コード例 #1
0
 private void cbSendToMenu_CheckedChanged(object sender, EventArgs e)
 {
     if (loaded)
     {
         ShortcutHelpers.SetShortcut(cbSendToMenu.Checked, Environment.SpecialFolder.SendTo);
     }
 }
コード例 #2
0
 private void cbStartWithWindows_CheckedChanged(object sender, EventArgs e)
 {
     if (loaded)
     {
         //RegistryHelper.SetStartWithWindows(cbStartWithWindows.Checked);
         ShortcutHelpers.SetShortcut(cbStartWithWindows.Checked, Environment.SpecialFolder.Startup, "-silent");
     }
 }
コード例 #3
0
        public static void CreateStartupShortcut(bool create)
        {
            //RegistryHelper.SetStartWithWindows(cbStartWithWindows.Checked);

            string filePath;

#if STEAM
            filePath = Helpers.GetAbsolutePath("../ShareX_Launcher.exe");
#else
            filePath = Application.ExecutablePath;
#endif

            ShortcutHelpers.SetShortcut(create, Environment.SpecialFolder.Startup, filePath, "-silent");
        }
コード例 #4
0
 public static bool CreateSendToMenuButton(bool create)
 {
     return(ShortcutHelpers.SetShortcut(create, Environment.SpecialFolder.SendTo, Application.ExecutablePath));
 }
コード例 #5
0
 public static void CreateStartupShortcut(bool create)
 {
     ShortcutHelpers.SetShortcut(create, Environment.SpecialFolder.Startup, GetStartupTargetPath(), "-silent");
 }