Ejemplo n.º 1
0
        private void FrmEditAddEntries_Closing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            /*								Welcome to the "Operation Room"
             * when we load this dialog ( two methods initialize this form (Edit, add)
             * in edit we give the CmdTest a Dialog result
             * in Edit  MyEd.Cmd_Test.DialogResult = DialogResult.Yes;
             * in Add   MyEd.Cmd_Test.DialogResult = DialogResult.OK;
             *	 */
            ClsEntriesManipulation MyImp = new ClsEntriesManipulation();

            string Suffix = MyImp.TellMeTheSuffix(CombSuffix.SelectedIndex);

            switch (this.DialogResult)
            {
            case DialogResult.OK:                      // Ok Means Add Entry
                MyImp.AddEntry
                    (Suffix, CombHkey.SelectedIndex, TxtNameAddEdit.Text, TxtCommandAddEdit.Text);
                break;

            case DialogResult.Yes:                      // Yes Means Edit Entry
                MyImp.CheckIfEdit
                    (TxtNameAddEdit.Text, TxtCommandAddEdit.Text,
                    CombHkey.SelectedIndex, CombSuffix.SelectedIndex);
                break;
            }
        }
Ejemplo n.º 2
0
        private void IsdalMainDisable_Click(object sender, System.EventArgs e)
        {
            ClsEntriesManipulation MyClsEntriesManipulation = new ClsEntriesManipulation();

            if (
                MyClsEntriesManipulation.DisableEntry
                (
                    ViewMain.FocusedItem.Text,             // Entry Name
                    ViewMain.FocusedItem.SubItems[1].Text, // Entry Data
                    ViewMain.FocusedItem.SubItems[2].Text, // Entry Root hkey
                    ViewMain.FocusedItem.SubItems[3].Text, // Entry Type
                    ViewMain.FocusedItem.SubItems[5].Text  // EntryKey
                ))
            {
                ContainerMathod(TreeMain.SelectedNode.FullPath);
            }
        }
Ejemplo n.º 3
0
        //-----------------------------------------------------------------------------------------------------\\
        //--------------------------  Begining of Delete, Edit, Add, Enable, Disable --------------------------\\
        //-----------------------------------------------------------------------------------------------------\\

        private void IsdalMainRemove_Click(object sender, System.EventArgs e)
        {
            ClsEntriesManipulation MyClsEntriesManipulation = new ClsEntriesManipulation();

            if
            (
                !MyClsEntriesManipulation.RemoveTheEntry
                (
                    ViewMain.FocusedItem.Text,                                 // Entry Name
                    MyAction.AnalyzeIt(ViewMain.FocusedItem.SubItems[1].Text), // Entry Data
                    ViewMain.FocusedItem.SubItems[2].Text,                     // Entry Root (hkey)
                    ViewMain.FocusedItem.SubItems[4].Text,                     // EntryStatus
                    ViewMain.FocusedItem.SubItems[5].Text                      // EntryKey
                )
            )
            {
                MessageBox.Show
                    ("File No longer Exists \n no system changes occured", "File Not Found", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }

            ContainerMathod(TreeMain.SelectedNode.FullPath);
        }