System.Diagnostics.Process.Start(string)

Here are the examples of the csharp api System.Diagnostics.Process.Start(string) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

3339 Examples 7

19 View Source File : BotMainWindow.xaml.cs
License : GNU General Public License v3.0
Project Creator : 00000vish

private void storePage1_Click(object sender, RoutedEventArgs e)
        {
            if (listView1.SelectedItem != null)
            {
                ListViewItem item = new ListViewItem();
                item = (ListViewItem)listView1.SelectedItem;
                Process.Start("https://store.steampowered.com/app/" + item.Tag.ToString());
            }
        }

19 View Source File : ToolWindow.xaml.cs
License : GNU General Public License v3.0
Project Creator : 00000vish

private void launch1_Click(object sender, RoutedEventArgs e)
        {

            if (listView1.SelectedItem != null)
            {
                ListViewItem item = new ListViewItem();
                item = (ListViewItem)listView1.SelectedItem;
                Process.Start("steam://rungameid/" + item.Tag.ToString());
                WindowState = WindowState.Minimized;
            }
        }

19 View Source File : DiscordWebhook.cs
License : MIT License
Project Creator : 1-EXON

private void label1_Click(object sender, EventArgs e)
        {
            Process.Start("https://github.com/1-EXON");
        }

19 View Source File : DiscordWebhook.cs
License : MIT License
Project Creator : 1-EXON

private void help_but_Click(object sender, EventArgs e)
        {
            Process.Start("https://www.youtube.com/watch?v=MAsQZ71_LGM");
        }

19 View Source File : MetroRichTextBox.cs
License : MIT License
Project Creator : 1217950746

public void AddLine(string replacedle, string url)
        {
            AddLine(replacedle, () => System.Diagnostics.Process.Start(url));
        }

19 View Source File : MetroRichTextBox.cs
License : MIT License
Project Creator : 1217950746

public void Add(string replacedle, string url)
        {
            Add(replacedle, () => System.Diagnostics.Process.Start(url));
        }

19 View Source File : DiscordWebhook.cs
License : MIT License
Project Creator : 1-EXON

private void label7_Click(object sender, EventArgs e)
        {
            Process.Start("https://github.com/1-EXON");
        }

19 View Source File : DiscordWebhook.cs
License : MIT License
Project Creator : 1-EXON

private void label6_Click(object sender, EventArgs e)
        {
            Process.Start("https://github.com/1-EXON/DisHook");
        }

19 View Source File : About.cs
License : MIT License
Project Creator : 1CM69

private void linkLabel4_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            System.Diagnostics.Process.Start("https://github.com/cytan299/tribahtinov");
        }

19 View Source File : Form2.cs
License : MIT License
Project Creator : 200Tigersbloxed

private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            System.Diagnostics.Process.Start("https://github.com/200Tigersbloxed/BSMulti-Installer/wiki/Which-Multiplayer-Should-I-Install%3F");
        }

19 View Source File : AboutForm.cs
License : Apache License 2.0
Project Creator : 214175590

private void linkLabel2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            Process.Start("http://v.yinsin.net");
        }

19 View Source File : Form1.cs
License : MIT License
Project Creator : 200Tigersbloxed

private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            System.Diagnostics.Process.Start("https://github.com/200Tigersbloxed/BSMulti-Installer/blob/master/README.md");
        }

19 View Source File : AboutForm.cs
License : Apache License 2.0
Project Creator : 214175590

private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            Process.Start("http://blog.yinsin.net");
        }

19 View Source File : IceMonitorForm.cs
License : Apache License 2.0
Project Creator : 214175590

private void visitToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (projects.SelectedItems.Count > 0)
            {
                string url = projects.SelectedItems[0].Text;
                Process.Start(url);
            }
        }

19 View Source File : SpringBootMonitorForm.cs
License : Apache License 2.0
Project Creator : 214175590

private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            string url = l_pro_visit_url.Text;
            if (!string.IsNullOrWhiteSpace(url))
            {
                Process.Start(url);
            }
        }

19 View Source File : About.cs
License : MIT License
Project Creator : 1CM69

private void linkLabel3_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            System.Diagnostics.Process.Start("https://www.cloudynights.com/topic/536410-a-tri-bahtinov-mask-for-sct-collimation-and-focusing/");
        }

19 View Source File : About.cs
License : MIT License
Project Creator : 1CM69

