浏览代码

添加主窗体控件设计与用户控件文件

wb_han 5 年之前
父节点
当前提交
07812198e3

+ 79 - 79
HOZProject/FormUnitControl.cs

@@ -1365,84 +1365,84 @@ namespace HOZProject
             lblstate6.Text = state.ToString();
             lblstate6.Text = state.ToString();
         }
         }
 
 
-        private void btnPost1_Click(object sender, EventArgs e)
-        {
-            double degree = 0;
-            int direction = 0;
-            int state = 0;
-            wr.Img_OffsetAngle_Direction("D:/aaaa.jpg", out degree, out direction, out state);
-            lbldegree1.Text = degree.ToString("0.0");
-            lbldirection1.Text = direction.ToString();
-            lblstate1.Text = state.ToString();
-        }
-
-        private void btnPost2_Click(object sender, EventArgs e)
-        {
-            double offsetx = 0;
-            double offsety = 0;
-            int state = 0;
-            wr.Img_Cut_Position("D:/aaaa.jpg", out offsetx, out offsety, out state);
-            lbllocationx.Text = offsetx.ToString("0.0");
-            lbllocationy.Text = offsety.ToString("0.0");
-            lblstate2.Text = state.ToString();
-        }
-
-        private void btnPost3_Click(object sender, EventArgs e)
-        {
-            int state = 0;
-            wr.Img_Cut_Success("D:/aaaa.jpg", "D:/bbbb.jpg", out state);
-            lblstate3.Text = state.ToString();
-        }
-
-        private void btnPost4_Click(object sender, EventArgs e)
-        {
-            double offsetx = 0;
-            double offsety = 0;
-            int state = 0;
-            wr.Img_Trapezoid_Top_Center_Position("D:/aaaa.jpg", out offsetx, out offsety, out state);
-            lbltopcx.Text = offsetx.ToString("0.0");
-            lbltopcy.Text = offsety.ToString("0.0");
-            lblstate4.Text = state.ToString();
-        }
-
-        private void btnPost5_Click(object sender, EventArgs e)
-        {
-            List<string> filenames = new List<string>();
-            filenames.Add("1111111");
-            filenames.Add("2222222");
-            filenames.Add("3333333");
-            lblfocuspath.Text = wr.Img_Auto_Focus(filenames);
-        }
-
-        private void btnPost6_Click(object sender, EventArgs e)
-        {
-            List<string> filenames = new List<string>();
-            filenames.Add("1111111");
-            filenames.Add("2222222");
-            filenames.Add("3333333");
-            lblstigpath.Text = wr.Img_Auto_Focus(filenames);
-        }
-
-        private void btnPost7_Click(object sender, EventArgs e)
-        {
-            double offsetx = 0;
-            double offsety = 0;
-            double degree = 0;
-            int direction = 0;
-            int state = 0;
-            wr.Img_Center_Position_OffsetAngle_Direction("D:/aaaa.jpg", out offsetx, out offsety, out degree, out direction, out state);
-            lblcenterx.Text = offsetx.ToString("0.0");
-            lblcentery.Text = offsety.ToString("0.0");
-            lbldegree2.Text = degree.ToString();
-            lbldirection2.Text = direction.ToString();
-            lblstate5.Text = state.ToString();
-        }
-
-        private void btnPost8_Click(object sender, EventArgs e)
-        {
-            int state = 0;
-            wr.Img_Measure_Size("D:/aaaa.jpg", "1000", "0.005", out state);
-            lblstate6.Text = state.ToString();
-        }
+        //private void btnPost1_Click(object sender, EventArgs e)
+        //{
+        //    double degree = 0;
+        //    int direction = 0;
+        //    int state = 0;
+        //    wr.Img_OffsetAngle_Direction("D:/aaaa.jpg", out degree, out direction, out state);
+        //    lbldegree1.Text = degree.ToString("0.0");
+        //    lbldirection1.Text = direction.ToString();
+        //    lblstate1.Text = state.ToString();
+        //}
+
+        //private void btnPost2_Click(object sender, EventArgs e)
+        //{
+        //    double offsetx = 0;
+        //    double offsety = 0;
+        //    int state = 0;
+        //    wr.Img_Cut_Position("D:/aaaa.jpg", out offsetx, out offsety, out state);
+        //    lbllocationx.Text = offsetx.ToString("0.0");
+        //    lbllocationy.Text = offsety.ToString("0.0");
+        //    lblstate2.Text = state.ToString();
+        //}
+
+        //private void btnPost3_Click(object sender, EventArgs e)
+        //{
+        //    int state = 0;
+        //    wr.Img_Cut_Success("D:/aaaa.jpg", "D:/bbbb.jpg", out state);
+        //    lblstate3.Text = state.ToString();
+        //}
+
+        //private void btnPost4_Click(object sender, EventArgs e)
+        //{
+        //    double offsetx = 0;
+        //    double offsety = 0;
+        //    int state = 0;
+        //    wr.Img_Trapezoid_Top_Center_Position("D:/aaaa.jpg", out offsetx, out offsety, out state);
+        //    lbltopcx.Text = offsetx.ToString("0.0");
+        //    lbltopcy.Text = offsety.ToString("0.0");
+        //    lblstate4.Text = state.ToString();
+        //}
+
+        //private void btnPost5_Click(object sender, EventArgs e)
+        //{
+        //    List<string> filenames = new List<string>();
+        //    filenames.Add("1111111");
+        //    filenames.Add("2222222");
+        //    filenames.Add("3333333");
+        //    lblfocuspath.Text = wr.Img_Auto_Focus(filenames);
+        //}
+
+        //private void btnPost6_Click(object sender, EventArgs e)
+        //{
+        //    List<string> filenames = new List<string>();
+        //    filenames.Add("1111111");
+        //    filenames.Add("2222222");
+        //    filenames.Add("3333333");
+        //    lblstigpath.Text = wr.Img_Auto_Focus(filenames);
+        //}
+
+        //private void btnPost7_Click(object sender, EventArgs e)
+        //{
+        //    double offsetx = 0;
+        //    double offsety = 0;
+        //    double degree = 0;
+        //    int direction = 0;
+        //    int state = 0;
+        //    wr.Img_Center_Position_OffsetAngle_Direction("D:/aaaa.jpg", out offsetx, out offsety, out degree, out direction, out state);
+        //    lblcenterx.Text = offsetx.ToString("0.0");
+        //    lblcentery.Text = offsety.ToString("0.0");
+        //    lbldegree2.Text = degree.ToString();
+        //    lbldirection2.Text = direction.ToString();
+        //    lblstate5.Text = state.ToString();
+        //}
+
+        //private void btnPost8_Click(object sender, EventArgs e)
+        //{
+        //    int state = 0;
+        //    wr.Img_Measure_Size("D:/aaaa.jpg", "1000", "0.005", out state);
+        //    lblstate6.Text = state.ToString();
+        //}
     }
     }
 }
 }

