Exemplo n.º 1
0
 /// <summary>
 /// When a tab is selected.
 /// </summary>
 private void onTabSelectionChanged(object pSender, TabControlEventArgs pEventArgs)
 {
     foreach (TabPage tabPage in tabs.TabPages)
     {
         tabPage.Controls[0].Visible = tabPage.TabIndex == tabs.SelectedTab.TabIndex;
     }
 }
Exemplo n.º 2
0
 void frame_Selected(object sender, TabControlEventArgs e)
 {
     if (e.TabPage == page)
     {
         ActivateControl();
     }
 }
Exemplo n.º 3
0
Arquivo: Main.cs Projeto: Zexks/QLite
 private void qtabsMain_Selected(object sender, TabControlEventArgs e)
 {
     TabPage tmpNew = (sender as TabControl).SelectedTab;
     int procNum = Convert.ToInt32(tmpNew.Tag);
     tspMainStrip.Controls.Clear();
     //tspMainStrip.Join(Global.Plugins.AvailablePlugins[Global.Processes[procNum].PluginIndex].Instance.Menu);
 }
Exemplo n.º 4
0
 private void OnSelected(object sender, TabControlEventArgs e)
 {
     if (e.TabPage == m_knownColorsTabPage)
         m_colorList.SelectColor(m_colorPicker.SelectedColor);
     if (e.TabPage == m_colorTabPage)
         m_colorPicker.SelectedColor = (Color)m_colorList.SelectedItem;
 }
        private void tabControl1_Selected(object sender, TabControlEventArgs e)
        {
            if (e.TabPageIndex == 1)
            {

            }
        }
Exemplo n.º 6
0
 private void cohTabControl_Selected(object sender, System.Windows.Forms.TabControlEventArgs e)
 {
     if (e.TabPageIndex == 1)
     {
         this.Refresh();
     }
 }
Exemplo n.º 7
0
        /*
         * protected override void OnPagesChanged(object sender, NotifyCollectionChangedEventArgs e)
         * {
         *      base.OnPagesChanged(sender, e);
         *
         *      e.Apply(AddTab, RemoveTab, ResetTab);
         * }
         *
         * void AddTab(object o, int index, bool create)
         * {
         * }
         *
         * void RemoveTab(object o, int index)
         * {
         * }
         *
         * void ResetTab()
         * {
         * }
         */

        void OnNativeSelected(object sender, WForms.TabControlEventArgs e)
        {
            UpdatePropertyHelper((element, control) =>
            {
                element.CurrentPage = Children.Find(e.TabPage)?.Element as Page;
            });
        }
Exemplo n.º 8
0
        // dynamically create ECL code listing when the tab is clicked on
        private void ECLTabControlLoadSelected(Object sender, TabControlEventArgs e)
        {
            if (e.TabPage != null && e.TabPage.Controls.Find("codepanel", false).Length > 0)
            {
                FillECLCodePanel(e.TabPage);

            }
        }
Exemplo n.º 9
0
        protected override void OnSelected(TabControlEventArgs e) {
            base.OnSelected(e);
            Console.WriteLine("page:"+e.TabPage.Name +" index:"+e.TabPageIndex);
            Size size;
            Console.WriteLine(size = GetControlCustomSize(Controls.Find(e.TabPage.Name, false).FirstOrDefault()));
            MainForm.Size = size;


        }
Exemplo n.º 10
0
 private async void TabSlaveGroup_Selected(object sender, System.Windows.Forms.TabControlEventArgs e)
 {
     if (e.TabPage == tabSchedule)
     {
         await SecurityExceptionUtil.TryAsyncAndReportSecurityExceptions(
             action : () => UpdateSchedule(),
             finallyCallback : () => scheduleView.Content = HiveAdminClient.Instance.Downtimes);
     }
     SetEnabledStateOfControls();
 }
Exemplo n.º 11
0
 private void tabControl_Selected(object sender, TabControlEventArgs e)
 {
     int index = 0;
     foreach (MenuItem mi in menuItemView.MenuItems) {
         if (mi.Text == "-") {
             break;
         }
         mi.Checked = index++ == e.TabPageIndex;
     }
 }
Exemplo n.º 12
0
 private void tabPanels_Selected(object sender, TabControlEventArgs e)
 {
     if (tabPanels.SelectedIndex == 1)
     {
         mainController.resultController.Init();
     }
     if (tabPanels.SelectedIndex == 0)
     {
         mainController.inleesView.Refresh();
     }
 }
