/// <summary> /// Determines whether this instance can a shell /// context show menu, given the specified selected file list. /// </summary> /// <returns> /// <c>true</c> if this instance should show a shell context /// menu for the specified file list; otherwise, <c>false</c>. /// </returns> protected override bool CanShowMenu() { var folderPaths = SelectedItemPaths.ToList(); var result = _helper.TryGetInfo(folderPaths).Result; return(result.Count == 0); }
private void MenuAction() { var form = new FRMMain(); var selectedItemPaths = SelectedItemPaths.ToList(); selectedItemPaths = PathTools.ExpandToFileList(selectedItemPaths); form.SourceFilenames = selectedItemPaths; form.InitializeFormData(); form.Show(); }
protected override ContextMenuStrip CreateMenu() { List <string> selectionSet = SelectedItemPaths.ToList(); if (selectionSet.Count == 1) { return(CreateSingleSelectionMenu(selectionSet[0])); } return(null); }
async Task Upload() { await _helper.HandleSyncRunning().ConfigureAwait(false); var itemPaths = SelectedItemPaths.ToList(); await _helper.WhitelistPaths(itemPaths).ConfigureAwait(false); foreach (var r in itemPaths) { // TODO: Game selection? _helper.OpenUrl("http://withsix.com/p/Arma-3/mods/?upload=1&folder=" + Uri.EscapeUriString(r)); } }
protected override bool CanShowMenu() { List <string> selectionSet = SelectedItemPaths.ToList(); if (selectionSet.Count != 1) { return(false); } var result = GetConfig().Any(i => i.Path == selectionSet.First()); return(result); }
async Task Sync() { await _helper.HandleSyncRunning().ConfigureAwait(false); var folderPaths = SelectedItemPaths.ToList(); var result = _helper.TryGetInfo(folderPaths).Result; foreach (var r in result) { _helper.OpenUrl("http://withsix.com/p/Arma-3/mods/" + new ShortGuid(r.ContentInfo.ContentId) + "?upload=1"); } }
protected override ContextMenuStrip CreateMenu() { var menu = new ContextMenuStrip(); var archiveDirectory = new ToolStripMenuItem { Text = "Pack this Directory" }; var fileList = SelectedItemPaths.ToList(); var archiveDirectoryToBeatmapFile = new ToolStripMenuItem { Text = "Pack this Directory to " + new DirectoryInfo(fileList[0]).Name + ".osz" }; var archiveDirectoryToSkinFile = new ToolStripMenuItem { Text = "Pack this Directory to " + new DirectoryInfo(fileList[0]).Name + ".osk" }; archiveDirectory.Click += (sender, args) => { debugMessage(); runAppWithArgs(getAppPath() + "osuFileArchiver.exe", String.Format("--directoryLocation \"{0}\" --saveLocation \"{1}\"", fileList[0], fileList[0] + ".osz")); }; archiveDirectoryToBeatmapFile.Click += (sender, args) => { debugMessage(); runAppWithArgs(getAppPath() + "osuFileArchiver.exe", String.Format("--directoryLocation \"{0}\" --saveLocation \"{1}\" --skipMenu", fileList[0], fileList[0] + ".osz")); }; archiveDirectoryToSkinFile.Click += (sender, args) => { debugMessage(); runAppWithArgs(getAppPath() + "osuFileArchiver.exe", String.Format("--directoryLocation \"{0}\" --saveLocation \"{1}\" --skipMenu", fileList[0], fileList[0] + ".osk")); }; menu.Items.Add(archiveDirectory); menu.Items.Add(archiveDirectoryToBeatmapFile); menu.Items.Add(archiveDirectoryToSkinFile); return(menu); }
private void ExtractMediaFiles() { DoExtraction(SelectedItemPaths.ToList()); }
public void OpenShellForm(HashHelper.HashType hashType) { var frm = new ShellForm(SelectedItemPaths.ToList(), hashType); frm.Show(); }
//HelperSmartOp sınıfında tag işaretleniyor gerekli değer atanıyor. void stripMenuItem_Click(object sender, EventArgs e) { ToolStripMenuItem tsmi = sender as ToolStripMenuItem; if (tsmi != null && tsmi.Tag is OgzShell.Branch.IBranch) { var cxtIBranch = tsmi.Tag as OgzShell.Branch.IBranch; try { foreach (var cmd in cxtIBranch.Commands) { cmd.RunContext(SelectedItemPaths, OgzShell.Helpers.ContextHelper.GetDefaultParams(SelectedItemPaths.ToList(), cxtIBranch)); } } catch (Exception ex) { MessageBox.Show(ex.ToString()); } } }