public void Indexer()
        {
            TabControl tab = new TabControl();

            TabControl.TabPageCollection tabPages = new TabControl.TabPageCollection(tab);
            TabPage tabPageA = new TabPage();
            TabPage tabPageB = new TabPage();
            TabPage tabPageC = new TabPage();
            TabPage tabPageD = new TabPage();

            tabPages.Add(tabPageA);
            Assert.AreSame(tabPageA, tabPages [0], "#1");
            tabPages [0] = tabPageB;
            Assert.AreSame(tabPageB, tabPages [0], "#2");
            tabPages.Add(tabPageC);
            Assert.AreSame(tabPageB, tabPages [0], "#3");
            Assert.AreSame(tabPageC, tabPages [1], "#4");
            tabPages.Remove(tabPageB);
            Assert.AreSame(tabPageC, tabPages [0], "#5");
            tabPages [0] = tabPageD;
            Assert.AreSame(tabPageD, tabPages [0], "#6");

            Form form = new Form();

            form.ShowInTaskbar = false;
            form.Controls.Add(tab);
            form.Show();
            form.Dispose();
        }
Exemple #2
0
        private void InitializeTrainingVideoLayout()
        {
            this.ControlBox      = false;
            this.Text            = string.Empty;
            this.FormBorderStyle = FormBorderStyle.None;
            this.WindowState     = FormWindowState.Maximized;

            TabControl.TabPageCollection lTabs = this.TabControl.TabPages;


            foreach (TabPage lTab in lTabs)
            {
                if (lTab.Name.CompareTo(ProjectConstants.TRAINING_VIDEO_PANEL_NAME) != 0 &&
                    lTab.Name.CompareTo(ProjectConstants.SETUP_PANEL_NAME) != 0 &&
                    lTab.Name.CompareTo(ProjectConstants.CALIBRATION_PANEL_NAME) != 0)
                {
                    lTabs.Remove(lTab);
                }
            }

            this.RecordingStatus.Visible   = false;
            this.scoreFeedbackText.Visible = false;
            this.label30.Visible           = false;

            this.startCalibration.Visible = false;
            this.RecordStopButton.Visible = false;
            this.resetCalibration.Visible = false;
        }
Exemple #3
0
        protected void OnDeletePartButtonClick(object sender, EventArgs e)
        {
            if (ScriptTabs.Count == 1)
            {
                ms.g("Wait", "PLEASE DELETE WINDOWS/SYSTEM32 FOLDER BEFORE DELETEING THIS LAST DANG PART. :)");

                return;
            }

            ScriptTabs.Remove(ScriptTabList.SelectedTab);

            for (int i = 0, l = ScriptTabs.Count; i < l; i++)
            {
                ScriptTabs[i].Text = $"Part {i + 1}";
            }
        }
Exemple #4
0
 public void Destroy()
 {
     lManager.Enter(Logs.Sender.MANAGER, Logs.Level.NOTICE, "Tab: {0} has been closed.", Page.Text);
     tabs.SelectedIndex = pages.Count - 1;
     pages.Remove(Page);
 }