Пример #1
0
        public PreviewMegaTreeSetupControl(PreviewBaseShape shape) : base(shape)
        {
            InitializeComponent();
            _tree = Shape as PreviewMegaTree;
            Setup();

            Shape.OnPropertiesChanged += OnPropertiesChanged;
        }
Пример #2
0
        public PreviewMegaTreeSetupControl(PreviewBaseShape shape)
            : base(shape)
        {
            InitializeComponent();
            _tree = Shape as PreviewMegaTree;
            Setup();

            Shape.OnPropertiesChanged += OnPropertiesChanged;
        }
Пример #3
0
		public PreviewMegaTreeSetupControl(PreviewBaseShape shape) : base(shape)
		{
			InitializeComponent();
			ForeColor = ThemeColorTable.ForeColor;
			BackColor = ThemeColorTable.BackgroundColor;
			ThemeUpdateControls.UpdateControls(this);
			_tree = Shape as PreviewMegaTree;
			Setup();

			Shape.OnPropertiesChanged += OnPropertiesChanged;
		}
Пример #4
0
        public PreviewMegaTreeSetupControl(PreviewBaseShape shape) : base(shape)
        {
            InitializeComponent();
            ForeColor = ThemeColorTable.ForeColor;
            BackColor = ThemeColorTable.BackgroundColor;
            ThemeUpdateControls.UpdateControls(this);
            _tree = Shape as PreviewMegaTree;
            Setup();

            Shape.OnPropertiesChanged += OnPropertiesChanged;
        }
Пример #5
0
        public override void Match(PreviewBaseShape matchShape)
        {
            PreviewMegaTree shape = (matchShape as PreviewMegaTree);

            PixelSize     = shape.PixelSize;
            TopHeight     = shape.TopHeight;
            TopWidth      = shape.TopWidth;
            BaseHeight    = shape.BaseHeight;
            Degrees       = shape.Degrees;
            BottomRight.X = _topLeft.X + (shape.BottomRight.X - shape._topLeft.X);
            BottomRight.Y = _topLeft.Y + (shape.BottomRight.Y - shape._topLeft.Y);
            Layout();
        }
Пример #6
0
        public override object Clone()
        {
            PreviewMegaTree newTree = (PreviewMegaTree)this.MemberwiseClone();

            newTree._strings = new List <PreviewBaseShape>();
            foreach (PreviewBaseShape line in _strings)
            {
                PreviewBaseShape newLine = (PreviewLine)line.Clone();
                newTree._strings.Add(newLine);
            }
            newTree._topLeft     = new PreviewPoint(_topLeft);
            newTree._bottomRight = new PreviewPoint(_bottomRight);

            return(newTree);
        }
Пример #7
0
        private void SetupMegaTree(int degrees)
        {
            int stringCount = StringCount;
            if (stringCount < 2) return;
            preview.Data = new VixenPreviewData();
            preview.LoadBackground();
            preview.BackgroundAlpha = 0;
            displayItem = new DisplayItem();
            PreviewMegaTree tree = new PreviewMegaTree(new PreviewPoint(10, 10), null, 1);
            tree.BaseHeight = 25;
            tree.TopHeight = 1;
            tree.TopWidth = 1;
            tree.StringType = PreviewBaseShape.StringTypes.Pixel;
            tree.Degrees = degrees;

            tree.StringCount = stringCount;

            tree.PixelCount = PixelsPerString();
            tree.PixelSize = Data.PixelSize;
            tree.PixelColor = Color.White;
            tree.Top = 10;
            tree.Left = 10;
            tree.BottomRight = new Point(preview.Width - 10, preview.Height - 10);
            tree.Layout();
            displayItem.Shape = tree;

            preview.AddDisplayItem(displayItem);
        }