Exemplo n.º 13
0
 private void OnSelected(object sender, TabControlEventArgs e)
 {
     m_acceptItemChangedEvent = false;
     if (e.TabPage == m_colorWheelTabPage)
         m_colorPicker.SelectedColor = m_curColor;
     if (e.TabPage == m_knownColorsTabPage)
         m_colorList.SelectedColor = m_curColor;
     if (e.TabPage == m_systemColorsTabPage)
         m_systemColorList.SelectedColor = m_curColor;
     m_acceptItemChangedEvent = true;
 }
Exemplo n.º 14
0
        private void tabControl1_Selected(object sender, TabControlEventArgs e)
        {

            if (e.TabPageIndex == 0)
            {
                toolStripStatusLabel1.Text = "Tab #1";
            }
            if (e.TabPageIndex == 1)
            {
                toolStripStatusLabel1.Text = "Tab #2";
            }
        }
Exemplo n.º 15
0
        private void tabsModes_Selected(object sender, System.Windows.Forms.TabControlEventArgs e)
        {
            switch (tabsModes.SelectedIndex)
            {
            case (int)Tabs.Create:
                DrawCreateSectionsTreeView();
                break;

            case (int)Tabs.Translate:
                LoadDefaultStrings();
                break;
            }
        }
Exemplo n.º 16
0
 private void tabControl1_Selected(object sender, TabControlEventArgs e)
 {
     if (e.TabPage.Text == "Sql")
     {
         textBoxSql.Text =
             string.Format("ALTER TABLE {0} ADD (\n{1} {2}", tablename, textBoxcolumnName.Text, comboBoxType.Text);
         textBoxSql.Text += (!string.IsNullOrEmpty(textBoxSize.Text) ? string.Format("({0}", textBoxSize.Text) : "");
         textBoxSql.Text += (!string.IsNullOrEmpty(textBoxScale.Text) ? string.Format(",{0}", textBoxScale.Text) : "");
         textBoxSql.Text += (!string.IsNullOrEmpty(textBoxSize.Text) ? ")"  : "");
         textBoxSql.Text += (!string.IsNullOrEmpty(textBoxDefaultValue.Text) ? string.Format(" DEFAULT {0}", textBoxDefaultValue.Text) : "");
         textBoxSql.Text += ")";
     }
 }
Exemplo n.º 17
0
 private void Supremetab_Selected(object sender, TabControlEventArgs e)
 {
     if (e.TabPageIndex.Equals(0))
     {
         this.AcceptButton = btnSCreateAccount;
         this.CancelButton = btnScancel;
     }
     else
     {
         this.AcceptButton = btnZCreateAccount;
         this.CancelButton = btnZcancel;
     }
 }
Exemplo n.º 18
0
        private void InjectionTabs_Selected(object sender, TabControlEventArgs e)
        {
            if (e.TabPage == MainUI.PrimitiveTab)
            {
                MainUI.PTPacketTxt.Text = MainUI.ITPacketTxt.Text;

                MainUI.ITPacketTxt.Enabled = false;
                MainUI.PTPacketTxt.TextChanged += PTPacketTxt_TextChanged;
            }
            else
            {
                MainUI.ITPacketTxt.Enabled = true;
                MainUI.PTPacketTxt.TextChanged -= PTPacketTxt_TextChanged;
            }
        }
Exemplo n.º 19
0
        private void TabControl1_Deselected(Object sender, TabControlEventArgs e)
        {
            // TODO: remove this message box code
            System.Text.StringBuilder messageBoxCS = new System.Text.StringBuilder();
            messageBoxCS.AppendFormat("{0} = {1}", "TabPage", e.TabPage);
            messageBoxCS.AppendLine();
            messageBoxCS.AppendFormat("{0} = {1}", "TabPageIndex", e.TabPageIndex);
            messageBoxCS.AppendLine();
            messageBoxCS.AppendFormat("{0} = {1}", "Action", e.Action);
            messageBoxCS.AppendLine();
            //MessageBox.Show(messageBoxCS.ToString(), "Deselected Event");
            if (e.TabPage != null)
                unloadTabPage(e.TabPage);

        }
Exemplo n.º 20
0
        private void tabControl1_Selected(object sender, TabControlEventArgs e)
        {
            switch (e.TabPage.Text)
            {
                case "Customers":
                    LoadCustomers();
                    break;
                case "Rewards":
                    LoadRewards();
                    break;
                default:
                    break;
            }

            ActiveTab = e.TabPage.Text;
        }
