Create() public method

public Create ( string file_path, string target_path ) : void
file_path string
target_path string
return void
Example #1
0
        /// <summary>
        /// Add CmisSync to the user's Windows Explorer bookmarks.
        /// </summary>
        public override void AddToBookmarks()
        {
            string user_profile_path = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
            string shortcut_path = Path.Combine(user_profile_path, "Links", "CmisSync.lnk");

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

            Shortcut shortcut = new Shortcut();

            shortcut.Create(FoldersPath, shortcut_path, Forms.Application.ExecutablePath, 0);
        }
Example #2
0
        /// <summary>
        /// Add CmisSync to the list of programs to be started up when the user logs into Windows.
        /// </summary>
        public override void CreateStartupItem() {
            string startup_folder_path = Environment.GetFolderPath(Environment.SpecialFolder.Startup);
            string shortcut_path = Path.Combine(startup_folder_path, "DataSpace Sync.lnk");

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

            string shortcut_target = Forms.Application.ExecutablePath;

            Shortcut shortcut = new Shortcut();
            shortcut.Create(shortcut_target, shortcut_path);
        }
Example #3
0
        /// <summary>
        /// Add CmisSync to the user's Windows Explorer bookmarks.
        /// </summary>
        public override void AddToBookmarks()
        {
            string user_profile_path = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
            string shortcut_path     = Path.Combine(user_profile_path, "Links", "CmisSync.lnk");

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

            Shortcut shortcut = new Shortcut();

            shortcut.Create(FoldersPath, shortcut_path, Forms.Application.ExecutablePath, 0);
        }
Example #4
0
        /// <summary>
        /// Add CmisSync to the list of programs to be started up when the user logs into Windows.
        /// </summary>
        public override void CreateStartupItem()
        {
            string startup_folder_path = Environment.GetFolderPath(Environment.SpecialFolder.Startup);
            string shortcut_path       = Path.Combine(startup_folder_path, "Oris4 Sync.lnk");

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

            string shortcut_target = Forms.Application.ExecutablePath;

            Shortcut.Create(shortcut_target, shortcut_path);
        }
Example #5
0
        /// <summary>
        /// Add CmisSync to the user's Windows Explorer bookmarks.
        /// </summary>
        public override void AddToBookmarks()
        {
            string user_profile_path = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
            string links_path        = Path.Combine(user_profile_path, "Links");
            string shortcut_path     = Path.Combine(links_path, "Oris4.lnk");

            if (!Directory.Exists(links_path))
            {
                Logger.Warn("Could not create bookmark, Links folder not found");
                return;
            }

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

            Shortcut.Create(FoldersPath, shortcut_path, Forms.Application.ExecutablePath, 0);
        }