private void linkLabel2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            System.Diagnostics.Process.Start("https://github.com/wytsep/bahtinov-grabber");
        }

19 View Source File : About.cs
License : MIT License
Project Creator : 1CM69

private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            System.Diagnostics.Process.Start("http://web.archive.org/web/20160220123031/http://www.njnoordhoek.com:80/?cat=10");
        }

19 View Source File : About.cs
License : MIT License
Project Creator : 1CM69

private void linkLabel5_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            System.Diagnostics.Process.Start("https://github.com/1CM69/Tri-Bahtinov_Grabber");
        }

19 View Source File : MainWindow.xaml.cs
License : GNU General Public License v3.0
Project Creator : 1RedOne

private void viewLogs_Click(object sender, RoutedEventArgs e)
        {
            System.Diagnostics.Process.Start($"{Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)}\\ClientFaux.log");
        }

19 View Source File : Form1.cs
License : MIT License
Project Creator : 200Tigersbloxed

private void Form1_Load(object sender, EventArgs e)
        {
            // check for internet
            if (CheckForInternetConnection() == true) { }
            else
            {
                MessageBox.Show("An Internet Connection is required!", "Not Connected to Internet", MessageBoxButtons.OK, MessageBoxIcon.Error);
                Application.Exit();
            }
            // check if user can access website
            if (CheckForWebsiteConnection() == true) { }
            else
            {
                MessageBox.Show("Failed to connect to https://tigersserver.xyz. Please try again soon.", "Failed to Connect", MessageBoxButtons.OK, MessageBoxIcon.Error);
                Application.Exit();
            }

            WebClient client = new WebClient();
            Stream stream = client.OpenRead("https://pastebin.com/raw/S8v9a7Ba");
            StreamReader reader = new StreamReader(stream);
            String content = reader.ReadToEnd();
            if(version != content)
            {
                DialogResult drUpdate = MessageBox.Show("BSMulti-Installer is not up to date! Would you like to download the newest version?", "Uh Oh!", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
                if(drUpdate == DialogResult.Yes)
                {
                    System.Diagnostics.Process.Start("https://github.com/200Tigersbloxed/BSMulti-Installer/releases/latest");
                    Application.Exit();
                }
            }

            checkForMessage();
            
            Directory.CreateDirectory("Files");
        }

19 View Source File : AboutForm.cs
License : Apache License 2.0
Project Creator : 214175590

private void linkLabel3_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            Process.Start("http://www.yinsin.net");
        }

19 View Source File : NginxMonitorForm.cs
License : Apache License 2.0
Project Creator : 214175590

private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            string url = l_visit_url.Text;
            if (!string.IsNullOrWhiteSpace(url))
            {
                Process.Start(url);
            }
        }

19 View Source File : SftpWinForm.cs
License : Apache License 2.0
Project Creator : 214175590

private void openToolStripMenuItem_Click(object sender, EventArgs e)
        {
            int count = listView1.SelectedItems.Count;
            if (count == 1)
            {
                Object tag = listView1.SelectedItems[0].Tag;
                if(tag is DirectoryInfo){
                    DirectoryInfo dire = (DirectoryInfo)tag;
                    string tempdir = dire.FullName;
                    // 刷新
                    LoadDirFilesToListView(tempdir, () => {
                        dir = tempdir;
                        text_adress.Text = tempdir;
                    });
                }
                else if (tag is FileInfo)
                {
                    FileInfo file = (FileInfo)tag;
                    try
                    {
                        Process.Start(file.FullName);
                    }
                    catch { }
                }
            }
        }

19 View Source File : CentralServerConfigForm.cs
License : Apache License 2.0
Project Creator : 214175590

private void 打开本地临时目录ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Process.Start(cfgDir);
        }

19 View Source File : TomcatMonitorForm.cs
License : Apache License 2.0
Project Creator : 214175590

private void projects_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            if (projects.SelectedItems.Count > 0)
            {
                ListViewItem item = projects.SelectedItems[0];
                if(item != null){
                    Process.Start(item.Text);
                }
            }
        }

19 View Source File : SftpWinForm.cs
License : Apache License 2.0
Project Creator : 214175590

