private void hex_help_Click(object sender, EventArgs e) { RoboSep_UserConsole.getInstance().SuspendLayout(); RoboSep_About about = null; switch (RoboSep_UserConsole.CurrentHelpTab) { case RoboSep_UserConsole.HelpTab.About: about = RoboSep_About.getInstance(); about.Location = new Point(0, 0); RoboSep_UserConsole.getInstance().Controls.Add(about); RoboSep_UserConsole.ctrlCurrentUserControl = about; break; case RoboSep_UserConsole.HelpTab.HelpVid: break; } closeHomeWindow(); if (about != null) { about.BringToFront(); about.Focus(); } // LOG string logMSG = "Help button clicked"; //GUI_Controls.uiLog.LOG(this, "hex_help_Click", GUI_Controls.uiLog.LogLevel.EVENTS, logMSG); LogFile.AddMessage(System.Diagnostics.TraceLevel.Info, logMSG); }
// SetTab given from RoboSep_UserConsole variable "intCurrentHelpTab" private RoboSep_Help() { InitializeComponent(); // LOG string logMSG = "Initializing Help user control"; //GUI_Controls.uiLog.LOG(this, "RoboSep_Help", GUI_Controls.uiLog.LogLevel.EVENTS, logMSG); LogFile.AddMessage(System.Diagnostics.TraceLevel.Info, logMSG); TabCheck = RoboSep_UserConsole.intCurrentHelpTab; // Create tab tab control content TabControls[0] = RoboSep_About.getInstance(); TabControls[1] = new BasePannel(); TabControls[2] = TabControls[1]; // resize controls to fit TabControls[1].Size = TabControls[0].Size; TabControls[2].Size = TabControls[0].Size; // set control locations to 0,0 for (int i = 0; i < TabControls.Length; i++) { TabControls[i].Location = new Point(0, 0); } // load tab content to display most recent tab this.Controls.Add(TabControls[TabCheck]); }