Create() 공개 메소드

public Create ( string file_path, string target_path ) : void
file_path string
target_path string
리턴 void
예제 #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);
        }
예제 #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);
        }
예제 #3
0
파일: Controller.cs 프로젝트: to2y/CmisSync
        /// <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);
        }
예제 #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);
        }
예제 #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);
        }