private void valLblOkBut_Click(object sender, RoutedEventArgs e)
{
if (modified)
{
//vlmatrix.getFinalList();//get final list from matrix. // no need to do it here. do in DAtaPanel
if (!checkMaxFactorsAndLoadFMap())//if factors are greater that maximum allowed
return;
newfactcount = ValLstBox.Items.Count;
switch (changeMeasureCombo.SelectedIndex)
{
case 0:
colMeasure = DataColumnMeasureEnum.Nominal;
break;
case 1:
colMeasure = DataColumnMeasureEnum.Ordinal;
break;
case 2:
colMeasure = DataColumnMeasureEnum.Scale;
break;
}
//MessageBox.Show(colMeasure.ToString());
OKclicked = true;
if (oldfactcount > newfactcount)//if numerbr of factors are less than minimum required
{
if (MessageBox.Show("Empty factors will be converted to NAs", "Warning!", MessageBoxButton.YesNo, MessageBoxImage.Warning) == MessageBoxResult.No)
{
///No. Dont convert empty factors to NA. Allow me to modify
OKclicked = false; //for allowing NAs, uncomment these 2 lines and comment 2 lines after if block
return;
}
//OKclicked = false;// for not allowing NAs
//return;
}
}
else
{
OKclicked = false;
}
///Then close the dialogue////
ValueLablesDialog.GetWindow(this).Close();
}