Exemplo n.º 1
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
            }
        }
Exemplo n.º 2
0
        private void item_MouseLeftButtonUp(object sender, System.Windows.Input.MouseButtonEventArgs e)
        {
            bool doubleClick = MouseButtonHelper.IsDoubleClick(sender, e);

            if (doubleClick)
            {
                TreeViewItem item = (TreeViewItem)sender;
                session.RevisionDialog.labelCurrentTimeStamp.Text = "Opened revision: " + item.Header.ToString();
                ServiceReference.Service1Client proxy = new ServiceReference.Service1Client();
                proxy.GetDocumentRevisionContentByIdAsync((int)item.Tag);
                proxy.GetDocumentRevisionContentByIdCompleted += new EventHandler <ServiceReference.GetDocumentRevisionContentByIdCompletedEventArgs>(proxy_GetDocumentRevisionContentByIdCompleted);
            }
        }