public DeleteStartItemCommand(StartItem startItem, StartManager startMenu) { this.startItem = startItem; this.startMenu = startMenu; this.startItemName = startItem.Name; this.name = "Delete '" + startItem.Name + "'"; }
public MoveFileCommand(string source, string target, StartItem startItem, string oldName, string newName, bool mayFail) { this.source = source; this.target = target; this.startItem = startItem; this.oldName = oldName; this.newName = newName; this.mayFail = mayFail; this.name = "Move '" + this.source + "' to '" + this.target + "'"; }
public DeleteFileCommand(string source, string target, StartItem startItem, string oldName, string newName) { base.source = source; base.target = target; base.startItem = startItem; base.oldName = oldName; base.newName = newName; this.name = "Delete '" + this.source + "'"; }
public RenameFileCommand(string source, string target, StartItem startItem, string oldName, string newName, bool mayfail) { base.source = source; base.target = target; base.startItem = startItem; base.oldName = oldName; base.newName = newName; base.mayFail = mayFail; this.name = "Rename '" + this.source + "' to '" + this.target + "'"; }
public RenameFileCommand(string source, string target, StartItem startItem, string oldName, string newName, bool mayfail) { base.source = source; base.target = target; base.startItem = startItem; base.oldName = oldName; base.newName = newName; base.mayFail = mayFail; this.name = "Rename '" + this.source + "' to '" + this.target + "'"; }
public MoveFileCommand(string source, string target, StartItem startItem, string oldName, string newName, bool mayFail) { this.source = source; this.target = target; this.startItem = startItem; this.oldName = oldName; this.newName = newName; this.mayFail = mayFail; this.name = "Move '" + this.source + "' to '" + this.target + "'"; }
public MoveStartItemCommand(StartItem startItem, string newCategory) { this.startItem = startItem; this.oldCategory = startItem.Category; this.newCategory = newCategory; this.oldName = startItem.Name; this.newName = Path.Combine(newCategory, Path.GetFileName(startItem.Name)); this.name = "Move '" + Path.GetFileName(startItem.Name) + "'"; //Console.WriteLine("-***'{0}'***-", this.Name); //Console.WriteLine("'{0}' to '{1}'", this.oldCategory, this.newCategory); //Console.WriteLine("'{0}' to '{1}'", this.oldName, this.newName); //Console.WriteLine("-******-"); }
public MoveStartItemCommand(StartItem startItem, string newCategory) { this.startItem = startItem; this.oldCategory = startItem.Category; this.newCategory = newCategory; this.oldName = startItem.Name; this.newName = Path.Combine(newCategory, Path.GetFileName(startItem.Name)); this.name = "Move '" + Path.GetFileName(startItem.Name) + "'"; //Console.WriteLine("-***'{0}'***-", this.Name); //Console.WriteLine("'{0}' to '{1}'", this.oldCategory, this.newCategory); //Console.WriteLine("'{0}' to '{1}'", this.oldName, this.newName); //Console.WriteLine("-******-"); }
public RenameStartItemCommand(StartItem startItem, string newName) { this.startItem = startItem; this.oldCategory = startItem.Category; this.newCategory = startItem.Category; this.oldName = startItem.Name; this.newName = Path.Combine(Path.GetDirectoryName(startItem.Name), newName); this.name = "Rename '" + Path.GetFileName(startItem.Name) + "'"; Console.WriteLine("-***'{0}'***-", this.Name); Console.WriteLine("'{0}' to '{1}'", this.oldCategory, this.newCategory); Console.WriteLine("'{0}' to '{1}'", this.oldName, this.newName); Console.WriteLine("-******-"); }
public RenameStartItemCommand(StartItem startItem, string newName) { this.startItem = startItem; this.oldCategory = startItem.Category; this.newCategory = startItem.Category; this.oldName = startItem.Name; this.newName = Path.Combine(Path.GetDirectoryName(startItem.Name), newName); this.name = "Rename '" + Path.GetFileName(startItem.Name) + "'"; Console.WriteLine("-***'{0}'***-", this.Name); Console.WriteLine("'{0}' to '{1}'", this.oldCategory, this.newCategory); Console.WriteLine("'{0}' to '{1}'", this.oldName, this.newName); Console.WriteLine("-******-"); }
public static GameSettings CreateSettings(string _playername, StartItem _startItem) { GameSettings settings = new GameSettings(); if (_playername == null || _playername == "") { settings.playername = "Nameless"; } else { settings.playername = _playername; } settings.myItem = _startItem; return(settings); }
public DeleteStartItemCommand(StartItem startItem, StartManager startMenu) { this.startItem = startItem; this.startMenu = startMenu; this.startItemName = startItem.Name; this.name = "Delete '" + startItem.Name + "'"; }
private void ConvertToCategory(StartItem startItem) { KnownCategories.Instance.Add(startItem.Name); startManager.RemoveItem(startItem); foreach (string str in AddCategoryToTree(startItem.Name)) { // This ensures that nodes that are not explicitly listed as categories are scanned AddToManager(str); } startManager.LoadAssociationList(Utility.ASSOCIATION_LIST_FILE_PATH); _categoryTree.SelectedNode = _categoryTree.Nodes.Find(startItem.Name, true)[0]; }
public ConvertToCategoryCommand(StartItem startItem, ArrayRemoveDelegate removeDelegate) { this.startItem = startItem; this.removeDelegate = removeDelegate; }
public StartItemSelector(StartItem[] source, StartItemFields field, object query) { this.source = source; this.field = field; this.query = query; }
private ListViewItem FindItem(StartItem tag) { for (int i = 0; i < _itemList.Items.Count; i++) { if (_itemList.Items[i].Tag == tag) { return _itemList.Items[i]; } } return null; }
private ListViewItem StartItemToListItem(StartItem startItem, bool setIcon) { ListViewItem listItem; string[] validPaths = startItem.GetValidPaths(); string path = (validPaths.Length >= 1) ? validPaths[0] : ""; if (startItem.Type == StartItemType.File) { listItem = new ListViewItem(new string[] { Path.GetFileNameWithoutExtension(startItem.Name), startItem.Location.ToString(), startItem.Application }); } else { listItem = new ListViewItem(new string[] { Path.GetFileNameWithoutExtension(startItem.Name), startItem.Location.ToString(), startItem.Application }); } listItem.SubItems[1].ForeColor = SystemColors.GrayText; listItem.SubItems[2].ForeColor = SystemColors.GrayText; listItem.Tag = startItem; listItem.Name = startItem.Name; if (setIcon) { listItem.ImageIndex = largeListIconList.IconIndex(path, true, ShellIconStateConstants.ShellIconStateNormal); } else { lock (iconInfoLock) { iconInfo.Add(listItem, path); } } return listItem; }
private void LocateOnDisk(StartItem item) { string[] validPaths = item.GetValidPaths(); for (int i = 0; i < validPaths.Length; i++) { LocateOnDisk(validPaths[i]); } }
private void RemoveCategory(TreeNode parent) { // remove the item and all children RecursiveRemoveCategory(parent); // add it back to parent category string grandParent = Path.GetDirectoryName(parent.Name); StartItem item = new StartItem(parent.Name, StartItemType.Directory, grandParent); if (item.HasLocal || item.HasUser) { startManager.AddItem(item); UpdateItemList(grandParent); _itemList.Items[parent.Name].Focused = true; _itemList.Focus(); } _categoryTree.SelectedNode = _categoryTree.Nodes.Find(grandParent, true)[0]; }
public ConvertToCategoryCommand(StartItem startItem, ArrayRemoveDelegate removeDelegate) { this.startItem = startItem; this.removeDelegate = removeDelegate; }