Ejemplo n.º 1
0
 private void tabControlAgenda_Selecting(object sender, TabControlCancelEventArgs e)
 {
     AtualizarLinhas();
 }
Ejemplo n.º 2
0
 //标签页切换中事件
 private void tabControl1_Selecting(object sender, TabControlCancelEventArgs e)
 {
     e.Cancel = !AllowSelect;
 }
Ejemplo n.º 3
0
 private void tabContainer1_Selecting(object sender, TabControlCancelEventArgs e)
 {
     tabContainer1.SelectedIndex = selectedIndex;
 }
Ejemplo n.º 4
0
 private void MasterTabControl_Selecting(object sender, TabControlCancelEventArgs e)
 {
     Ogmo.SetLevel(e.TabPageIndex);
 }
Ejemplo n.º 5
0
 private void tabControl1_Selecting(object sender, TabControlCancelEventArgs e)
 {
     Control();
 }
Ejemplo n.º 6
0
 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;
 {
 }
Ejemplo n.º 7
0
 protected virtual void OnTabSelecting(TabControlCancelEventArgs e)
 {
     IsNotifying = false;
 }
Ejemplo n.º 8
0
 private void tabControl1_Selecting(object sender, TabControlCancelEventArgs e)
 {
     countStatisticalData();
 }
Ejemplo n.º 9
0
 private void tabControl1_Selecting(object sender, TabControlCancelEventArgs e)
 {
     //chqno.Clear();
     //tno.Clear();
     //amnt.Clear();
 }
Ejemplo n.º 10
0
        // обработка переключения вкладок
        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();
        }
Ejemplo n.º 11
0
 private void tabCtrl_TabClosing(object sender, TabControlCancelEventArgs e)
 {
     ExitFunk(sender, e, tabCtrl.SelectedTab);
 }
Ejemplo n.º 12
0
 private void FMain_Selecting(object sender, TabControlCancelEventArgs e, UIPage page)
 {
     page?.Text.ConsoleWriteLine();
 }
Ejemplo n.º 13
0
 protected override void OnTabSelecting(TabControlCancelEventArgs e)
 {
     e.Cancel = true;
     base.OnTabSelecting(e);
 }
Ejemplo n.º 14
0
 protected override void OnSelecting(TabControlCancelEventArgs e)
 {
     e.Cancel = !AllowSelect;
 }
Ejemplo n.º 15
0
 private void tabControl1_Selecting(object sender, TabControlCancelEventArgs e)
 {
     врачиTableAdapter.Fill(this.стоматологияDataSet.Врачи);
 }
Ejemplo n.º 16
0
 private void form_Selecting(object sender, TabControlCancelEventArgs e)
 {
     e.Cancel    = checkCancel;
     checkCancel = true;
 }
Ejemplo n.º 17
0
 private void MainFormTab_Selecting(object sender, TabControlCancelEventArgs e)
 {
     e.Cancel = !e.TabPage.Enabled;
 }
Ejemplo n.º 18
0
 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);
 }
Ejemplo n.º 19
0
        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);
        }
Ejemplo n.º 20
0
        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;
                }
            }
        }
Ejemplo n.º 21
0
    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;
            }
        }
    }
Ejemplo n.º 22
0
 private void tabEasy_Selecting(object sender, TabControlCancelEventArgs e)
 {
 }
Ejemplo n.º 23
0
 private void tabControl1_Selecting(object sender, TabControlCancelEventArgs e)
 {
     QuanLy.LoadDuLieu(cbbMaCB, cbbMaVe);
 }
Ejemplo n.º 24
0
        void tcConfigForm_Selecting(object sender, TabControlCancelEventArgs e)
        {
            TabPage current = (sender as TabControl).SelectedTab;

            ChangeFormSize(current.Name);
        }
Ejemplo n.º 25
0
        private void TabSelection_Selecting(object sender, TabControlCancelEventArgs e)
        {
            DbEntities db = new DbEntities();

            populateGrid(db.Participants.ToList());
        }
Ejemplo n.º 26
0
 private void tab_Selecting(object sender, TabControlCancelEventArgs e)
 {//餐桌状态
     Zt();
 }
 private void docsTabControl_Selecting(object sender, TabControlCancelEventArgs e)
 {
     this.LoadDocumentForTab(e.TabPage);
 }
Ejemplo n.º 28
0
 private void tabControl_Selecting(object sender, TabControlCancelEventArgs e)
 {
     e.Cancel = e.TabPageIndex >= tabControl.TabPages.Count;
 }
Ejemplo n.º 29
0
 protected virtual void OnTabDeselecting(TabControlCancelEventArgs e)
 {
 }
Ejemplo n.º 30
0
 private void tabXml_Selecting(object sender, TabControlCancelEventArgs e)
 {
     Cursor.Current = Cursors.WaitCursor;
 }
Ejemplo n.º 31
0
 private void tabControl_Deselecting(object sender, TabControlCancelEventArgs e)
 {
     e.Cancel = true;
 }