Пример #1
0
 private void addButton_Click(object sender, EventArgs e)
 {
     MetricForm form = new MetricForm();
     var res = form.ShowDialog();
     if (res == System.Windows.Forms.DialogResult.OK)
         loadMetrics();
 }
Пример #2
0
 private void editButton_Click(object sender, EventArgs e)
 {
     if (list.SelectedRows.Count == 0)
     {
         MessageBox.Show("حداقل یکی از موارد را انتخاب کنید", "خطا", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, MessageBoxOptions.RtlReading| MessageBoxOptions.RightAlign);
         return;
     }
     var metric = list.SelectedRows[0].Cells[0].Value as Metric;
     var form = new MetricForm(metric);
     var res = form.ShowDialog();
     if (res == System.Windows.Forms.DialogResult.OK)
         loadMetrics();
 }