+ 1 - 1
HOZProject/Program.cs

@@ -17,7 +17,7 @@ namespace HOZProject
             Application.EnableVisualStyles();
             Application.EnableVisualStyles();
             Application.SetCompatibleTextRenderingDefault(false);
             Application.SetCompatibleTextRenderingDefault(false);
             //Application.Run(new FormUCMain());
             //Application.Run(new FormUCMain());
-            Application.Run(new FormUnitControl());
+            Application.Run(new FormHOZMain());
             //Application.Run(new FormMeasureTest());
             //Application.Run(new FormMeasureTest());
         }
         }
     }
     }

+ 40 - 0
HOZProject/Properties/Resources.Designer.cs

@@ -150,6 +150,26 @@ namespace HOZProject.Properties {
             }
             }
         }
         }
         
         
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        internal static System.Drawing.Bitmap init {
+            get {
+                object obj = ResourceManager.GetObject("init", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        internal static System.Drawing.Bitmap Log {
+            get {
+                object obj = ResourceManager.GetObject("Log", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
         /// <summary>
         /// <summary>
         ///   查找 System.Drawing.Bitmap 类型的本地化资源。
         ///   查找 System.Drawing.Bitmap 类型的本地化资源。
         /// </summary>
         /// </summary>
@@ -190,6 +210,26 @@ namespace HOZProject.Properties {
             }
             }
         }
         }
         
         
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        internal static System.Drawing.Bitmap open {
+            get {
+                object obj = ResourceManager.GetObject("open", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        internal static System.Drawing.Bitmap save {
+            get {
+                object obj = ResourceManager.GetObject("save", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
         /// <summary>
         /// <summary>
         ///   查找 System.Drawing.Bitmap 类型的本地化资源。
         ///   查找 System.Drawing.Bitmap 类型的本地化资源。
         /// </summary>
         /// </summary>

+ 12 - 0
HOZProject/Properties/Resources.resx

@@ -163,4 +163,16 @@
   <data name="GetImage" type="System.Resources.ResXFileRef, System.Windows.Forms">
   <data name="GetImage" type="System.Resources.ResXFileRef, System.Windows.Forms">
     <value>..\Resources\GetImage.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
     <value>..\Resources\GetImage.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
   </data>
   </data>
+  <data name="init" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\init.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="Log" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\Log.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="open" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\open.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
+  <data name="save" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\save.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
 </root>
 </root>

+ 78 - 0
HOZProject/UnitControl.csproj

@@ -47,6 +47,13 @@
     <Reference Include="System.Xml" />
     <Reference Include="System.Xml" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
+    <Compile Include="Colors\TextColors.cs" />
+    <Compile Include="FormHOZMain.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FormHOZMain.Designer.cs">
+      <DependentUpon>FormHOZMain.cs</DependentUpon>
+    </Compile>
     <Compile Include="FormShowImage.cs">
     <Compile Include="FormShowImage.cs">
       <SubType>Form</SubType>
       <SubType>Form</SubType>
     </Compile>
     </Compile>
@@ -65,8 +72,49 @@
     <Compile Include="FormUnitControl.Designer.cs">
     <Compile Include="FormUnitControl.Designer.cs">
       <DependentUpon>FormUnitControl.cs</DependentUpon>
       <DependentUpon>FormUnitControl.cs</DependentUpon>
     </Compile>
     </Compile>
+    <Compile Include="Helpers\ControlHelper.cs" />
+    <Compile Include="Helpers\NativeMethods.cs" />
     <Compile Include="Program.cs" />
     <Compile Include="Program.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="UserControls\UControl_CutHole.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="UserControls\UControl_CutHole.Designer.cs">
+      <DependentUpon>UControl_CutHole.cs</DependentUpon>
+    </Compile>
+    <Compile Include="UserControls\UControl_Init.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="UserControls\UControl_Init.Designer.cs">
+      <DependentUpon>UControl_Init.cs</DependentUpon>
+    </Compile>
+    <Compile Include="UserControls\UControl_Log.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="UserControls\UControl_Log.Designer.cs">
+      <DependentUpon>UControl_Log.cs</DependentUpon>
+    </Compile>
+    <Compile Include="UserControls\UControl_ParaInfo.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="UserControls\UControl_ParaInfo.Designer.cs">
+      <DependentUpon>UControl_ParaInfo.cs</DependentUpon>
+    </Compile>
+    <Compile Include="UserControls\UControl_Process.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="UserControls\UControl_Process.Designer.cs">
+      <DependentUpon>UControl_Process.cs</DependentUpon>
+    </Compile>
+    <Compile Include="UserControls\UCTimeLine.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="UserControls\UCTimeLine.designer.cs">
+      <DependentUpon>UCTimeLine.cs</DependentUpon>
+    </Compile>
+    <EmbeddedResource Include="FormHOZMain.resx">
+      <DependentUpon>FormHOZMain.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="FormShowImage.resx">
     <EmbeddedResource Include="FormShowImage.resx">
       <DependentUpon>FormShowImage.cs</DependentUpon>
       <DependentUpon>FormShowImage.cs</DependentUpon>
     </EmbeddedResource>
     </EmbeddedResource>
@@ -86,6 +134,24 @@
       <DependentUpon>Resources.resx</DependentUpon>
       <DependentUpon>Resources.resx</DependentUpon>
       <DesignTime>True</DesignTime>
       <DesignTime>True</DesignTime>
     </Compile>
     </Compile>
+    <EmbeddedResource Include="UserControls\UControl_CutHole.resx">
+      <DependentUpon>UControl_CutHole.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="UserControls\UControl_Init.resx">
+      <DependentUpon>UControl_Init.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="UserControls\UControl_Log.resx">
+      <DependentUpon>UControl_Log.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="UserControls\UControl_ParaInfo.resx">
+      <DependentUpon>UControl_ParaInfo.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="UserControls\UControl_Process.resx">
+      <DependentUpon>UControl_Process.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="UserControls\UCTimeLine.resx">
+      <DependentUpon>UCTimeLine.cs</DependentUpon>
+    </EmbeddedResource>
     <None Include="Properties\Settings.settings">
     <None Include="Properties\Settings.settings">
       <Generator>SettingsSingleFileGenerator</Generator>
       <Generator>SettingsSingleFileGenerator</Generator>
       <LastGenOutput>Settings.Designer.cs</LastGenOutput>
       <LastGenOutput>Settings.Designer.cs</LastGenOutput>
@@ -166,5 +232,17 @@
   <ItemGroup>
   <ItemGroup>
     <None Include="Resources\GetImage.jpg" />
     <None Include="Resources\GetImage.jpg" />
   </ItemGroup>
   </ItemGroup>
+  <ItemGroup>
+    <None Include="Resources\open.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="Resources\save.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="Resources\init.png" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="Resources\Log.png" />
+  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
 </Project>
 </Project>