コード例 #1
0
        public void SetupBackward()
        {
            string deployDirectory = PropertySet.GetValue("setupdir").ToString();

            if (!string.IsNullOrEmpty(deployDirectory))
            {
                if (Directory.Exists(deployDirectory))
                {
                    Directory.Delete(deployDirectory, true);
                }
            }
            PropertySet.RemoveProperty("setupdir");

            m_form.AddTitleUC("指定安装目录");
            SelectSetupDirCommand command = new SelectSetupDirCommand(m_form);

            m_form.AddBodyUC(command);
            m_form.CurrentCommand = command;
        }
コード例 #2
0
        public void SetupForward()
        {
            if (string.IsNullOrEmpty(txtFileName.Text))
            {
                MessageBox.Show("未选择安装包文件,请选择。", "警告", MessageBoxButtons.OK,
                                MessageBoxIcon.Warning);
                m_form.SetNextButtonEnabled(false);
            }
            else
            {
                PropertySet.AddProperty("zipfile", txtFileName.Text.Trim());

                m_form.AddTitleUC("指定安装目录");
                SelectSetupDirCommand command = new SelectSetupDirCommand(m_form);
                m_form.AddBodyUC(command);
                m_form.SetBeforeButtonEnabled(true);
                m_form.CurrentCommand = command;
            }
        }