public static string GetSubPlanTitle(ElementSubPlan element) { Plan plan = GetPlan(element); if (plan == null && element.PlanUID != Guid.Empty) SetSubPlan(element, null); return plan == null ? "Несвязанная ссылка на план" : plan.Caption; }
public SubPlanPropertiesViewModel(ElementSubPlan elementSubPlan) { Title = "Свойства фигуры: Подплан"; _elementSubPlan = elementSubPlan; Initialize(); SelectedPlan = Plans.FirstOrDefault(x => x.Plan.UID == elementSubPlan.PlanUID); }
public override ElementBase Clone() { ElementSubPlan elementBase = new ElementSubPlan() { PlanUID = PlanUID, Caption = Caption }; Copy(elementBase); return elementBase; }
public ElementSubPlanViewModel(ElementSubPlan elementSubPlan) { ElementSubPlan = elementSubPlan; ElementSubPlanView = new ElementSubPlanView(); //Rect rectangle = elementSubPlan.GetRectangle(); //ElementSubPlanView._polygon.Points.Add(rectangle.TopLeft); //ElementSubPlanView._polygon.Points.Add(rectangle.TopRight); //ElementSubPlanView._polygon.Points.Add(rectangle.BottomRight); //ElementSubPlanView._polygon.Points.Add(rectangle.BottomLeft); ElementSubPlanView.PlanUID = elementSubPlan.PlanUID; }
public override ElementBase Clone() { ElementSubPlan elementBase = new ElementSubPlan(); Copy(elementBase); return elementBase; }
public SubPlanPropertiesViewModel(ElementSubPlan elementSubPlan) { Title = "Свойства фигуры: Ссылка на план"; _elementSubPlan = elementSubPlan; Initialize(); }
public static void SetSubPlan(ElementSubPlan element, Plan plan) { element.PlanUID = plan == null ? Guid.Empty : plan.UID; element.Caption = plan == null ? string.Empty : plan.Caption; element.BackgroundColor = GetSubPlanColor(plan); }
public static void SetSubPlan(ElementSubPlan element) { Plan plan = GetPlan(element); SetSubPlan(element, plan); }
public static Plan GetPlan(ElementSubPlan element) { return FiresecManager.PlansConfiguration.AllPlans.FirstOrDefault(x => x.UID == element.PlanUID); }
protected override Infrustructure.Plans.Elements.ElementBaseRectangle CreateElement() { var element = new ElementSubPlan(); var propertiesViewModel = new SubPlanPropertiesViewModel(element); return DialogService.ShowModalWindow(propertiesViewModel) ? element : null; }
private static void UpdateSubPlan(ElementSubPlan elementSubPlan, Plan plan) { elementSubPlan.BackgroundColor = plan == null ? System.Windows.Media.Colors.Black : System.Windows.Media.Colors.Green; }
public static string GetSubPlanTitle(ElementSubPlan element) { Plan plan = GetPlan(element); return plan == null ? "Несвязанный подплан" : plan.Caption; }