Пример #1
0
        private void Ribbon1_Load(object sender, RibbonUIEventArgs e)
        {
            if (this.Context == null)
            {
                // Will call a second time after the NewInspector event.
                return;
            }
            // The Ribbon is not loaded when the inspector is created. We need to make sure the best folder button gets updated.
            Outlook.Inspector inspector       = (Outlook.Inspector) this.Context;
            TaskPaneContext   taskPaneContext = Globals.ThisAddIn.TaskPaneContexts[inspector];

            taskPaneContext.UpdateBestFolderWrapper();
        }
Пример #2
0
 private void toggleButton1_Click(object sender, RibbonControlEventArgs e)
 {
     try
     {
         Outlook.Explorer explorer        = (Outlook.Explorer)e.Control.Context;
         TaskPaneContext  taskPaneContext = Globals.ThisAddIn.TaskPaneContexts[explorer];
         taskPaneContext.Visible = ((RibbonToggleButton)sender).Checked;
     }
     catch (Exception err)
     {
         MessageBox.Show("Unexpected error processing button.\n" + err.Message, "Fast File Error");
         Logger.Error(err, "Unexpected error processing button.");
     }
 }
Пример #3
0
 private void guessButton_Click(object sender, RibbonControlEventArgs e)
 {
     try
     {
         Outlook.Inspector inspector       = (Outlook.Inspector)e.Control.Context;
         TaskPaneContext   taskPaneContext = Globals.ThisAddIn.TaskPaneContexts[inspector];
         taskPaneContext.MoveSelectedItemToBest();
     }
     catch (Exception err)
     {
         MessageBox.Show("Unexpected error processing button.\n" + err.Message, "Fast File Error");
         Logger.Error(err, "Unexpected error processing button.");
     }
 }