Exemplo n.º 21
0
        private void tabControl1_Selected(object sender, TabControlEventArgs e)
        {
            if (tabControl1.SelectedIndex == 1)
            {
                WorkDBF wd = new WorkDBF();
                DataTable dt = null;

                try {
                    dt = wd.getTable(textBox1.Text, Path.GetFileName(listBox1.SelectedItem.ToString())); }
                catch
                {
                    MessageBox.Show("Список файлів пустий.");
                }

                if (dt != null)
                {
                    this.dataGridView1.DataSource = dt;
                }
            }
        }
Exemplo n.º 22
0
 private void tabMain_Selected(object sender, TabControlEventArgs e)
 {
     currentTab = e.TabPage;
     
     if (currentTab.Text == Language.Resource.ManageUsers)
     {
         LoadUser();
     }
     else if (currentTab.Text == Language.Resource.ManageConnections)
     {
         LoadConnection();
     }
     else if (currentTab.Text == Language.Resource.ManageEmails)
     {
         LoadMail();
     }
     else if (currentTab.Text == Language.Resource.ManageAccounts)
     {
         LoadAccount();
     }
 }
Exemplo n.º 23
0
 private void tabControl1_Selected(object sender, TabControlEventArgs e)
 {
     switch (e.TabPage.Text)
     {
         case "Info":
             break;
         case "Vertex":
             this.RefreshVertex();
             break;
         case "Edge":
             this.RefreshEdge();
             break;
         case "Face":
             this.RefreshFace();
             break;
         case "Tetrahedron":
             this.RefreshTetrahedron();
             break;
         default:
             break;
     }
 }
Exemplo n.º 24
0
        private void tabControl1_Selected(object sender, TabControlEventArgs e)
        {
            if (e.TabPage.Text == "SQL")
            {
                if (checkBoxUnique.Checked)
                    textBoxSql.Text = "CREATE UNIQUE INDEX ";
                else
                    textBoxSql.Text = "CREATE INDEX ";
                textBoxSql.Text += string.Format("{0} ON {1} (", textBoxIndexName.Text, labelTableName.Text);
                for (int i = 0; i < dataGridViewColumnName.Rows.Count; i++ )
                {
                    if (dataGridViewColumnName.Rows[i].Cells[0].Value != null)
                    {
                        if (i > 0)
                            textBoxSql.Text += ", ";
                        textBoxSql.Text += string.Format("{0}", dataGridViewColumnName.Rows[i].Cells[0].Value.ToString());
                    }
                }

                textBoxSql.Text += ")";
            }
        }
Exemplo n.º 25
0
        //在IO测试页面时启动timer1,切换到其他界面时,关闭timer1    
        private void tabControlBottom_Selected(object sender, TabControlEventArgs e)
        {
            //每次切到IO测试页面时,启动Timer1
            if (MainForm.mainform.deviceTestForm.tabControlBottom.SelectedIndex == 0)
            {
                MainForm.mainform.deviceTestForm.Invoke(new EventHandler(delegate
                {
                    MainForm.mainform.deviceTestForm.timer1.Enabled = true;
                    MainForm.mainform.deviceTestForm.timer1.Interval = 1000;
                    MainForm.mainform.deviceTestForm.timer1.Start();
                }));
            }
            else
            {
                MainForm.mainform.deviceTestForm.Invoke(new EventHandler(delegate
                {
                    MainForm.mainform.deviceTestForm.timer1.Stop();
                }));
            }

            //当通道测试页面点击开始以后,未点击停止,不允许切换到其他界面
            if (MainForm.protocol.channel_test_flag == 1)
            {
                MainForm.mainform.deviceTestForm.tabControlBottom.SelectedIndex = 1;
            }
            else
            {

            }
            if (MainForm.mainform.deviceTestForm.tabControlBottom.SelectedIndex == 1)
            {
                comboBox1.SelectedIndex = 0;
            }
            if (MainForm.protocol.sign == 1)
            {
                MainForm.mainform.deviceTestForm.tabControlBottom.SelectedIndex = 2;
            }
        }
