修改按钮显示问题

Chu Jun 1 year ago
parent bb7ce4e9b1
commit dde961b14e

@ -1 +1 @@
12c1d82ba3f096dfcfda848bfe12ce5b52201374
dd5f1753fb63c681d3738811b550e3f060083be3

@ -88,3 +88,15 @@ C:\Users\Administrator\Desktop\UDP\Diaoyong\obj\Debug\Diaoyong.csproj.CoreCompil
C:\Users\Administrator\Desktop\UDP\Diaoyong\obj\Debug\Diaoyong.csproj.CopyComplete
C:\Users\Administrator\Desktop\UDP\Diaoyong\obj\Debug\Diaoyong.exe
C:\Users\Administrator\Desktop\UDP\Diaoyong\obj\Debug\Diaoyong.pdb
D:\烟厂资料\程序测试\远程端\231114-最新\Publish\Diaoyong.exe.config
D:\烟厂资料\程序测试\远程端\231114-最新\Publish\Diaoyong.exe
D:\烟厂资料\程序测试\远程端\231114-最新\Publish\Diaoyong.pdb
D:\烟厂资料\程序测试\远程端\231114-最新\Diaoyong\obj\Debug\Diaoyong.csproj.AssemblyReference.cache
D:\烟厂资料\程序测试\远程端\231114-最新\Diaoyong\obj\Debug\Diaoyong.ConnectionTest.resources
D:\烟厂资料\程序测试\远程端\231114-最新\Diaoyong\obj\Debug\Diaoyong.Form1.resources
D:\烟厂资料\程序测试\远程端\231114-最新\Diaoyong\obj\Debug\Diaoyong.Properties.Resources.resources
D:\烟厂资料\程序测试\远程端\231114-最新\Diaoyong\obj\Debug\Diaoyong.csproj.GenerateResource.cache
D:\烟厂资料\程序测试\远程端\231114-最新\Diaoyong\obj\Debug\Diaoyong.csproj.CoreCompileInputs.cache
D:\烟厂资料\程序测试\远程端\231114-最新\Diaoyong\obj\Debug\Diaoyong.csproj.CopyComplete
D:\烟厂资料\程序测试\远程端\231114-最新\Diaoyong\obj\Debug\Diaoyong.exe
D:\烟厂资料\程序测试\远程端\231114-最新\Diaoyong\obj\Debug\Diaoyong.pdb

Binary file not shown.

Binary file not shown.

