public TextNode(Surface surface, string text) : base() { this.surface = surface; this.text = text; // default brush Brush = surface.whiteBrush; }
/// <summary> /// Set up the UI and initialize the NLP. /// </summary> public void Initialize() { MycroParser mp = new MycroParser(); XmlDocument doc = new XmlDocument(); doc.Load("MainForm.xml"); mp.Load(doc, "Form", this); form = (Form)mp.Process(); dgvKeywords = (DataGridView)mp.ObjectCollection["dgvKeywords"]; sbStatus = mp.ObjectCollection["sbStatus"] as StatusBarPanel; btnProcess = mp.ObjectCollection["btnProcess"] as Button; tbUrl = mp.ObjectCollection["tbUrl"] as TextBox; lblAlchemyKeywords = (Label)mp.ObjectCollection["lblAlchemyKeywords"]; rtbSentences = (RichTextBox)mp.ObjectCollection["rtbSentences"]; btnPrevSentence = (Button)mp.ObjectCollection["btnPrevSentence"]; btnNextSentence = (Button)mp.ObjectCollection["btnNextSentence"]; surface = (Surface)mp.ObjectCollection["surface"]; rbNeighboringSentenceKeywords = (RadioButton)mp.ObjectCollection["rbNeighboringSentenceKeywords"]; rbKeywordDirectedGraph = (RadioButton)mp.ObjectCollection["rbKeywordDirectedGraph"]; InitializeNlp(); try { Application.Run(form); } catch (Exception ex) { System.Diagnostics.Debug.WriteLine(ex.Message); } }