Esempio n. 1
0
        private void buttonXCustomDataDiscretization_Click(object sender, EventArgs e)
        {
            int selectedIndex = checkedListBoxColumnName.SelectedIndex;

            if (selectedIndex == -1)
            {
                MessageBox.Show("Chưa chọn thuộc tính để rời rạc", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else
            {
                if (checkedListBoxColumnName.Items[selectedIndex].ToString() == "Tuoi" ||
                    checkedListBoxColumnName.Items[selectedIndex].ToString() == "GioiTinh")
                {
                    MessageBox.Show("Thuộc tính Tuoi và GioiTinh không cần thực hiện rời rạc"
                                    , "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
                else
                {
                    String colName  = checkedListBoxColumnName.SelectedItem.ToString();
                    int    interval = integerInputIntervalDiscretization.Value;
                    FormCustomDataDiscretization newFormCustomDataDiscretization =
                        new FormCustomDataDiscretization(colName, interval);
                    newFormCustomDataDiscretization.FormClosed += buttonXDataDiscretizationDataView_Click;
                    newFormCustomDataDiscretization.Show();
                }
            }
        }
 private void buttonXCustomDataDiscretization_Click(object sender, EventArgs e)
 {
     int selectedIndex = checkedListBoxColumnName.SelectedIndex;
     if (selectedIndex == -1)
         MessageBox.Show("Chưa chọn thuộc tính để rời rạc", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Error);
     else
     {
         if (checkedListBoxColumnName.Items[selectedIndex].ToString() == "Tuoi"
             || checkedListBoxColumnName.Items[selectedIndex].ToString() == "GioiTinh")
         {
             MessageBox.Show("Thuộc tính Tuoi và GioiTinh không cần thực hiện rời rạc"
                 , "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
         else
         {
             String colName = checkedListBoxColumnName.SelectedItem.ToString();
             int interval = integerInputIntervalDiscretization.Value;
             FormCustomDataDiscretization newFormCustomDataDiscretization =
                 new FormCustomDataDiscretization(colName, interval);
             newFormCustomDataDiscretization.FormClosed += buttonXDataDiscretizationDataView_Click;
             newFormCustomDataDiscretization.Show();
         }
     }
 }