A task pane used to browse the wiki structure.
コード例 #1
0
        private void UpdateWikiExplorerButtonState()
        {
            XWikiNavigationPane activePane = XWikiTaskPane;

            Tools.CustomTaskPane ctp = GetActiveWikiExplorer();
            Globals.Ribbons.XWikiRibbon.SetWikiExplorerButtonState(ctp.Visible);
        }
コード例 #2
0
        private void btnShowAttachments_Click(object sender, RibbonControlEventArgs e)
        {
            XWikiNavigationPane pane = Addin.XWikiTaskPane;
            TreeNode            node = pane.treeView.SelectedNode;

            if (node != null)
            {
                pane.ShowAttachments(node);
            }
        }
コード例 #3
0
 void XWikiAddIn_LoginSuccessul()
 {
     if (!HasVisibleWikiExplorer())
     {
         AddTaskPanes();
     }
     // refreshes the ribbon buttons which allow the user to work with the documents from XWiki server
     Globals.Ribbons.XWikiRibbon.Refresh(null, null);
     Globals.Ribbons.XWikiRibbon.SwitchToOnlineMode();
     XWikiNavigationPane.ReloadDataAndSyncAll();
     Log.Success("Logged in  to " + serverURL);
 }
コード例 #4
0
 /// <summary>
 /// Syncronizes all WikiExplorer task panes.
 /// </summary>
 public static void SynchTaskPanes()
 {
     foreach (Tools.CustomTaskPane ctp in Globals.XWikiAddIn.XWikiCustomTaskPanes)
     {
         String tag = (String)ctp.Control.Tag;
         if (tag.Contains(XWIKI_EXPLORER_TAG))
         {
             XWikiNavigationPane pane = (XWikiNavigationPane)ctp.Control;
             //Do sync work;
             pane.BuildTree();
         }
     }
 }
コード例 #5
0
 /// <summary>
 /// Event triggered when the background worker reports it's progress.
 /// </summary>
 /// <param name="e">The event parameters</param>
 /// <param name="sender">The control that triggered the event.</param>
 private void backgroundWorker_ProgressChanged(object sender, ProgressChangedEventArgs e)
 {
     //If work is completed
     if (e.UserState != null)
     {
         XWikiNavigationPane navPane = (XWikiNavigationPane)e.UserState;
         if (e.ProgressPercentage == 100)
         {
             //navPane.pictureBox.Visible = false;
             loadingWikiData = false;
         }
     }
 }
コード例 #6
0
        /// <summary>
        /// Adds a custom task pane to the addin's taskpanes collection.
        /// The task pane is assigned to the given document's active window.
        /// </summary>
        /// <param name="doc">The instance of the document.</param>
        private void AddTaskPane(Word.Document doc)
        {
            XWikiNavigationPane paneControl = new XWikiNavigationPane(this);

            if (GetWikiExplorer(doc) == null)
            {
                //attach a new Wiki Explorer to the document window.
                Tools.CustomTaskPane ctp = this.CustomTaskPanes.Add(paneControl, XWikiNavigationPane.TASK_PANE_TITLE,
                                                                    doc.ActiveWindow);
                this.XWikiTaskPane  = paneControl;
                ctp.Visible         = true;
                ctp.VisibleChanged += new EventHandler(wikiExplorer_VisibleChanged);
            }
        }
コード例 #7
0
 /// <summary>
 /// Reloads data from the server and syncs all taskpanes
 /// </summary>
 public static void ReloadDataAndSyncAll()
 {
     foreach (Tools.CustomTaskPane ctp in Globals.XWikiAddIn.XWikiCustomTaskPanes)
     {
         String tag = (String)ctp.Control.Tag;
         if (tag.Contains(XWIKI_EXPLORER_TAG))
         {
             XWikiNavigationPane pane = (XWikiNavigationPane)ctp.Control;
             pane.ClearNodes();
             pane.RefreshWikiExplorer();
             break;
         }
     }
     SynchTaskPanes();
 }
コード例 #8
0
 /// <summary>
 /// Adds a custom task pane to the addin's taskpanes collection.
 /// The task pane is assigned to the given document's active window.
 /// </summary>
 /// <param name="doc">The instance of the document.</param>
 private void AddTaskPane(Word.Document doc)
 {
     XWikiNavigationPane paneControl = new XWikiNavigationPane(this);
     if (GetWikiExplorer(doc) == null)
     {
         //attach a new Wiki Explorer to the document window.
         Tools.CustomTaskPane ctp = this.CustomTaskPanes.Add(paneControl, XWikiNavigationPane.TASK_PANE_TITLE,
                                                         doc.ActiveWindow);
         this.XWikiTaskPane = paneControl;
         ctp.Visible = true;
         ctp.VisibleChanged += new EventHandler(wikiExplorer_VisibleChanged);
     }
 }