/// <summary> /// Sets the initial view of the GUI /// </summary> public MainPage() { InitializeComponent(); controller = Controller.GetInstance(); controller.SetGui(this); richTextBox.Visibility = Visibility.Collapsed; }
/// <summary> /// Event handler for mouse event on document selection. Specifies the document to be opened. /// </summary> /// <param name="sender">The tree view item getting selected</param> /// <param name="e">Event arguments</param> public void documentItem_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) { bool doubleClick = MouseButtonHelper.IsDoubleClick(sender, e); if (doubleClick) { TreeViewItem item = (TreeViewItem)sender; Controller.GetInstance().SetOpenDocument(int.Parse(((object[])item.Tag)[0].ToString()), item.Header.ToString(), int.Parse(((object[])item.Tag)[1].ToString())); //open file in view } }