private void tabControlAgenda_Selecting(object sender, TabControlCancelEventArgs e) { AtualizarLinhas(); }
//标签页切换中事件 private void tabControl1_Selecting(object sender, TabControlCancelEventArgs e) { e.Cancel = !AllowSelect; }
private void tabContainer1_Selecting(object sender, TabControlCancelEventArgs e) { tabContainer1.SelectedIndex = selectedIndex; }
private void MasterTabControl_Selecting(object sender, TabControlCancelEventArgs e) { Ogmo.SetLevel(e.TabPageIndex); }
private void tabControl1_Selecting(object sender, TabControlCancelEventArgs e) { Control(); }
void tabControl_Selecting(object sender, TabControlCancelEventArgs e) //is called from NavigationControl.Designer.cs when Tab is selected //Path = e.TabPage.Text; //this return TAB's name (eg: chat, pw, battle). NOTE: not needed because BUTTON press will call SwitchTab() which also started the navigation //e.Cancel = true; { }
protected virtual void OnTabSelecting(TabControlCancelEventArgs e) { IsNotifying = false; }
private void tabControl1_Selecting(object sender, TabControlCancelEventArgs e) { countStatisticalData(); }
private void tabControl1_Selecting(object sender, TabControlCancelEventArgs e) { //chqno.Clear(); //tno.Clear(); //amnt.Clear(); }
// обработка переключения вкладок private void tabControl1_Selecting(object sender, TabControlCancelEventArgs e) { // вкладка товары if (tabControl1.SelectedTab.Name == "tabPage1") { // включение / выключение радиокнопок radioButton1.Checked = true; radioButton1.Enabled = true; radioButton2.Enabled = true; radioButton3.Enabled = true; radioButton4.Enabled = true; radioButton5.Enabled = false; radioButton6.Enabled = false; searchParam2.Visible = false; searchParam3.Visible = false; dateTimePicker1.Enabled = false; dateTimePicker1.Visible = false; dateTimePicker2.Enabled = false; dateTimePicker2.Visible = false; // изменение названия кнопок edit.Text = "Редактировать товар"; add.Text = "Добавить новый товар"; removeButton.Text = "Удалить товар"; } //вкладка продажи else if (tabControl1.SelectedTab.Name == "tabPage2") { // включение / выключение радиокнопок radioButton1.Enabled = false; radioButton2.Enabled = false; radioButton3.Enabled = false; radioButton4.Enabled = false; radioButton5.Enabled = true; radioButton5.Checked = true; radioButton6.Enabled = false; searchParam2.Visible = true; searchParam3.Visible = true; dateTimePicker1.Enabled = true; dateTimePicker1.Visible = true; dateTimePicker2.Enabled = true; dateTimePicker2.Visible = true; // изменение названия кнопок edit.Text = "Редактировать заказ"; add.Text = "Добавить новый заказ"; removeButton.Text = "Удалить заказ"; } // вкладка поставщики else { // включение / выключение радиокнопок radioButton1.Enabled = false; radioButton2.Enabled = false; radioButton3.Enabled = false; radioButton4.Enabled = false; radioButton5.Enabled = false; radioButton6.Enabled = true; radioButton6.Checked = true; searchParam2.Visible = false; searchParam3.Visible = false; dateTimePicker1.Enabled = false; dateTimePicker1.Visible = false; dateTimePicker2.Enabled = false; dateTimePicker2.Visible = false; // изменение названия кнопок edit.Text = "Изменить поставщика"; add.Text = "Добавить нового поставщика"; removeButton.Text = "Удалить поставщика"; } UpdateMainForm(); }
private void tabCtrl_TabClosing(object sender, TabControlCancelEventArgs e) { ExitFunk(sender, e, tabCtrl.SelectedTab); }
private void FMain_Selecting(object sender, TabControlCancelEventArgs e, UIPage page) { page?.Text.ConsoleWriteLine(); }
protected override void OnTabSelecting(TabControlCancelEventArgs e) { e.Cancel = true; base.OnTabSelecting(e); }
protected override void OnSelecting(TabControlCancelEventArgs e) { e.Cancel = !AllowSelect; }
private void tabControl1_Selecting(object sender, TabControlCancelEventArgs e) { врачиTableAdapter.Fill(this.стоматологияDataSet.Врачи); }
private void form_Selecting(object sender, TabControlCancelEventArgs e) { e.Cancel = checkCancel; checkCancel = true; }
private void MainFormTab_Selecting(object sender, TabControlCancelEventArgs e) { e.Cancel = !e.TabPage.Enabled; }
public void tabs_Selecting(object sender, TabControlCancelEventArgs e) { current = (sender as TabControl).SelectedTab; //changes the name of current every time you click on a tab userControl(tabs.SelectedTab); }
private void tabControl_Deselecting(object sender, TabControlCancelEventArgs e) { if (!_back) { _history.Push(e.TabPageIndex); buttonPrev.Enabled = true; } if (_skip) { return; } var errorText = string.Empty; switch (e.TabPageIndex) { case TabEventPeriod: { int eventPeriod; if (int.TryParse(textBoxEventPeriod.Text, out eventPeriod)) { if (eventPeriod < Vendor.MinimumEventPeriod) { errorText = String.Format(Resources.EventPeriodTooShort, Vendor.MinimumEventPeriod); textBoxEventPeriod.Text = Vendor.MinimumEventPeriod.ToString(CultureInfo.InvariantCulture); } else { _eventSequence.EventPeriod = eventPeriod; } } else { errorText = textBoxChannelCount.Text + Resources.EventPeriodInvalid; } break; } case TabProfile: if (comboBoxProfiles.SelectedIndex == 0) { _eventSequence.FileIOHandler = FileIOHelper.GetNativeHelper(); _eventSequence.Profile = null; } else { var profilePath = Path.Combine(Paths.ProfilePath, comboBoxProfiles.SelectedItem + ".pro"); _eventSequence.FileIOHandler = FileIOHelper.GetProfileVersion(profilePath); _eventSequence.Profile = _eventSequence.FileIOHandler.OpenProfile(profilePath); } if (_eventSequence.Profile != null) { _eventSequence.Groups = _eventSequence.Profile.Groups; } break; case TabChannelCount: { int channelCount; if (int.TryParse(textBoxChannelCount.Text, out channelCount)) { if (channelCount < 1) { errorText = Resources.ChannelCountMinimums; } else { if ((channelCount > 1024) && (MessageBox.Show(string.Format(Resources.ConfirmChannelCount, channelCount), Vendor.ProductName, MessageBoxButtons.YesNo, MessageBoxIcon.Question) != DialogResult.Yes)) { tabControl.TabIndex = 1; } else { Cursor = Cursors.WaitCursor; try { _eventSequence.FullChannelCount = channelCount; } finally { Cursor = Cursors.Default; } } } } else { errorText = textBoxChannelCount.Text + Resources.InvalidChannelCount; } break; } case TabChannelNames: if (textBoxChannelNames.Lines.Length == Convert.ToInt32(textBoxChannelCount.Text)) { if (textBoxChannelNames.Lines.Any(str2 => str2.Trim() == string.Empty)) { errorText = Resources.ChannelNameCantBeBlank; } Cursor = Cursors.WaitCursor; try { for (var i = 0; i < _eventSequence.FullChannelCount; i++) { _eventSequence.FullChannels[i].Name = textBoxChannelNames.Lines[i]; } } finally { Cursor = Cursors.Default; } break; } errorText = Resources.ChannelCountAndNameInequal; break; case TabSequenceTime: { var sequenceTimeInMills = ParseTimeString(textBoxTime.Text); if (sequenceTimeInMills != 0) { _eventSequence.Time = sequenceTimeInMills; } else { errorText = "Bad time format"; } break; } } if (errorText == string.Empty) { return; } e.Cancel = true; MessageBox.Show(errorText, Vendor.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Exclamation); }
private void MainTabControl_Selecting(object sender, TabControlCancelEventArgs e) { bool configurationChanged = DBConnectionString != ConnectionStringTextBox.Text || DBDataProviderString != DataProviderTextBox.Text || SerializedSchema != SerializedSchemaTextBox.Text; if (configurationChanged) { Cursor cursor = Cursor; try { Cursor = Cursors.WaitCursor; if (string.IsNullOrEmpty(ConnectionStringTextBox.Text)) { ConnectionStringTextBox.Text = HostConnectionString; } if (string.IsNullOrEmpty(DataProviderTextBox.Text)) { DataProviderTextBox.Text = HostDataProviderString; } if (string.IsNullOrEmpty(SerializedSchemaTextBox.Text)) { SerializedSchemaTextBox.Text = "SerializedSchema.bin"; } DBConnectionString = ConnectionStringTextBox.Text; DBDataProviderString = DataProviderTextBox.Text; SerializedSchema = SerializedSchemaTextBox.Text; UpdateDBSchema(); string connectionString = string.Empty; string dataProviderString = string.Empty; if (DBConnectionString != HostConnectionString) { connectionString = DBConnectionString; } if (DBDataProviderString != HostDataProviderString) { dataProviderString = DBDataProviderString; } ConfigurationFile configurationFile = ConfigurationFile.Current; CategorizedSettingsElementCollection applicationSettings = configurationFile.Settings["applicationSettings"]; applicationSettings.Add("ConnectionString", connectionString, "Database connection string.", false, SettingScope.User); applicationSettings.Add("DataProviderString", dataProviderString, "Configuration database ADO.NET data provider assembly type creation string.", false, SettingScope.User); applicationSettings.Add("SerializedSchema", SerializedSchema, "File containing binary-serialized schema information about the database.", false, SettingScope.User); applicationSettings["ConnectionString"].Value = connectionString; applicationSettings["DataProviderString"].Value = dataProviderString; applicationSettings["SerializedSchema"].Value = SerializedSchema; configurationFile.Save(); } catch (Exception ex) { string message = $"Error updating configuration: {ex.Message}"; MessageBox.Show(message, "Configuration error", MessageBoxButtons.OK, MessageBoxIcon.Error); e.Cancel = true; } finally { Cursor = cursor; } } }
protected override void OnSelecting(TabControlCancelEventArgs e) { base.OnSelecting(e); if ((e.TabPage != null)) { if (!string.IsNullOrEmpty((string)e.TabPage.Tag)) { e.Cancel = true; } else { Index = -1; } } }
private void tabEasy_Selecting(object sender, TabControlCancelEventArgs e) { }
private void tabControl1_Selecting(object sender, TabControlCancelEventArgs e) { QuanLy.LoadDuLieu(cbbMaCB, cbbMaVe); }
void tcConfigForm_Selecting(object sender, TabControlCancelEventArgs e) { TabPage current = (sender as TabControl).SelectedTab; ChangeFormSize(current.Name); }
private void TabSelection_Selecting(object sender, TabControlCancelEventArgs e) { DbEntities db = new DbEntities(); populateGrid(db.Participants.ToList()); }
private void tab_Selecting(object sender, TabControlCancelEventArgs e) {//餐桌状态 Zt(); }
private void docsTabControl_Selecting(object sender, TabControlCancelEventArgs e) { this.LoadDocumentForTab(e.TabPage); }
private void tabControl_Selecting(object sender, TabControlCancelEventArgs e) { e.Cancel = e.TabPageIndex >= tabControl.TabPages.Count; }
protected virtual void OnTabDeselecting(TabControlCancelEventArgs e) { }
private void tabXml_Selecting(object sender, TabControlCancelEventArgs e) { Cursor.Current = Cursors.WaitCursor; }
private void tabControl_Deselecting(object sender, TabControlCancelEventArgs e) { e.Cancel = true; }