public override void CreateStartupItem()
        {
            string startup_folder_path = Environment.GetFolderPath(Environment.SpecialFolder.Startup);
            string shortcut_path       = Path.Combine(startup_folder_path, "SparkleShare.lnk");

            if (File.Exists(shortcut_path))
            {
                File.Delete(shortcut_path);
            }

            string shortcut_target = Forms.Application.ExecutablePath;

            Shortcut shortcut = new Shortcut();

            shortcut.Create(shortcut_path, shortcut_target);
        }
        public override void AddToBookmarks()
        {
            string user_profile_path = Environment.GetFolderPath(
                Environment.SpecialFolder.UserProfile);

            string shortcut_path = Path.Combine(user_profile_path, "Links", "SparkleShare.lnk");

            if (File.Exists(shortcut_path))
            {
                File.Delete(shortcut_path);
            }

            string shortcut_target = SparkleConfig.DefaultConfig.FoldersPath;

            Shortcut shortcut = new Shortcut();

            shortcut.Create(shortcut_path, shortcut_target);
        }
Esempio n. 3
0
        public override void AddToBookmarks()
        {
            string user_profile_path = Environment.GetFolderPath (Environment.SpecialFolder.UserProfile);
            string shortcut_path     = Path.Combine (user_profile_path, "Links", "SparkleShare.lnk");

            if (File.Exists (shortcut_path))
                File.Delete (shortcut_path);

            Shortcut shortcut = new Shortcut ();
            shortcut.Create (FoldersPath, shortcut_path);
        }
Esempio n. 4
0
        public override void CreateStartupItem()
        {
            string startup_folder_path = Environment.GetFolderPath (Environment.SpecialFolder.Startup);
            string shortcut_path       = Path.Combine (startup_folder_path, "SparkleShare.lnk");

            if (File.Exists (shortcut_path))
                File.Delete (shortcut_path);

            string shortcut_target = Forms.Application.ExecutablePath;

            Shortcut shortcut = new Shortcut ();
            shortcut.Create (shortcut_path, shortcut_target);
        }