private void editToolStripMenuItem_Click(object sender, EventArgs e)
        {
            int count = listView1.SelectedItems.Count;
            if (count == 1)
            {
                Object tag = listView1.SelectedItems[0].Tag;
                if (tag is FileInfo)
                {
                    FileInfo file = (FileInfo)tag;
                    try
                    {
                        Process.Start(file.FullName);
                    }
                    catch { }                    
                }
            }            
        }

19 View Source File : MainForm.cs
License : Apache License 2.0
Project Creator : 214175590

private void tool_ssh_Click(object sender, EventArgs e)
        {
            Process.Start(System.Windows.Forms.Application.ExecutablePath);
        }

19 View Source File : MainForm.cs
License : Apache License 2.0
Project Creator : 214175590

private void tool_ftp_Click(object sender, EventArgs e)
        {
            SshUser user = null;
            FATabStripItem tab = (FATabStripItem)faTab.SelectedItem;
            if (tab != null)
            {
                SessionConfig sessionConfig = (SessionConfig)tab.Tag;
                if (null != sessionConfig)
                {
                    user = new SshUser();
                    user.Host = sessionConfig.Host;
                    user.UserName = sessionConfig.UserName;
                    user.Preplacedword = sessionConfig.Preplacedword;
                    user.Port = sessionConfig.Port;
                }                 
            }
            //new SftpForm(user).Show();
            if (null != user)
            {
                string host = "\"" + user.Host + "\"";
                string username = "\"" + user.UserName + "\"";
                string preplacedword = "\"" + user.Preplacedword + "\"";
                string port = "\"" + user.Port + "\"";  

                Process process = new Process();
                process.StartInfo.FileName = APP_DIR + "\\AMSftp.exe";
                process.StartInfo.Arguments = host + " " + username + " " + preplacedword + " " + port;  
                process.StartInfo.UseShellExecute = true;
                //启动  
                process.Start();  
            }
            else
            {
                Process.Start(APP_DIR + "\\AMSftp.exe");
            }
        }

19 View Source File : SftpWinForm.cs
License : Apache License 2.0
Project Creator : 214175590

private void listView1_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            if (listView1.SelectedItems.Count > 0)
            {
                ListViewItem row = listView1.SelectedItems[0];
                int index = listView1.SelectedIndices[0];
                string name = row.Text;
                if(name == ".." && index == 0){
                    OpenUpDir();
                }
                else
                {
                    Object tag = row.Tag;
                    if (tag is DirectoryInfo)
                    {
                        string tempdir = ((DirectoryInfo)tag).FullName;
                        LoadDirFilesToListView(tempdir, () =>
                        {
                            dir = tempdir;
                            text_adress.Text = dir;
                        });
                    }
                    else if (tag is FileInfo)
                    {
                        string path = ((FileInfo)tag).FullName;
                        Process.Start(path);
                    }
                }
                
            }
        }

19 View Source File : Form1.cs
License : MIT License
Project Creator : 2881099

private void buttonItem35_Click(object sender, EventArgs e)
        {
            Process.Start(@"https://github.com/2881099/FreeSql");
        }

19 View Source File : Form1.cs
License : MIT License
Project Creator : 2881099

private void buttonItem36_Click(object sender, EventArgs e)
        {
            Process.Start(@"https://github.com/2881099/FreeSql/wiki");
        }

19 View Source File : MainForm.cs
License : GNU General Public License v3.0
Project Creator : 2dust

private void tsbPromotion_Click(object sender, EventArgs e)
        {
            Process.Start($"{Utils.Base64Decode(Global.PromotionUrl)}?t={DateTime.Now.Ticks}");
        }

19 View Source File : OptionSettingForm.cs
License : GNU General Public License v3.0
Project Creator : 2dust

private void linkDnsObjectDoc_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            System.Diagnostics.Process.Start("https://www.v2fly.org/config/dns.html#dnsobject");
        }

19 View Source File : Form1.cs
License : MIT License
Project Creator : 2881099

private void buttonItem34_Click(object sender, EventArgs e)
        {
            Process.Start(@"https://github.com/2881099/FreeSql/issues/new");
        }

19 View Source File : mainframe.cs
License : MIT License
Project Creator : 2881099

[JSFunction]
        public void openBrowser(string url)
        {
            Process.Start(url);
        }

19 View Source File : RoutingSettingForm.cs
License : GNU General Public License v3.0
Project Creator : 2dust

private void linkLabelRoutingDoc_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            System.Diagnostics.Process.Start("https://www.v2fly.org/config/routing.html");
        }

