//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(); }
//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(); }
public void Ribbon_Load(Office.IRibbonUI ribbonUI) { this.ribbon = ribbonUI; MainManager mainMgr = new MainManager(); uiService = mainMgr.RibbonManager; RegisterHandlerUI(); }
//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; }
internal RibbonController() { CheckBoxClick = HandleCheckBoxAction; GetCheckBoxPressed = HandleGetPressed; GetToggleButtonPressed = HandleGetPressed; GetScreenTip = HandleGetScreenTip; RibbonLoad = ribbonUI => RibbonUI = ribbonUI; Startup = HandleStartupEvent; Shutdown = HandleShutdownEvent; }
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(); } }
//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()); } }
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; }
//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); // } //}; }
//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 }
/// <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; }
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); } }
//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) // { // } //} }
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; }
//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(); }
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; }
/// <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); } }
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); } }
//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); }
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(); } }
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; }
//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); } }
//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; }
public void Ribbon_Load(Core.IRibbonUI ribbonUi) { _ribbon = ribbonUi; Undo.SetButtonEnabled += enable => SetRibbonControlEnabled("btUndo_Click", enable); }
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; }
//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; }
//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)); }
//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; }
public void OnLoad(Office.IRibbonUI ribbon) { _ribbon = ribbon; AddIn.Ribbon = Ribbon; }
//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(); }
//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; }
// 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(); }
//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; }
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); }
// remember ribbon to save public void OnRibbonLoad(Office.IRibbonUI ribbonUI) { _ribbon = ribbonUI; }
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; }
//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) { }
public void OnLoad(Microsoft.Office.Core.IRibbonUI ribbonUI) { _ribbonUi = ribbonUI; }
public void OnLoad(Office.IRibbonUI r) { ribbonUI = r; }
//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; }
public void Ribbon_Load(O.IRibbonUI ribbonUI) { this.ribbon = ribbonUI; Application.WorkbookActivate += app_WorkbookActivate; }