public MainForm() { this.InitializeComponent(); MainForm.RawInput_Install(base.Handle); EcoGlobalVar.gl_DevManPage = this.devManPage1; this.pageInit(); }
public MainForm(UserInfo pUser) { this.InitializeComponent(); MainForm.RawInput_Install(base.Handle); string text = DevAccessCfg.GetInstance().getVersion(); if (text.Length > 0) { text = " (" + text + ")"; } else { System.Version version = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version; text = string.Concat(new string[] { " (V", version.Major.ToString(), ".", version.Minor.ToString(), ".", version.Build.ToString("000"), ")" }); } this.Text += text; EcoGlobalVar.gl_DevManPage = this.devManPage1; int num = 1; this.butUser.Hide(); this.butDevice.Hide(); this.butSysManagement.Hide(); this.butLog.Hide(); if (EcoGlobalVar.ECOAppRunMode == 1) { int userRight = pUser.UserRight; if ((userRight & 1) != 0) { this.tlpMainMenu.SetCellPosition(this.butUser, new TableLayoutPanelCellPosition(num, 0)); this.butUser.Show(); num++; } if ((userRight & 2) != 0) { this.tlpMainMenu.SetCellPosition(this.butDevice, new TableLayoutPanelCellPosition(num, 0)); this.butDevice.Show(); num++; } if ((userRight & 4) != 0) { this.tlpMainMenu.SetCellPosition(this.butSysManagement, new TableLayoutPanelCellPosition(num, 0)); this.butSysManagement.Show(); num++; } if ((userRight & 8) != 0) { this.tlpMainMenu.SetCellPosition(this.butLog, new TableLayoutPanelCellPosition(num, 0)); this.butLog.Show(); num++; } } if (pUser.UserType != 0) { this.enegManPage1.hiddenPowerAnalysisButton(); this.logPage1.hidden_LogOptionEvent(); } this.pageInit(); }