19 View Source File : MainForm.cs
License : GNU General Public License v3.0
Project Creator : 2dust

private void btnOK_Click(object sender, EventArgs e)
        {
            try
            {
                Process[] existing = Process.GetProcessesByName("v2rayN");
                foreach (Process p in existing)
                {
                    string path = p.MainModule.FileName;
                    if (path == GetPath("v2rayN.exe"))
                    {
                        p.Kill();
                        p.WaitForExit(100);
                    }
                }
            }
            catch (Exception ex)
            {
                // Access may be denied without admin right. The user may not be an administrator.
                showWarn("Failed to close v2rayN(关闭v2rayN失败).\n" +
                    "Close it manually, or the upgrade may fail.(请手动关闭正在运行的v2rayN,否则可能升级失败。\n\n" + ex.StackTrace);
            }

            StringBuilder sb = new StringBuilder();
            try
            {
                if (!File.Exists(fileName))
                {
                    if (File.Exists(defaultFilename))
                    {
                        fileName = defaultFilename;
                    }
                    else
                    {
                        showWarn("Upgrade Failed, File Not Exist(升级失败,文件不存在).");
                        return;
                    }
                }

                string thisAppOldFile = Application.ExecutablePath + ".tmp";
                File.Delete(thisAppOldFile);
                string startKey = "v2rayN/";


                using (ZipArchive archive = ZipFile.OpenRead(fileName))
                {
                    foreach (ZipArchiveEntry entry in archive.Entries)
                    {
                        try
                        {
                            if (entry.Length == 0)
                            {
                                continue;
                            }
                            string fullName = entry.FullName;
                            if (fullName.StartsWith(startKey))
                            {
                                fullName = fullName.Substring(startKey.Length, fullName.Length - startKey.Length);
                            }
                            if (Application.ExecutablePath.ToLower() == GetPath(fullName).ToLower())
                            {
                                File.Move(Application.ExecutablePath, thisAppOldFile);
                            }

                            string entryOuputPath = GetPath(fullName);

                            FileInfo fileInfo = new FileInfo(entryOuputPath);
                            fileInfo.Directory.Create();
                            entry.ExtractToFile(entryOuputPath, true);
                        }
                        catch (Exception ex)
                        {
                            sb.Append(ex.StackTrace);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                showWarn("Upgrade Failed(升级失败)." + ex.StackTrace);
                return;
            }
            if (sb.Length > 0)
            {
                showWarn("Upgrade Failed,Hold ctrl + c to copy to clipboard.\n" +
                    "(升级失败,按住ctrl+c可以复制到剪贴板)." + sb.ToString());
                return;
            }

            Process.Start("v2rayN.exe");
            MessageBox.Show("Upgrade successed(升级成功)", "", MessageBoxButtons.OK, MessageBoxIcon.Information);

            Close();
        }

19 View Source File : MainWindow.xaml.cs
License : MIT License
Project Creator : 3RD-Dimension

private void Hyperlink_RequestNavigate(object sender, System.Windows.Navigation.RequestNavigateEventArgs e)
		{
			System.Diagnostics.Process.Start(e.Uri.AbsoluteUri);
		}

19 View Source File : Util.cs
License : MIT License
Project Creator : 499116344

public static void TalkQQ(string uin)
        {
            try
            {
                var fileName = $"tencent://message/?uin={uin}&Site=qq&Menu=yes";
                Process.Start(fileName);
            }
            catch
            {
            }
        }

19 View Source File : NotchSolutionPreferences.cs
License : MIT License
Project Creator : 5argon

public override void OnActivate(string searchContext, VisualElement root)
        {
            var padRect = new VisualElement();
            int padding = 10;
            padRect.style.paddingBottom = padding;
            padRect.style.paddingLeft = padding;
            padRect.style.paddingRight = padding;
            padRect.style.paddingTop = padding - 5;
            root.Add(padRect);

            var replacedle = new Label("Notch Solution");
            replacedle.style.fontSize = 15;
            replacedle.style.unityFontStyleAndWeight = FontStyle.Bold;
            padRect.Add(replacedle);

            var repo = new Label("https://github.com/5argon/NotchSolution");
            repo.style.paddingBottom = 15;
            repo.style.unityFontStyleAndWeight = FontStyle.Bold;
            repo.RegisterCallback((MouseDownEvent ev) =>
            {
                System.Diagnostics.Process.Start("https://github.com/5argon/NotchSolution");
            });
            padRect.Add(repo);

            var devicesPath = new TextField("Device Directory");
            devicesPath.SetEnabled(false);
            devicesPath.value = NotchSimulatorUtility.DevicesFolder;
            padRect.Add(devicesPath);

            var colorField = new ColorField("Prefab mode overlay color");
            colorField.value = Settings.Instance.PrefabModeOverlayColor;
            colorField.RegisterValueChangedCallback(ev =>
            {
                var settings = Settings.Instance;
                settings.PrefabModeOverlayColor = ev.newValue;
                settings.Save();
                NotchSimulator.UpdateAllMockups();
                NotchSimulator.UpdateSimulatorTargets();
            });
            padRect.Add(colorField);
        }

19 View Source File : dlgSettings.cs
License : MIT License
Project Creator : 86Box

private void lnkGithub2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            lnkGithub2.LinkVisited = true;
            Process.Start("https://github.com/86Box/86Box");
        }

19 View Source File : dlgSettings.cs
License : MIT License
Project Creator : 86Box

private void lnkGithub_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            lnkGithub.LinkVisited = true;
            Process.Start("https://github.com/86Box/86BoxManager");
        }

19 View Source File : FrmAbout.cs
License : GNU General Public License v3.0
Project Creator : 9vult

private void LabelGithubUrl_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            System.Diagnostics.Process.Start("https://github.com/ninevult/MikuReader");
        }

