コード例 #1
0
		public PassCardTemplatePropertiesViewModel(PassCardTemplate passCardTemplate)
		{
			Title = "Свойства элемента: Шаблон пропуска";
			PassCardTemplate = passCardTemplate;
			ImagePropertiesViewModel = new ImagePropertiesViewModel(PassCardTemplate);
			CopyProperties();
		}
コード例 #2
0
		public PolygonPropertiesViewModel(ElementPolygon elementPolygon, CommonDesignerCanvas designerCanvas)
		{
			Title = "Свойства фигуры: Полигон";
			_elementPolygon = elementPolygon;
			PositionSettingsViewModel = new PositionSettingsViewModel(_elementPolygon as ElementBase, designerCanvas);
			ImagePropertiesViewModel = new ImagePropertiesViewModel(_elementPolygon);
			CopyProperties();
		}
コード例 #3
0
		public EllipsePropertiesViewModel(ElementEllipse element, CommonDesignerCanvas designerCanvas)
		{
			Title = "Свойства фигуры: Эллипс";
			_elementEllipse = element;
			PositionSettingsViewModel = new PositionSettingsViewModel(element as ElementBase, designerCanvas);
			ImagePropertiesViewModel = new ImagePropertiesViewModel(_elementEllipse);
			CopyProperties();
		}
コード例 #4
0
		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();
		}
コード例 #5
0
		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();
		}