Esempio n. 1
0
 void OnEdit()
 {
     var planDetailsViewModel = new DesignerPropertiesViewModel(SelectedPlan.Plan);
     if (DialogService.ShowModalWindow(planDetailsViewModel))
     {
         SelectedPlan.Update();
         DesignerCanvas.Update();
         PlanDesignerViewModel.Update();
         ServiceFactory.SaveService.PlansChanged = true;
     }
 }
Esempio n. 2
0
		private void OnAddSubPlan()
		{
			var planDetailsViewModel = new DesignerPropertiesViewModel(null);
			if (DialogService.ShowModalWindow(planDetailsViewModel))
				OnPlanPaste(planDetailsViewModel.Plan, false);
		}
Esempio n. 3
0
        void OnAddSubPlan()
        {
            var planDetailsViewModel = new DesignerPropertiesViewModel(null);
            if (DialogService.ShowModalWindow(planDetailsViewModel))
            {
                var plan = planDetailsViewModel.Plan;
                var planViewModel = new PlanViewModel(plan, Plans);

                SelectedPlan.Children.Add(planViewModel);
                SelectedPlan.Plan.Children.Add(plan);
                planViewModel.Parent = SelectedPlan;
                plan.Parent = SelectedPlan.Plan;

                SelectedPlan.Update();
                SelectedPlan = planViewModel;
                FiresecManager.PlansConfiguration.Update();
                ServiceFactory.SaveService.PlansChanged = true;
            }
        }