Пример #1
0
 protected virtual void problemInstanceProviderComboBox_SelectedIndexChanged(object sender, System.EventArgs e)
 {
     if (problemInstanceProviderComboBox.SelectedIndex >= 0)
     {
         SelectedProvider = (IProblemInstanceProvider)problemInstanceProviderComboBox.SelectedItem;
         problemInstanceProviderViewHost.Content = SelectedProvider;
         var view     = (ProblemInstanceProviderView)problemInstanceProviderViewHost.ActiveView;
         var consumer = (IProblemInstanceConsumer)Content;
         view.Consumer = consumer;
         if (CheckForIProblemInstanceExporter(consumer))
         {
             view.Exporter = (IProblemInstanceExporter)Content;
         }
         else
         {
             view.Exporter = null;
         }
         SetTooltip();
     }
     else
     {
         SelectedProvider = null;
     }
     SetEnabledStateOfControls();
 }
Пример #2
0
 protected virtual void problemInstanceProviderComboBox_SelectedIndexChanged(object sender, System.EventArgs e) {
   if (problemInstanceProviderComboBox.SelectedIndex >= 0) {
     SelectedProvider = (IProblemInstanceProvider)problemInstanceProviderComboBox.SelectedItem;
     problemInstanceProviderViewHost.Content = SelectedProvider;
     var view = (ProblemInstanceProviderView)problemInstanceProviderViewHost.ActiveView;
     var consumer = (IProblemInstanceConsumer)Content;
     view.Consumer = consumer;
     if (CheckForIProblemInstanceExporter(consumer))
       view.Exporter = (IProblemInstanceExporter)Content;
     else view.Exporter = null;
     SetTooltip();
   } else {
     SelectedProvider = null;
   }
   SetEnabledStateOfControls();
 }
Пример #3
0
 public static void LoadData(IProblemInstanceProvider provider, IDataDescriptor descriptor, IProblemInstanceConsumer consumer) {
   ((dynamic)consumer).Load(((dynamic)provider).LoadData(descriptor));
 }
Пример #4
0
 public static IEnumerable<IDataDescriptor> GetDataDescriptors(IProblemInstanceProvider provider) {
   IEnumerable<IDataDescriptor> descriptors = ((dynamic)provider).GetDataDescriptors();
   return descriptors;
 }
Пример #5
0
 public static void LoadData(IProblemInstanceProvider provider, IDataDescriptor descriptor, IProblemInstanceConsumer consumer)
 {
     ((dynamic)consumer).Load(((dynamic)provider).LoadData(descriptor));
 }
Пример #6
0
        public static IEnumerable <IDataDescriptor> GetDataDescriptors(IProblemInstanceProvider provider)
        {
            IEnumerable <IDataDescriptor> descriptors = ((dynamic)provider).GetDataDescriptors();

            return(descriptors);
        }