Pārlūkot izejas kodu

add Find MovieItem in URL which is user input

unknown 10 gadi atpakaļ
vecāks
revīzija
64d7fcf41b

+ 14 - 0
ASYC/obj/Debug/ASYC.csproj.FileListAbsolute.txt

@@ -25,3 +25,17 @@ E:\Codes\AVsorter\AVsorter\ASYC\obj\Debug\ASYC.Properties.Resources.resources
 E:\Codes\AVsorter\AVsorter\ASYC\obj\Debug\ASYC.csproj.GenerateResource.Cache
 E:\Codes\AVsorter\AVsorter\ASYC\obj\Debug\ASYC.exe
 E:\Codes\AVsorter\AVsorter\ASYC\obj\Debug\ASYC.pdb
+C:\Users\jojo\Desktop\codes\avsorter\ASYC\bin\Debug\DB\AVDB.accdb
+C:\Users\jojo\Desktop\codes\avsorter\ASYC\bin\Debug\ASYC.exe
+C:\Users\jojo\Desktop\codes\avsorter\ASYC\bin\Debug\ASYC.pdb
+C:\Users\jojo\Desktop\codes\avsorter\ASYC\bin\Debug\Entity.dll
+C:\Users\jojo\Desktop\codes\avsorter\ASYC\bin\Debug\Gets.dll
+C:\Users\jojo\Desktop\codes\avsorter\ASYC\bin\Debug\HtmlAgilityPack.dll
+C:\Users\jojo\Desktop\codes\avsorter\ASYC\bin\Debug\Gets.pdb
+C:\Users\jojo\Desktop\codes\avsorter\ASYC\bin\Debug\Entity.pdb
+C:\Users\jojo\Desktop\codes\avsorter\ASYC\obj\Debug\ASYC.Form1.resources
+C:\Users\jojo\Desktop\codes\avsorter\ASYC\obj\Debug\ASYC.Properties.Resources.resources
+C:\Users\jojo\Desktop\codes\avsorter\ASYC\obj\Debug\ASYC.csproj.GenerateResource.Cache
+C:\Users\jojo\Desktop\codes\avsorter\ASYC\obj\Debug\ASYC.exe
+C:\Users\jojo\Desktop\codes\avsorter\ASYC\obj\Debug\ASYC.pdb
+C:\Users\jojo\Desktop\codes\avsorter\ASYC\obj\Debug\ASYC.csprojResolveAssemblyReference.cache

BIN
ASYC/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache


+ 14 - 14
AVsorter.sln

@@ -1,14 +1,14 @@
 
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 2012
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PicSo", "PicSo\PicSo.csproj", "{1A9F40ED-0402-4145-9140-0C153B989983}"
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Gets", "Arzon\Gets.csproj", "{9262F4C4-2D81-41AB-A444-57D3A21CEA9B}"
-EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Entity", "Entity\Entity.csproj", "{21D25A8A-680F-4C0A-815B-AE394905A64A}"
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ASYC", "ASYC\ASYC.csproj", "{4EAD9001-7E4B-4639-A3A4-C5DF4A09A943}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Gets", "Arzon\Gets.csproj", "{9262F4C4-2D81-41AB-A444-57D3A21CEA9B}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -29,16 +29,6 @@ Global
 		{1A9F40ED-0402-4145-9140-0C153B989983}.Release|Mixed Platforms.Build.0 = Release|x86
 		{1A9F40ED-0402-4145-9140-0C153B989983}.Release|x86.ActiveCfg = Release|x86
 		{1A9F40ED-0402-4145-9140-0C153B989983}.Release|x86.Build.0 = Release|x86
