public PreviewSetElements(List <PreviewBaseShape> shapes) { InitializeComponent(); Icon = Resources.Icon_Vixen3; ThemeUpdateControls.UpdateControls(this); contextMenuLinkedElements.Renderer = new ThemeToolStripRenderer(); int imageSize = (int)(16 * ScalingTools.GetScaleFactor()); contextMenuLinkedElements.ImageScalingSize = new Size(imageSize, imageSize); buttonHelp.Image = Tools.GetIcon(Resources.help, imageSize); _shapes = shapes; connectStandardStrings = shapes[0].connectStandardStrings; int i = 1; foreach (PreviewBaseShape shape in _shapes) { if (shape.Pixels.Count == 0) { continue; } var newString = new PreviewSetElementString(); // If this is a Standard string, only set the first pixel of the string if (shape.StringType == PreviewBaseShape.StringTypes.Standard) { //Console.WriteLine("Standard String"); PreviewPixel pixel = shape.Pixels[0]; //Console.WriteLine(shape.Pixels[0].Node.Name.ToString()); newString.Pixels.Add(pixel.Clone()); } // If this is a pixel string, let them set every pixel else if (shape.StringType == PreviewBaseShape.StringTypes.Pixel) { foreach (PreviewPixel pixel in shape.Pixels) { newString.Pixels.Add(pixel.Clone()); } } else if (shape.StringType == PreviewBaseShape.StringTypes.Custom) { foreach (var pixel in shape.Pixels) { newString.Pixels.Add(pixel.Clone()); } } newString.StringName = "String " + i.ToString(); _strings.Add(newString); i++; } if (_shapes[0].Parent != null) { string shapeType = ""; shapeType = _shapes[0].Parent.GetType().ToString(); if ((shapeType.Contains("Icicle") && _shapes[0].StringType != PreviewBaseShape.StringTypes.Standard) || shapeType.Contains("MultiString")) { tblLightCountControls.Visible = true; } } }
public PreviewSetElements(List <PreviewBaseShape> shapes) { InitializeComponent(); _shapes = shapes; connectStandardStrings = shapes[0].connectStandardStrings; int i = 1; foreach (PreviewBaseShape shape in _shapes) { PreviewSetElementString newString = new PreviewSetElementString(); // If this is a Standard string, only set the first pixel of the string if (shape.StringType == PreviewBaseShape.StringTypes.Standard) { //Console.WriteLine("Standard String"); PreviewPixel pixel = shape.Pixels[0]; ; //Console.WriteLine(shape.Pixels[0].Node.Name.ToString()); newString.Pixels.Add(pixel.Clone()); } // If this is a pixel string, let them set every pixel else { foreach (PreviewPixel pixel in shape.Pixels) { newString.Pixels.Add(pixel.Clone()); } } newString.StringName = "String " + i.ToString(); _strings.Add(newString); i++; } }
public PreviewSetElements(List <PreviewBaseShape> shapes) { InitializeComponent(); Icon = Resources.Icon_Vixen3; ForeColor = ThemeColorTable.ForeColor; BackColor = ThemeColorTable.BackgroundColor; ThemeUpdateControls.UpdateControls(this); contextMenuLinkedElements.Renderer = new ThemeToolStripRenderer(); _shapes = shapes; connectStandardStrings = shapes[0].connectStandardStrings; int i = 1; foreach (PreviewBaseShape shape in _shapes) { if (shape.Pixels.Count == 0) { continue; } var newString = new PreviewSetElementString(); // If this is a Standard string, only set the first pixel of the string if (shape.StringType == PreviewBaseShape.StringTypes.Standard) { //Console.WriteLine("Standard String"); PreviewPixel pixel = shape.Pixels[0]; //Console.WriteLine(shape.Pixels[0].Node.Name.ToString()); newString.Pixels.Add(pixel.Clone()); } // If this is a pixel string, let them set every pixel else if (shape.StringType == PreviewBaseShape.StringTypes.Pixel) { foreach (PreviewPixel pixel in shape.Pixels) { newString.Pixels.Add(pixel.Clone()); } } newString.StringName = "String " + i.ToString(); _strings.Add(newString); i++; } if (_shapes[0].Parent != null) { string shapeType = ""; shapeType = _shapes[0].Parent.GetType().ToString(); if ((shapeType.Contains("Icicle") && _shapes[0].StringType != PreviewBaseShape.StringTypes.Standard) || shapeType.Contains("MultiString")) { panelSetLightCount.Visible = true; } } }
public PreviewSetElements(List <PreviewBaseShape> shapes) { InitializeComponent(); _shapes = shapes; connectStandardStrings = shapes[0].connectStandardStrings; int i = 1; foreach (PreviewBaseShape shape in _shapes) { if (shape.Pixels.Count == 0) { continue; } var newString = new PreviewSetElementString(); // If this is a Standard string, only set the first pixel of the string if (shape.StringType == PreviewBaseShape.StringTypes.Standard) { //Console.WriteLine("Standard String"); PreviewPixel pixel = shape.Pixels[0]; //Console.WriteLine(shape.Pixels[0].Node.Name.ToString()); newString.Pixels.Add(pixel.Clone()); } // If this is a pixel string, let them set every pixel else if (shape.StringType == PreviewBaseShape.StringTypes.Pixel) { foreach (PreviewPixel pixel in shape.Pixels) { newString.Pixels.Add(pixel.Clone()); } } newString.StringName = "String " + i.ToString(); _strings.Add(newString); i++; } if (_shapes[0].Parent != null) { string shapeType = ""; shapeType = _shapes[0].Parent.GetType().ToString(); if ((shapeType.Contains("Icicle") && _shapes[0].StringType != PreviewBaseShape.StringTypes.Standard) || shapeType.Contains("MultiString")) { panelSetLightCount.Visible = true; } } }