예제 #1
0
 /// <summary>
 /// Sets the initial view of the GUI
 /// </summary>
 public MainPage()
 {
     InitializeComponent();
     controller = Controller.GetInstance();
     controller.SetGui(this);
     richTextBox.Visibility = Visibility.Collapsed;
 }
예제 #2
0
        /// <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
            }
        }