Beispiel #1
0
        private void DetermineItemType()
        {
            if (this.FilteredItemTypes.Count <= 0)
            {
                return;
            }
            SelectTemplateDialog selectTemplateDialog = new SelectTemplateDialog((IEnumerable <ITrackedItemType>) this.FilteredItemTypes, this.services);

            selectTemplateDialog.SelectedTemplate = this.activeType;
            bool?nullable = selectTemplateDialog.ShowDialog();

            this.activeType = (nullable.HasValue ? (nullable.GetValueOrDefault() ? true : false) : 0) != 0 ? selectTemplateDialog.SelectedTemplate : (ITrackedItemType)null;
        }
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     if (sender == this.ChooseButton)
     {
         SelectTemplateDialog selectTemplateDialog = new SelectTemplateDialog((IEnumerable <ITrackedItemType>) this.allTypes, this.services);
         selectTemplateDialog.SelectedTemplate = this.type;
         bool?nullable = selectTemplateDialog.ShowDialog();
         if ((nullable.HasValue ? (nullable.GetValueOrDefault() ? true : false) : 0) == 0)
         {
             return;
         }
         this.RegenerateForm(selectTemplateDialog.SelectedTemplate);
     }
     else
     {
         this.DialogResult = new bool?(sender != this.CancelButton);
         this.Close();
     }
 }