Exemplo n.º 1
0
        private void правилаToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Hide();
            RulesForm rulesForm = new RulesForm();

            rulesForm.Show();
        }
Exemplo n.º 2
0
        private void button2_Click(object sender, EventArgs e)
        {
            this.Hide();
            RulesForm rulesForm = new RulesForm();

            rulesForm.Show();
        }
Exemplo n.º 3
0
        public bool EditRules(List <Rule> rules)
        {
            RulesForm editForm = new RulesForm(_eventAggregator);

            editForm.DisplayRules(rules);
            bool isOk = editForm.ShowDialog() == DialogResult.OK;

            return(isOk);
        }
Exemplo n.º 4
0
        // create a new rename rule, update UI state
        private void NewRuleButtonClick(object sender, EventArgs e)
        {
            RulesForm    rulesForm    = new RulesForm();
            DialogResult dialogResult = rulesForm.ShowDialog();

            if (dialogResult == DialogResult.OK)
            {
                UpdateRulesListView();
                UpdateFileRenameListView();
            }
            RenameButton.Enabled = TorrentFileListTreeView.TotalFilesSelected > 0 && RulesListView.Items.Count > 0;
        }
Exemplo n.º 5
0
        // edit selected rule from the list of rules, update UI state
        private void EditRuleButtonClick(object sender, EventArgs e)
        {
            IRenameRule  currentSelectedRule = (IRenameRule)RulesListView.SelectedItems[0].Tag;
            int          currentRuleIndex    = RulesListView.SelectedItems[0].Index;
            RulesForm    rulesForm           = new RulesForm(editMode: true, currentSelectedRule);
            DialogResult dialogResult        = rulesForm.ShowDialog();

            if (dialogResult == DialogResult.OK)
            {
                UpdateRulesListView();
                UpdateFileRenameListView();
                RulesListView.Focus();
                RulesListView.Items[currentRuleIndex].Focused  = true;
                RulesListView.Items[currentRuleIndex].Selected = true;
            }
            RenameButton.Enabled = TorrentFileListTreeView.TotalFilesSelected > 0 && RulesListView.Items.Count > 0;
        }
Exemplo n.º 6
0
        private void RulesButton_Click(object sender, EventArgs e)
        {
            RulesForm rulesForm = new RulesForm();

            rulesForm.Show();
        }