大屏显示的版本

dep
我叫锄头 11 months ago
parent 974adc94d6
commit 32e94daf3f

@ -286,16 +286,13 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl
try try
{ {
if (UserJudge.IsSettingNormalUser)
if (UserJudge.IsNormalUser())
{ {
ReportReadDb.ReadReport(); ReportReadDb.ReadReport();
ReportReadDb.ReadFeededDry(); ReportReadDb.ReadFeededDry();
} }
} }
catch (Exception) catch (Exception)
{ {
@ -320,11 +317,12 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl
} }
var reachSingle = RgvPlcUtil.GetRGVAllError(); var reachSingle = RgvPlcUtil.GetRGVAllError();
var mixSingle = Db3000Helper.ReadDb(); var mixSingle = Db3000Helper.ReadDb();
if (UserJudge.IsSettingNormalUser)
if (UserJudge.IsNormalUser())
{ {
RGVRecord(reachSingle, mixSingle); RGVRecord(reachSingle, mixSingle);
} }

@ -28,28 +28,29 @@ namespace Mesnac.Action.ChemicalWeighing.Util
} }
} }
/// <summary>
/// 判断是否为超级用户
/// </summary>
/// <returns>true为普通Run环境用户false为超级用户</returns>
public static bool IsNormalUser()
{
return !IsEdit();
}
public static bool IsSettingNormalUser public static bool IsSettingNormalUser
{ {
get get
{ {
var settingUser= ConfigurationManager.AppSettings["IsNormalUser"]; try
{
var settingUser = ConfigurationManager.AppSettings["IsDaPing"];
if(string.IsNullOrEmpty(settingUser) ) if (string.IsNullOrEmpty(settingUser))
{ {
return false; return false;
} }
return Convert.ToBoolean(settingUser); return Convert.ToBoolean(settingUser);
}
catch (Exception)
{
return false;
}
} }
} }

@ -5,7 +5,7 @@
</configSections> </configSections>
<appSettings> <appSettings>
<add key="IsNormalUser" value="true"/> <add key="IsDaPing" value="true"/>
<!--控件属性列表文件--> <!--控件属性列表文件-->
<add key="componentsPropertyFile" value="\data\ComponentProperty.xml" /> <add key="componentsPropertyFile" value="\data\ComponentProperty.xml" />

@ -25,12 +25,12 @@ namespace MCRun
if (Mesnac.Basic.ProcessHelper.HaveRunningInstance()) //if (Mesnac.Basic.ProcessHelper.HaveRunningInstance())
{ //{
Mesnac.Basic.MessageBoxTimeOut.Show("The application is running, Please be patient...", "Caption", 2000); // Mesnac.Basic.MessageBoxTimeOut.Show("The application is running, Please be patient...", "Caption", 2000);
Application.Exit(); // Application.Exit();
return; // return;
} //}
Application.EnableVisualStyles(); Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false); Application.SetCompatibleTextRenderingDefault(false);
//初始化服务管理器 //初始化服务管理器

Loading…
Cancel
Save