Commit e5b824af 刘韬

打开界面强制输入密码

1 个父辈 66d8ad13
......@@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ACServoDriveTest</RootNamespace>
<AssemblyName>ACServoDriveTest</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
......@@ -22,6 +22,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
......@@ -31,6 +32,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
......
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/>
</startup>
</configuration>
......@@ -19,7 +19,7 @@ namespace ACServoDriveTest.Properties {
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
......@@ -47,8 +47,8 @@ namespace ACServoDriveTest.Properties {
}
/// <summary>
/// 使用此强类型资源类,为所有资源查找
/// 重写当前线程的 CurrentUICulture 属性
/// 重写当前线程的 CurrentUICulture 属性,对
/// 使用此强类型资源类的所有资源查找执行重写
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
......
......@@ -12,7 +12,7 @@ namespace ACServoDriveTest.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.6.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.9.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
......
......@@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>OnlineStore.ACSingleStore</RootNamespace>
<AssemblyName>ACSingleStore</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
<PublishUrl>publish\</PublishUrl>
......
......@@ -12,7 +12,7 @@
<add key="StartBlowValue" value="4"/>
<!-- 停止吹气的判断值(配置值=服务器发送的湿度值-停止吹气值)-->
<add key="StopBlowValue" value="4"/>
<add key ="ACBaudRate" value ="115200"/>
<add key="ACBaudRate" value="115200"/>
<!--Server address-->
<!--<add key="http.server" value="http://localhost:80/"/>-->
<!--storeType-->
......@@ -33,18 +33,18 @@
<!--解码方式,0=halcon 解码,1=西安料仓 使用zxing解码,2=成都料仓-->
<add key="DeCodeType" value="0"/>
<add key ="DefaultPWD" value ="123456"/>
<add key="DefaultPWD" value="123456"/>
<add key="UseAIOBOX" value="1"/>
<!--是否使用蜂鸣器-->
<add key ="UseBuzzer" value ="1"/>
<add key ="StartScan_CMD" value ="S"/>
<add key ="ShowLanguageMsg" value ="1"/>
<add key="UseBuzzer" value="1"/>
<add key="StartScan_CMD" value="S"/>
<add key="ShowLanguageMsg" value="1"/>
<!--每盘料扫码的次数-->
<add key ="MaxScanCount" value ="2"/>
<add key="MaxScanCount" value="2"/>
</appSettings>
<log4net>
<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
<file type="log4net.Util.PatternString" value="logs/Store-%property{fname}.log"/>
<file type="log4net.Util.PatternString" value="logs/Store-%property{fname}.log"/>
<param name="Encoding" value="UTF-8"/>
<appendToFile value="true"/>
<rollingStyle value="Date"/>
......@@ -55,7 +55,7 @@
</appender>
<appender name="ResourcesLog" type="log4net.Appender.RollingFileAppender">
<file value="logs/ResourcesLog.log"/>
<param name="Encoding" value="UTF-8" />
<param name="Encoding" value="UTF-8"/>
<appendToFile value="true"/>
<rollingStyle value="Date"/>
<datePattern value="yyyy-MM-dd"/>
......@@ -65,12 +65,12 @@
</appender>
<logger name="RollingLogFileAppender">
<level value="Info" />
<appender-ref ref="RollingLogFileAppender" />
<level value="Info"/>
<appender-ref ref="RollingLogFileAppender"/>
</logger>
<logger name="ResourcesLog">
<level value="Info" />
<appender-ref ref="ResourcesLog" />
<level value="Info"/>
<appender-ref ref="ResourcesLog"/>
</logger>
<root>
<level value="Info"/>
......@@ -78,7 +78,7 @@
</root>
</log4net>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/>
</startup>
<!-- 部署服务库项目时,必须将配置文件的内容添加到
主机的 app.config 文件中。System.Configuration 不支持库的配置文件。 -->
......
......@@ -26,18 +26,24 @@ namespace OnlineStore.ACSingleStore
private void FrmPwd_Load(object sender, EventArgs e)
{
this.DialogResult = DialogResult.None;
txtPwd.Text = ConfigAppSettings.GetValue(Setting_Init.DefaultPWD);
//txtPwd.Text = ConfigAppSettings.GetValue(Setting_Init.DefaultPWD);
string configPwd = ConfigAppSettings.GetValue(Setting_Init.Config_Pwd);
if (string.IsNullOrEmpty(configPwd))
{
this.DialogResult = DialogResult.OK;
this.Close();
}
}
private void btnNext_Click(object sender, EventArgs e)
{
string pwd = txtPwd.Text;
string configPwd = ConfigAppSettings.GetValue(Setting_Init.Config_Pwd);
if (configPwd.Equals(""))
{
configPwd = "123456";
ConfigAppSettings.SaveValue(Setting_Init.Config_Pwd,configPwd);
}
//if (configPwd.Equals(""))
//{
// configPwd = "123456";
// ConfigAppSettings.SaveValue(Setting_Init.Config_Pwd,configPwd);
//}
if (pwd.Equals(configPwd))
{
this.DialogResult = DialogResult.OK;
......
......@@ -2128,6 +2128,7 @@
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.FrmStoreBox_FormClosed);
this.Load += new System.EventHandler(this.FrmTest_Load);
this.Shown += new System.EventHandler(this.FrmStoreBox_Shown);
this.Resize += new System.EventHandler(this.FrmStoreBox_Resize);
this.contextMenuStrip1.ResumeLayout(false);
this.tabControl2.ResumeLayout(false);
this.tabPage4.ResumeLayout(false);
......
......@@ -164,6 +164,7 @@ namespace OnlineStore.ACSingleStore
loadTest();
tabControl1.TabPages.Remove(tabPage7);
HideForm();
}
private string WaitStart = ResourceCulture.GetString("等待启动");
private string dooropen = ResourceCulture.GetString("前门未关");
......@@ -894,13 +895,18 @@ namespace OnlineStore.ACSingleStore
{
try
{
FrmPwd fw = new FrmPwd(10);
DialogResult result = fw.ShowDialog();
if (!result.Equals(DialogResult.OK))
{
this.WindowState = FormWindowState.Minimized;
this.notifyIcon1.Visible = true;
this.ShowInTaskbar = false;
LogUtil.info("切换界面显示时,没有正确输入密码");
return;
}
needpwd = false;
this.Visible = true;
this.WindowState = FormWindowState.Maximized;
this.notifyIcon1.Visible = false;
......@@ -1342,5 +1348,21 @@ namespace OnlineStore.ACSingleStore
{
lblTmsg.Text = testInfo + "\r\n" + currInfo;
}
bool needpwd = false;
private void FrmStoreBox_Resize(object sender, EventArgs e)
{
if (this.WindowState == FormWindowState.Minimized)
{
needpwd = true;
return;
}
if (!needpwd)
return;
if (this.WindowState == FormWindowState.Normal || this.WindowState == FormWindowState.Maximized)
{
显示ToolStripMenuItem_Click(this, EventArgs.Empty);
}
}
}
}
......@@ -76,7 +76,7 @@ namespace OnlineStore.ACSingleStore
formhwnd = FindWindow(null, formTitle);
// 重新显示该窗体并切换到带入到前台
ShowWindow(formhwnd, SW_RESTORE);
SwitchToThisWindow(formhwnd, true);
//SwitchToThisWindow(formhwnd, true);
isShow = true;
break;
}
......
......@@ -19,7 +19,7 @@ namespace OnlineStore.ACSingleStore.Properties {
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
......@@ -47,8 +47,8 @@ namespace OnlineStore.ACSingleStore.Properties {
}
/// <summary>
/// 重写当前线程的 CurrentUICulture 属性
/// 重写当前线程的 CurrentUICulture 属性
/// 重写当前线程的 CurrentUICulture 属性,对
/// 使用此强类型资源类的所有资源查找执行重写
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
......
......@@ -12,7 +12,7 @@ namespace OnlineStore.ACSingleStore.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.9.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
......
......@@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>OnlineStore.Common</RootNamespace>
<AssemblyName>Common</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
......
......@@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>OnlineStore.DeviceLibrary</RootNamespace>
<AssemblyName>DeviceLibrary</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
......
......@@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>OnlineStore.LoadCSVLibrary</RootNamespace>
<AssemblyName>LoadCSVLibrary</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
......
......@@ -19,7 +19,7 @@ namespace UserFromControl.Properties {
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
......@@ -47,8 +47,8 @@ namespace UserFromControl.Properties {
}
/// <summary>
/// 使用此强类型资源类,为所有资源查找
/// 重写当前线程的 CurrentUICulture 属性
/// 重写当前线程的 CurrentUICulture 属性,对
/// 使用此强类型资源类的所有资源查找执行重写
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
......
......@@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>UserFromControl</RootNamespace>
<AssemblyName>UserFromControl</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!