コード例 #1
0
        private void BasePath_BT_Click(object sender, EventArgs e)
        {
            if (Script_FdB.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                BasePath_TB.Text = Script_FdB.SelectedPath;
                Properties.Settings.Default.ROOT_PATH = BasePath_TB.Text;
                Properties.Settings.Default.Save();

                SetModulePath(EOperation.Update);
            }
        }
コード例 #2
0
        private void ScriptPath_BT_Click(object sender, EventArgs e)
        {
            if ((TipoScript_TC.SelectedTab == Install_TP) ||
                (TipoScript_TC.SelectedTab == Schema_TP))
            {
                string base_path = Directory.Exists(Path_TB.Text)
                                        ? Path_TB.Text
                                        : Directory.GetParent(Path_TB.Text).ToString();

                if (Directory.Exists(base_path))
                {
                    Script_FdB.SelectedPath = base_path;
                }

                if (Script_FdB.ShowDialog() == DialogResult.OK)
                {
                    Path_TB.Text = Script_FdB.SelectedPath;
                }
            }
            else if (TipoScript_TC.SelectedTab == Update_TP)
            {
                string base_path = Path.Combine(GetModulePath(Module_CB.Text, EOperation.Update));

                if (Directory.Exists(Path.Combine(GetModulePath(Module_CB.Text, EOperation.Update))))
                {
                    Script_FiB.InitialDirectory = Path_TB.Text;
                }

                if (Script_FiB.ShowDialog() == DialogResult.OK)
                {
                    Path_TB.Text = Script_FiB.FileName;
                }
            }
            else if (TipoScript_TC.SelectedTab == Module_TP)
            {
                string base_path = Path.Combine(GetModulePath(Module_CB.Text, EOperation.Installation));

                if (Directory.Exists(Path.Combine(GetModulePath(Module_CB.Text, EOperation.Installation))))
                {
                    Script_FdB.SelectedPath = Path_TB.Text;
                }

                if (Script_FdB.ShowDialog() == DialogResult.OK)
                {
                    Path_TB.Text = Script_FdB.SelectedPath;
                }
            }
        }