-		{9262F4C4-2D81-41AB-A444-57D3A21CEA9B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{9262F4C4-2D81-41AB-A444-57D3A21CEA9B}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{9262F4C4-2D81-41AB-A444-57D3A21CEA9B}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
-		{9262F4C4-2D81-41AB-A444-57D3A21CEA9B}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
-		{9262F4C4-2D81-41AB-A444-57D3A21CEA9B}.Debug|x86.ActiveCfg = Debug|Any CPU
-		{9262F4C4-2D81-41AB-A444-57D3A21CEA9B}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{9262F4C4-2D81-41AB-A444-57D3A21CEA9B}.Release|Any CPU.Build.0 = Release|Any CPU
-		{9262F4C4-2D81-41AB-A444-57D3A21CEA9B}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
-		{9262F4C4-2D81-41AB-A444-57D3A21CEA9B}.Release|Mixed Platforms.Build.0 = Release|Any CPU
-		{9262F4C4-2D81-41AB-A444-57D3A21CEA9B}.Release|x86.ActiveCfg = Release|Any CPU
 		{21D25A8A-680F-4C0A-815B-AE394905A64A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{21D25A8A-680F-4C0A-815B-AE394905A64A}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{21D25A8A-680F-4C0A-815B-AE394905A64A}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
@@ -59,6 +49,16 @@ Global
 		{4EAD9001-7E4B-4639-A3A4-C5DF4A09A943}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
 		{4EAD9001-7E4B-4639-A3A4-C5DF4A09A943}.Release|Mixed Platforms.Build.0 = Release|Any CPU
 		{4EAD9001-7E4B-4639-A3A4-C5DF4A09A943}.Release|x86.ActiveCfg = Release|Any CPU
+		{9262F4C4-2D81-41AB-A444-57D3A21CEA9B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{9262F4C4-2D81-41AB-A444-57D3A21CEA9B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{9262F4C4-2D81-41AB-A444-57D3A21CEA9B}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+		{9262F4C4-2D81-41AB-A444-57D3A21CEA9B}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+		{9262F4C4-2D81-41AB-A444-57D3A21CEA9B}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{9262F4C4-2D81-41AB-A444-57D3A21CEA9B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{9262F4C4-2D81-41AB-A444-57D3A21CEA9B}.Release|Any CPU.Build.0 = Release|Any CPU
+		{9262F4C4-2D81-41AB-A444-57D3A21CEA9B}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+		{9262F4C4-2D81-41AB-A444-57D3A21CEA9B}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+		{9262F4C4-2D81-41AB-A444-57D3A21CEA9B}.Release|x86.ActiveCfg = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE

+ 22 - 0
Arzon/Arzon.cs

@@ -429,5 +429,27 @@ namespace Gets
             ar.wc.m_container = value as System.Net.CookieContainer;
             return ar;
         }
+
+        public List<MovieBasic> FindInURL(string url)
+        {
+            HtmlAgilityPack.HtmlDocument doc = new HtmlDocument();
+            doc.LoadHtml(wc.GetHTML(new Uri(url)));
+            var nodes = doc.DocumentNode.SelectNodes("//div[@class='pictlist']");
+            List<MovieBasic> list = new List<MovieBasic>();
+            if ( nodes==null)
+            {
+                return list;
+            }
+            foreach (var item in nodes)
+            {
+                 var itemurl = "http://www.arzon.jp" + item.SelectSingleNode(".//dt/a").Attributes["href"].Value.ToString().Trim();
+                 var title = item.SelectSingleNode(".//dt/a").Attributes["title"].Value.ToString().Trim();
+                 var img = item.SelectSingleNode(".//img[1]").Attributes["src"].Value.ToString().Trim();
+
+                 list.Add(new MovieBasic() { ItemURL = itemurl, Img_s = img, Title = title });
+            }
+            return list;
+        }
+
     }
 }

BIN
Entity/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache


+ 7 - 0
Entity/obj/Debug/Entity.csproj.FileListAbsolute.txt

@@ -33,3 +33,10 @@ E:\Codes\AVsorter\AVsorter\Entity\obj\Debug\AVSORTER.Properties.Resources.resour
 E:\Codes\AVsorter\AVsorter\Entity\obj\Debug\Entity.csproj.GenerateResource.Cache
 E:\Codes\AVsorter\AVsorter\Entity\obj\Debug\Entity.dll
 E:\Codes\AVsorter\AVsorter\Entity\obj\Debug\Entity.pdb
+C:\Users\jojo\Desktop\codes\avsorter\Entity\bin\Debug\DB\AVDB.accdb
+C:\Users\jojo\Desktop\codes\avsorter\Entity\bin\Debug\Entity.dll
+C:\Users\jojo\Desktop\codes\avsorter\Entity\bin\Debug\Entity.pdb
+C:\Users\jojo\Desktop\codes\avsorter\Entity\obj\Debug\AVSORTER.Properties.Resources.resources
+C:\Users\jojo\Desktop\codes\avsorter\Entity\obj\Debug\Entity.csproj.GenerateResource.Cache
+C:\Users\jojo\Desktop\codes\avsorter\Entity\obj\Debug\Entity.dll
+C:\Users\jojo\Desktop\codes\avsorter\Entity\obj\Debug\Entity.pdb

+ 64 - 25
PicSo/Form1.Designer.cs

@@ -59,20 +59,24 @@
             this.label2 = new System.Windows.Forms.Label();
             this.txt_sub = new System.Windows.Forms.TextBox();
             this.label1 = new System.Windows.Forms.Label();
-            this.bc = new AVSORTER.BasicContainer();
             this.tabControl1 = new System.Windows.Forms.TabControl();
             this.tabPage2 = new System.Windows.Forms.TabPage();
             this.listBox1 = new System.Windows.Forms.ListBox();
             this.cb_AutoCorrect = new System.Windows.Forms.CheckBox();
-            this.movieContainer1 = new PicSo.MovieContainer();
             this.btn_LocalSearch = new System.Windows.Forms.Button();
             this.txt_LocalSearchKeyWord = new System.Windows.Forms.TextBox();
+            this.tabPage3 = new System.Windows.Forms.TabPage();
+            this.txt_url = new System.Windows.Forms.TextBox();
+            this.btnFind = new System.Windows.Forms.Button();
+            this.bc = new AVSORTER.BasicContainer();
+            this.movieContainer1 = new PicSo.MovieContainer();
             this.contextMenuStrip1.SuspendLayout();
             this.tabPage1.SuspendLayout();
             this.groupBox2.SuspendLayout();
             this.groupBox1.SuspendLayout();
             this.tabControl1.SuspendLayout();
             this.tabPage2.SuspendLayout();
+            this.tabPage3.SuspendLayout();
             this.SuspendLayout();
             // 
             // contextMenuStrip1
@@ -369,22 +373,11 @@
             this.label1.TabIndex = 12;
             this.label1.Text = "目标路径";
             // 
-            // bc
-            // 
-            this.bc.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
-            this.bc.IsShowPic = false;
-            this.bc.ListMovieBasic = null;
-            this.bc.Location = new System.Drawing.Point(6, 341);
-            this.bc.MovieB = null;
-            this.bc.Name = "bc";
-            this.bc.Size = new System.Drawing.Size(411, 180);
-            this.bc.TabIndex = 7;
-            this.bc.Load += new System.EventHandler(this.bc_Load);
-            // 
             // tabControl1
             // 
             this.tabControl1.Controls.Add(this.tabPage1);
             this.tabControl1.Controls.Add(this.tabPage2);
+            this.tabControl1.Controls.Add(this.tabPage3);
             this.tabControl1.Location = new System.Drawing.Point(12, 12);
             this.tabControl1.Name = "tabControl1";
             this.tabControl1.SelectedIndex = 0;
@@ -395,9 +388,9 @@
             // 
             this.tabPage2.Controls.Add(this.listBox1);
             this.tabPage2.Controls.Add(this.cb_AutoCorrect);
-            this.tabPage2.Controls.Add(this.movieContainer1);
             this.tabPage2.Controls.Add(this.btn_LocalSearch);
             this.tabPage2.Controls.Add(this.txt_LocalSearchKeyWord);
+            this.tabPage2.Controls.Add(this.movieContainer1);
             this.tabPage2.Location = new System.Drawing.Point(4, 22);
             this.tabPage2.Name = "tabPage2";
             this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
@@ -428,16 +421,6 @@
             this.cb_AutoCorrect.Text = "自动改正";
             this.cb_AutoCorrect.UseVisualStyleBackColor = true;
             // 
-            // movieContainer1
-            // 
-            this.movieContainer1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
-            this.movieContainer1.Location = new System.Drawing.Point(6, 176);
-            this.movieContainer1.Movie = null;
-            this.movieContainer1.MovieList = null;
-            this.movieContainer1.Name = "movieContainer1";
-            this.movieContainer1.Size = new System.Drawing.Size(913, 375);
-            this.movieContainer1.TabIndex = 2;
-            // 
             // btn_LocalSearch
             // 
             this.btn_LocalSearch.Location = new System.Drawing.Point(309, 4);
@@ -456,6 +439,57 @@
             this.txt_LocalSearchKeyWord.TabIndex = 0;
             this.txt_LocalSearchKeyWord.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txt_LocalSearchKeyWord_KeyPress);
             // 
+            // tabPage3
+            // 
+            this.tabPage3.Controls.Add(this.btnFind);
+            this.tabPage3.Controls.Add(this.txt_url);
+            this.tabPage3.Location = new System.Drawing.Point(4, 22);
+            this.tabPage3.Name = "tabPage3";
+            this.tabPage3.Padding = new System.Windows.Forms.Padding(3);
+            this.tabPage3.Size = new System.Drawing.Size(965, 557);
+            this.tabPage3.TabIndex = 2;
+            this.tabPage3.Text = "tabPage3";
+            this.tabPage3.UseVisualStyleBackColor = true;
+            // 
+            // txt_url
+            // 
+            this.txt_url.Location = new System.Drawing.Point(6, 6);
+            this.txt_url.Name = "txt_url";
+            this.txt_url.Size = new System.Drawing.Size(414, 21);
+            this.txt_url.TabIndex = 0;
+            // 
+            // btnFind
+            // 
+            this.btnFind.Location = new System.Drawing.Point(426, 6);
+            this.btnFind.Name = "btnFind";
+            this.btnFind.Size = new System.Drawing.Size(75, 23);
+            this.btnFind.TabIndex = 1;
+            this.btnFind.Text = "btn_Find";
+            this.btnFind.UseVisualStyleBackColor = true;
+            this.btnFind.Click += new System.EventHandler(this.btnFind_Click);
+            // 
+            // bc
+            // 
+            this.bc.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+            this.bc.IsShowPic = false;
+            this.bc.ListMovieBasic = null;
+            this.bc.Location = new System.Drawing.Point(6, 341);
+            this.bc.MovieB = null;
+            this.bc.Name = "bc";
+            this.bc.Size = new System.Drawing.Size(411, 180);
+            this.bc.TabIndex = 7;
+            this.bc.Load += new System.EventHandler(this.bc_Load);
+            // 
+            // movieContainer1
+            // 
+            this.movieContainer1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+            this.movieContainer1.Location = new System.Drawing.Point(6, 176);
+            this.movieContainer1.Movie = null;
+            this.movieContainer1.MovieList = null;
+            this.movieContainer1.Name = "movieContainer1";
+            this.movieContainer1.Size = new System.Drawing.Size(913, 375);
+            this.movieContainer1.TabIndex = 2;
+            // 
             // Form1
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -479,6 +513,8 @@
             this.tabControl1.ResumeLayout(false);
             this.tabPage2.ResumeLayout(false);
             this.tabPage2.PerformLayout();
+            this.tabPage3.ResumeLayout(false);
+            this.tabPage3.PerformLayout();
             this.ResumeLayout(false);
             this.PerformLayout();
 
@@ -523,6 +559,9 @@
         private System.Windows.Forms.CheckBox cb_AutoCorrect;
         private System.Windows.Forms.Button btn_rebuild;
         private System.Windows.Forms.ListBox listBox1;
+        private System.Windows.Forms.TabPage tabPage3;
+        private System.Windows.Forms.Button btnFind;
+        private System.Windows.Forms.TextBox txt_url;
     }
 }
 

