public override void AddToBookmarks() { string user_profile_path = Environment.GetFolderPath ( Environment.SpecialFolder.UserProfile); string shortcut_path = Path.Combine (user_profile_path, "Links", "OrangeShare.lnk"); if (File.Exists (shortcut_path)) File.Delete (shortcut_path); string shortcut_target = OrangeConfig.DefaultConfig.FoldersPath; Shortcut shortcut = new Shortcut (); shortcut.Create (shortcut_path, shortcut_target); }
public override void CreateStartupItem() { string startup_folder_path = Environment.GetFolderPath ( Environment.SpecialFolder.Startup); string shortcut_path = Path.Combine (startup_folder_path, "OrangeShare.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); }