private void FrmModuleConfig_Load(object sender, EventArgs e) { FormTranslator.Translate(this, GetType().FullName, new FormTranslatorOptions { ContextMenus = new ContextMenuStrip[] { cmsTree } }); if (!string.IsNullOrEmpty(configProvider.FormTitle)) { Text = configProvider.FormTitle; } propertyGrid.ToolbarVisible = configProvider.GridToolbarVisible; propertyGrid.HelpVisible = configProvider.GridHelpVisible; propertyGrid.PropertySort = configProvider.GridSort; if (!configProvider.LoadConfig(out string errMsg)) { ScadaUiUtils.ShowError(errMsg); } configProvider.BackupConfig(); Modified = false; AddToolButtons(); TakeTreeViewImages(); FillTreeView(); }
private void FrmCommTcpServerProps_Load(object sender, EventArgs e) { FormTranslator.Translate(this, GetType().FullName, new FormTranslatorOptions { ToolTip = toolTip }); OptionsToControls(); }
private void FrmLineAdd_Load(object sender, EventArgs e) { FormTranslator.Translate(this, GetType().FullName); FillInstanceList(); SetLineNum(); txtName.Select(); }
/// <summary> /// Initializes a new instance of the class. /// </summary> public FrmFind(FrmBaseTable frmBaseTable, DataGridView dataGridView) : this() { this.frmBaseTable = frmBaseTable ?? throw new ArgumentNullException(nameof(frmBaseTable)); this.dataGridView = dataGridView ?? throw new ArgumentNullException(nameof(dataGridView)); FormTranslator.Translate(this, GetType().FullName); }
private void FrmTableExport_Load(object sender, EventArgs e) { FormTranslator.Translate(this, GetType().FullName); saveFileDialog.SetFilter(ExtensionPhrases.ExportTableFilter); ExtensionUtils.FillTableList(cbTable, configDatabase, SelectedItemType); cbFormat.SelectedIndex = 0; }
private async void FrmRegistration_Load(object sender, EventArgs e) { FormTranslator.Translate(this, GetType().FullName); LoadRegKey(); txtRegKey.Select(); await Task.Run(() => RequestCompCode()); }
private void toolStripMenuItem_addimg_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(main.PicFileName)) { var f = FormTranslator.Translate(new Form_Dialog_MacroAddImage()); if (f.ShowDialog() == DialogResult.OK) { main.PicFileName = f.Path; main.PicSize = new SizeF(f.XSize, f.YSize); MacroBmp = new Bitmap(f.Path); } ; } else { var f = FormTranslator.Translate(new Form_Dialog_MacroAddImage() { Path = main.PicFileName, XSize = main.PicSize.Width, YSize = main.PicSize.Height }); if (f.ShowDialog() == DialogResult.OK) { main.PicFileName = f.Path; main.PicSize = new SizeF(f.XSize, f.YSize); MacroBmp = new Bitmap(f.Path); } ; } }
private void FrmPasswordSet_Load(object sender, EventArgs e) { FormTranslator.Translate(this, GetType().FullName); txtUserID.Text = UserID.ToString(); txtPassword.Select(); btnHidePassword.Top = btnShowPassword.Top; SetOkEnabled(); }
private void FrmStartPage_Load(object sender, EventArgs e) { FormTranslator.Translate(this, GetType().FullName, new FormTranslatorOptions { ContextMenus = new ContextMenuStrip[] { cmsProjectList } }); FillRecentProjectList(); }
private void FrmInCnl_Load(object sender, EventArgs e) { FormTranslator.Translate(this, GetType().FullName); FormTranslator.Translate(bmArchive, bmArchive.GetType().FullName); FormTranslator.Translate(bmEvent, bmEvent.GetType().FullName); ShowItemProps(); }
private void FrmProfileEdit_Load(object sender, EventArgs e) { FormTranslator.Translate(this, GetType().FullName); FormTranslator.Translate(ctrlAgentConnection, ctrlAgentConnection.GetType().FullName); FormTranslator.Translate(ctrlDbConnection, ctrlDbConnection.GetType().FullName); FillExtensionComboBox(); ConfigToControls(); }
private void FrmDataSources_Load(object sender, EventArgs e) { FormTranslator.Translate(this, GetType().FullName); FillDriverComboBox(); SetControlsEnabled(); ConfigToControls(); btnPaste.Enabled = false; }
private void FrmFileAssociation_Load(object sender, EventArgs e) { FormTranslator.Translate(this, GetType().FullName); openFileDialog.SetFilter(AppPhrases.ExecutableFileFilter); txtExt.Text = FileExtension; txtPath.Text = ExecutablePath; }
private void FrmBitMask_Load(object sender, EventArgs e) { FormTranslator.Translate(this, GetType().FullName); FormTranslator.Translate(ctrlBitMask, ctrlBitMask.GetType().FullName); ctrlBitMask.ShowMask(); ctrlBitMask.SetFocus(); }
/// <summary> /// Initializes a new instance of the class. /// </summary> public FrmFilter(DataGridView dataGridView, DataTable dataTable) : this() { this.dataGridView = dataGridView ?? throw new ArgumentNullException(nameof(dataGridView)); this.dataTable = dataTable ?? throw new ArgumentNullException(nameof(dataTable)); currentFilter = null; FormTranslator.Translate(this, GetType().FullName); }
private void CtrlLineReqSequence_Load(object sender, EventArgs e) { FormTranslator.Translate(this, GetType().FullName, new FormTranslatorOptions { ToolTip = toolTip, SkipUserControls = false }); SetControlsEnabled(); btnPasteDevice.Enabled = false; }
private void FrmConnManager_Load(object sender, EventArgs e) { FormTranslator.Translate(this, GetType().FullName); FormTranslator.Translate(ctrlClientConnection, ctrlClientConnection.GetType().FullName); ActiveControl = lvConn; LoadConfig(); FillConnList(); }
private void FrmLimCreate_Load(object sender, EventArgs e) { FormTranslator.Translate(this, GetType().FullName); if (CnlNum > 0) { txtName.Text = string.Format(AppPhrases.DefaultLimName, CnlNum); } }
private void FrmLineOptions_Load(object sender, EventArgs e) { FormTranslator.Translate(this, GetType().FullName); Text = string.Format(ExtensionPhrases.LineConfigTitle, lineConfig.CommLineNum); ChildFormTag.MessageToChildForm += ChildFormTag_MessageToChildForm; ctrlLineMain.Init(adminContext, commApp); ctrlLinePolling.Init(adminContext, commApp, lineConfig); lbTabs.SelectedIndex = 0; }
private void FrmEditSource_Load(object sender, EventArgs e) { FormTranslator.Translate(this, GetType().FullName); txtPlainText.MaxLength = MaxLength; string text = Normalize(PlainText); txtPlainText.Text = text.Length <= MaxLength ? text : text.Substring(0, MaxLength); ShowCurrentLine(); ShowTextLength(); }
private void FrmOpcUaServerDSO_Load(object sender, EventArgs e) { FormTranslator.Translate(this, GetType().FullName, new FormTranslatorOptions { ToolTip = toolTip }); openFileDialog.SetFilter(CommonPhrases.XmlFileFilter); saveFileDialog.SetFilter(CommonPhrases.XmlFileFilter); OptionsToControls(); }
private void button2_Click(object sender, EventArgs e) { if (listBox_Main.SelectedIndex != -1) { FormTranslator.Translate(new Form_Dialog_EditGraph(Main.Graphs[listBox_Main.SelectedIndex])).ShowDialog(); Main.ResetPrerender(); UpdateListBox(); RedrawHigh(pictureBox1.Width / 2 - dx, pictureBox1.Height / 2 - dy); } }
private void FrmDeviceData_Load(object sender, EventArgs e) { FormTranslator.Translate(this, GetType().FullName); Text = string.Format(Text, deviceConfig.DeviceNum); ChildFormTag.MessageToChildForm += ChildFormTag_MessageToChildForm; InitLogBox(); tmrRefresh.Interval = ScadaUiUtils.LogRemoteRefreshInterval; tmrRefresh.Start(); }
/// <summary> /// Initializes a new instance of the class. /// </summary> public FrmDeviceCommand(IAdminContext adminContext, DeviceConfig deviceConfig) : this() { this.adminContext = adminContext ?? throw new ArgumentNullException(nameof(adminContext)); this.deviceConfig = deviceConfig ?? throw new ArgumentNullException(nameof(deviceConfig)); AgentClient = null; FormTranslator.Translate(this, GetType().FullName); Text = string.Format(Text, CommUtils.GetDeviceTitle(deviceConfig)); rbNumVal.Checked = true; }
private void FrmLineStats_Load(object sender, EventArgs e) { FormTranslator.Translate(this, GetType().FullName); Text = string.Format(ExtensionPhrases.LineStatsTitle, lineConfig.CommLineNum); ChildFormTag.MessageToChildForm += ChildFormTag_MessageToChildForm; lbTabs.SelectedIndex = 0; InitLogBoxes(); tmrRefresh.Interval = ScadaUiUtils.LogRemoteRefreshInterval; tmrRefresh.Start(); }
private void FrmCnlCreate_Load(object sender, EventArgs e) { FormTranslator.Translate(this, GetType().FullName); FormTranslator.Translate(ctrlCnlCreate1, ctrlCnlCreate1.GetType().FullName); FormTranslator.Translate(ctrlCnlCreate2, ctrlCnlCreate2.GetType().FullName); FormTranslator.Translate(ctrlCnlCreate3, ctrlCnlCreate3.GetType().FullName); ctrlCnlCreate1.Init(adminContext, project, recentSelection); ctrlCnlCreate2.Init(project, recentSelection); ctrlCnlCreate3.Init(adminContext, project); ApplyStep(0); }
private void FrmInstanceProfile_Load(object sender, EventArgs e) { FormTranslator.Translate(this, GetType().FullName); FormTranslator.Translate(ctrlProfileSelector, ctrlProfileSelector.GetType().FullName); ctrlProfileSelector.Init(appData, project.DeploymentConfig, instance); if (ctrlProfileSelector.SelectedProfile != null) { initialProfile = ctrlProfileSelector.SelectedProfile.DeepClone(); } }
private void FrmTableEditor_Load(object sender, EventArgs e) { FormTranslator.Translate(this, GetType().FullName, new FormTranslatorOptions { ContextMenus = new ContextMenuStrip[] { cmsDevice } }); ChildFormTag.MessageToChildForm += ChildFormTag_MessageToChildForm; Text = Path.GetFileName(fileName); TakeTreeViewImages(); FillTreeView(); LoadTableView(); }
private void button_openineditor_Click(object sender, EventArgs e) { if (listBox_macroses.SelectedIndex != -1) { FormTranslator.Translate(new Form_Macro(main.Elems[listBox_macroses.SelectedIndex].Path)).Show(); } else { MessageBox.Show( TB.L.Phrase["Form_MacroPack.SelectMacro"], TB.L.Phrase["Form_MacroPack.Error"], MessageBoxButtons.OK, MessageBoxIcon.Information); } }
private void FrmConfig_Load(object sender, EventArgs e) { // translate form FormTranslator.Translate(this, GetType().FullName); Text = string.Format(Text, deviceNum); // load configuration if (File.Exists(configFileName) && !config.Load(configFileName, out string errMsg)) { ScadaUiUtils.ShowError(errMsg); } // display configuration ConfigToControls(); }