Example #1
0
        private void btnPrevious_Click(object sender, EventArgs e)
        {
            this.Close();
            InstallationPath installPath = new InstallationPath();

            installPath.MdiParent = GlobalData.FrmName;
            Control txtpath = installPath.Controls.Find("txtInstallationPath", true).FirstOrDefault();

            if (txtpath != null && txtpath.GetType() == typeof(TextBox))
            {
                ((TextBox)txtpath).Text = GlobalData.InstallationPath;
            }
            installPath.Show();
            installPath.WindowState = FormWindowState.Maximized;
        }
Example #2
0
        public static void OpenInstallationPathForm()
        {
            InstallationPath installPathFrm = new InstallationPath();

            installPathFrm.MdiParent = GlobalData.FrmName;
            installPathFrm.Dock      = DockStyle.Fill;
            string previousTaskPath = Scheduler.GetScheduledTaskPath("SyncClientApp");

            if (string.IsNullOrEmpty(previousTaskPath))
            {
                installPathFrm.txtInstallationPath.Text = string.IsNullOrEmpty(GlobalData.InstallationPath) ? "" : GlobalData.InstallationPath;
            }
            else
            {
                installPathFrm.txtInstallationPath.Text     = System.IO.Directory.GetParent(System.IO.Path.GetDirectoryName(previousTaskPath)).FullName;
                installPathFrm.btnBrowse.Visible            = false;
                installPathFrm.txtInstallationPath.ReadOnly = true;
            }
            installPathFrm.Show();
        }