private static void PlaceChangeCallBack(DependencyObject d, DependencyPropertyChangedEventArgs e) { EquCheckControl currentcontrol = d as EquCheckControl; currentcontrol.querycondition.PlaceGuid = e.NewValue == null ? null : e.NewValue.ToString(); currentcontrol.OnQueryEquCheck(); }
private void listBoxStationPlanningStep_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (e.AddedItems == null || e.AddedItems.Count == 0) { this.borderContent.Visibility = System.Windows.Visibility.Collapsed; return; } this.borderContent.Child = null; this.borderContent.Visibility = System.Windows.Visibility.Visible; var stepState = e.AddedItems[0] as FreqPlanningStepState; if (stepState != null) { switch (stepState.Step) { case Types.FreqPlanningStep.FreqAssign: FreqAssignHandleControl freqAssignHandle = new FreqAssignHandleControl(); freqAssignHandle.PlaceGuid = this.CurrentPlaceGuid; this.borderContent.Child = freqAssignHandle; break; case Types.FreqPlanningStep.EquipmentInspection: EquCheckControl equCheckControl = new EquCheckControl(); equCheckControl.PlaceGuid = this.CurrentPlaceGuid; this.borderContent.Child = equCheckControl; break; default: this.borderContent.Visibility = System.Windows.Visibility.Collapsed; break; } } //this.borderContent.Child = null; //this.borderContent.Visibility = System.Windows.Visibility.Visible; //switch (listBoxStationPlanningStep.SelectedIndex) //{ // case 0: // FreqAssignHandleControl freqAssignHandle = new FreqAssignHandleControl(); // freqAssignHandle.PlaceGuid = this.CurrentPlaceGuid; // this.borderContent.Child = freqAssignHandle; // break; // case 1: // EquCheckControl equCheckControl = new EquCheckControl(); // equCheckControl.PlaceGuid = this.CurrentPlaceGuid; // this.borderContent.Child = equCheckControl; // break; //} }