Beispiel #1
0
        public void AddVariable()
        {
            if (this.SelectedDataSet == null)
            {
                return;
            }
            SelectVariableWindow dlg = new SelectVariableWindow(this.StudyUnit);

            dlg.Owner = Application.Current.MainWindow;
            dlg.ShowDialog();
            if (dlg.DialogResult == true)
            {
                ObservableCollection <VariableVM> variables = dlg.SelectedVariables;
                foreach (VariableVM variable in variables)
                {
                    DataSetVariableVM v = createDataSetVariable(variable);
                    if (v != null)
                    {
                        this.SelectedDataSet.Variables.Add(v);
                    }
                }
                Memorize();
            }
        }
 public void AddVariable()
 {
     if (this.SelectedDataSet == null)
     {
         return;
     }
     SelectVariableWindow dlg = new SelectVariableWindow(this.StudyUnit);
     dlg.Owner = Application.Current.MainWindow;
     dlg.ShowDialog();
     if (dlg.DialogResult == true)
     {
         ObservableCollection<VariableVM> variables = dlg.SelectedVariables;
         foreach (VariableVM variable in variables)
         {
             DataSetVariableVM v = createDataSetVariable(variable);
             if (v != null)
             {
                 this.SelectedDataSet.Variables.Add(v);
             }
         }
         Memorize();
     }
 }