private void UseTrayUtils() { // setup a tray icon to signalize we are loaded // and show NetOffice diagnostics default dialog on double click Utils.Tray.Setup(true, "Excel06AddinCS4", "Addin.ico"); Utils.Tray.ShowBalloonTip(3000, "Sample", "Hello from Excel06AddinCS4", NetOffice.OfficeApi.Tools.Utils.TrayToolTipIcon.Info); Utils.Tray.DoubleClick += delegate { Utils.Dialog.ShowDiagnostics(); }; // add some standard menu items to the tray TrayMenuItem item1 = Utils.Tray.Menu.Items.Add <TrayMenuItem>("Item 1"); TrayMenuProgressItem item2 = Utils.Tray.Menu.Items.Add <TrayMenuProgressItem>("Item 2"); item2.Value = 60; TrayMenuCheckboxItem item3 = Utils.Tray.Menu.Items.Add <TrayMenuCheckboxItem>("Item 3"); TrayMenuDropDownListItem item4 = Utils.Tray.Menu.Items.Add <TrayMenuDropDownListItem>("Item 4"); item4.DataSource.Add("SubItem1", "SubItem2", "SubItem3"); TrayMenuButtonItem item5 = Utils.Tray.Menu.Items.Add <TrayMenuButtonItem>("Item 5"); }
/// <summary> /// Creates an instance of the class /// </summary> /// <param name="item">target item</param> /// <param name="check">item checked state</param> public TrayMenuItemCheckedEventArgs(TrayMenuItem item, bool check) : base(item) { Checked = check; }