示例#1
0
        //Create callback methods here. For more information about adding callback methods, select the Ribbon XML item in Solution Explorer and then press F1

        public void RibbonLoad(Office.IRibbonUI ribbonUi)
        {
            _ribbon = ribbonUi;

            SetVoicesFromInstalledOptions();
            SetCoreVoicesToSelections();
        }
示例#2
0
        //Create callback methods here. For more information about adding callback methods, visit https://go.microsoft.com/fwlink/?LinkID=271226


        public void Ribbon_Load(Office.IRibbonUI ribbonUI)
        {
            this.ribbon               = ribbonUI;
            screenCheckTimer          = new Timer();
            screenCheckTimer.Interval = 2000;
            screenCheckTimer.Tick    += ScreenCheckTimer_Tick;
            screenCheckTimer.Start();
        }
示例#3
0
        public void Ribbon_Load(Office.IRibbonUI ribbonUI)
        {
            this.ribbon = ribbonUI;

            MainManager mainMgr = new MainManager();

            uiService = mainMgr.RibbonManager;
            RegisterHandlerUI();
        }
示例#4
0
        //Create callback methods here. For more information about adding callback methods, visit https://go.microsoft.com/fwlink/?LinkID=271226

        public void RibbonLoad(Office.IRibbonUI ribbonUI)
        {
            this.ribbon = ribbonUI;
            //register events
            Application          = Globals.ThisAddIn.Application;
            SelectionChangeEvent = new Microsoft.Office.Interop.Word.ApplicationEvents4_WindowSelectionChangeEventHandler(Application_WindowSelectionChange);
            Application.WindowSelectionChange += SelectionChangeEvent;
            DocumentChangeEvent         = new Microsoft.Office.Interop.Word.ApplicationEvents4_DocumentChangeEventHandler(Application_DocumentChange);
            Application.DocumentChange += DocumentChangeEvent;
        }
示例#5
0
 internal RibbonController()
 {
     CheckBoxClick          = HandleCheckBoxAction;
     GetCheckBoxPressed     = HandleGetPressed;
     GetToggleButtonPressed = HandleGetPressed;
     GetScreenTip           = HandleGetScreenTip;
     RibbonLoad             = ribbonUI => RibbonUI = ribbonUI;
     Startup  = HandleStartupEvent;
     Shutdown = HandleShutdownEvent;
 }
示例#6
0
 public void OnLoad(Office.IRibbonUI ribbonUI)
 {
     //Event handler for ribbon load event
     //NOTE: This method is called once for the first inspector of any type
     try {
         this.mRibbonUI = ribbonUI;
     }
     catch (Exception ex) { App.ReportError(new ApplicationException("Unexpected error while loading the Issue Mgt ribbon extension.", ex), true, LogLevel.Error); }
     finally { this.mRibbonUI.Invalidate(); }
 }
示例#7
0
        //Create callback methods here. For more information about adding callback methods, visit http://go.microsoft.com/fwlink/?LinkID=271226

        public void Ribbon_Load(Office.IRibbonUI ribbonUI)
        {
            this.ribbon = ribbonUI;

            m_App = Globals.ThisAddIn.Application;

            // 文档打开事件,绑定如自动加载功能区的。
            m_App.DocumentChange += M_App_DocumentChange;
            //new System.Windows.Forms.FileDialog().ShowDialog()
        }
        //Create callback methods here. For more information about adding callback methods, visit https://go.microsoft.com/fwlink/?LinkID=271226

        public void Ribbon_Load(Office.IRibbonUI ribbonUI)
        {
            try
            {
                this.Ribbon = ribbonUI;
            }
            catch (Exception PobjEx)
            {
                MessageBox.Show(PobjEx.ToString());
            }
        }