+ 9 - 0
PicSo/Form1.cs

@@ -427,6 +427,15 @@ namespace PicSo
         }
         #endregion
 
+        #region Page3
+
+        private void btnFind_Click(object sender, EventArgs e)
+        {
+            var mvbs = arzon.FindInURL(txt_url.Text);
+            MessageBox.Show("Test");
+        }
+
+        #endregion
 
 
 

+ 2 - 3
PicSo/PicSo.csproj

@@ -38,9 +38,8 @@
     <ApplicationIcon>1414496318_339862.ico</ApplicationIcon>
   </PropertyGroup>
   <ItemGroup>
-    <Reference Include="HtmlAgilityPack, Version=1.4.6.0, Culture=neutral, PublicKeyToken=bd319b19eaf3b43a, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>bin\Debug\HtmlAgilityPack.dll</HintPath>
+    <Reference Include="HtmlAgilityPack">
+      <HintPath>..\Arzon\HtmlAgilityPack.dll</HintPath>
     </Reference>
     <Reference Include="System" />
     <Reference Include="System.Core" />

BIN
PicSo/bin/Debug/PicSo.vshost.exe


BIN
PicSo/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache


BIN
PicSo/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache


+ 19 - 0
PicSo/obj/x86/Debug/PicSo.csproj.FileListAbsolute.txt

