Exemple #1
0
        private void Save()
        {
            ScoreCalcRuleRecordEditor editor = new ScoreCalcRuleRecordEditor();

            editor.Name    = txtNewName.Text;
            editor.Content = GetDefault();
            editor.Save();
        }
Exemple #2
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            if (SelectedItem == null)
            {
                return;
            }

            if (!_error.HasError)
            {
                ScoreCalcRuleRecord       record = SelectedItem.Tag as ScoreCalcRuleRecord;
                ScoreCalcRuleRecordEditor editor = record.GetEditor();
                editor.Content = GetContent();
                editor.Save();
            }
        }
Exemple #3
0
        private void btnDelete_Click(object sender, EventArgs e)
        {
            if (SelectedItem == null)
            {
                return;
            }

            if (MsgBox.Show("您確定要刪除「" + SelectedItem.Text + "」嗎?", MessageBoxButtons.YesNo) == DialogResult.Yes)
            {
                ScoreCalcRuleRecord       record = SelectedItem.Tag as ScoreCalcRuleRecord;
                ScoreCalcRuleRecordEditor editor = record.GetEditor();
                editor.Remove = true;
                editor.Save();
            }
        }