示例#9
0
        public void Ribbon_Load(Office.IRibbonUI ribbonUI)
        {
            //hold a handle to the ribbon so we can refresh controls later
            this.Ribbon = ribbonUI;

            //register events
            Application          = Globals.ThisAddIn.Application;
            SelectionChangeEvent = new Microsoft.Office.Interop.Word.ApplicationEvents4_WindowSelectionChangeEventHandler(Application_WindowSelectionChange);
            Application.WindowSelectionChange += SelectionChangeEvent;
            DocumentChangeEvent         = new Microsoft.Office.Interop.Word.ApplicationEvents4_DocumentChangeEventHandler(Application_DocumentChange);
            Application.DocumentChange += DocumentChangeEvent;
        }
示例#10
0
        //Create callback methods here. For more information about adding callback methods, visit http://go.microsoft.com/fwlink/?LinkID=271226

        public void Ribbon_Load(Office.IRibbonUI ribbonUI)
        {
            this.ribbon = ribbonUI;
            //_addin.Application.
            //_addin.Application.DocumentChange += () =>
            //{

            //    if (ConfigHelper.Config.IsPanelOpen )
            //    {
            //        onShowMenu(null);
            //    }
            //};
        }
示例#11
0
        //Create callback methods here. For more information about adding callback methods, visit http://go.microsoft.com/fwlink/?LinkID=271226

        public void Ribbon_Load(Office.IRibbonUI ribbonUI)
        {
#if Debug
            DateTime startPoint = DateTime.Now;
            DateTime endPoint;
            Trace.WriteLineIf(debugLevel.TraceVerbose, String.Format("{0}: Ribbon_Load start.", startPoint));
#endif
            this.ribbon = ribbonUI;
#if Debug
            endPoint = DateTime.Now;
            Trace.WriteLineIf(debugLevel.TraceVerbose, String.Format("{0}: Ribbon_Load end - {1} milliseconds.", endPoint, endPoint.Subtract(startPoint).Milliseconds));
#endif
        }
示例#12
0
        /// <summary>
        /// Loads the ribbon UI.
        /// </summary>
        /// <param name="ribbonUI"></param>
        public void Ribbon_Load(Office.IRibbonUI ribbonUI)
        {
            #region Validations

            if (ribbonUI == null)
            {
                throw new ArgumentNullException(nameof(ribbonUI));
            }

            #endregion

            _ribbon = ribbonUI;
        }
示例#13
0
 public void Ribbon_Load(Office.IRibbonUI ribbonUI)
 {
     try
     {
         this.ribbon = ribbonUI;
         ribbonref   = this;
         AssemblyInfo.SetAddRemoveProgramsIcon("ExcelAddin.ico");
         AssemblyInfo.SetAssemblyFolderVersion();
     }
     catch (Exception ex)
     {
         ErrorHandler.DisplayMessage(ex);
     }
 }
示例#14
0
        //Create callback methods here. For more information about adding callback methods, select the Ribbon XML item in Solution Explorer and then press F1

        public void Ribbon_Load(Office.IRibbonUI ribbonUI)
        {
            this.ribbon = ribbonUI;



            //Files = new Dictionary<string, Tuple<string, Bitmap>>();


            //var directory = Environment.GetFolderPath(Environment.SpecialFolder.Recent);
            //var files = Directory.EnumerateFiles(directory).ToArray();

            //foreach (string file in files)
            //{
            //    try
            //    {
            //        var fi = new FileInfo(file);
            //        if (fi.FullName.ToLower().EndsWith("lnk"))
            //        {
            //            IWshShell shell = new WshShell();
            //            var lnk = shell.CreateShortcut(fi.FullName) as IWshShortcut;
            //            if (lnk != null)
            //            {
            //                try
            //                {
            //                    var bitmap = Icon.ExtractAssociatedIcon(lnk.TargetPath).ToBitmap();
            //                    var label = Path.GetFileName(lnk.TargetPath);

            //                    Files.Add(lnk.TargetPath, new Tuple<string, Bitmap>(label, bitmap));
            //                }
            //                catch (System.IO.FileNotFoundException)
            //                {

            //                }
            //            }
            //        }
            //        else
            //        {
            //            var bitmap = Icon.ExtractAssociatedIcon(file).ToBitmap();
            //            var label = Path.GetFileName(file);

            //            Files.Add(file, new Tuple<string, Bitmap>(label, bitmap));
            //        }
            //    }
            //    catch (System.Exception e)
            //    {
            //    }
            //}
        }
