public void Restart() { SetTools(); SetSize(); ToolBoxStrip.Select(); ToolBoxItems.First().Select(); }
public void Restart() { //RTC_HIJACK : Kill toolbox return; SetTools(); SetSize(); ToolBoxStrip.Select(); ToolBoxItems.First().Select(); }
public override void Restart() { if (OSTailoredCode.IsUnixHost) { return; } SetTools(); SetSize(); ToolBoxStrip.Select(); ToolBoxItems.First().Select(); }
private void ToolBox_Load(object sender, EventArgs e) { Location = new Point( GlobalWin.MainForm.Location.X + GlobalWin.MainForm.Size.Width, GlobalWin.MainForm.Location.Y ); SetTools(); SetSize(); ToolBoxStrip.Select(); ToolBoxItems.First().Select(); }
public override void Restart() { //RTC_HIJACK : Kill toolbox if (Convert.ToBoolean(true)) { return; } SetTools(); SetSize(); ToolBoxStrip.Select(); ToolBoxItems.First().Select(); }
private void SetSize() { var rows = (int)Math.Ceiling(ToolBoxItems.Count() / 4.0); Height = 30 + (rows * 30); }
public ToolBoxViewModel() { ToolBoxItems.Add(new ToolBoxData("../Images/Persist.png", typeof(NodeDesignerItemViewModel))); //toolBoxItems.Add(new ToolBoxData("../Images/Persist.png", typeof(PersistDesignerItemViewModel))); }
/// <summary> /// Activate an item in the toolbox /// </summary> /// <param name="DTE">DTE object</param> /// <param name="tabName">The toolbox tab name</param> /// <param name="itemName">The item name in that tab</param> /// <returns>true if the item has been activated</returns> public static bool ActivateToolboxItem(DTE2 DTE, string tabName, string itemName) { DTE.ExecuteCommand("View.Toolbox", ""); ToolBox toolbox = DTE.ToolWindows.ToolBox; ToolBoxTab tab = toolbox.ToolBoxTabs.Item(tabName); if (tab != null) { tab.Activate(); ToolBoxItem foundItem = null; int foundItemIndex = -1; int selectedItemIndex = -1; ToolBoxItems items = tab.ToolBoxItems; ToolBoxItem selectedItem = items.SelectedItem; foreach (ToolBoxItem currentItem in items) { if (foundItem == null) { ++foundItemIndex; if (currentItem.Name == itemName) { foundItem = currentItem; if (selectedItem == null) { break; } } } if (selectedItem != null) { ++selectedItemIndex; if (selectedItem == currentItem) { selectedItem = null; if (foundItem != null) { break; } } } } if (foundItem != null) { int distance = foundItemIndex - selectedItemIndex; if (distance != 0) { SendKeys.Flush(); if (distance > 0) { SendKeys.SendWait(string.Format("{{DOWN {0}}}", distance)); } else { SendKeys.SendWait(string.Format("{{UP {0}}}", -distance)); } } return(true); } } return(false); }