public void OnSendList(Office.Core.IRibbonControl control) { if (control != null) { try { Outlook.Inspector inspector = (Outlook.Inspector)control.Context; String coffeeText = GetTextFromTaskPane(inspector); // Create a new email from the input parameters, and send it. Outlook._MailItem mi = (Outlook._MailItem) Globals.ThisAddIn.Application.CreateItem( Outlook.OlItemType.olMailItem); mi.Subject = _orderName; mi.Body = coffeeText; mi.To = _mailAddressee; mi.Send(); // Update the count of orders in the form region. UserInterfaceContainer uiContainer = Globals.ThisAddIn._uiElements.GetUIContainerForInspector( inspector); CultureInfo cultureInfo = new CultureInfo("en-us"); uiContainer.FormRegionControls.SetControlText( _ordersTextBoxName, (++_orderCount).ToString(cultureInfo)); } catch (COMException ex) { System.Diagnostics.Debug.WriteLine(ex.ToString()); } } }
public bool GetVisible(Office.Core.IRibbonControl control) { if (control == null) { return(false); } // Match up this control instance (determined by its inspector) in // the collection, and return the current value of the cached // visibility state. Outlook.Inspector inspector = control.Context as Outlook.Inspector; UserInterfaceContainer uiContainer = Globals.ThisAddIn._uiElements.GetUIContainerForInspector(inspector); return(uiContainer.IsControlVisible); }
public bool GetVisible(Office.Core.IRibbonControl control) { if (control == null) { return(false); } // 在集合中匹配此控件实例(取决于其检查器), // 并返回缓存可见性状态的 // 当前值。 Outlook.Inspector inspector = control.Context as Outlook.Inspector; UserInterfaceContainer uiContainer = Globals.ThisAddIn._uiElements.GetUIContainerForInspector(inspector); return(uiContainer.IsControlVisible); }
public void OnToggleTaskPane( Office.Core.IRibbonControl control, bool isPressed) { // Toggle the visibility of the custom taskpane. if (control != null) { // Find the inspector for this ribbon, so that we can find the // corresponding task pane from our collection. Outlook.Inspector inspector = (Outlook.Inspector)control.Context; Office.Core.CustomTaskPane taskpane = Globals.ThisAddIn._uiElements.GetTaskPaneForInspector( inspector); // If we've been called before we've had a chance to add this // Inspector/task pane to the collection, we can add it now. if (taskpane == null) { taskpane = Globals.ThisAddIn.CreateTaskPane(inspector); } taskpane.Visible = isPressed; } }
public void OnToggleTaskPane( Office.Core.IRibbonControl control, bool isPressed) { // 切换自定义任务窗格的可见性。 if (control != null) { // 查找此功能区的检查器,以便我们能够从集合中找到 // 对应的任务窗格。 Outlook.Inspector inspector = (Outlook.Inspector)control.Context; Office.Core.CustomTaskPane taskpane = Globals.ThisAddIn._uiElements.GetTaskPaneForInspector( inspector); // 如果我们在有机会将此 // 检查器/任务窗格添加到集合中之前已被调用,则我们可以现在添加窗格。 if (taskpane == null) { taskpane = Globals.ThisAddIn.CreateTaskPane(inspector); } taskpane.Visible = isPressed; } }
public void Username_TextChanged(Microsoft.Office.Core.IRibbonControl control, string text) { Username = text; }
public void ToCir(Microsoft.Office.Core.IRibbonControl control) => FindReplace(lat, cir);
public void ToLat(Microsoft.Office.Core.IRibbonControl control) => FindReplace(cir, lat);
public Bitmap OnDo1GetImage(Microsoft.Office.Core.IRibbonControl control) => Resources.Do1_128px;
public void OnDo1Click(Microsoft.Office.Core.IRibbonControl control) { MessageBox.Show(Resources.Do1Action); }
public string GetPassword(Microsoft.Office.Core.IRibbonControl control) { return(!string.IsNullOrWhiteSpace(EncodedPassword) ? "**********" : string.Empty); }
public void TestSettings(Microsoft.Office.Core.IRibbonControl control) { Func <bool> func = () => _clickToCall.RingTest(_credential, IPAddress.Parse(PhoneIP)); CheckAndCall(func); }
public void PhoneIP_TextChanged(Microsoft.Office.Core.IRibbonControl control, string text) { PhoneIP = text; }
public string GetPhoneIP(Microsoft.Office.Core.IRibbonControl control) { return(PhoneIP); }
public string GetUsername(Microsoft.Office.Core.IRibbonControl control) { return(Username); }
public void PasswordDialog(Microsoft.Office.Core.IRibbonControl control) { var passForm = new PasswordForm(); var result = passForm.ShowDialog(); }
public Bitmap GetLatImg(Microsoft.Office.Core.IRibbonControl control) => Resources.lat;
public Bitmap GetCirImg(Microsoft.Office.Core.IRibbonControl control) => Resources.cir;