示例#15
0
        public void RibbonLoad(Office.IRibbonUI ribbonUi)
        {
            ActionHandlerFactory         = new ActionHandlerFactory();
            EnabledHandlerFactory        = new EnabledHandlerFactory();
            LabelHandlerFactory          = new LabelHandlerFactory();
            SupertipHandlerFactory       = new SupertipHandlerFactory();
            ImageHandlerFactory          = new ImageHandlerFactory();
            ContentHandlerFactory        = new ContentHandlerFactory();
            PressedHandlerFactory        = new PressedHandlerFactory();
            CheckBoxActionHandlerFactory = new CheckBoxActionHandlerFactory();

            DisableFormatTab     = new Boolean();
            ShouldCompressImages = new Boolean();

            _ribbon = ribbonUi;
        }
示例#16
0
        //Create callback methods here. For more information about adding callback methods, select the Ribbon XML item in Solution Explorer and then press F1

        public void RibbonLoad(Office.IRibbonUI ribbonUi)
        {
            ActionHandlerFactory         = new ActionHandlerFactory();
            EnabledHandlerFactory        = new EnabledHandlerFactory();
            LabelHandlerFactory          = new LabelHandlerFactory();
            SupertipHandlerFactory       = new SupertipHandlerFactory();
            ImageHandlerFactory          = new ImageHandlerFactory();
            ContentHandlerFactory        = new ContentHandlerFactory();
            PressedHandlerFactory        = new PressedHandlerFactory();
            CheckBoxActionHandlerFactory = new CheckBoxActionHandlerFactory();

            _ribbon = ribbonUi;

            SetVoicesFromInstalledOptions();
            SetCoreVoicesToSelections();
        }
示例#17
0
        private void ThisAddIn_Shutdown(object sender, EventArgs e)
        {
            // Unhook event handlers
            _explorers.NewExplorer   -= OutlookEvent_Explorers_NewExplorer;
            _inspectors.NewInspector -= OutlookEvent__Inspectors_NewInspector;

            // Dereference objects
            _explorers  = null;
            _inspectors = null;
            Windows.Clear();
            Windows = null;
            InspectorWindows.Clear();
            InspectorWindows = null;
            Ribbon           = null;
            _application     = null;
        }
示例#18
0
 /// <summary>
 /// loads the ribbon UI and creates a log record
 /// </summary>
 /// <param name="ribbonUI">Represents the IRibbonUI instance that is provided by the Microsoft Office application to the Ribbon extensibility code. </param>
 /// <remarks></remarks>
 public void Ribbon_Load(Office.IRibbonUI ribbonUI)
 {
     try
     {
         this.ribbon        = ribbonUI;
         ribbonref          = this;
         ThisAddIn.e_ribbon = ribbonUI;
         //AssemblyInfo.SetAddRemoveProgramsIcon("WordAddin.ico");
         AssemblyInfo.SetAssemblyFolderVersion();
         ErrorHandler.SetLogPath();
         ErrorHandler.CreateLogRecord();
     }
     catch (Exception ex)
     {
         ErrorHandler.DisplayMessage(ex);
     }
 }