Exemplo n.º 26
0
        private void tab_selected(object sender, TabControlEventArgs e)
        {
            if (tab_statistics.SelectedIndex == 0)
            {
                if(service!=null)
                {
                    service.load();
                }
                else
                {
                    service = new SERVICE_REPORT_UI();
                    service.Dock = DockStyle.Fill;
                    this.tabPageBCN.Controls.Add(service);
                }

            }
            if (tab_statistics.SelectedIndex == 1)
            {
                REVENUE_REPORT_UI revenue = new REVENUE_REPORT_UI();
                revenue.Dock = DockStyle.Fill;
                this.tabPage_revenue.Controls.Add(revenue);
            }
        }
Exemplo n.º 27
0
        private void tab_room_management_Selected(object sender, TabControlEventArgs e)
        {
            if (tab_room_management.SelectedIndex == 0)
            {
                if (room != null)
                {
                    room.loadData();
                }
                else
                {
                    room = new ROOM_UI();
                    room.Dock = DockStyle.Fill;
                    this.tab_room.Controls.Add(room);
                }

            }
            if (tab_room_management.SelectedIndex == 1)
            {
                ROOMTYPE_UI roomtype = new ROOMTYPE_UI();
                roomtype.Dock = DockStyle.Fill;
                this.tab_type.Controls.Add(roomtype);
            }
        }
Exemplo n.º 28
0
 private void TabControlTagBranch_Selected(object sender, TabControlEventArgs e)
 {
     if (TabControlTagBranch.SelectedTab == MultipleBranchTab)
         UpdateMultiBranchView();
     else if (TabControlTagBranch.SelectedTab == TagTab)
         FillTagDropDown();
     else
     {
         UpdateBranchDropDown();
         UpdateRemoteBranchDropDown();
     }
 }
Exemplo n.º 29
0
 private void TabSelected(object sender, TabControlEventArgs e)
 {
     var margin = tabControl.Margin;
     if (IsGridTab)
     {
         margin.Bottom = 0;
         tabControl.Margin = margin;
         UpdateSegmentList();
         tableLayoutPanel1.SetRowSpan(tabControl, 1);
         runGrid.Visible = true;
         runGrid.Invalidate();
     }
     else
     {
         runGrid.Visible = false;
         tableLayoutPanel1.SetRowSpan(tabControl, 9);
         metadataControl.RefreshInformation();
         margin.Bottom = 10;
         tabControl.Margin = margin;
     }
 }
Exemplo n.º 30
0
 private void tabControlSearch_Selected(object sender, TabControlEventArgs e)
 {
     SetSearchItems();
 }
 /// <summary>
 /// Handle when the bound OLV is part of a TabControl and that
 /// TabControl changes tabs. The overlay panel is hidden. The
 /// first time the bound OLV is redrawn, the overlay panel will
 /// be shown again.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void tabControl_Selected(object sender, TabControlEventArgs e) {
     this.HideGlass();
 }
Exemplo n.º 32
0
 private void tabsChatChannels_Selected(object sender, TabControlEventArgs e)
 {
     this.RefocusInput();
 }
Exemplo n.º 33
0
 /// <summary>
 /// The reload tab.
 /// </summary>
 /// <param name="index">
 /// The index.
 /// </param>
 private void ReloadTab(int index)
 {
     if (this.TabPageReloading != null)
     {
         TabPage tab = this.TabPages[index];
         var args = new TabControlEventArgs(tab, index, TabControlAction.Selecting);
         this.TabPageReloading(this, args);
     }
 }
Exemplo n.º 34
0
 void StructEditor_Selected(object sender, System.Windows.Forms.TabControlEventArgs e)
 {
     UpdateView(this.views[tab.SelectedIndex]);
 }
Exemplo n.º 35
0
 private void metroTabControlP_Selected(object sender, System.Windows.Forms.TabControlEventArgs e)
 {
 }
Exemplo n.º 36
0
 private void tabControl1_Selected(object sender, TabControlEventArgs e)
 {
     Form1_Load(sender,e);
 }
Exemplo n.º 37
0
 /// <summary>
 /// Raises the selected event.
 /// </summary>
 /// <param name="e">Drag Event Args</param>
 protected override void OnSelected(TabControlEventArgs e)
 {
     base.OnSelected(e);
     this.Invalidate();
 }
Exemplo n.º 38
0
 void tabControl_Selected(object sender, System.Windows.Forms.TabControlEventArgs e)
 {
     DisableAllButtons();
 }
Exemplo n.º 39
0
 // This handles the actual chaning of the tab pages
 private void TabControl1_Selected(System.Object sender, System.Windows.Forms.TabControlEventArgs e)
 {
     selectedPage = TabControl1.SelectedTab;
 }