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(); }
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(); } } }