Beispiel #1
0
        /// <summary>
        /// Promopt user set the branch root path
        /// </summary>
        /// <param name="initPath">init branch root path</param>
        /// <param name="forceSet">force to reset path</param>
        /// <returns>success or not</returns>
        private static bool PromoptSelectBranchRoot(string initPath, bool forceSet = false)
        {
            if (forceSet || (String.IsNullOrEmpty(BanchRootPath) ||
                             !Directory.Exists(BanchRootPath)))
            {
                if (frmSetRoot == null)
                {
                    frmSetRoot = new frmSetRoot(initPath);
                }

                if (frmSetRoot.ShowDialog() == DialogResult.OK)
                {
                    Win32.WritePrivateProfileString(PluginName, PluginRootPathKey, frmSetRoot.SelectedPath, iniFilePath);
                    BanchRootPath = frmSetRoot.SelectedPath;
                    return(true);
                }
            }
            return(false);
        }
Beispiel #2
0
        /// <summary>
        /// Promopt user set the branch root path
        /// </summary>
        /// <param name="initPath">init branch root path</param>
        /// <param name="forceSet">force to reset path</param>
        /// <returns>success or not</returns>
        private static bool PromoptSelectBranchRoot(string initPath, bool forceSet = false)
        {
            if (forceSet || (String.IsNullOrEmpty(BanchRootPath)
                   || !Directory.Exists(BanchRootPath)))
            {
                if (frmSetRoot == null)
                {
                    frmSetRoot = new frmSetRoot(initPath);
                }

                if (frmSetRoot.ShowDialog() == DialogResult.OK)
                {
                    Win32.WritePrivateProfileString(PluginName, PluginRootPathKey, frmSetRoot.SelectedPath, iniFilePath);
                    BanchRootPath = frmSetRoot.SelectedPath;
                    return true;
                }
            }
            return false;
        }