private BaseViewModel CreatePlansViewModel(ILayoutProperties properties) { var plansViewModel = new PlansViewModel(_planPresenters, properties as LayoutPartPlansProperties); plansViewModel.Initialize(); _plansViewModels.Add(plansViewModel); return plansViewModel; }
public PlanDesignerViewModel(PlansViewModel plansViewModel) { PlansViewModel = plansViewModel; DesignerCanvas = new DesignerCanvas(this); DesignerCanvas.Toolbox.IsRightPanel = true; DesignerCanvas.Toolbox.RegisterInstruments(new[] { new InstrumentViewModel() { ImageSource="Subplan", ToolTip="Ссылка на план", Index = 1000, Adorner = new SubPlanRectangleAdorner(DesignerCanvas), GroupIndex = 1000, }, new InstrumentViewModel() { ImageSource="Subplan", ToolTip="Ссылка на план", Index = 1001, Adorner = new SubPlanPolygonAdorner(DesignerCanvas), GroupIndex = 1000, }, }); AllowScalePoint = true; FullScreenSize = true; }
public PlanTreeViewModel(PlansViewModel plansViewModel, List<Guid> filter, bool IsAllPlan ) { Current = this; _filter = filter; _plansViewModel = plansViewModel; _isAllPlan = IsAllPlan; }
public override void CreateViewModels() { ServiceFactory.Events.GetEvent<ConfigurationClosedEvent>().Subscribe(OnConfigurationClosedEvent); ServiceFactory.Events.GetEvent<RegisterPlanExtensionEvent<Plan>>().Subscribe(OnRegisterPlanExtension); ServiceFactory.Events.GetEvent<ConfigurationSavingEvent>().Subscribe(OnConfigurationSavingEvent); PlansViewModel = new PlansViewModel(); ApplicationService.Starting += (s, e) => ShowRightContent(); }
public PlanDesignerViewModel(PlansViewModel plansViewModel) { _plansViewModel = plansViewModel; DesignerCanvas = new PresenterCanvas(); _flushAdorner = new FlushAdorner(DesignerCanvas); ServiceFactory.Events.GetEvent<UserChangedEvent>().Unsubscribe(OnUserChanged); ServiceFactory.Events.GetEvent<UserChangedEvent>().Subscribe(OnUserChanged); }
public PlanDesignerViewModel(PlansViewModel plansViewModel, LayoutPartPlansProperties properties) { _plansViewModel = plansViewModel; DesignerCanvas = new PresenterCanvas(); _flushAdorner = new FlushAdorner(DesignerCanvas); ShowZoomSliders = properties.ShowZoomSliders; DeviceZoom = properties.DeviceZoom; AllowChangePlanZoom = properties.AllowChangePlanZoom; }
public PlanDesignerViewModel(PlansViewModel plansViewModel) { PlansViewModel = plansViewModel; DesignerCanvas = new DesignerCanvas(this); DesignerCanvas.Toolbox.IsRightPanel = true; DesignerCanvas.Toolbox.RegisterInstruments(new[]{ new InstrumentViewModel() { ImageSource="/Controls;component/Images/Subplan.png", ToolTip="Ссылка на план", Index = 300, Adorner = new SubPlanAdorner(DesignerCanvas), }}); AllowScalePoint = true; }
public PlansMenuViewModel(PlansViewModel context) { Items = new ObservableCollection<BaseViewModel>() { new MenuButtonViewModel(context.AddCommand, "/Controls;component/Images/Add.png" , "Добавить"), new MenuButtonViewModel(context.EditCommand, "/Controls;component/Images/Edit.png" , "Редактировать"), new MenuButtonViewModel(context.RemoveCommand, "/Controls;component/Images/Delete.png" , "Удалить"), //new MenuButtonViewModel(context.AddSubPlanCommand, "/Controls;component/Images/AddChild.png" , "Добавить дочерний план"), //new MenuSeparatorViewModel(), new MenuButtonViewModel(context.CopyCommand, "/Controls;component/Images/Copy.png" , "Копировать"), new MenuButtonViewModel(context.CutCommand, "/Controls;component/Images/Cut.png" , "Вырезать"), new MenuButtonViewModel(context.PasteCommand, "/Controls;component/Images/Paste.png" , "Вставить"), new MenuButtonViewModel(context.UndoCommand, "/Controls;component/Images/Undo.png" , "Отменить"), new MenuButtonViewModel(context.RedoCommand, "/Controls;component/Images/Redo.png" , "Применить"), //new MenuSeparatorViewModel(), new MenuButtonViewModel(context.PlanDesignerViewModel.MoveToFrontCommand, "/Controls;component/Images/MoveForward.png" , "Вверх"), new MenuButtonViewModel(context.PlanDesignerViewModel.SendToBackCommand, "/Controls;component/Images/MoveBackward.png" , "Вниз"), new MenuButtonViewModel(context.PlanDesignerViewModel.MoveForwardCommand, "/Controls;component/Images/MoveFront.png" , "Выше"), new MenuButtonViewModel(context.PlanDesignerViewModel.MoveBackwardCommand, "/Controls;component/Images/MoveBack.png" , "Ниже"), //new MenuSeparatorViewModel(), //context.DesignerCanvas.Toolbox }; }
public PlansMenuViewModel(PlansViewModel context) { Items = new ObservableCollection<BaseViewModel>() { new MenuButtonViewModel(context.AddFolderCommand, "/Controls;component/Images/FolderOpen.png" , "Добавить папку"), new MenuButtonViewModel(context.AddCommand, "/Controls;component/Images/Add.png" , "Добавить"), new MenuButtonViewModel(context.EditCommand, "/Controls;component/Images/Edit.png" , "Редактировать"), new MenuButtonViewModel(context.RemoveCommand, "/Controls;component/Images/Delete.png" , "Удалить"), //new MenuSeparatorViewModel(), new MenuButtonViewModel(context.PlanDesignerViewModel.CopyCommand, "/Controls;component/Images/Copy.png" , "Копировать"), new MenuButtonViewModel(context.PlanDesignerViewModel.CutCommand, "/Controls;component/Images/Cut.png" , "Вырезать"), new MenuButtonViewModel(context.PlanDesignerViewModel.PasteCommand, "/Controls;component/Images/Paste.png" , "Вставить"), new MenuButtonViewModel(context.PlanDesignerViewModel.UndoCommand, "/Controls;component/Images/Undo.png" , "Отменить"), new MenuButtonViewModel(context.PlanDesignerViewModel.RedoCommand, "/Controls;component/Images/Redo.png" , "Применить"), //new MenuSeparatorViewModel(), new MenuButtonViewModel(context.PlanDesignerViewModel.MoveToFrontCommand, "/Controls;component/Images/MoveForward.png" , "Вверх"), new MenuButtonViewModel(context.PlanDesignerViewModel.SendToBackCommand, "/Controls;component/Images/MoveBackward.png" , "Вниз"), new MenuButtonViewModel(context.PlanDesignerViewModel.MoveForwardCommand, "/Controls;component/Images/MoveFront.png" , "Выше"), new MenuButtonViewModel(context.PlanDesignerViewModel.MoveBackwardCommand, "/Controls;component/Images/MoveBack.png" , "Ниже"), //new MenuSeparatorViewModel(), //context.DesignerCanvas.Toolbox //new MenuButtonViewModel(context.PlanDesignerViewModel., "/Controls;component/Images/shapes-flip-horizontal.png" , "Ниже"), //new MenuButtonViewModel(context.PlanDesignerViewModel., "/Controls;component/Images/shapes-flip-vertical.png" , "Ниже"), //new MenuButtonViewModel(context.PlanDesignerViewModel., "/Controls;component/Images/shapes-rotate-anticlockwise.png" , "Ниже"), //new MenuButtonViewModel(context.PlanDesignerViewModel., "/Controls;component/Images/shapes-rotate-clockwise.png" , "Ниже"), }; if (!GlobalSettingsHelper.GlobalSettings.Administrator_HidePlanAlignInstruments) { Items.Add(new MenuButtonViewModel(context.PlanDesignerViewModel.AlignHorizontalLeftCommand, "/Controls;component/Images/shapes-align-hori-left.png", "Выровнять по левому краю")); Items.Add(new MenuButtonViewModel(context.PlanDesignerViewModel.AlignHorizontalCenterCommand, "/Controls;component/Images/shapes-align-hori-center.png", "Выровнять по вертикали")); Items.Add(new MenuButtonViewModel(context.PlanDesignerViewModel.AlignHorizontalRightCommand, "/Controls;component/Images/shapes-align-hori-right.png", "Выровнять по правому краю")); Items.Add(new MenuButtonViewModel(context.PlanDesignerViewModel.AlignVerticalTopCommand, "/Controls;component/Images/shapes-align-verti-top.png", "Выровнять по верхнему краю")); Items.Add(new MenuButtonViewModel(context.PlanDesignerViewModel.AlignVerticalCenterCommand, "/Controls;component/Images/shapes-align-verti-middle.png", "Выровнять по горизонтали")); Items.Add(new MenuButtonViewModel(context.PlanDesignerViewModel.AlignVerticalBottomCommand, "/Controls;component/Images/shapes-align-verti-bottom.png", "Выровнять по нижнему краю")); } }
public PlansMenuViewModel(PlansViewModel context) { Items = new ObservableCollection<BaseViewModel>() { //new MenuSeparatorViewModel(), new MenuButtonViewModel(context.PlanDesignerViewModel.CopyCommand, "Copy", "Копировать"), new MenuButtonViewModel(context.PlanDesignerViewModel.CutCommand, "Cut", "Вырезать"), new MenuButtonViewModel(context.PlanDesignerViewModel.PasteCommand, "Paste", "Вставить"), new MenuButtonViewModel(context.PlanDesignerViewModel.UndoCommand, "Undo", "Отменить"), new MenuButtonViewModel(context.PlanDesignerViewModel.RedoCommand, "Redo", "Применить"), //new MenuSeparatorViewModel(), new MenuButtonViewModel(context.PlanDesignerViewModel.MoveToFrontCommand, "MoveForward", "Вверх"), new MenuButtonViewModel(context.PlanDesignerViewModel.SendToBackCommand, "MoveBackward", "Вниз"), new MenuButtonViewModel(context.PlanDesignerViewModel.MoveForwardCommand, "MoveFront", "Выше"), new MenuButtonViewModel(context.PlanDesignerViewModel.MoveBackwardCommand, "MoveBack", "Ниже"), //new MenuSeparatorViewModel(), new MenuButtonViewModel(context.PlanDesignerViewModel.AlignHorizontalLeftCommand, "shapes-align-hori-left", "Выровнять по левому краю"), new MenuButtonViewModel(context.PlanDesignerViewModel.AlignHorizontalCenterCommand, "shapes-align-hori-center", "Выровнять по вертикали"), new MenuButtonViewModel(context.PlanDesignerViewModel.AlignHorizontalRightCommand, "shapes-align-hori-right", "Выровнять по правому краю"), new MenuButtonViewModel(context.PlanDesignerViewModel.AlignVerticalTopCommand, "shapes-align-verti-top", "Выровнять по верхнему краю"), new MenuButtonViewModel(context.PlanDesignerViewModel.AlignVerticalCenterCommand, "shapes-align-verti-middle", "Выровнять по горизонтали"), new MenuButtonViewModel(context.PlanDesignerViewModel.AlignVerticalBottomCommand, "shapes-align-verti-bottom", "Выровнять по нижнему краю"), }; }
public override void CreateViewModels() { PainterCache.UseTransparentImage = false; EventService.RegisterEventAggregator(ServiceFactory.Events); _plansViewModel = new PlansViewModel(_planPresenters); }
public PlansViewModel() { Current = this; MainCanvas = new Canvas(); ServiceFactory.Events.GetEvent<SelectPlanEvent>().Subscribe(OnSelectPlan); }
public PlansTreeViewModel(PlansViewModel plansViewModel) { PlansViewModel = plansViewModel; TreeNodeDropCommand = new RelayCommand<TreeNodeDropObject>(OnDrop, CanDrop); }
public PlansModule() { ServiceFactory.Events.GetEvent<RegisterPlanExtensionEvent<Plan>>().Subscribe(OnRegisterPlanExtension); ServiceFactory.Events.GetEvent<ConfigurationSavingEvent>().Subscribe(OnSave); _plansViewModel = new PlansViewModel(); }
public PlanTreeViewModel(PlansViewModel plansViewModel) { Current = this; _plansViewModel = plansViewModel; }
public PlansModuleLoader() { ServiceFactory.Events.GetEvent<ShowDeviceOnPlanEvent>().Subscribe(OnShowDeviceOnPlan); ServiceFactory.Events.GetEvent<ShowZoneOnPlanEvent>().Subscribe(OnShowZoneOnPlan); PlansViewModel = new PlansViewModel(); }