示例#1
0
 public void LoadConfig(Config config, INetworkTaskChanged taskChanged)
 {
     NetworkTask.Helper.FillComboBox(CtlTask, config, null);
     Task = NetworkTask.Helper.GetInstance(CtlTask.SelectedItem.ToString());
     PointsRearrangeSnap = Task.GetPointsRearrangeSnap();
     CtlHolder.Children.Clear();
     CtlHolder.Children.Add(Task.GetVisualControl());
     Task.SetConfig(config);
     Task.LoadConfig();
     Task.SetChangeEvent(TaskParameterChanged);
     TaskChanged = taskChanged;
     TaskParameterChanged();
 }
示例#2
0
 private void CtlTask_SelectedIndexChanged()
 {
     if (CtlTask.SelectedItem != null)
     {
         Task = NetworkTask.Helper.GetInstance(CtlTask.SelectedItem.ToString());
         PointsRearrangeSnap = Task.GetPointsRearrangeSnap();
         Task.SetChangeEvent(TaskParameterChanged);
         CtlHolder.Children.Clear();
         CtlHolder.Children.Add(Task.GetVisualControl());
         if (TaskChanged != null)
         {
             TaskChanged.TaskChanged();
         }
     }
 }