public PassCardTemplatePropertiesViewModel(PassCardTemplate passCardTemplate) { Title = "Свойства элемента: Шаблон пропуска"; PassCardTemplate = passCardTemplate; ImagePropertiesViewModel = new ImagePropertiesViewModel(PassCardTemplate); CopyProperties(); }
public PolygonPropertiesViewModel(ElementPolygon elementPolygon, CommonDesignerCanvas designerCanvas) { Title = "Свойства фигуры: Полигон"; _elementPolygon = elementPolygon; PositionSettingsViewModel = new PositionSettingsViewModel(_elementPolygon as ElementBase, designerCanvas); ImagePropertiesViewModel = new ImagePropertiesViewModel(_elementPolygon); CopyProperties(); }
public EllipsePropertiesViewModel(ElementEllipse element, CommonDesignerCanvas designerCanvas) { Title = "Свойства фигуры: Эллипс"; _elementEllipse = element; PositionSettingsViewModel = new PositionSettingsViewModel(element as ElementBase, designerCanvas); ImagePropertiesViewModel = new ImagePropertiesViewModel(_elementEllipse); CopyProperties(); }
public RectanglePropertiesViewModel(ElementRectangle element, CommonDesignerCanvas designerCanvas) { Title = "Свойства фигуры: Прямоугольник"; ElementRectangle = element; PositionSettingsViewModel = new PositionSettingsViewModel(element as ElementBase, designerCanvas); ImagePropertiesViewModel = new ImagePropertiesViewModel(ElementRectangle); BindStrokeThicknessCommand = new RelayCommand(OnBindStrokeThickness); CopyProperties(); }
public DesignerPropertiesViewModel(Plan plan) { Title = "Свойства элемента: План"; if (plan == null) { plan = new Plan(); var width = RegistrySettingsHelper.GetDouble("Administrator.Plans.DefaultWidth"); var height = RegistrySettingsHelper.GetDouble("Administrator.Plans.DefaultHeight"); var color = RegistrySettingsHelper.GetColor("Administrator.Plans.DefaultColor"); if (width != 0) plan.Width = width; if (height != 0) plan.Height = height; plan.BackgroundColor = color; } Plan = plan; ImagePropertiesViewModel = new ImagePropertiesViewModel(Plan); IsEnable = ImagePropertiesViewModel.ImageBrush != null; ImagePropertiesViewModel.UpdateProperty += ImagePropertiesViewModel_UpdateProperty; CopyProperties(); }