示例#19
0
 public void Ribbon_Load(Office.IRibbonUI ribbonUI)
 {
     try
     {
         this.ribbon        = ribbonUI;
         ThisAddIn.e_ribbon = ribbonUI;
         Properties.Settings.Default.Markup_LastShapeName = "";
         ErrorHandler.SetLogPath();
         ErrorHandler.CreateLogRecord();
         AssemblyInfo.SetAddRemoveProgramsIcon("ExcelAddin.ico");
         System.Globalization.CultureInfo enUS = new System.Globalization.CultureInfo("en-US");
         System.Threading.Thread.CurrentThread.CurrentCulture = enUS;
     }
     catch (Exception ex)
     {
         ErrorHandler.DisplayMessage(ex);
     }
 }
示例#20
0
        //Cree aquí métodos de devolución de llamada. Para obtener más información sobre los métodos de devolución de llamada, visite http://go.microsoft.com/fwlink/?LinkID=271226.

        public void Ribbon_Load(Office.IRibbonUI ribbonUi)
        {
            _ribbon = ribbonUi;

            _listaBools = new ObservableDictionary <string, bool>
            {
                { "btAjustarInventario", true },
                { "btReporteInventarioPorDepartamento", true },
                { "btReporteComparativo", true },
                { "btReporteGernerarInventario", true },
                { "subtAjustarRojo", true },
                { "subtReconteoVerde", true },
                { "subtProductoAlertaAzul", true }
            };
            _listaBools.OnAdd             += new EventHandler(l_OnAdd);
            _listaBools.CollectionChanged += l_OnAdd;
            //  _listaBools.Add("btAjustarInventario", false);
        }
示例#21
0
文件: Ribbon.cs 项目: fberga/Iren
 public void Ribbon_Load(Office.IRibbonUI ribbonUI)
 {
     this.ribbon = ribbonUI;
     if (ThisDocument._db.OpenConnection())
     {
         DataTable dt = ThisDocument._db.Select("spGetAvailableYears", "@IdStruttura=" + ThisDocument._idStruttura);
         _cbAnniDispLabels = new List <string>();
         foreach (DataRow r in dt.Rows)
         {
             RibbonDropDownItem i = Globals.Factory.GetRibbonFactory().CreateRibbonDropDownItem();
             i.Label = r["Anno"].ToString();
             _cbAnniDispLabels.Add(r["Anno"].ToString());
         }
         _cbAnniDispCount = _cbAnniDispLabels.Count;
         _appV            = getCurrentV();
         _coreV           = ThisDocument._db.GetCurrentV();
         ThisDocument._db.CloseConnection();
     }
 }
示例#22
0
        private void ThisAddIn_Shutdown(object sender, System.EventArgs e)
        {
            // Shutdown code here
            // Unhook event handlers
            m_Explorers.NewExplorer -=
                new Outlook.ExplorersEvents_NewExplorerEventHandler(m_Explorers_NewExplorer);
            m_Inspectors.NewInspector -=
                new Outlook.InspectorsEvents_NewInspectorEventHandler(m_Inspectors_NewInspector);

            // Dereference objects
            m_pictdisp   = null;
            m_Explorers  = null;
            m_Inspectors = null;
            m_Windows.Clear();
            m_Windows = null;
            m_InspectorWindows.Clear();
            m_InspectorWindows = null;
            m_Ribbon           = null;
            m_Application      = null;
        }
示例#23
0
        //Create callback methods here. For more information about adding callback methods, visit https://go.microsoft.com/fwlink/?LinkID=271226
        /// <summary>
        ///
        /// </summary>
        /// <param name="ribbonUI"></param>
        public void Ribbon_Load(Office.IRibbonUI ribbonUI)
        {
            StringBuilder sbTrace = new StringBuilder();

            try
            {
                sbTrace.AppendLine("Start");
                Logger.SaveLoggerTrace(sbTrace);
                this.ribbon = ribbonUI;
            }
            catch (Exception ex)
            {
                sbTrace.Clear();
                sbTrace.AppendLine("Exception" + ex);
                Logger.SaveLoggerTrace(sbTrace);
                Logger.LogWriter(ex.StackTrace);
            }
            finally
            {
                sbTrace.Clear();
                sbTrace.AppendLine("End");
                Logger.SaveLoggerTrace(sbTrace);
            }
        }