@ -109,5 +109,35 @@ namespace WindowsFormsApp2.Properties {
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap {
get {
object obj = ResourceManager.GetObject("复位", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap 1 {
get {
object obj = ResourceManager.GetObject("复位1", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap 2 {
get {
object obj = ResourceManager.GetObject("复位2", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
}
}

@ -118,19 +118,28 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="复位" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\复位.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="复位1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\复位.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="start" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\start.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="pause" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\pause.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="rotate" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\rotate.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="unlock" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\unlock.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="lock" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\lock.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="start" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\start.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="rotate" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\rotate.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="复位2" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\复位.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

@ -30,16 +30,13 @@
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(UserControl1));
this.button5 = new System.Windows.Forms.Button();
this.button6 = new System.Windows.Forms.Button();
this.checkBox1 = new System.Windows.Forms.CheckBox();
this.checkBox2 = new System.Windows.Forms.CheckBox();
this.button2 = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.textBox1 = new System.Windows.Forms.TextBox();
this.textBox2 = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.ReSet = new System.Windows.Forms.Button();
this.label8 = new System.Windows.Forms.Label();
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel();
@ -55,30 +52,26 @@
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.button4 = new System.Windows.Forms.Button();
this.button3 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.ReSet = new System.Windows.Forms.Button();
this.button5 = new System.Windows.Forms.Button();
this.statusStrip1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
//
// button5
//
this.button5.Location = new System.Drawing.Point(4, 675);
this.button5.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.button5.Name = "button5";
this.button5.Size = new System.Drawing.Size(104, 32);
this.button5.TabIndex = 4;
this.button5.Text = "换班";
this.button5.UseVisualStyleBackColor = true;
this.button5.Click += new System.EventHandler(this.button5_Click);
//
// button6
//
this.button6.BackColor = System.Drawing.SystemColors.HotTrack;
this.button6.FlatAppearance.BorderSize = 0;
this.button6.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.button6.ForeColor = System.Drawing.SystemColors.Control;
this.button6.Location = new System.Drawing.Point(4, 711);
this.button6.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.button6.Name = "button6";
this.button6.Size = new System.Drawing.Size(104, 32);
this.button6.TabIndex = 5;
this.button6.Text = "清理图片";
this.button6.UseVisualStyleBackColor = true;
this.button6.UseVisualStyleBackColor = false;
this.button6.Click += new System.EventHandler(this.button6_Click);
//
// checkBox1
@ -107,20 +100,6 @@
this.checkBox2.UseVisualStyleBackColor = true;
this.checkBox2.Click += new System.EventHandler(this.checkBox2_Click);
//
// button2
//
this.button2.BackColor = System.Drawing.Color.Black;
this.button2.BackgroundImage = global::WindowsFormsApp2.Properties.Resources.pause;
this.button2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.button2.Location = new System.Drawing.Point(4, 174);
this.button2.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(104, 91);
this.button2.TabIndex = 1;
this.button2.UseVisualStyleBackColor = false;
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// label1
//
this.label1.AutoSize = true;
@ -164,17 +143,6 @@
this.label2.TabIndex = 10;
this.label2.Text = "当班";
//
// ReSet
//
this.ReSet.Location = new System.Drawing.Point(4, 459);
this.ReSet.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.ReSet.Name = "ReSet";
this.ReSet.Size = new System.Drawing.Size(109, 30);
this.ReSet.TabIndex = 14;
this.ReSet.Text = "复位";
this.ReSet.UseVisualStyleBackColor = true;
this.ReSet.Click += new System.EventHandler(this.ReSet_Click);
//
// label8
//
this.label8.BackColor = System.Drawing.Color.Lime;
@ -358,11 +326,57 @@
this.button3.UseVisualStyleBackColor = true;
this.button3.Click += new System.EventHandler(this.button3_Click);
//
// button2
//
this.button2.BackColor = System.Drawing.Color.Black;
this.button2.BackgroundImage = global::WindowsFormsApp2.Properties.Resources.pause;
this.button2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.button2.Location = new System.Drawing.Point(4, 174);
this.button2.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(104, 91);
this.button2.TabIndex = 1;
this.button2.UseVisualStyleBackColor = false;
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// ReSet
//
this.ReSet.BackColor = System.Drawing.SystemColors.HotTrack;
this.ReSet.FlatAppearance.BorderSize = 0;
this.ReSet.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.ReSet.ForeColor = System.Drawing.SystemColors.Control;
this.ReSet.Location = new System.Drawing.Point(4, 457);
this.ReSet.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.ReSet.Name = "ReSet";
this.ReSet.Size = new System.Drawing.Size(104, 32);
this.ReSet.TabIndex = 28;
this.ReSet.Text = "复位";
this.ReSet.UseVisualStyleBackColor = false;
this.ReSet.Click += new System.EventHandler(this.ReSet_Click);
//
// button5
//
this.button5.BackColor = System.Drawing.SystemColors.HotTrack;
this.button5.FlatAppearance.BorderSize = 0;
this.button5.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.button5.ForeColor = System.Drawing.SystemColors.Control;
this.button5.Location = new System.Drawing.Point(3, 676);
this.button5.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.button5.Name = "button5";
this.button5.Size = new System.Drawing.Size(105, 32);
this.button5.TabIndex = 29;
this.button5.Text = "换班";
this.button5.UseVisualStyleBackColor = false;
this.button5.Click += new System.EventHandler(this.button5_Click);
//
// UserControl1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.Black;
this.Controls.Add(this.button5);
this.Controls.Add(this.ReSet);
this.Controls.Add(this.button1);
this.Controls.Add(this.label7);
this.Controls.Add(this.button7);
@ -373,7 +387,6 @@
this.Controls.Add(this.statusStrip1);
this.Controls.Add(this.pictureBox1);
this.Controls.Add(this.label8);
this.Controls.Add(this.ReSet);
this.Controls.Add(this.textBox2);
this.Controls.Add(this.label2);
this.Controls.Add(this.textBox1);
@ -381,7 +394,6 @@
this.Controls.Add(this.checkBox2);
this.Controls.Add(this.checkBox1);
this.Controls.Add(this.button6);
this.Controls.Add(this.button5);
this.Controls.Add(this.button4);
this.Controls.Add(this.button3);
this.Controls.Add(this.button2);
@ -403,7 +415,6 @@
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Button button3;
private System.Windows.Forms.Button button4;
private System.Windows.Forms.Button button5;
private System.Windows.Forms.Button button6;
private System.Windows.Forms.CheckBox checkBox1;
private System.Windows.Forms.CheckBox checkBox2;
@ -411,7 +422,6 @@
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Button ReSet;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.StatusStrip statusStrip1;
@ -424,5 +434,7 @@
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Button button7;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Button ReSet;
private System.Windows.Forms.Button button5;
}
}

@ -566,7 +566,7 @@
RudN65tdA8sHzg46DF645Xrr8m2v29fvrLwzMBQydHc4cnjkLvvu5L2key/vZ9yff7DpIfph4SOpR+WP
lR7X/aj3Y+uI5ciZUdfRvidBTx6Mscae/5T+04fx/Kfkp+UTqhONk2aTp6fcp24+W/1s/Hnq8/npgp+l
f65+ofviu18cf+mbWTUz/pL/cuHX4lfyr468Xva6e9Z/9vGb5Dfzc4Vv5d8efcd41/s+7P3EfOYH7IeK
j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALDAAACwwBP0AiyAAAUN1JREFUeF7tfXecHcWV
j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALDwAACw8BkvkDpQAAUN1JREFUeF7tfXecHcWV
9fMuXu+3BiRAQtKMZjQ5aXKWNAqjGYWRNEGTNUE5h9EoZwkEIgsFQBIgkTMIMNHGxnG9a7wOa+MAxgSD
SYvDOizLguF+59zq6tfz1BPeIDA2+uP8uru6urrqnlO3blV3vxe48sor+4y9e/cGtm3bFti8eXNg8eLF
gbq6ukBjY6OioaEhMGvWrMC0adMCpaWlgbKyskB5eXlg0qRJul9dXR245ZZbAnfddVfggQceCNx77726

@ -26,6 +26,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
@ -35,6 +36,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>1</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup>
<StartupObject />
@ -135,6 +137,11 @@
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="singleCam.cs">
<SubType>UserControl</SubType>
</Compile>
@ -185,14 +192,9 @@
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<EmbeddedResource Include="singleCam.resx">
<DependentUpon>singleCam.cs</DependentUpon>
</EmbeddedResource>
@ -235,6 +237,9 @@
<ItemGroup>
<None Include="Resources\rotate.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\复位.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>

@ -1 +1 @@
e59955340ef496cc91298f0dfbe926cd5bb5dc47
9c9b8393333a0be8cfbbdbde65fba7671b7418a8

@ -169,3 +169,29 @@ D:\udp\Publish\dll\x86\opencv_videoio_ffmpeg480.dll
D:\udp\Publish\dll\x64\OpenCvSharpExtern.dll
D:\udp\Publish\dll\x64\opencv_videoio_ffmpeg480_64.dll
D:\udp\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.csproj.CopyComplete
D:\烟厂资料\程序测试\远程端\231114-最新\Publish\WindowsFormsApp2.dll.config
D:\烟厂资料\程序测试\远程端\231114-最新\Publish\WindowsFormsApp2.dll
D:\烟厂资料\程序测试\远程端\231114-最新\Publish\WindowsFormsApp2.pdb
D:\烟厂资料\程序测试\远程端\231114-最新\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.csproj.AssemblyReference.cache
D:\烟厂资料\程序测试\远程端\231114-最新\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.Alarm_Record.resources
D:\烟厂资料\程序测试\远程端\231114-最新\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.Camera_glue.resources
D:\烟厂资料\程序测试\远程端\231114-最新\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.Change_shift.resources
D:\烟厂资料\程序测试\远程端\231114-最新\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.displayResult.resources
D:\烟厂资料\程序测试\远程端\231114-最新\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.Form1.resources
D:\烟厂资料\程序测试\远程端\231114-最新\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.DialogSetup.resources
D:\烟厂资料\程序测试\远程端\231114-最新\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.FullScreen.resources
D:\烟厂资料\程序测试\远程端\231114-最新\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.Output_statistic.resources
D:\烟厂资料\程序测试\远程端\231114-最新\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.Properties.Resources.resources
D:\烟厂资料\程序测试\远程端\231114-最新\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.singleCam.resources
D:\烟厂资料\程序测试\远程端\231114-最新\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.singleCam2.resources
D:\烟厂资料\程序测试\远程端\231114-最新\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.UserControl1.resources
D:\烟厂资料\程序测试\远程端\231114-最新\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.DialogLogin.resources
D:\烟厂资料\程序测试\远程端\231114-最新\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.csproj.GenerateResource.cache
D:\烟厂资料\程序测试\远程端\231114-最新\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.csproj.CoreCompileInputs.cache
D:\烟厂资料\程序测试\远程端\231114-最新\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.csproj.CopyComplete
D:\烟厂资料\程序测试\远程端\231114-最新\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.dll
D:\烟厂资料\程序测试\远程端\231114-最新\WindowsFormsApp2\obj\Debug\WindowsFormsApp2.pdb
D:\烟厂资料\程序测试\远程端\231114-最新\Publish\dll\x86\OpenCvSharpExtern.dll
D:\烟厂资料\程序测试\远程端\231114-最新\Publish\dll\x86\opencv_videoio_ffmpeg480.dll
D:\烟厂资料\程序测试\远程端\231114-最新\Publish\dll\x64\OpenCvSharpExtern.dll
D:\烟厂资料\程序测试\远程端\231114-最新\Publish\dll\x64\opencv_videoio_ffmpeg480_64.dll

@ -7,6 +7,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Drawing.Imaging;
namespace WindowsFormsApp2
{
@ -105,6 +106,8 @@ namespace WindowsFormsApp2
Bitmap bmp0 = null;
private void updateImage(int Num,Bitmap data)
{
if (pictureBox1.InvokeRequired) {
if(Num==0)
pictureBox1.Invoke(new Action<int, Bitmap>(updateImage), Num, data);
@ -119,6 +122,7 @@ namespace WindowsFormsApp2
bmp0.Dispose();
bmp0 = null;
}
bmp0 = new Bitmap(data);
pictureBox1.Image = bmp0;
}

Loading…
Cancel
Save