19 View Source File : LoaderIntegrityCheck.cs
License : GNU General Public License v3.0
Project Creator : 9E4ECDDE

private static void PopupMsg()
        {
            try
            {
                if (MessageBox(IntPtr.Zero, "You're using MelonLoader with important security features missing. Do you want to download the official installer?", "Multiplayer Dynamic Bones Mod", 0x04 | 0x40 | 0x1000) == 6)
                {
                    Process.Start("https://github.com/LavaGang/MelonLoader/releases");
                    MessageBox(IntPtr.Zero, "Please close the game, and reinstall MelonLoader using the link on the page that just loaded.", "Multiplayer Dynamic Bones Mod", 0x40 | 0x1000);
                }
            }
            catch (Exception ex) { MelonLogger.Error(ex.ToString()); return; }
        }

19 View Source File : FrmAbout.cs
License : GNU General Public License v3.0
Project Creator : 9vult

private void labelCompanyName_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            System.Diagnostics.Process.Start("https://9voltfansubs.wordpress.com");
        }

19 View Source File : UI.cs
License : MIT License
Project Creator : aaaddress1

private void run_Click(object sender, EventArgs e)
        {
            if (new FileInfo(exePath).Exists)
                Process.Start(exePath);
            else
                MessageBox.Show("executable file not found!");
        }

19 View Source File : ServerManager.cs
License : Apache License 2.0
Project Creator : AantCoder

public void SaveAndRestart()
        {
            try
            {
                Loger.Log("Command SaveAndRestart");
                Thread.CurrentThread.IsBackground = false;
                Connect.Stop();
                Thread.Sleep(100);
                var rep = Repository.Get;
                rep.Save();
                Thread.Sleep(200);
                Loger.Log("Restart");
                Process.Start(Process.GetCurrentProcess().MainModule.FileName);
                Loger.Log("Command SaveAndRestart done");
                Environment.Exit(0);
            }
            catch (Exception e)
            {
                Loger.Log("Command Exception " + e.ToString());
            }
        }

19 View Source File : DevicePortal.cs
License : Apache License 2.0
Project Creator : abist-co-ltd

public static void OpenWebPortal(DeviceInfo targetDevice)
        {
            System.Diagnostics.Process.Start(FinalizeUrl(targetDevice.IP));
        }

19 View Source File : HyperlinkButtonCompatible.cs
License : MIT License
Project Creator : ABTSoftware

private void OnClick(object sender, RoutedEventArgs routedEventArgs)
        {
#if !SILVERLIGHT
            if(!string.IsNullOrWhiteSpace(NavigateUri))
            {
                Process.Start(NavigateUri);
            }
#else
            if (!string.IsNullOrWhiteSpace(NavigateUri))
            {
                System.Windows.Browser.HtmlPage.Window.Navigate(new Uri(NavigateUri), "_blank");
            }
#endif
        }

See More Examples