示例#24
0
        //Create callback methods here. For more information about adding callback methods, visit http://go.microsoft.com/fwlink/?LinkID=271226

        public void Ribbon_Load(Office.IRibbonUI ribbonUI)
        {
            this.ribbon = ribbonUI;
            Globals.ThisAddIn.FolderContextMenu = ribbonUI;
        }
示例#25
0
 public void Ribbon_Load(Core.IRibbonUI ribbonUi)
 {
     _ribbon = ribbonUi;
     Undo.SetButtonEnabled += enable => SetRibbonControlEnabled("btUndo_Click", enable);
 }
示例#26
0
 public void Ribbon_Load(Office.IRibbonUI ribbonUI)
 {
     Connect.m_Ribbon = ribbonUI;
 }
 //Create callback methods here. For more information about adding callback methods, select the Ribbon XML item in Solution Explorer and then press F1
 public void Ribbon_Load(Office.IRibbonUI ribbonUI)
 {
     //this.ribbon = ribbonUI;
     Ribbon.ribbonUI = ribbonUI;
 }
示例#28
0
文件: Ribbon2.cs 项目: leonchen09/poc
        //Create callback methods here. For more information about adding callback methods, select the Ribbon XML item in Solution Explorer and then press F1

        public void Ribbon_Load(Office.IRibbonUI ribbonUI)
        {
            this.ribbon = ribbonUI;
        }
示例#29
0
        //Erstellen Sie hier Rückrufmethoden. Weitere Informationen zum Hinzufügen von Rückrufmethoden finden Sie unter "http://go.microsoft.com/fwlink/?LinkID=271226".

        public void Ribbon_Load(Office.IRibbonUI ribbonUI)
        {
            this.ribbon = ribbonUI;
            this.shapePersistence.RegisterCacheListener(new RibbonCacheListener(this));
        }
示例#30
0
 //Create callback methods here. For more information about adding callback methods, visit http://go.microsoft.com/fwlink/?LinkID=271226
 public void Ribbon_Load(Office.IRibbonUI ribbonUI)
 {
     currentExplorer = Globals.ThisAddIn.Application.ActiveExplorer();
     currentExplorer.SelectionChange += new Outlook
         .ExplorerEvents_10_SelectionChangeEventHandler
         (CurrentExplorer_Event);
     addIn = Globals.ThisAddIn;
     this.ribbon = ribbonUI;
 }
示例#31
0
 public void OnLoad(Office.IRibbonUI ribbon)
 {
     _ribbon = ribbon;
     AddIn.Ribbon = Ribbon;
 }
示例#32
0
        //Create callback methods here. For more information about adding callback methods, select the Ribbon XML item in Solution Explorer and then press F1

        public void RibbonLoad(Office.IRibbonUI ribbonUi)
        {
            ActionHandlerFactory = new ActionHandlerFactory();
            LabelHandlerFactory = new LabelHandlerFactory();
            SupertipHandlerFactory = new SupertipHandlerFactory();
            ImageHandlerFactory = new ImageHandlerFactory();

            _ribbon = ribbonUi;

            SetVoicesFromInstalledOptions();
            SetCoreVoicesToSelections();
        }
示例#33
0
        //Create callback methods here. For more information about adding callback methods, visit https://go.microsoft.com/fwlink/?LinkID=271226

        public void Ribbon_Load(Office.IRibbonUI ribbonUI)
        {
            ribbon = ribbonUI;
            settings.PropertyChanged += Default_PropertyChanged;
        }
示例#34
0
 // Create callback methods here. For more information about adding callback methods, visit http://go.microsoft.com/fwlink/?LinkID=271226
 /// <summary>
 /// Ribbon_Load
 /// </summary>
 /// <param name="ribbonUI"></param>
 public void Ribbon_Load(Office.IRibbonUI ribbonUI)
 {
     this.ribbon = ribbonUI;
     RibbonInitControls();
 }
