예제 #1
0
        private void ShowSystem()
        {
            if (!connected || filling)
            {
                //MessageBox.Show("No connection available.");
                return;
            }

            //first check if the system form is already showing.
            //if not show it.
            if (sysForm == null || !sysForm.Created)
            {
                sysForm = new SysPerfForm(console);
                sysForm.Closing += new CancelEventHandler(SysForm_Closing);
                sysForm.MdiParent = this.MdiParent;
                sysForm.Text = "System Performance Monitor:  "+console.ManagerEP.Host+":"+console.ManagerEP.Port;
                sysForm.WindowState = this.WindowState;
            }

            sysForm.Show();
            sysForm.ShowSystem();
            sysForm.Activate();
        }
예제 #2
0
        private void RefreshUI()
        {
            if (connected)
            {
                sbar.Text = string.Format("Connected to grid as {0}@{1}:{2}.", console.Credentials.Username, console.Connection.Host, console.Connection.Port);
            }
            else
            {
                sbar.Text = "Not connected.";
                if (sysForm!=null)
                {
                    sysForm.Dispose();
                }
                sysForm = null;
            }

            SetColumnHeaders();
            SetMenuState();
            SetToolbarState();

            this.Refresh();
        }