Пример #1
0
        /*
         * AddProgram:
         *  Adds a program to the application list
         */
        private void addProgramToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            // create an instance of the application wizard and use *this for the callback on complete function.
            ApplicationWizard addApplication = new ApplicationWizard();

            addApplication._callBack = this;
            addApplication.ShowDialog();

            //Update the Form Text
            string fileName = _location.Substring(_location.LastIndexOf('\\') + 1);

            this.Text = "Application Installer - " + fileName;
        }
Пример #2
0
        /*
         * EditProgram:
         *  Edits programs from the applications list
         */
        private void editProgramsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            // colllect the current information
            string OldPackageName = (string)selectInstallList.SelectedItem;
            string path           = _programs[OldPackageName]._path;
            string installer      = _programs[OldPackageName]._installer;
            string uninstaller    = _programs[OldPackageName]._uninstaller;

            // send the information to the application wizard and use *this for the callback function.
            ApplicationWizard editApplication = new ApplicationWizard(OldPackageName, path, installer, uninstaller);

            editApplication._callBack = this;
            editApplication.ShowDialog();

            //Update the Form Text
            string fileName = _location.Substring(_location.LastIndexOf('\\') + 1);

            this.Text = "Application Installer - " + fileName;
        }