internal StyleProgram() { InitializeComponent(); #region SpeelTextBox //Create TLBox TLBox = new SpellTextBox(); ZSKN.Controls.Add(TLBox); TLBox.Anchor = ((AnchorStyles.Bottom | AnchorStyles.Left) | AnchorStyles.Right); TLBox.BorderStyle = BorderStyle.None; TLBox.Location = new System.Drawing.Point(13, 296); TLBox.Name = "TLBox"; TLBox.Size = new System.Drawing.Size(620, 20); TLBox.TabIndex = 13; TLBox.Visible = true; TLBox.Enabled = false; TLBox.Multiline = false; TLBox.BringToFront(); //Initialize Events Engine.Append(ref TLBox.TextChanged, TLBox_TextChanged); TLBox.KeyDown += new KeyEventHandler(TLBox_KeyDown); TLBox.Anchor = ((AnchorStyles.Bottom | AnchorStyles.Left) | AnchorStyles.Right); ZTextBox.GotFocus += (sender, e) => { TLBox.Focus(); }; #endregion #region RadioToolStrip //Initialize RadioToolStrip Engine ToolStripMenuItem[] BackupItems = new ToolStripMenuItem[] { ZAoSalvar, Z200Dialogos, Z100Dialogos, Z50Dialogos, Z25Dialogos, Z10Dialogos, ZNunca }; RadioEngine = new Engine.RadioToolStrip(ref BackupItems, 2); ToolStripMenuItem[] ThemeItems = new ToolStripMenuItem[] { ZBasico, ZModerno }; ThemeEngine = new Engine.RadioToolStrip(ref ThemeItems, 1); ThemeEngine.CheckedChange += ChangeTheme; ToolStripMenuItem[] TLCLients = new ToolStripMenuItem[] { ZLEC, ZGoogle, ZBing }; TLEngine = new Engine.RadioToolStrip(ref TLCLients, 1); TLEngine.CheckedChange += TLEngine_CheckedChange; ToolStripMenuItem[] SelItems = new ToolStripMenuItem[] { ZAutoSelMode, ZAsianSel, ZLatimSel }; SelEngine = new Engine.RadioToolStrip(ref SelItems, 0); SelEngine.CheckedChange += SelEngine_CheckedChange; //Initialize DeleyedMouseOver Event OVE = new Engine.OverTimerEvent() { sender = StrList }; OVE.MouseStopOver += StrList_MouseStopOver; OVE.Initialize(); #endregion //Set File Filter OpenScript.Filter = Engine.Filter; SaveScript.Filter = Engine.Filter; //Initalize TLBox TLBox.Font = ZTextBox.Font; TLBox.LoadDictionary(AppDomain.CurrentDomain.BaseDirectory + "Dictionary"); TLBox.BootUP(); //Initialize Config ZVerificacao.Checked = Engine.GetConfig("VNXTLP", "SpellCheck", false).ToLower() == "true"; TLBox.SpellCheckEnable = ZVerificacao.Checked; ZValidar.Checked = Engine.GetConfig("VNXTLP", "AutoJump", false).ToLower() == "true"; ZAltaRel.Checked = Engine.GetConfig("VNXTLP", "HighFont", false).ToLower() == "true"; ZAltoContraste.Checked = Engine.GetConfig("VNXTLP", "BlackTheme", false).ToLower() == "true"; ZLimiteAvanco.Checked = Engine.GetConfig("VNXTLP", "SkipDelay", false).ToLower() == "true"; ZModoDianmico.Checked = Engine.GetConfig("VNXTLP", "DynamicMode", false).ToLower() == "true"; //get int string cfg = Engine.GetConfig("VNXTLP", "BackupSpeed", false); int Val = 0; if (int.TryParse(cfg, out Val)) { RadioEngine.SelectedIndex = Val; } //get int cfg = Engine.GetConfig("VNXTLP", "SelMode", false); if (int.TryParse(cfg, out Val)) { SelEngine.SelectedIndex = Val; } //get int cfg = Engine.GetConfig("VNXTLP", "TLClient", false); if (int.TryParse(cfg, out Val)) { TLEngine.SelectedIndex = Val; } else if (cfg == "off") { ZTLClient.Visible = false; } //Load Translation ZContinue.Text = Engine.LoadTranslation(Engine.TLID.Next); ZReturn.Text = Engine.LoadTranslation(Engine.TLID.Back); ZArquivo.Text = Engine.LoadTranslation(Engine.TLID.File); ZAbrir.Text = Engine.LoadTranslation(Engine.TLID.Open); ZSaveAsItem.Text = Engine.LoadTranslation(Engine.TLID.SaveAs); ZMinhaConta.Text = Engine.LoadTranslation(Engine.TLID.MyAccount); ZSelecao.Text = Engine.LoadTranslation(Engine.TLID.Selection); ZSelecionarTodos.Text = Engine.LoadTranslation(Engine.TLID.SelectAll); ZDesselecionarTodos.Text = Engine.LoadTranslation(Engine.TLID.UnselectAll); ZSelecaoAutomatica.Text = Engine.LoadTranslation(Engine.TLID.AutoSelect); ZOpcoes.Text = Engine.LoadTranslation(Engine.TLID.Options); ZTema.Text = Engine.LoadTranslation(Engine.TLID.Theme); ZBasico.Text = Engine.LoadTranslation(Engine.TLID.Basic); ZModerno.Text = Engine.LoadTranslation(Engine.TLID.Modern); ZPeriodo.Text = Engine.LoadTranslation(Engine.TLID.BackupFrequence); ZAoSalvar.Text = Engine.LoadTranslation(Engine.TLID.OnSave); Z50Dialogos.Text = Engine.LoadTranslation(Engine.TLID.BackOn50); Z25Dialogos.Text = Engine.LoadTranslation(Engine.TLID.BackOn25); Z10Dialogos.Text = Engine.LoadTranslation(Engine.TLID.BackOn10); ZNunca.Text = Engine.LoadTranslation(Engine.TLID.Never); ZVerificacao.Text = Engine.LoadTranslation(Engine.TLID.SpellChecking); ZValidar.Text = Engine.LoadTranslation(Engine.TLID.ValidateIndex); OpenScript.Title = Engine.LoadTranslation(Engine.TLID.SelectAScript); SaveScript.Title = Engine.LoadTranslation(Engine.TLID.SelectAScript); ZPesquisa.Text = Engine.LoadTranslation(Engine.TLID.SearchOrReplace); ZTLClient.Text = Engine.LoadTranslation(Engine.TLID.TranslationSystem); ZLEC.Text = Engine.LoadTranslation(Engine.TLID.LEC); ZGoogle.Text = Engine.LoadTranslation(Engine.TLID.Google); ZScriptRef.Text = Engine.LoadTranslation(Engine.TLID.ReferenceScript); ZAltoContraste.Text = Engine.LoadTranslation(Engine.TLID.HighContrast); ZAltaRel.Text = Engine.LoadTranslation(Engine.TLID.HighResolution); ZSelMode.Text = Engine.LoadTranslation(Engine.TLID.SelectMode); ZAutoSelMode.Text = Engine.LoadTranslation(Engine.TLID.AutoDetect); ZAsianSel.Text = Engine.LoadTranslation(Engine.TLID.Asian); ZLatimSel.Text = Engine.LoadTranslation(Engine.TLID.Latim); ZSaveAsItem.Text = Engine.LoadTranslation(Engine.TLID.SaveAs); ZLimiteAvanco.Text = Engine.LoadTranslation(Engine.TLID.LimitSkip); ZModoDianmico.Text = Engine.LoadTranslation(Engine.TLID.DynamicMode); ZOtherOptions.Text = Engine.LoadTranslation(Engine.TLID.MoreOptions); ZSaveWindowState.Text = Engine.LoadTranslation(Engine.TLID.SaveWindowState); //Load Custom Resources from a VNXTL Build foreach (ToolStripMenuItem item in Engine.CustomResources(ref TLBox)) { ZMenu.Items.Add(item); } Engine.LoadWindowState(this); }
internal NoStyle() { InitializeComponent(); #if !DEBUG //Initialize TLBOX TLBox = new SpellTextBox(); MainPanel.Controls.Add(TLBox); TLBox.Anchor = ((AnchorStyles.Bottom | AnchorStyles.Left) | AnchorStyles.Right); TLBox.Enabled = false; TLBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128))); TLBox.Location = new System.Drawing.Point(Scroll.Location.X, Scroll.Location.Y - (Scroll.Size.Height + 5)); TLBox.Margin = new Padding(3, 2, 3, 2); TLBox.Multiline = false; TLBox.Size = new System.Drawing.Size(Scroll.Size.Width, 26); TLBox.SizeChanged += new EventHandler(TLBox_SizeChanged); Engine.Append(ref TLBox.TextChanged, TLBox_TextChanged); TLBox.KeyDown += new KeyEventHandler(TLBox_KeyDown); //Initialize RadioToolStrip Engine ToolStripMenuItem[] BackupItems = new ToolStripMenuItem[] { BackupOnSaveItem, BackupOn200MenuItem, BackupOn100MenuItem, BackupOn50Item, BackupOn25Item, BackupOn10Item, NeverBackupItem }; RadioEngine = new Engine.RadioToolStrip(ref BackupItems, 3); ToolStripMenuItem[] ThemeItems = new ToolStripMenuItem[] { BasicThemeMenuItem, ModernThemeMenuItem, bernToolStripMenuItem }; ThemeEngine = new Engine.RadioToolStrip(ref ThemeItems, 1); ThemeEngine.CheckedChange += ChangeTheme; ToolStripMenuItem[] TLCLients = new ToolStripMenuItem[] { lECToolStripMenuItem, googleToolStripMenuItem, zBingToolStripMenuItem }; TLEngine = new Engine.RadioToolStrip(ref TLCLients, 1); TLEngine.CheckedChange += TLEngine_CheckedChange; ToolStripMenuItem[] SelItems = new ToolStripMenuItem[] { AutomaticoToolStripMenuItem, asiaticaToolStripMenuItem, latimToolStripMenuItem }; SelEngine = new Engine.RadioToolStrip(ref SelItems, 0); SelEngine.CheckedChange += SelEngine_CheckedChange; //Initialize DeleyedMouseOver Event OVE = new Engine.OverTimerEvent() { sender = StrList }; OVE.MouseStopOver += StrList_MouseStopOver; OVE.Initialize(); //Set File Filter OpenScript.Filter = Engine.Filter; SaveScript.Filter = Engine.Filter; //Initalize SpellCheck Engine TLBox.LoadDictionary(AppDomain.CurrentDomain.BaseDirectory + "Dictionary"); TLBox.BootUP(); //Initialize Config SpellCheckEnableMenuItem.Checked = Engine.GetConfig("VNXTLP", "SpellCheck", false).ToLower() == "true"; TLBox.SpellCheckEnable = SpellCheckEnableMenuItem.Checked; IndexTestEnableMenuItem.Checked = Engine.GetConfig("VNXTLP", "AutoJump", false).ToLower() == "true"; altaResoluçãoToolStripMenuItem.Checked = Engine.GetConfig("VNXTLP", "HighFont", false).ToLower() == "true"; altoContrasteToolStripMenuItem.Checked = Engine.GetConfig("VNXTLP", "BlackTheme", false).ToLower() == "true"; delimitarAvançoToolStripMenuItem.Checked = Engine.GetConfig("VNXTLP", "SkipDelay", false).ToLower() == "true"; modoDinâmicoToolStripMenuItem.Checked = Engine.GetConfig("VNXTLP", "DynamicMode", false).ToLower() == "true"; //get int string cfg = Engine.GetConfig("VNXTLP", "BackupSpeed", false); int Val = 0; if (int.TryParse(cfg, out Val)) { RadioEngine.SelectedIndex = Val; } //get int cfg = Engine.GetConfig("VNXTLP", "SelMode", false); if (int.TryParse(cfg, out Val)) { SelEngine.SelectedIndex = Val; } //get int cfg = Engine.GetConfig("VNXTLP", "TLClient", false); if (int.TryParse(cfg, out Val)) { TLEngine.SelectedIndex = Val; } else if (cfg == "off") { sistemaDeTraduçãoToolStripMenuItem.Visible = false; } //Load Translation SkipBnt.Text = Engine.LoadTranslation(Engine.TLID.Next); RetBnt.Text = Engine.LoadTranslation(Engine.TLID.Back); arquivoToolStripMenuItem.Text = Engine.LoadTranslation(Engine.TLID.File); OpenItem.Text = Engine.LoadTranslation(Engine.TLID.Open); SaveAsItem.Text = Engine.LoadTranslation(Engine.TLID.SaveAs); TLAccMenuItem.Text = Engine.LoadTranslation(Engine.TLID.MyAccount); seleçãoToolStripMenuItem.Text = Engine.LoadTranslation(Engine.TLID.Selection); SelectAll.Text = Engine.LoadTranslation(Engine.TLID.SelectAll); UnselectAll.Text = Engine.LoadTranslation(Engine.TLID.UnselectAll); AutoSelect.Text = Engine.LoadTranslation(Engine.TLID.AutoSelect); opçõesToolStripMenuItem.Text = Engine.LoadTranslation(Engine.TLID.Options); temaToolStripMenuItem.Text = Engine.LoadTranslation(Engine.TLID.Theme); BasicThemeMenuItem.Text = Engine.LoadTranslation(Engine.TLID.Basic); ModernThemeMenuItem.Text = Engine.LoadTranslation(Engine.TLID.Modern); períodoDeBackupToolStripMenuItem.Text = Engine.LoadTranslation(Engine.TLID.BackupFrequence); BackupOnSaveItem.Text = Engine.LoadTranslation(Engine.TLID.OnSave); BackupOn50Item.Text = Engine.LoadTranslation(Engine.TLID.BackOn50); BackupOn25Item.Text = Engine.LoadTranslation(Engine.TLID.BackOn25); BackupOn10Item.Text = Engine.LoadTranslation(Engine.TLID.BackOn10); NeverBackupItem.Text = Engine.LoadTranslation(Engine.TLID.Never); SpellCheckEnableMenuItem.Text = Engine.LoadTranslation(Engine.TLID.SpellChecking); IndexTestEnableMenuItem.Text = Engine.LoadTranslation(Engine.TLID.ValidateIndex); OpenScript.Title = Engine.LoadTranslation(Engine.TLID.SelectAScript); SaveScript.Title = Engine.LoadTranslation(Engine.TLID.SelectAScript); pesquisaToolStripMenuItem.Text = Engine.LoadTranslation(Engine.TLID.SearchOrReplace); sistemaDeTraduçãoToolStripMenuItem.Text = Engine.LoadTranslation(Engine.TLID.TranslationSystem); lECToolStripMenuItem.Text = Engine.LoadTranslation(Engine.TLID.LEC); googleToolStripMenuItem.Text = Engine.LoadTranslation(Engine.TLID.Google); RefScriptMenuItem.Text = Engine.LoadTranslation(Engine.TLID.ReferenceScript); altoContrasteToolStripMenuItem.Text = Engine.LoadTranslation(Engine.TLID.HighContrast); altaResoluçãoToolStripMenuItem.Text = Engine.LoadTranslation(Engine.TLID.HighResolution); SelecaoAutomaticaMenuItem1.Text = Engine.LoadTranslation(Engine.TLID.SelectMode); AutomaticoToolStripMenuItem.Text = Engine.LoadTranslation(Engine.TLID.AutoDetect); asiaticaToolStripMenuItem.Text = Engine.LoadTranslation(Engine.TLID.Asian); latimToolStripMenuItem.Text = Engine.LoadTranslation(Engine.TLID.Latim); SaveItem.Text = Engine.LoadTranslation(Engine.TLID.Save); delimitarAvançoToolStripMenuItem.Text = Engine.LoadTranslation(Engine.TLID.LimitSkip); modoDinâmicoToolStripMenuItem.Text = Engine.LoadTranslation(Engine.TLID.DynamicMode); outrasopçõesmenuitem.Text = Engine.LoadTranslation(Engine.TLID.MoreOptions); salvarEstadoDaJanelaToolStripMenuItem.Text = Engine.LoadTranslation(Engine.TLID.SaveWindowState); //Special Items foreach (ToolStripMenuItem item in Engine.CustomResources(ref TLBox)) { MainMenu.Items.Add(item); } Engine.LoadWindowState(this); #endif }