Пример #1
0
        /****************/
        /***** Func *****/
        /****************/
        public frmMain()
        {
            if (mutex.WaitOne(TimeSpan.Zero, true))
            {
                //initialize form components
                InitializeComponent();
                InitializeChromium();
                //try to load the saved settings
                loadConfig();
                //start JagexLauncher and dock it to RS Wikit window
                DockApp();
                //add tools page to sidebar
                MdiTabControl.TabPage tools = tabSide.TabPages.Add(new frmTools());
                tools.Icon = new Icon("ico/tools.ico"); //tools page icon
                tools.CloseButtonVisible = false;       //disallow closing tools page

                //Resize game client
                UpdateSize();
                FinishSize();

                //Do fullscreen
                if (full)
                {
                    setFullscreen(true);
                }
            }
            else
            {
                MessageBox.Show("Multiple instances are not supported!");
                Environment.Exit(Environment.ExitCode);
            }
        }
        public void SetActiveWorkSpace(IWorkSpaceShell workSpace)
        {
            if (ReferenceEquals(workSpace, null) || !(workSpace is WorkSpaceShell))
            {
                throw new ArgumentException("Invalid workspace");
            }

            var spaceShell = (workSpace as WorkSpaceShell);

            MdiTabControl.TabPage page = m_WorkSpaceContainer.TabPages[spaceShell.WorkForm()];
            if (!ReferenceEquals(page, null))
            {
                page.Select();
            }
        }
 public IWorkSpaceShell GetActiveWorkSpace()
 {
     MdiTabControl.TabPage page = m_WorkSpaceContainer.TabPages.SelectedTab();
     return((WorkSpaceShell)((Form)page.Form).Tag);
 }