/// <summary> /// Either update or add the application name and file location. /// </summary> /// <param name="appName">Application Name</param> /// <param name="fileLocation">Application File Location</param> public void UpdateApplication(string appName, string fileLocation) { var applicationIndex = ExternalApplications.Find(x => string.Equals(x.Name, appName, StringComparison.OrdinalIgnoreCase)); var externalApplication = new ExternalApplication(appName, fileLocation); if (applicationIndex == null) { ExternalApplications.Add(externalApplication); } else { ExternalApplications[ExternalApplications.IndexOf(applicationIndex)] = externalApplication; } }
public static void Initialize() { _extApps = null; switch (Environment.OSVersion.Platform) { case PlatformID.Win32NT: goto default; case PlatformID.MacOSX: _extApps = new ExternalApplicationsMac(); break; case PlatformID.Unix: _extApps = new ExternalApplicationsUnix(); break; default: _extApps = new ExternalApplicationsWin(); break; } }
private void fileZillaToolStripMenuItem_Click(object sender, EventArgs e) { SessionData session = (SessionData)treeView1.SelectedNode.Tag; ExternalApplications.openFileZilla(session); }
/// <summary> /// Gets the external applications file location for the specified application name. /// </summary> /// <param name="appName">Application name with extension.</param> /// <returns>Game Region</returns> public string GetApplicationLocation(string appName) { return(ExternalApplications.FirstOrDefault(app => app.Name.Equals(appName, StringComparison.OrdinalIgnoreCase))?.FileLocation); }
public static void ShowExternalApplicationsDialog(Form owner) { using ExternalApplications externalApplications = new ExternalApplications(); externalApplications.ShowDialog(owner); }