//getter methods //_______________________________________ private void ProgramTabs_Selected(object sender, TabControlEventArgs e) { updateDetailBox(true); }
protected virtual void SetupTabSelected(TabControlEventArgs e) { // to give the sub-classes an opportunity to set things up when in 'edit' mode }
private void tabControl1_Selected(object sender, TabControlEventArgs e) { grdPorch.DataSource = porchAdapter.GetDataBySelectObject(this.currObjID); grdPomesch.DataSource = pomeschAdapter.GetDataBySelectedPorch(this.currPorchID); }
private void tabControl1_Selected(object sender, TabControlEventArgs e) { TabSelected = tabControl1.SelectedIndex; }
private void tabControl1_Selected(object sender, TabControlEventArgs e) { try { if (e.Action == TabControlAction.Selected) { Set_TabPlan_AutoSubscribe(false); Set_tabElementA_AutoSubscribe(false); Set_tabElementB_AutoSubscribe(false); Set_tabProStd_AutoSubscribe(false); Set_tabProcess_AutoSubscribe(false); //Set_tabProcessB_AutoSubscribe(false); switch (e.TabPage.Name) { case "tabPlan": if (dsPlan.L3DataAdapter == null) { dsPlan.L3DataAdapter = Adapter; } if (dsArrivleRHSteel.L3DataAdapter == null) { dsArrivleRHSteel.L3DataAdapter = Adapter; } Set_TabPlan_AutoSubscribe(true); break; case "tabArearA": if (dsElementA.L3DataAdapter == null) { dsElementA.L3DataAdapter = Adapter; } if (dsInCtrolEleA.L3DataAdapter == null) { dsInCtrolEleA.L3DataAdapter = Adapter; } if (dsElementInfoA.L3DataAdapter == null) { dsElementInfoA.L3DataAdapter = Adapter; } dsElementA.SourceCondition = "SteelGradeIndex = '" + dbxSteelGradeIndexA.Text + "'"; dsInCtrolEleA.SourceCondition = "SteelGradeIndex = '" + dbxSteelGradeIndexA.Text + "'"; dsElementInfoA.SourceCondition = "HeatID = '" + dbxHeatIDA.Text + "' and UnitTypeID = '" + UnitID.Substring(1, 1).ToString() + "' order by HeatID,AppID,Sample_Count"; Set_tabElementA_AutoSubscribe(true); //Modify begin by llj 2011-04-13 增加Ca/Al比值 String HeatID_A = dbxHeatIDA.Text.Trim(); AppSvrIF.Command command_A = null; String strMethod_A = @"CalEleRateValue"; String strObjURI_A = @"XGMESLogic\RHMag\CRH_Unit_Mag\S51"; try { int iRet = this.Adapter.Session.CreateCommand((int)AppSvrIF.CommandType.Call, strObjURI_A, strMethod_A, ref command_A); if (iRet == 0) { command_A.set_Parameters(0, HeatID_A); command_A.set_Parameters(1, "Ca"); command_A.set_Parameters(2, "Al"); this.Adapter.Session.Execute(command_A); object retValue = command_A.Return; if (retValue != null) { string strA = retValue.ToString(); txtCaAl_A.Text = strA; if (strA.Length > 7) { txtCaAl_A.Text = strA.Substring(0, 7); } } } } catch { txtCaAl_A.Text = ""; } finally { command_A.Dispose(); } //Modify end break; case "tabArearB": if (dsElementB.L3DataAdapter == null) { dsElementB.L3DataAdapter = Adapter; } if (dsInCtrolEleB.L3DataAdapter == null) { dsInCtrolEleB.L3DataAdapter = Adapter; } if (dsElementInfoB.L3DataAdapter == null) { dsElementInfoB.L3DataAdapter = Adapter; } dsElementB.SourceCondition = "SteelGradeIndex = '" + dbxSteelGradeIndexB.Text + "'"; dsInCtrolEleB.SourceCondition = "SteelGradeIndex = '" + dbxSteelGradeIndexB.Text + "'"; dsElementInfoB.SourceCondition = "HeatID = '" + dbxHeatIDB.Text + "' and UnitTypeID = '" + UnitID.Substring(1, 1).ToString() + "' order by HeatID,AppID,Sample_Count"; Set_tabElementB_AutoSubscribe(true); //Modify begin by llj 2011-04-13 增加Ca/Al比值 String HeatID_B = dbxHeatIDB.Text.Trim(); AppSvrIF.Command command_B = null; String strMethod_B = @"CalEleRateValue"; String strObjURI_B = @"XGMESLogic\RHMag\CRH_Unit_Mag\S51"; try { int iRet = this.Adapter.Session.CreateCommand((int)AppSvrIF.CommandType.Call, strObjURI_B, strMethod_B, ref command_B); if (iRet == 0) { command_B.set_Parameters(0, HeatID_B); command_B.set_Parameters(1, "Ca"); command_B.set_Parameters(2, "Al"); this.Adapter.Session.Execute(command_B); object retValue = command_B.Return; if (retValue != null) { string strB = retValue.ToString(); txtCaAl_B.Text = strB; if (strB.Length > 5) { txtCaAl_B.Text = strB.Substring(0, 5); } } } } catch { txtCaAl_B.Text = ""; } finally { command_B.Dispose(); } //Modify end break; case "tabProStd": if (dsProcess.L3DataAdapter == null) { dsProcess.L3DataAdapter = Adapter; } if (dsAlloy.L3DataAdapter == null) { dsAlloy.L3DataAdapter = Adapter; } if (dsBase.L3DataAdapter == null) { dsBase.L3DataAdapter = Adapter; } if (dsFeed.L3DataAdapter == null) { dsFeed.L3DataAdapter = Adapter; } Set_tabProStd_AutoSubscribe(true); break; case "tabProcess": if (dsBOFProcessData.L3DataAdapter == null) { dsBOFProcessData.L3DataAdapter = Adapter; } dsBOFProcessData.SourceCondition = "HeatID = '" + dbxHeatIDA.Text.Trim() + "'"; if (dsTapProcessData.L3DataAdapter == null) { dsTapProcessData.L3DataAdapter = Adapter; } dsTapProcessData.SourceCondition = "HeatID = '" + dbxHeatIDA.Text.Trim() + "'"; if (dsLFProcessData.L3DataAdapter == null) { dsLFProcessData.L3DataAdapter = Adapter; } dsLFProcessData.SourceCondition = "HeatID = '" + dbxHeatIDA.Text.Trim() + "' order by Start_Time desc"; if (dsLFOxyData.L3DataAdapter == null) { dsLFOxyData.L3DataAdapter = Adapter; } dsLFOxyData.SourceCondition = "HeatID = '" + dbxHeatIDA.Text.Trim() + "' order by Measure_Time desc"; if (dsRHTempData.L3DataAdapter == null) { dsRHTempData.L3DataAdapter = Adapter; } dsRHTempData.SourceCondition = "TreatNo = '" + dbxTreatNoA.Text.Trim() + "'"; if (dsRHOxyData.L3DataAdapter == null) { dsRHOxyData.L3DataAdapter = Adapter; } dsRHOxyData.SourceCondition = "TreatNo = '" + dbxTreatNoA.Text.Trim() + "'"; if (dsExcept.L3DataAdapter == null) { dsExcept.L3DataAdapter = Adapter; } dsExcept.SourceCondition = "HeatID = '" + dbxHeatIDA.Text.Trim() + "' order by Exceptional_Time desc"; if (dsProcessStatus.L3DataAdapter == null) { dsProcessStatus.L3DataAdapter = Adapter; } dsProcessStatus.SourceCondition = "TreatNo = '" + dbxTreatNoA.Text.Trim() + "' order by Change_Time desc"; if (dsAddition.L3DataAdapter == null) { dsAddition.L3DataAdapter = Adapter; } dsAddition.SourceCondition = "TreatNo = '" + dbxTreatNoA.Text.Trim() + "' order by Discharge_Time desc"; if (dsProcessInfo.L3DataAdapter == null) { dsProcessInfo.L3DataAdapter = Adapter; } dsProcessInfo.SourceCondition = "TreatNo = '" + dbxTreatNoA.Text.Trim() + "'"; if (dsWireData.L3DataAdapter == null) { dsWireData.L3DataAdapter = Adapter; } dsWireData.SourceCondition = "TreatNo = '" + dbxTreatNoA.Text.Trim() + "' order by WireTime desc"; if (dsRHProcess.L3DataAdapter == null) { dsRHProcess.L3DataAdapter = Adapter; } dsRHProcess.SourceCondition = "TreatNo = '" + dbxTreatNoA.Text.Trim() + "'"; if (dsLadleInfo.L3DataAdapter == null) { dsLadleInfo.L3DataAdapter = Adapter; } dsLadleInfo.SourceCondition = "TreatNo = '" + dbxTreatNoA.Text.Trim() + "'"; Set_tabProcess_AutoSubscribe(true); break; case "tabProcessB": if (dsBOFProcessData.L3DataAdapter == null) { dsBOFProcessData.L3DataAdapter = Adapter; } dsBOFProcessData.SourceCondition = "HeatID = '" + dbxHeatIDB.Text.Trim() + "'"; if (dsTapProcessData.L3DataAdapter == null) { dsTapProcessData.L3DataAdapter = Adapter; } dsTapProcessData.SourceCondition = "HeatID = '" + dbxHeatIDB.Text.Trim() + "'"; if (dsLFProcessData.L3DataAdapter == null) { dsLFProcessData.L3DataAdapter = Adapter; } dsLFProcessData.SourceCondition = "HeatID = '" + dbxHeatIDB.Text.Trim() + "' order by Start_Time desc"; if (dsLFOxyData.L3DataAdapter == null) { dsLFOxyData.L3DataAdapter = Adapter; } dsLFOxyData.SourceCondition = "HeatID = '" + dbxHeatIDB.Text.Trim() + "' order by Measure_Time desc"; if (dsRHTempData.L3DataAdapter == null) { dsRHTempData.L3DataAdapter = Adapter; } dsRHTempData.SourceCondition = "TreatNo = '" + dbxTreatNoB.Text.Trim() + "'"; if (dsRHOxyData.L3DataAdapter == null) { dsRHOxyData.L3DataAdapter = Adapter; } dsRHOxyData.SourceCondition = "TreatNo = '" + dbxTreatNoB.Text.Trim() + "'"; if (dsExcept.L3DataAdapter == null) { dsExcept.L3DataAdapter = Adapter; } dsExcept.SourceCondition = "HeatID = '" + dbxHeatIDB.Text.Trim() + "' order by Exceptional_Time desc"; if (dsProcessStatus.L3DataAdapter == null) { dsProcessStatus.L3DataAdapter = Adapter; } dsProcessStatus.SourceCondition = "TreatNo = '" + dbxTreatNoB.Text.Trim() + "' order by Change_Time desc"; if (dsAddition.L3DataAdapter == null) { dsAddition.L3DataAdapter = Adapter; } dsAddition.SourceCondition = "TreatNo = '" + dbxTreatNoB.Text.Trim() + "' order by Discharge_Time desc"; if (dsProcessInfo.L3DataAdapter == null) { dsProcessInfo.L3DataAdapter = Adapter; } dsProcessInfo.SourceCondition = "TreatNo = '" + dbxTreatNoB.Text.Trim() + "'"; if (dsWireData.L3DataAdapter == null) { dsWireData.L3DataAdapter = Adapter; } dsWireData.SourceCondition = "TreatNo = '" + dbxTreatNoB.Text.Trim() + "' order by WireTime desc"; if (dsRHProcess.L3DataAdapter == null) { dsRHProcess.L3DataAdapter = Adapter; } dsRHProcess.SourceCondition = "TreatNo = '" + dbxTreatNoB.Text.Trim() + "'"; if (dsLadleInfo.L3DataAdapter == null) { dsLadleInfo.L3DataAdapter = Adapter; } dsLadleInfo.SourceCondition = "TreatNo = '" + dbxTreatNoB.Text.Trim() + "'"; Set_tabProcess_AutoSubscribe(true); //Set_tabProcessB_AutoSubscribe(true);//2009-05-05 break; default: break; } } } catch { } }
private void MainTab_Selected(object sender, TabControlEventArgs args) { if ((sender == null) || (args == null)) { Logging.LogNullError(nameof(sender) + " || " + nameof(args)); return; } if (args.TabPage == RemoveTab) { ConfigPage configPage = OldTab as ConfigPage; if (configPage == null) { MainTab.SelectedIndex = -1; return; } if (configPage == ASFTab) { MainTab.SelectedTab = ASFTab; Logging.LogGenericErrorWithoutStacktrace("You can't remove global config!"); return; } MainTab.SelectedTab = configPage; if (DialogBox.YesNoBox("Removal", "Do you really want to remove this config?") != DialogResult.Yes) { return; } MainTab.SelectedIndex = 0; configPage.ASFConfig.Remove(); MainTab.TabPages.Remove(configPage); } else if (args.TabPage == RenameTab) { ConfigPage configPage = OldTab as ConfigPage; if (configPage == null) { MainTab.SelectedIndex = -1; return; } if (configPage == ASFTab) { MainTab.SelectedTab = ASFTab; Logging.LogGenericErrorWithoutStacktrace("You can't rename global config!"); return; } MainTab.SelectedTab = configPage; string input; if (DialogBox.InputBox("Rename", "Your new bot name:", out input) != DialogResult.OK) { return; } if (string.IsNullOrEmpty(input)) { Logging.LogGenericErrorWithoutStacktrace("Your bot name is empty!"); return; } // Get rid of any potential whitespaces in bot name input = Regex.Replace(input, @"\s+", ""); configPage.ASFConfig.Rename(input); configPage.RefreshText(); } else if (args.TabPage == NewTab) { ConfigPage configPage = OldTab as ConfigPage; if (configPage == null) { MainTab.SelectedIndex = -1; return; } MainTab.SelectedTab = configPage; Tutorial.OnAction(Tutorial.EPhase.BotNickname); string input; if (DialogBox.InputBox("New", "Your new bot name:", out input) != DialogResult.OK) { return; } if (string.IsNullOrEmpty(input)) { Logging.LogGenericErrorWithoutStacktrace("Your bot name is empty!"); return; } // Get rid of any potential whitespaces in bot name input = Regex.Replace(input, @"\s+", ""); if (ASFConfig.ASFConfigs.Select(config => Path.GetFileNameWithoutExtension(config.FilePath)).Any(fileNameWithoutExtension => (fileNameWithoutExtension == null) || fileNameWithoutExtension.Equals(input))) { Logging.LogGenericErrorWithoutStacktrace("Bot with such name exists already!"); return; } input = Path.Combine(Program.ConfigDirectory, input + ".json"); ConfigPage newConfigPage = new ConfigPage(BotConfig.Load(input)); MainTab.TabPages.Insert(MainTab.TabPages.Count - ReservedTabs, newConfigPage); MainTab.SelectedTab = newConfigPage; Tutorial.OnAction(Tutorial.EPhase.BotNicknameFinished); } else if (args.TabPage == ASFTab) { Tutorial.OnAction(Tutorial.EPhase.GlobalConfigOpened); } }
// -------------------------- private void tabControl1_Selected(object sender, TabControlEventArgs e) { // -------------------------- plotOn = (tabControl1.SelectedTab.Name == "Plot"); }
private void tabControl1_Selected(object sender, TabControlEventArgs e) { if (e.TabPageIndex == 1) { } }
private void TabSelectedHndler(object sender, TabControlEventArgs e) { UpdateSettings(); }
private void tabControl1_Selected(object sender, TabControlEventArgs e) { UIUpdater_Tick(sender, e); }
private void MinimapTab_Selected(object sender, TabControlEventArgs e) { }
private void tabControl1_Selected(object sender, TabControlEventArgs e) { ((GameAgent)e.TabPage.Tag).active(); }
private void tc_Selected(object sender, TabControlEventArgs e) { this.Selection(); //Выделяем вкладку по событию из NewTabControl }
private void tabControlsetting_Selected(object sender, TabControlEventArgs e) { // MessageBox.Show("Outside if"); if (e.TabPage.Text.ToString().ToLower() == "incoming popup") { // MessageBox.Show("Inside evnet"); string query = "select TaskDock from computerpref where computerName='" + Environment.MachineName + "_hrdsq_service'"; DentalPlugin.Connection connection = new DentalPlugin.Connection(); this.command = query; tbxIncomingTimer.Text = Convert.ToString(connection.ExecuteScalar(this.command, CommandType.Text, (MySqlParameter[])null)); } else if (e.TabPage.Text.ToString().ToLower() == "database") { try { EnCryptDecryptEngine _objED = new EnCryptDecryptEngine(); if (File.Exists(AppDomain.CurrentDomain.BaseDirectory + "\\config.txt")) { fcontent = File.ReadAllText(AppDomain.CurrentDomain.BaseDirectory + "\\config.txt"); using (StreamReader sr = new StreamReader(AppDomain.CurrentDomain.BaseDirectory + "\\config.txt")) { string line; int i = 1; while ((line = sr.ReadLine()) != null) { if (i == 1) { dbname = line.ToString().Trim(); } else if (i == 2) { dbhost = line.ToString().Trim(); } else if (i == 3) { dbusername = line.ToString().Trim(); } else if (i == 4) { dbpass = line.ToString().Trim(); } else if (i == 5) { dbport = line.ToString().Trim(); } i++; string Server = _objED.Decrypt(dbhost, true); string port = _objED.Decrypt(dbport, true); txtserver.Text = Server + ":" + port; txtdatabase.Text = _objED.Decrypt(dbname, true); txtpass.Text = _objED.Decrypt(dbpass, true); txtusername.Text = _objED.Decrypt(dbusername, true); } } } } catch (Exception ex) { Library.WriteErrorLog(ex.Message); } } else if (e.TabPage.Text.ToString().ToLower() == "exclude operatory") { if (File.Exists(AppDomain.CurrentDomain.BaseDirectory + "\\config.txt")) { if (radCheckedDropDownList1.DataSource == null) { Connection conn = new Connection(); string Qry = "SELECT operatorynum , OpName from operatory"; DataTable dtLang = conn.GetDataSet(Qry.ToString().Trim(), CommandType.Text, null).Tables[0]; if (dtLang.Rows.Count > 0) { foreach (DataRow dr in dtLang.Rows) { if (!string.IsNullOrEmpty(Convert.ToString(dr["OpName"].ToString()))) { OpList.Add(new Operatory { operatorynum = Convert.ToInt64(dr["OperatoryNum"].ToString()), OpName = Convert.ToString(dr["OpName"].ToString()), }); } } } radCheckedDropDownList1.DataSource = null; radCheckedDropDownList1.DisplayMember = "OpName"; radCheckedDropDownList1.ValueMember = "operatorynum"; radCheckedDropDownList1.DataSource = OpList.ToList(); //================================================================================================= string command = "select valuestring from preference where prefname ='px_exclude_op_confirmation&remainder' "; string data = Convert.ToString(conn.ExecuteScalar(command.ToString().Trim(), CommandType.Text, null)); if (data != null && data != "") { //Checking all the Default form items string[] fff = data.Split(','); for (int i = 0; i < fff.Count(); i++) { int index = radCheckedDropDownList1.Items.Where(a => a.Value.ToString().Equals(fff[i])).Select(a => a.Index).FirstOrDefault(); this.radCheckedDropDownList1.Items[index].Checked = true; } } } } } }
private void tabs_Selected(object sender, TabControlEventArgs e) { General.MainWindow.FocusDisplay(); }
private void Sessiontab_Selected(object sender, TabControlEventArgs e) { }
/// <summary> /// Method RibbonTabContainer_Selected. /// </summary> /// <param name="sender">Event sender.</param> /// <param name="e">Instance of TabControlEventArgs.</param> private void RibbonTabContainer_Selected(object sender, TabControlEventArgs e) { this._isRibbonTabShow = false; }
private void questionTabControl_Selected(object sender, TabControlEventArgs e) { //TabPage currentTab = e.TabPage; }
private void TabControl_Selected(object sender, TabControlEventArgs e) { UpdateReadline(); }
private void tabControl_Selected(object sender, TabControlEventArgs e) { this.TabPageChanged(); }
private void ModInfoTabSelected(object sender, TabControlEventArgs e) { UpdateModChangeLog(ModList.SelectedObject); }
private void tabControl1_Selected(object sender, TabControlEventArgs e) { try { if (e.Action == TabControlAction.Selected) { Set_TabPlan_AutoSubscribe(false); Set_tabElement_AutoSubscribe(false); Set_tabMakeStd_AutoSubscribe(false); Set_tabProcess_AutoSubscribe(false); Set_tabExcept_AutoSubscribe(false); switch (e.TabPage.Name) { case "tabPlan": //if (dsPlan.L3DataAdapter == null) // dsPlan.L3DataAdapter = Adapter; //if (dsArrivleCCMSteel.L3DataAdapter == null) // dsArrivleCCMSteel.L3DataAdapter = Adapter; //Set_TabPlan_AutoSubscribe(true); GetPlan(); break; case "tabElement": if (dsElementStd.L3DataAdapter == null) { dsElementStd.L3DataAdapter = Adapter; } if (dsLabElement.L3DataAdapter == null) { dsLabElement.L3DataAdapter = Adapter; } Set_tabElement_AutoSubscribe(true); break; case "tabMakeStd": if (dsBaseStd.L3DataAdapter == null) { dsBaseStd.L3DataAdapter = Adapter; } if (dsProcStd.L3DataAdapter == null) { dsProcStd.L3DataAdapter = Adapter; } if (dsSpeedStd.L3DataAdapter == null) { dsSpeedStd.L3DataAdapter = Adapter; } if (dsTundishStd.L3DataAdapter == null) { dsTundishStd.L3DataAdapter = Adapter; } if (dsTundishFlux.L3DataAdapter == null) { dsTundishFlux.L3DataAdapter = Adapter; } Set_tabMakeStd_AutoSubscribe(true); break; case "tabProcess": if (dsProcessData.L3DataAdapter == null) { dsProcessData.L3DataAdapter = Adapter; } if (dsLadle.L3DataAdapter == null) { dsLadle.L3DataAdapter = Adapter; } if (dsBaseCCM.L3DataAdapter == null) { dsBaseCCM.L3DataAdapter = Adapter; } if (dsProtectCasting.L3DataAdapter == null) { dsProtectCasting.L3DataAdapter = Adapter; } if (dsCutInfo.L3DataAdapter == null) { dsCutInfo.L3DataAdapter = Adapter; } if (dsCurve.L3DataAdapter == null) { dsCurve.L3DataAdapter = Adapter; } Set_tabProcess_AutoSubscribe(true); break; case "tabExcept": if (dsProcessStatus.L3DataAdapter == null) { dsProcessStatus.L3DataAdapter = Adapter; } if (dsProdExcept.L3DataAdapter == null) { dsProdExcept.L3DataAdapter = Adapter; } if (dsCastingData.L3DataAdapter == null) { dsCastingData.L3DataAdapter = Adapter; } if (dsTundishData.L3DataAdapter == null) { dsTundishData.L3DataAdapter = Adapter; } if (dsHeatTundishTemp.L3DataAdapter == null) { dsHeatTundishTemp.L3DataAdapter = Adapter; } Set_tabExcept_AutoSubscribe(true); break; default: break; } } } catch { } }
private void tabControl1_Selected(object sender, TabControlEventArgs e) { //Bitmap newTabBitmap = WindowUtilities.GrabWindowBitmap(tabControl1.SelectedTab.Handle, tabControl1.SelectedTab.Size); //_tabBitmaps[tabControl1.SelectedIndex] = newTabBitmap; }
/// <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(); }
private void TabControl1_Deselected(object sender, TabControlEventArgs e) { _previousTab = e.TabPage; }
private void TabControlMain_Selected(object sender, TabControlEventArgs e) { }
private void tabControl1_Selected(object sender, TabControlEventArgs e) { this.tomaTab(); }
private void tabControl_Selected(object sender, TabControlEventArgs e) { if (e.TabPage == tabPageSetup) { buttonSaveInRepository.Visible = SetupTabSelected_MakeSaveInRepositoryVisible; SetupTabSelected(e); } // if it was modified, then we need to apply it or switch back to // the setup tab (unless it was the about tab that was selected) else if (e.TabPage != tabPageAbout) { // Test or Advanced tab. // If the configuration was modified, then make the user go back if (IsModified && !OnApply()) { MessageBox.Show("You must first configure the conversion process on the Setup tab", EncConverters.cstrCaption); tabControl.SelectTab(tabPageSetup); } else { System.Diagnostics.Debug.Assert(!IsModified); IEncConverter aEC = InitializeEncConverter; if (aEC != null) { if (e.TabPage == tabPageTestArea) { string strLhsFont, strRhsFont; if (GetFontMapping(aEC.Name, out strLhsFont, out strRhsFont)) { if (!String.IsNullOrEmpty(strLhsFont)) { ecTextBoxInput.Font = new Font(strLhsFont, 14); } if (!String.IsNullOrEmpty(strRhsFont)) { ecTextBoxOutput.Font = new Font(strRhsFont, 14); } } TestTabInputChanged(); // doesn't happen automatically the first time for some reason checkBoxTestReverse.Visible = !EncConverters.IsUnidirectional(aEC.ConversionType); } else // if (e.TabPage == tabPageAdvanced) { m_bAdvancedTabVisited = true; dataGridViewProperties.Visible = labelProperties.Visible = false; // pessimistic if (String.IsNullOrEmpty(FriendlyName)) { textBoxFriendlyName.Text = DefaultFriendlyName; IsModified = true; } else { textBoxFriendlyName.Text = FriendlyName; // we shouldn't get here with a temporary converter... System.Diagnostics.Debug.Assert(FriendlyName.IndexOf(EncConverters.cstrTempConverterPrefix) != 0); // load the grid with any existing converter property keys and their values // (but only do this if this is already in the collection object (or there // won't be any properties by definition) and if there *are* any properties // (because many sub-classes don't have any properties) EncConverters aECs = (EncConverters)m_aECs; ECAttributes attrs = null; if (aECs.ContainsKey(FriendlyName) && ((attrs = m_aECs.Attributes(FriendlyName, AttributeType.Converter)) != null) && (attrs.Count > 0)) { dataGridViewProperties.Visible = labelProperties.Visible = true; dataGridViewProperties.Rows.Clear(); foreach (DictionaryEntry kvp in attrs) { object[] aos = new object[] { kvp.Key, kvp.Value }; dataGridViewProperties.Rows.Add(aos); } } } // certain sub-classes don't allow the friendly name to be modified (e.g. spellfixer) textBoxFriendlyName.ReadOnly = ShouldFriendlyNameBeReadOnly; // load the combo boxes with the existing Encoding names comboBoxEncodingNamesLhs.Items.Clear(); comboBoxEncodingNamesRhs.Items.Clear(); foreach (string strEncodingName in m_aECs.Encodings) { comboBoxEncodingNamesLhs.Items.Add(strEncodingName); comboBoxEncodingNamesRhs.Items.Add(strEncodingName); } // if the left-hand side Encoding name is already configured, then select that if (!String.IsNullOrEmpty(LhsEncodingId)) { if (!comboBoxEncodingNamesLhs.Items.Contains(LhsEncodingId)) { comboBoxEncodingNamesLhs.Items.Add(LhsEncodingId); } comboBoxEncodingNamesLhs.SelectedItem = LhsEncodingId; } // if the right-hand side Encoding name is already configured, then select that if (!String.IsNullOrEmpty(RhsEncodingId)) { if (!comboBoxEncodingNamesRhs.Items.Contains(RhsEncodingId)) { comboBoxEncodingNamesRhs.Items.Add(RhsEncodingId); } comboBoxEncodingNamesRhs.SelectedItem = RhsEncodingId; } // initialize the check boxes for the Process Types checkBoxUnicodeEncodingConversion.Checked = ((ProcessType & (int)ProcessTypeFlags.UnicodeEncodingConversion) != 0); checkBoxTransliteration.Checked = ((ProcessType & (int)ProcessTypeFlags.Transliteration) != 0); checkBoxICUTransliteration.Checked = ((ProcessType & (int)ProcessTypeFlags.ICUTransliteration) != 0); checkBoxICUConverter.Checked = ((ProcessType & (int)ProcessTypeFlags.ICUConverter) != 0); checkBoxCodePage.Checked = ((ProcessType & (int)ProcessTypeFlags.CodePageConversion) != 0); checkBoxNonUnicodeEncodingConversion.Checked = ((ProcessType & (int)ProcessTypeFlags.NonUnicodeEncodingConversion) != 0); checkBoxSpellingFixerProject.Checked = ((ProcessType & (int)ProcessTypeFlags.SpellingFixerProject) != 0); checkBoxICURegularExpression.Checked = ((ProcessType & (int)ProcessTypeFlags.ICURegularExpression) != 0); checkBoxPythonScript.Checked = ((ProcessType & (int)ProcessTypeFlags.PythonScript) != 0); checkBoxPerlExpression.Checked = ((ProcessType & (int)ProcessTypeFlags.PerlExpression) != 0); checkBoxSpare1.Checked = ((ProcessType & (int)ProcessTypeFlags.UserDefinedSpare1) != 0); checkBoxSpare2.Checked = ((ProcessType & (int)ProcessTypeFlags.UserDefinedSpare2) != 0); } } } } }
//换tab页 private void tabControlMain_Selected(object sender, TabControlEventArgs e) { try { if (e.Action == TabControlAction.Selected) { switch (e.TabPage.Name) { case "tabCoolWater": if (dsCoolWater.L3DataAdapter == null) { dsCoolWater.L3DataAdapter = Adapter; } break; case "tabRoller": if (dsRoller.L3DataAdapter == null) { dsRoller.L3DataAdapter = Adapter; } break; case "tabMold": if (dsMold.L3DataAdapter == null) { dsMold.L3DataAdapter = Adapter; } break; case "tabLevel": if (dsLevel.L3DataAdapter == null) { dsLevel.L3DataAdapter = Adapter; } break; case "tabOscillate": if (dsOscillate.L3DataAdapter == null) { dsOscillate.L3DataAdapter = Adapter; } break; case "tabPlugBar": if (dsPlugBar.L3DataAdapter == null) { dsPlugBar.L3DataAdapter = Adapter; } break; case "tabEnergy": if (dsEnergy.L3DataAdapter == null) { dsEnergy.L3DataAdapter = Adapter; } break; case "tabElectMix": if (dsElectMix.L3DataAdapter == null) { dsElectMix.L3DataAdapter = Adapter; } break; default: break; } } } catch { } }
private void STTabControl_Selected(object sender, TabControlEventArgs e) { }
private void tabControl_Selected(object sender, TabControlEventArgs e) { this.Text = e.TabPage.Text + "를 선택!!"; }