void ShowUserEnd() { if (user.UserType.Equals(0)) { UserEnd userEnd = new UserEnd(user) { StartPosition = FormStartPosition.Manual, Location = point }; //userEnd.Location = this.Location; //userEnd.StartPosition = FormStartPosition.Manual(); //userEnd.Location = this.Location; userEnd.BringToFront(); Application.Run(userEnd); } else if (user.UserType.Equals(1)) { Dashboard dashboard = new Dashboard(user) { StartPosition = FormStartPosition.Manual, Location = point }; //dashboard.Location = this.Location; dashboard.BringToFront(); Application.Run(dashboard); } }
private void frmMain_Load(object sender, EventArgs e) { panel2.Focus(); timer1.Start(); Dashboard frm = new Dashboard(); frm.TopLevel = false; btnlist.Controls.Add(frm); frm.BringToFront(); frm.Show(); }
public void InitAdmin() { if (IsInitialized) { return; } InitAgentSettings(); //SecurityAgent agentX = new SecurityAgent("FTP Security Agent", 1563, 18, 230, global::Cyberarms.IntrusionDetection.Admin.Properties.Resources.Paladin_Icon_32); //Dashboard.AddAgent(agentX); labelMenuHome_Click(labelMenuHome, EventArgs.Empty); //CurrentMenu = labelMenuHome; paintPanelTopBorder(); // Invalidate(false); try { serviceController = new System.ServiceProcess.ServiceController("Cyberarms Intrusion Detection Service"); IsServiceRunning = serviceController.Status != System.ServiceProcess.ServiceControllerStatus.Running; } catch (Exception ex) { GenericErrorDialog errdlg = new GenericErrorDialog("Error starting application", "The service is not installed or installed correctly. Please uninstall Cyberarms IDDS and reinstall to fix the problem!", false); errdlg.ShowDialog(); EventLog.WriteEntry("Cyberarms.IntrusionDetection.Admin", ex.Message); } logReader = new Timer(); logReader.Interval = 1000; logReader.Tick += new EventHandler(logReader_Tick); logReader.Enabled = true; logReader.Start(); timerRefreshServiceStatus = new Timer(); timerRefreshServiceStatus.Interval = 1000; timerRefreshServiceStatus.Tick += new EventHandler(serviceReader_Tick); timerRefreshServiceStatus.Enabled = true; timerRefreshServiceStatus.Start(); eventLogCyberarms = new EventLog("Cyberarms"); eventLogCyberarms.Source = "Cyberarms Intrusion Detection"; ShowMenu(labelMenuHome); Dashboard.BringToFront(); }
private void labelMenuHome_Click(object sender, EventArgs e) { ShowMenu(labelMenuHome); Dashboard.BringToFront(); panelOnlineServices.Hide(); }