| LB_SmartVision/Forms/Pages/HistoricalDataPage/HistoricalDataEditPage.Designer.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| LB_SmartVision/Forms/Pages/HistoricalDataPage/HistoricalDataEditPage.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| LB_SmartVision/Program.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| LB_SmartVisionLoginUI/LB_SmartVisionLoginUI.csproj | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| LB_SmartVisionLoginUI/MainWindow.xaml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
LB_SmartVision/Forms/Pages/HistoricalDataPage/HistoricalDataEditPage.Designer.cs
@@ -106,7 +106,6 @@ tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Percent, 50F)); tableLayoutPanel2.Size = new Size(854, 500); tableLayoutPanel2.TabIndex = 0; tableLayoutPanel2.Paint += tableLayoutPanel2_Paint; // // tableLayoutPanel3 // @@ -120,8 +119,8 @@ tableLayoutPanel3.RowCount = 3; tableLayoutPanel3.RowStyles.Add(new RowStyle(SizeType.Absolute, 45F)); tableLayoutPanel3.RowStyles.Add(new RowStyle(SizeType.Absolute, 90F)); tableLayoutPanel3.RowStyles.Add(new RowStyle(SizeType.Absolute, 200F)); tableLayoutPanel3.Size = new Size(334, 305); tableLayoutPanel3.RowStyles.Add(new RowStyle(SizeType.Absolute, 45F)); tableLayoutPanel3.Size = new Size(334, 180); tableLayoutPanel3.TabIndex = 0; // // tableLayoutPanelSN @@ -135,7 +134,7 @@ tableLayoutPanelSN.Name = "tableLayoutPanelSN"; tableLayoutPanelSN.RowCount = 1; tableLayoutPanelSN.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); tableLayoutPanelSN.Size = new Size(328, 45); tableLayoutPanelSN.Size = new Size(328, 39); tableLayoutPanelSN.TabIndex = 7; // // labelSN @@ -145,7 +144,7 @@ labelSN.ForeColor = SystemColors.Control; labelSN.Location = new Point(3, 0); labelSN.Name = "labelSN"; labelSN.Size = new Size(129, 45); labelSN.Size = new Size(129, 39); labelSN.TabIndex = 6; labelSN.Text = "SN号"; labelSN.TextAlign = ContentAlignment.MiddleLeft; @@ -195,6 +194,7 @@ comboBoxSearchBasis.Name = "comboBoxSearchBasis"; comboBoxSearchBasis.Size = new Size(187, 28); comboBoxSearchBasis.TabIndex = 1; comboBoxSearchBasis.SelectedIndexChanged += comboBoxSearchBasis_SelectedIndexChanged; // // contentContainer // @@ -227,6 +227,8 @@ dateTimePickerEnd.Dock = DockStyle.Fill; dateTimePickerEnd.Location = new Point(138, 50); dateTimePickerEnd.Margin = new Padding(3, 5, 3, 3); dateTimePickerEnd.MaxDate = new DateTime(2100, 1, 1, 0, 0, 0, 0); dateTimePickerEnd.MinDate = new DateTime(2020, 1, 1, 0, 0, 0, 0); dateTimePickerEnd.Name = "dateTimePickerEnd"; dateTimePickerEnd.Size = new Size(187, 30); dateTimePickerEnd.TabIndex = 9; @@ -236,9 +238,12 @@ dateTimePickerStart.Dock = DockStyle.Fill; dateTimePickerStart.Location = new Point(138, 5); dateTimePickerStart.Margin = new Padding(3, 5, 3, 3); dateTimePickerStart.MaxDate = new DateTime(2100, 1, 1, 0, 0, 0, 0); dateTimePickerStart.MinDate = new DateTime(2020, 1, 1, 0, 0, 0, 0); dateTimePickerStart.Name = "dateTimePickerStart"; dateTimePickerStart.Size = new Size(187, 30); dateTimePickerStart.TabIndex = 8; dateTimePickerStart.ValueChanged += dateTimePickerStart_ValueChanged; // // labelEndTime // @@ -335,6 +340,7 @@ Name = "HistoricalDataEditPage"; Size = new Size(866, 580); grpHisData.ResumeLayout(false); grpHisData.PerformLayout(); tableLayoutPanel1.ResumeLayout(false); tableLayoutPanel2.ResumeLayout(false); tableLayoutPanel3.ResumeLayout(false); @@ -362,11 +368,11 @@ private ReaLTaiizor.Controls.HopeButton hopeButton2; private TableLayoutPanel tableLayoutPanel5; private Label labelSearchBasis; private ComboBox comboBoxSearchBasis; private Panel contentContainer; private TableLayoutPanel tableLayoutPanelSN; private Label labelSN; private TextBox textBoxSN; private ComboBox comboBoxSearchBasis; private Panel contentContainer; private TableLayoutPanel tableLayoutPanelTimeSearch; private DateTimePicker dateTimePickerEnd; private DateTimePicker dateTimePickerStart; LB_SmartVision/Forms/Pages/HistoricalDataPage/HistoricalDataEditPage.cs
@@ -15,17 +15,26 @@ { public Action<string, LogInfoType> LogInfo; private Panel currentContentPanel; private int row2OriginalHeight; private int row3OriginalHeight; public HistoricalDataEditPage() { Name = "HistoricalDataEditPage"; Text = "历史数据查询"; InitializeComponent(); // 保存原始行高度 row2OriginalHeight = (int)tableLayoutPanel3.RowStyles[1].Height; row3OriginalHeight = (int)tableLayoutPanel3.RowStyles[2].Height; InitializeDataGridView(); InitializeComboBox(); } /// <summary> /// 数据显示表格初始化 /// </summary> private void InitializeDataGridView() { // 设置DataGridView列宽 @@ -65,6 +74,9 @@ dataGridViewHD.RowHeadersVisible = true; } /// <summary> /// 选择依据下拉框初始化 /// </summary> private void InitializeComboBox() { comboBoxSearchBasis.Items.Add("日期"); @@ -74,9 +86,70 @@ comboBoxSearchBasis.SelectedIndex = 0; } private void tableLayoutPanel2_Paint(object sender, PaintEventArgs e) /// <summary> /// 下拉框控制选项视图变换 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void comboBoxSearchBasis_SelectedIndexChanged(object sender, EventArgs e) { ComboBox cb = sender as ComboBox; if (cb.SelectedIndex == 0) { ShowRow2(); } else if (cb.SelectedIndex == 1) { ShowRow3(); } } private void ShowRow2() { // 显示Row2(恢复高度) tableLayoutPanel3.RowStyles[1].SizeType = SizeType.Absolute; tableLayoutPanel3.RowStyles[1].Height = row2OriginalHeight; // 隐藏Row3(高度设为0) tableLayoutPanel3.RowStyles[2].SizeType = SizeType.Absolute; tableLayoutPanel3.RowStyles[2].Height = 0; // 显示Row2中的控件 foreach (Control ctrl in tableLayoutPanel3.Controls) { int row = tableLayoutPanel3.GetRow(ctrl); if (row == 1) ctrl.Visible = true; else if (row == 2) ctrl.Visible = false; } } private void ShowRow3() { // 隐藏Row2(高度设为0) tableLayoutPanel3.RowStyles[1].SizeType = SizeType.Absolute; tableLayoutPanel3.RowStyles[1].Height = 0; // 显示Row3(恢复高度) tableLayoutPanel3.RowStyles[2].SizeType = SizeType.Absolute; tableLayoutPanel3.RowStyles[2].Height = row3OriginalHeight; // 显示Row3中的控件 foreach (Control ctrl in tableLayoutPanel3.Controls) { int row = tableLayoutPanel3.GetRow(ctrl); if (row == 1) ctrl.Visible = false; else if (row == 2) ctrl.Visible = true; } } private void dateTimePickerStart_ValueChanged(object sender, EventArgs e) { dateTimePickerEnd.MinDate = dateTimePickerStart.Value; } } } LB_SmartVision/Program.cs
@@ -24,21 +24,26 @@ System.Threading.Mutex mutex = new System.Threading.Mutex(true, System.Windows.Forms.Application.ProductName, out ret); if (ret) { ////登录验证权限 MainWindow.InstanceLoginandConfirmation().ShowDialog(); if (!MainWindow.InstanceLoginandConfirmation().isQuit && MainWindow.InstanceLoginandConfirmation().correctUser) { MainWindow.InstanceLoginandConfirmation().closeLoginFrm(); Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); System.Windows.Forms.Application.EnableVisualStyles(); System.Windows.Forms.Application.SetCompatibleTextRenderingDefault(false); System.Windows.Forms.Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException); System.Windows.Forms.Application.ThreadException += (sender, e) => HandleException(e.Exception); AppDomain.CurrentDomain.UnhandledException += (sender, e) => HandleException(e.ExceptionObject as Exception); // To customize application configuration such as set high DPI settings or default font, // see https://aka.ms/applicationconfiguration. System.Windows.Forms.Application.Run(new VisionForm()); } // Main 为你程序的主窗体,如果是控制台程序不用这句 else { MainWindow.InstanceLoginandConfirmation().closeLoginFrm(); } //// Main 为你程序的主窗体,如果是控制台程序不用这句 Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); System.Windows.Forms.Application.EnableVisualStyles(); System.Windows.Forms.Application.SetCompatibleTextRenderingDefault(false); System.Windows.Forms.Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException); System.Windows.Forms.Application.ThreadException += (sender, e) => HandleException(e.Exception); AppDomain.CurrentDomain.UnhandledException += (sender, e) => HandleException(e.ExceptionObject as Exception); //// To customize application configuration such as set high DPI settings or default font, //// see https://aka.ms/applicationconfiguration. System.Windows.Forms.Application.Run(new VisionForm()); mutex.ReleaseMutex(); } else LB_SmartVisionLoginUI/LB_SmartVisionLoginUI.csproj
@@ -10,7 +10,80 @@ </PropertyGroup> <ItemGroup> <None Remove="favicon.ico" /> <None Remove="images\01.JPG" /> <None Remove="images\02.png" /> <None Remove="images\03.png" /> <None Remove="images\04.png" /> <None Remove="images\05.png" /> <None Remove="images\06.png" /> <None Remove="images\07.png" /> <None Remove="images\favicon.ico" /> <None Remove="images\lanbao.jpg" /> <None Remove="images\logo.ico" /> <None Remove="images\logo_h.png" /> <None Remove="images\键盘.ico" /> <None Remove="lanbao.jpg" /> <None Remove="logo.ico" /> <None Remove="logo_h.png" /> </ItemGroup> <ItemGroup> <Resource Include="favicon.ico"> <CopyToOutputDirectory></CopyToOutputDirectory> </Resource> <Resource Include="images\01.JPG"> <CopyToOutputDirectory></CopyToOutputDirectory> </Resource> <Resource Include="images\02.png"> <CopyToOutputDirectory></CopyToOutputDirectory> </Resource> <Resource Include="images\03.png"> <CopyToOutputDirectory></CopyToOutputDirectory> </Resource> <Resource Include="images\04.png"> <CopyToOutputDirectory></CopyToOutputDirectory> </Resource> <Resource Include="images\05.png"> <CopyToOutputDirectory></CopyToOutputDirectory> </Resource> <Resource Include="images\06.png"> <CopyToOutputDirectory></CopyToOutputDirectory> </Resource> <Resource Include="images\07.png"> <CopyToOutputDirectory></CopyToOutputDirectory> </Resource> <Resource Include="images\favicon.ico"> <CopyToOutputDirectory></CopyToOutputDirectory> </Resource> <Resource Include="images\lanbao.jpg"> <CopyToOutputDirectory></CopyToOutputDirectory> </Resource> <Resource Include="images\logo.ico"> <CopyToOutputDirectory></CopyToOutputDirectory> </Resource> <Resource Include="images\logo_h.png"> <CopyToOutputDirectory></CopyToOutputDirectory> </Resource> <Resource Include="images\键盘.ico"> <CopyToOutputDirectory></CopyToOutputDirectory> </Resource> </ItemGroup> <ItemGroup> <ProjectReference Include="..\LB_SmartVisionCommon\LB_SmartVisionCommon.csproj" /> </ItemGroup> <ItemGroup> <Resource Include="lanbao.jpg"> <CopyToOutputDirectory></CopyToOutputDirectory> </Resource> <Resource Include="logo.ico"> <CopyToOutputDirectory></CopyToOutputDirectory> </Resource> <Resource Include="logo_h.png"> <CopyToOutputDirectory></CopyToOutputDirectory> </Resource> </ItemGroup> </Project> LB_SmartVisionLoginUI/MainWindow.xaml
@@ -13,36 +13,25 @@ <Grid x:Name="test" Width="800" Height="460" Opacity="1.0"> <Grid.Background> <ImageBrush ImageSource="./images/lanbao.jpg" Stretch="UniformToFill"/> <ImageBrush ImageSource="lanbao.jpg"/> </Grid.Background> <!--<Grid.Background> <ImageBrush ImageSource="/lanbao.jpg" Stretch="UniformToFill"/> </Grid.Background>--> <!--标题--> <Border BorderBrush="LightBlue" BorderThickness="3" Height="60" VerticalAlignment="Top" CornerRadius="30" Margin="116,2,102,0" Background="#72F5DEB3"> <Label x:Name="Lbl_Title" BorderBrush="Red" Background="Transparent" Content="轮胎外观视觉检测系统" HorizontalAlignment="Center" Foreground="Black" FontFamily="楷体" FontSize="36" Margin="31,2,91,-2" Width="454"></Label> </Border> <!--关闭系统--> <Image Source="./images/05.png" Height="30" MouseDown="test_Close" Margin="644,15,116,415" ToolTip="关闭系统" /> <Image Source="/05.png" Height="30" MouseDown="test_Close" Margin="644,15,116,415" ToolTip="关闭系统" /> <!--最小化系统--> <Image Source="./images/06.png" Height="30" Margin="603,15,157,415" MouseDown="test_Min" ToolTip="最小化"/> <Image Source="/06.png" Height="30" Margin="603,15,157,415" MouseDown="test_Min" ToolTip="最小化"/> <Border BorderBrush="LightBlue" Width="700" Height="325" Background="Transparent" BorderThickness="3" CornerRadius="80" Padding="13" > <Border Width="655" BorderThickness="3" CornerRadius="80" BorderBrush="LightBlue" Padding="23" > <!--<Border.Background> <ImageBrush ImageSource="./images/lanbao.jpg" Stretch="UniformToFill"/> </Border.Background>--> <!--<Image Height="161" Width="162" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="-5,40,0,0" RenderTransformOrigin="0.5,0.5" Stretch="Fill" Source="./images/logo.ico"/>--> <!--<Image Source="/images/logo_h.png" Height="161" Width="162" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="-5,40,0,0" RenderTransformOrigin="0.5,0.5" Stretch="Fill" Visibility="Visible" ScrollViewer.HorizontalScrollBarVisibility="Auto" StretchDirection="DownOnly">--> <!--<Image.RenderTransform> <TransformGroup> <ScaleTransform/> <SkewTransform AngleX="0.149"/> <RotateTransform/> <TranslateTransform X="-0.469"/> </TransformGroup> </Image.RenderTransform> </Image>--> </Border> </Border> @@ -56,9 +45,9 @@ </TransformGroup> </Border.RenderTransform> <Button x:Name="Btn_KeyBoard" Margin="283,67,-16,67" Content="" FontFamily="楷体" FontSize="36" Foreground="Black" Click="Btn_KeyBoard_Click" Visibility="Hidden" > <Button.Background> <ImageBrush ImageSource="images/键盘.ico"/> </Button.Background> <!--<Button.Background> --><!--<ImageBrush ImageSource="images/键盘.ico"/>--><!-- </Button.Background>--> </Button> </Border> <!--用户密码标签加文本框-->