@@ -16,3 +16,22 @@ E:\Codes\AVsorter\AVsorter\PicSo\obj\x86\Debug\PicSo.Tester.resources
 E:\Codes\AVsorter\AVsorter\PicSo\obj\x86\Debug\PicSo.csproj.GenerateResource.Cache
 E:\Codes\AVsorter\AVsorter\PicSo\obj\x86\Debug\PicSo.exe
 E:\Codes\AVsorter\AVsorter\PicSo\obj\x86\Debug\PicSo.pdb
+C:\Users\jojo\Desktop\codes\avsorter\PicSo\bin\Debug\PicSo.exe.config
+C:\Users\jojo\Desktop\codes\avsorter\PicSo\obj\x86\Debug\AVSORTER.BasicContainer.resources
+C:\Users\jojo\Desktop\codes\avsorter\PicSo\obj\x86\Debug\PicSo.Form1.resources
+C:\Users\jojo\Desktop\codes\avsorter\PicSo\obj\x86\Debug\PicSo.InputBox.resources
+C:\Users\jojo\Desktop\codes\avsorter\PicSo\obj\x86\Debug\PicSo.MovieContainer.resources
+C:\Users\jojo\Desktop\codes\avsorter\PicSo\obj\x86\Debug\PicSo.Properties.Resources.resources
+C:\Users\jojo\Desktop\codes\avsorter\PicSo\obj\x86\Debug\PicSo.Tester.resources
+C:\Users\jojo\Desktop\codes\avsorter\PicSo\obj\x86\Debug\PicSo.csproj.GenerateResource.Cache
+C:\Users\jojo\Desktop\codes\avsorter\PicSo\obj\x86\Debug\PicSo.csprojResolveAssemblyReference.cache
+C:\Users\jojo\Desktop\codes\avsorter\PicSo\bin\Debug\DB\AVDB.accdb
+C:\Users\jojo\Desktop\codes\avsorter\PicSo\bin\Debug\PicSo.exe
+C:\Users\jojo\Desktop\codes\avsorter\PicSo\bin\Debug\PicSo.pdb
+C:\Users\jojo\Desktop\codes\avsorter\PicSo\bin\Debug\Entity.dll
+C:\Users\jojo\Desktop\codes\avsorter\PicSo\bin\Debug\Gets.dll
+C:\Users\jojo\Desktop\codes\avsorter\PicSo\bin\Debug\HtmlAgilityPack.dll
+C:\Users\jojo\Desktop\codes\avsorter\PicSo\bin\Debug\Gets.pdb
+C:\Users\jojo\Desktop\codes\avsorter\PicSo\bin\Debug\Entity.pdb
+C:\Users\jojo\Desktop\codes\avsorter\PicSo\obj\x86\Debug\PicSo.exe
+C:\Users\jojo\Desktop\codes\avsorter\PicSo\obj\x86\Debug\PicSo.pdb