示例#35
0
        //Create callback methods here. For more information about adding callback methods, visit https://go.microsoft.com/fwlink/?LinkID=271226

        public void Ribbon_Load(Office.IRibbonUI ribbonUI)
        {
            this.ribbon = ribbonUI;
            FlashSketch.Instance.Ribbon = ribbon;
        }
示例#36
0
文件: RibbonX.cs 项目: Helen1987/edu
 public void Ribbon_Load(Office.IRibbonUI ribbonUI)
 {
     this.ribbon = ribbonUI;
     ExcelApplication = (Microsoft.Office.Interop.Excel.Application)Globals.ThisAddIn.Application;
     ExcelApplication.SheetSelectionChange += new Microsoft.Office.Interop.Excel.AppEvents_SheetSelectionChangeEventHandler(excelApplication_SheetSelectionChange);
 }
示例#37
0
 // remember ribbon to save
 public void OnRibbonLoad(Office.IRibbonUI ribbonUI)
 {
     _ribbon = ribbonUI;
 }
示例#38
0
文件: Ribbon.cs 项目: ProjectECS/ECS
 public void RibbonLoad(Office.IRibbonUI ribbonUI)
 {
     _ribbon = ribbonUI;
 }
 //Create callback methods here. For more information about adding callback methods, visit http://go.microsoft.com/fwlink/?LinkID=271226
 public void Ribbon_Load(Office.IRibbonUI ribbonUI)
 {
     //if the initialize failed, no loading for us.
     this.ribbon = ribbonUI;
 }
 //Create callback methods here. For more information about adding callback methods, visit http://go.microsoft.com/fwlink/?LinkID=271226
 public void Ribbon_Load(Office.IRibbonUI ribbonUI)
 {
     this.ribbon = ribbonUI;
     Globals.ThisAddIn.RibbonUI = ribbonUI;
 }
示例#41
0
        //Erstellen Sie hier Rückrufmethoden.
        //Weitere Informationen zum Hinzufügen von Rückrufmethoden finden Sie unter https://go.microsoft.com/fwlink/?LinkID=271226.

        public void Ribbon_Load(Office.IRibbonUI ribbonUI)
        {
        }
示例#42
0
        private void ThisAddIn_Shutdown(object sender, System.EventArgs e)
        {
            // Shutdown code here
            // Unhook event handlers
            m_Explorers.NewExplorer -=
                new Outlook.ExplorersEvents_NewExplorerEventHandler(m_Explorers_NewExplorer);
            m_Inspectors.NewInspector -=
                new Outlook.InspectorsEvents_NewInspectorEventHandler(m_Inspectors_NewInspector);

            // Dereference objects
            m_pictdisp = null;
            m_Explorers = null;
            m_Inspectors = null;
            m_Windows.Clear();
            m_Windows = null;
            m_InspectorWindows.Clear();
            m_InspectorWindows = null;
            m_Ribbon = null;
            m_Application = null;
        }
示例#43
0
 public void OnLoad(Microsoft.Office.Core.IRibbonUI ribbonUI)
 {
     _ribbonUi = ribbonUI;
 }
示例#44
0
 public void OnLoad(Office.IRibbonUI r)
 {
     ribbonUI = r;
 }
示例#45
0
文件: Ribbon.cs 项目: oerb/DTO
 //Erstellen Sie hier Rückrufmethoden. Weitere Informationen zum Hinzufügen von Rückrufmethoden finden Sie unter "http://go.microsoft.com/fwlink/?LinkID=271226".
 public void Ribbon_Load(Office.IRibbonUI ribbonUI)
 {
     this.ribbon = ribbonUI;
 }
示例#46
0
 public void Ribbon_Load(O.IRibbonUI ribbonUI)
 {
     this.ribbon = ribbonUI;
     Application.WorkbookActivate += app_WorkbookActivate;
 }