private void editNCBLToolStripMenuItem_Click(object sender, EventArgs e) { bool loadSuggestionEnabled = false; if (richTextBoxNepali.SelectedText.Length > 0) { loadSuggestionEnabled = LoadSuggestions(richTextBoxNepali.SelectedText, SessionsManager.NounsCommonInBothLanguageListFileName); } if (pr == null) { pr = new PostProcessor(SessionsManager.RuleFileName, SessionsManager.VerbListFileName, SessionsManager.NounListFileName, SessionsManager.AdjectiveListFileName, SessionsManager.PronounListFileName, SessionsManager.UsersCustomFileName, SessionsManager.NounsCommonInBothLanguageListFileName); } if (ncblEditor == null || ncblEditor.IsDisposed) { nounEditor = new RuleEditor(); } ncblEditor.SetFileName(SessionsManager.NounsCommonInBothLanguageListFileName); if (loadSuggestionEnabled) { ncblEditor.LoadSuggestion(richTextBoxNepali.SelectedText); } ncblEditor.Show(); }
// public StringBuilder Feedback = new StringBuilder(); /// <summary> /// Default constructor: initiating everything here /// </summary> public FormMainWindow() { InitializeComponent(); //Setting the second tab as the default tab( i.e. hindi tab as default) this.tabControl1.SelectedIndex = 1; ruleEditor = new RuleEditor(); ruleEditor.SetFileName(SessionsManager.RuleFileName); verbEditor = new RuleEditor(); verbEditor.SetFileName(SessionsManager.VerbListFileName); nounEditor = new RuleEditor(); nounEditor.SetFileName(SessionsManager.NounListFileName); ncblEditor = new RuleEditor(); ncblEditor.SetFileName(SessionsManager.NounsCommonInBothLanguageListFileName); adjectiveEditor = new RuleEditor(); adjectiveEditor.SetFileName(SessionsManager.AdjectiveListFileName); pronounEditor = new RuleEditor(); pronounEditor.SetFileName(SessionsManager.PronounListFileName); UsersCustomEditor = new RuleEditor(); UsersCustomEditor.SetFileName(SessionsManager.UsersCustomFileName); //this is for dragging and dropping text files this.richTextBoxHindi.DragDrop += new System.Windows.Forms.DragEventHandler(this.DragTextFile); //This is for setting cursor this.richTextBoxHindi.DragEnter += new DragEventHandler(this.TextBox_DragEnter); this.webBrowser.Navigate("about:blank"); this.helpToolStripMenuItem.Enabled = File.Exists(SessionsManager.HELPFILENAME); this.InvokeMyWebBrowserEvent += new InvokeWebBrowser(C_UpdateWebBrowserFromThreads); }