private void AddBox_Click(object sender, EventArgs e) { wardrobe.AddBox(36); part = wardrobe.Visual_part; view = "front"; TestVisualPart(view); }
/* * views_names : keys = views from added visualPart, values = positions in the current visualPart * locations : keys = views from added visualPart, values = locations in the current visualPart * * create a new panel in current visualPart for each concerned view (path = position + name) */ //AddVisualPart public void AddVisualPart(string name, VisualPart visual_part, Dictionary <string, string> views_names, Dictionary <string, Point> locations) { visual_part.ChangeScaling(scaling); pieces.Add(name, new Tuple <VisualPart, HashSet <string> >(visual_part, new HashSet <string>())); foreach (string view in views_names.Keys) { List <string> position = ConvertToPosition(views_names[view]); position.Add(name); string view_container = ConvertToName(position); VPPanel container = AddPanel(view_container, locations[view], visual_part.Views[view].Mm_size); //container.BorderStyle = BorderStyle.FixedSingle;//MODIF wtf apparence bizarre? pieces[name].Item2.Add(view_container); container.Controls.Add(visual_part.Views[view]); OrderedDictionary size = new OrderedDictionary() { { "slave", null }, { "master_sizes", null }, { "axis_dependency", new Tuple <bool, bool>(true, true) }, { "axis_inversion", false } }; Action <VPPanel, Tuple <Size, Size>, Tuple <bool, bool>, bool> SizCopySizeChangeRule = visual_part.CopySizeChangeRule; AddRule(container.Name, string.Concat(view, "_" + name), SizCopySizeChangeRule, size, typeof(Size)); //MODIF desactive peut etre l'opportunite de cliquer sur l'etage, a verifier } }
private void ChangeSurface_Click(object sender, EventArgs e) { wardrobe.ChangeSurface(80, 52); part = wardrobe.Visual_part; view = "front"; TestVisualPart(view); }
private void ChangeColor_Click(object sender, EventArgs e) { string etage = wardrobe.Visual_part.Pointer.Split('_').Last(); wardrobe.ChangeColor(Color_input.Text); part = wardrobe.Visual_part; view = "front"; TestVisualPart(view); }
private void ResizeBox_Click(object sender, EventArgs e) { string position = wardrobe.Visual_part.Pointer.Split('*').Last(); wardrobe.ResizeBox(position, 56); part = wardrobe.Visual_part; view = "front"; TestVisualPart(view); }
public Part() { Code = ""; Dimensions = new Size3D(0, 0, 0); Location = new Point3D(0, 0, 0); Color = Color.Empty; Selling_price = 0; visual_part = null; }
/// <summary> /// Construct the visualPart for a panel (which is also a nogging => same behavior for a visualPart) /// </summary> public override void ConstructVisualPart() { Size scaled = new Size(Convert.ToInt32(Dimensions.X), Convert.ToInt32(Dimensions.Y)); Visual_part = new VisualPart(scaled, new Dictionary <string, Size>() { { "front", scaled } }); Visual_part.AddPanel("front_" + Reference, new Point(0, 0), scaled, Color); }
private void UNZOOM_Click(object sender, EventArgs e) { if (parts.Count() > 0) { VisualPart container = parts.Pop(); string piece = container.ConvertToPosition(container.Pointer).Last(); container.ReinsertPiece(piece); part = container; view = "front"; TestVisualPart(view); } }
private void ZOOM_Click(object sender, EventArgs e) { string piece = part.ConvertToPosition(part.Pointer).Last(); if (part.Pieces.Keys.Contains(piece)) { parts.Push(part); part = part.Pieces[piece].Item1; view = "front"; TestVisualPart(view); } }
private void AddVisualPart1v(VisualPart container, VisualPart content, string content_name, string content_view, string container_pos, Point location) { container.AddVisualPart(content_name, content, new Dictionary <string, string>() { { content_view, container_pos } }, new Dictionary <string, Point>() { { content_view, location } }); }
//ReinsertPiece /// <summary> /// When a piece is displayed in a screen, the related controls are removed from the VisualPart that contained the piece /// This method adds the said removed controls in the right place anew /// </summary> /// <param name="name">the name of the piece that had been displayed</param> public void ReinsertPiece(string name) { VisualPart piece = Pieces[name].Item1; foreach(string container in Pieces[name].Item2.Keys) { VPPanel master = GetPanel(container); VPPanel slave = piece.GetPanel(Pieces[name].Item2[container]); if(!master.Controls.Contains(slave)) { master.Controls.Add(slave); } } }
/* * */ //ChangeScaling : scaling public void ChangeScaling(double scaling) { foreach (string reference in references) { VPPanel current = GetPanel(reference); current.Location = ScalePoint(current.Mm_location, scaling); current.Size = ScaleSize(current.Mm_size, scaling); } foreach (string visual_part in pieces.Keys) { VisualPart piece = pieces[visual_part].Item1; piece.ChangeScaling(scaling); } }
//Display /// <summary> /// Adapt the method called when clicking on a component of the VisualPart for every components /// </summary> /// <returns> views as in a technical drawing, key : name of the view </returns> public Dictionary<string, VPPanel> Display() { Action<object> RuleSelected = SelectPiece; Rule selection = new Rule(RuleSelected, new OrderedDictionary() { { "sender", null } }, typeof(EventHandler), typeof(VisualPart)); this.selection = selection; foreach (string ref_piece in pieces.Keys) { VisualPart current = pieces[ref_piece].Item1; current.ChangeEventHandler(selection); } return Views; }
public void Preset() { part = wardrobe.Visual_part; parts = new Stack <VisualPart>(); view = "front"; M_etage.Text = "armoire"; DisplayVisualPart(view); ZoneWardrobe(true); M_depth.Text = Convert.ToString(wardrobe.Dimensions.Z); M_width.Text = Convert.ToString(wardrobe.Dimensions.X); M_price.Text = Convert.ToString(wardrobe.SellingPrice()); M_dim.Text = Convert.ToString(wardrobe.Dimensions.X) + "*" + Convert.ToString(wardrobe.Dimensions.Y) + "*" + Convert.ToString(wardrobe.Dimensions.Z); }
private void M_unzoom_Click(object sender, EventArgs e) { if (parts.Count() > 0) { VisualPart container = parts.Pop(); string piece = container.ConvertToPosition(container.Pointer).Last(); container.ReinsertPiece(piece); part = container; view = "front"; DisplayVisualPart(view); } if (parts.Count() == 0) { ZoneWardrobe(true); M_etage.Text = "armoire"; } }
private void M_zoom_Click(object sender, EventArgs e) { string piece = part.ConvertToPosition(part.Pointer).Last(); if (part.Pieces.Keys.Contains(piece)) { parts.Push(part); part = part.Pieces[piece].Item1; view = "front"; DisplayVisualPart(view); ZoneWardrobe(false); if (parts.Count == 1) { M_etage.Text = piece; } } }
public Part() { Code = ""; Dimensions = new Size3D(0, 0, 0); Location = new Point3D(0, 0, 0); Color = Color.Empty; Stock = 0; Min_stock = 0; Selling_price = 0; visual_part = null; //MODIF??? //Dictionary that contains every suppliers //Dictionary that contains every structure //Dictionary that contains every Type }
private void compute_Click(object sender, EventArgs e) { wardrobe = null; switch (test_input.Text) { case "vp_door": //VisualPart_Door part = TestDoor(62, 32, Color.Beige).Visual_part; break; case "vp_knop": //VisualPart_Knop part = TestKnop(6, 6, Color.Black).Visual_part; break; case "vp_panel": //VisualPart_Panel part = TestPanel(120, 2, Color.Tan).Visual_part; break; case "vp_angle": //VisualPart_Angle part = TestAngle(2, 108, Color.Black).Visual_part; break; case "vp_box": //VisualPart_Box part = TestBox(120, 36, 42).Visual_part;; break; case "vp_wardrobe": //VisualPart_Wardrobe wardrobe = TestWardrobe(120, 36, 42); part = wardrobe.Visual_part; AddBox.Visible = true; ChangeSurface.Visible = true; RemoveBox.Visible = true; ResizeBox.Visible = true; ChangeColor.Visible = true; Color_input.Visible = true; break; } try { view = "front"; TestVisualPart(view); } catch { return; } }
public override void ConstructVisualPart() { Size scaled = new Size(Convert.ToInt32(Dimensions.X), Convert.ToInt32(Dimensions.Y)); Visual_part = new VisualPart(scaled, new Dictionary <string, Size>() { { "front", scaled } }); Visual_part.AddPanel("front_" + Reference, new Point(0, 0), scaled, Color); int invert; int take; if (knop_position == "left") { invert = -1; take = 0; } else if (knop_position == "right") { invert = 1; take = 1; } else { return; } Visual_part.AddVisualPart(knop.Reference + "*" + Knop.Position, knop.Visual_part, new Dictionary <string, string>() { { "front", "front_" + Reference } }, new Dictionary <string, Point>() { { "front", new Point(take * (scaled.Width - Convert.ToInt32(knop.Dimensions.X)) - invert * Convert.ToInt32(knop.Location.X), Convert.ToInt32((scaled.Height - Convert.ToInt32(knop.Dimensions.Y)) / 2)) } }); }
//WARNING COUPELLE DE DROITE PLACEMENT ERRONE? public Viewer() { InitializeComponent(); //6 coupelles Stack <VisualPart> knops = new Stack <VisualPart>(); for (int i = 0; i < 6; i++) { Size scaled = new Size(6, 6); VisualPart knop = new VisualPart(scaled, new Dictionary <string, Size>() { { "front", scaled } }); knop.AddPanel("front_knop", new Point(0, 0), scaled, Color.Black, true); knops.Push(knop); } //6 portes Stack <VisualPart> doors = new Stack <VisualPart>(); for (int i = 0; i < 6; i++) { Size scaled = new Size(62, 32); VisualPart door = new VisualPart(scaled, new Dictionary <string, Size>() { { "front", scaled } }); door.AddPanel("front_door", new Point(0, 0), scaled, Color.White); VisualPart knop = knops.Pop(); int invert = Convert.ToInt32(Math.Pow(-1, i)); //1 ou -1 int take = Convert.ToInt32(((1 + invert) / 2)); //1 ou 0 AddVisualPart1v(door, knop, "knop", "front", "front_door", new Point(take * (scaled.Width - knop.Mm_size.Width) - invert * 4, Convert.ToInt32((scaled.Height - knop.Mm_size.Height) / 2))); doors.Push(door); } //3 panneaux AR Stack <VisualPart> ARpanels = new Stack <VisualPart>(); for (int i = 0; i < 3; i++) { Size scaled = new Size(120, 32); VisualPart ARpanel = new VisualPart(scaled, new Dictionary <string, Size>() { { "front", scaled } }); ARpanel.AddPanel("front_arpanel", new Point(0, 0), scaled, Color.White); ARpanels.Push(ARpanel); } //6 panneaux GD Stack <VisualPart> GDpanels = new Stack <VisualPart>(); for (int i = 0; i < 6; i++) { Size scaled = new Size(42, 32); VisualPart GDpanel = new VisualPart(scaled, new Dictionary <string, Size>() { { "front", scaled } }); GDpanel.AddPanel("front_gdpanel", new Point(0, 0), scaled, Color.White); GDpanels.Push(GDpanel); } //6 panneaux HB Stack <VisualPart> HBpanels = new Stack <VisualPart>(); for (int i = 0; i < 6; i++) { Size scaled = new Size(120, 42); VisualPart HBpanel = new VisualPart(scaled, new Dictionary <string, Size>() { { "front", scaled } }); HBpanel.AddPanel("front_HBpanel", new Point(0, 0), scaled, Color.White); HBpanels.Push(HBpanel); } //6 traverses AV Stack <VisualPart> AVnoggings = new Stack <VisualPart>(); for (int i = 0; i < 6; i++) { Size scaled = new Size(120, 2); VisualPart AVnogging = new VisualPart(scaled, new Dictionary <string, Size>() { { "front", scaled } }); AVnogging.AddPanel("front_AVnogging", new Point(0, 0), scaled, Color.Tan); AVnoggings.Push(AVnogging); } //6 traverses AR Stack <VisualPart> ARnoggings = new Stack <VisualPart>(); for (int i = 0; i < 6; i++) { Size scaled = new Size(120, 2); VisualPart ARnogging = new VisualPart(scaled, new Dictionary <string, Size>() { { "front", scaled } }); ARnogging.AddPanel("front_ARnogging", new Point(0, 0), scaled, Color.Tan); ARnoggings.Push(ARnogging); } //12 traverses GD Stack <VisualPart> GDnoggings = new Stack <VisualPart>(); for (int i = 0; i < 12; i++) { Size scaled = new Size(42, 2); VisualPart GDnogging = new VisualPart(scaled, new Dictionary <string, Size>() { { "front", scaled } }); GDnogging.AddPanel("front_GDnogging", new Point(0, 0), scaled, Color.Tan); GDnoggings.Push(GDnogging); } //4 cornières Stack <VisualPart> angles = new Stack <VisualPart>(); for (int i = 0; i < 4; i++) { Size scaled = new Size(2, 108); VisualPart angle = new VisualPart(scaled, new Dictionary <string, Size>() { { "front", scaled }, { "left", scaled } }); angle.AddPanel("front_angle", new Point(0, 0), scaled, Color.Black); angle.AddPanel("left_angle", new Point(0, 0), scaled, Color.Black); angles.Push(angle); } //3 etages Stack <VisualPart> boxes = new Stack <VisualPart>(); for (int i = 0; i < 3; i++) { int h = 36; int l = 120; int p = 42; Size lh = new Size(l, h); Size lp = new Size(l, p); Size ph = new Size(p, h); VisualPart box = new VisualPart(front.Size, new Dictionary <string, Size>() { { "front", lh }, { "left", ph }, { "right", ph }, { "rear", lh }, { "top", lp }, { "bottom", lp } }); //doors VisualPart Ldoor = doors.Pop(); AddVisualPart1v(box, Ldoor, "Ldoor", "front", "front", new Point(0, 2)); VisualPart Rdoor = doors.Pop(); AddVisualPart1v(box, Rdoor, "Rdoor", "front", "front", new Point(l - Rdoor.Mm_size.Width, 2)); //GDnoggings VisualPart BLnogging = GDnoggings.Pop(); AddVisualPart1v(box, BLnogging, "BLnogging", "front", "left", new Point(0, h - BLnogging.Mm_size.Height)); VisualPart HLnogging = GDnoggings.Pop(); AddVisualPart1v(box, HLnogging, "HLnogging", "front", "left", new Point(0, 0)); VisualPart BRnogging = GDnoggings.Pop(); AddVisualPart1v(box, BRnogging, "BRnogging", "front", "right", new Point(0, h - BRnogging.Mm_size.Height)); VisualPart HRnogging = GDnoggings.Pop(); AddVisualPart1v(box, HRnogging, "HRnogging", "front", "right", new Point(0, 0)); //AVnoggings VisualPart BAVnogging = AVnoggings.Pop(); AddVisualPart1v(box, BAVnogging, "BAVnogging", "front", "front", new Point(0, h - BAVnogging.Mm_size.Height)); VisualPart HAVnogging = AVnoggings.Pop(); AddVisualPart1v(box, HAVnogging, "HAVnogging", "front", "front", new Point(0, 0)); //ARnoggings VisualPart BARnogging = ARnoggings.Pop(); AddVisualPart1v(box, BARnogging, "BARnogging", "front", "rear", new Point(0, h - BARnogging.Mm_size.Height)); VisualPart HARnogging = ARnoggings.Pop(); AddVisualPart1v(box, HARnogging, "HARnogging", "front", "rear", new Point(0, 0)); //HBpanels VisualPart Hpanel = HBpanels.Pop(); AddVisualPart1v(box, Hpanel, "Hpanel", "front", "top", new Point(0, 0)); VisualPart Bpanel = HBpanels.Pop(); AddVisualPart1v(box, Bpanel, "Bpanel", "front", "bottom", new Point(0, 0)); //GDpanels VisualPart Gpanel = GDpanels.Pop(); AddVisualPart1v(box, Gpanel, "Gpanel", "front", "left", new Point(0, 2)); VisualPart Dpanel = GDpanels.Pop(); AddVisualPart1v(box, Dpanel, "Dpanel", "front", "right", new Point(0, 2)); //ARpanels VisualPart ARpanel = ARpanels.Pop(); AddVisualPart1v(box, ARpanel, "ARpanel", "front", "rear", new Point(0, 2)); boxes.Push(box); } //1 armoire int _h = 3 * 36; int _l = 120; int _p = 42; Size _lh = new Size(_l, _h); Size _lp = new Size(_l, _p); Size _ph = new Size(_p, _h); VisualPart wardrobe = new VisualPart(front.Size, new Dictionary <string, Size>() { { "front", _lh }, { "left", _ph }, { "right", _ph }, { "rear", _lh }, { "top", _lp }, { "bottom", _lp } }); //angles VisualPart angle1 = angles.Pop(); wardrobe.AddVisualPart("angle1", angle1, new Dictionary <string, string>() { { "front", "front" }, { "left", "left" } }, new Dictionary <string, Point>() { { "front", new Point(0, 0) }, { "left", new Point(_p - angle1.Mm_size.Width, 0) } }); VisualPart angle2 = angles.Pop(); wardrobe.AddVisualPart("angle2", angle2, new Dictionary <string, string>() { { "front", "right" }, { "left", "front" } }, new Dictionary <string, Point>() { { "front", new Point(0, 0) }, { "left", new Point(_l - angle2.Mm_size.Width, 0) } }); VisualPart angle3 = angles.Pop(); wardrobe.AddVisualPart("angle3", angle3, new Dictionary <string, string>() { { "front", "rear" }, { "left", "right" } }, new Dictionary <string, Point>() { { "front", new Point(0, 0) }, { "left", new Point(_p - angle3.Mm_size.Width, 0) } }); VisualPart angle4 = angles.Pop(); wardrobe.AddVisualPart("angle4", angle4, new Dictionary <string, string>() { { "front", "left" }, { "left", "rear" } }, new Dictionary <string, Point>() { { "front", new Point(0, 0) }, { "left", new Point(_l - angle4.Mm_size.Width, 0) } }); //floors VisualPart floor1 = boxes.Pop(); wardrobe.AddVisualPart("floor1", floor1, new Dictionary <string, string>() { { "front", "front" }, { "left", "left" }, { "right", "right" }, { "rear", "rear" }, { "top", "top" }, { "bottom", "bottom" }, }, new Dictionary <string, Point>() { { "front", new Point(0, 0) }, { "left", new Point(0, 0) }, { "right", new Point(0, 0) }, { "rear", new Point(0, 0) }, { "top", new Point(0, 0) }, { "bottom", new Point(0, 0) } }); VisualPart floor2 = boxes.Pop(); wardrobe.AddVisualPart("floor2", floor2, new Dictionary <string, string>() { { "front", "front" }, { "left", "left" }, { "right", "right" }, { "rear", "rear" }, { "top", "top" }, { "bottom", "bottom" }, }, new Dictionary <string, Point>() { { "front", new Point(0, 36) }, { "left", new Point(0, 36) }, { "right", new Point(0, 36) }, { "rear", new Point(0, 36) }, { "top", new Point(0, 0) }, { "bottom", new Point(0, 0) } }); VisualPart floor3 = boxes.Pop(); wardrobe.AddVisualPart("floor3", floor3, new Dictionary <string, string>() { { "front", "front" }, { "left", "left" }, { "right", "right" }, { "rear", "rear" }, { "top", "top" }, { "bottom", "bottom" }, }, new Dictionary <string, Point>() { { "front", new Point(0, 72) }, { "left", new Point(0, 72) }, { "right", new Point(0, 72) }, { "rear", new Point(0, 72) }, { "top", new Point(0, 0) }, { "bottom", new Point(0, 0) } }); current = wardrobe; //DimensionTester.Panel1.Controls.Add(current.Views["front"]); Dictionary <string, VPPanel> views = current.Display(); front.Controls.Add(views["front"]); rear.Controls.Add(views["rear"]); top.Controls.Add(views["top"]); bottom.Controls.Add(views["bottom"]); left.Controls.Add(views["left"]); right.Controls.Add(views["right"]); }
public App() { InitializeComponent(); Stack <VisualPart> knops = new Stack <VisualPart>(); for (int i = 0; i < 2; i++) { Size scaled = new Size(6, 6); VisualPart knop = new VisualPart(scaled, new Dictionary <string, Size>() { { "front", scaled } }); knop.AddPanel("front_knop", new Point(0, 0), scaled, Color.Black, true); knops.Push(knop); } //6 portes Stack <VisualPart> doors = new Stack <VisualPart>(); for (int i = 0; i < 2; i++) { Size scaled = new Size(62, 32); VisualPart door = new VisualPart(scaled, new Dictionary <string, Size>() { { "front", scaled } }); door.AddPanel("front_door", new Point(0, 0), scaled, Color.White); VisualPart knop = knops.Pop(); int invert = Convert.ToInt32(Math.Pow(-1, i)); //1 ou -1 int take = Convert.ToInt32(((1 + invert) / 2)); //1 ou 0 AddVisualPart1v(door, knop, "knop", "front", "front_door", new Point(take * (scaled.Width - knop.Mm_size.Width) - invert * 4, Convert.ToInt32((scaled.Height - knop.Mm_size.Height) / 2))); doors.Push(door); } //3 panneaux AR Stack <VisualPart> ARpanels = new Stack <VisualPart>(); for (int i = 0; i < 1; i++) { Size scaled = new Size(120, 32); VisualPart ARpanel = new VisualPart(scaled, new Dictionary <string, Size>() { { "front", scaled } }); ARpanel.AddPanel("front_arpanel", new Point(0, 0), scaled, Color.White); ARpanels.Push(ARpanel); } //6 panneaux GD Stack <VisualPart> GDpanels = new Stack <VisualPart>(); for (int i = 0; i < 2; i++) { Size scaled = new Size(42, 32); VisualPart GDpanel = new VisualPart(scaled, new Dictionary <string, Size>() { { "front", scaled } }); GDpanel.AddPanel("front_gdpanel", new Point(0, 0), scaled, Color.White); GDpanels.Push(GDpanel); } //6 panneaux HB Stack <VisualPart> HBpanels = new Stack <VisualPart>(); for (int i = 0; i < 2; i++) { Size scaled = new Size(120, 42); VisualPart HBpanel = new VisualPart(scaled, new Dictionary <string, Size>() { { "front", scaled } }); HBpanel.AddPanel("front_HBpanel", new Point(0, 0), scaled, Color.White); HBpanels.Push(HBpanel); } //6 traverses AV Stack <VisualPart> AVnoggings = new Stack <VisualPart>(); for (int i = 0; i < 2; i++) { Size scaled = new Size(120, 2); VisualPart AVnogging = new VisualPart(scaled, new Dictionary <string, Size>() { { "front", scaled } }); AVnogging.AddPanel("front_AVnogging", new Point(0, 0), scaled, Color.Tan); AVnoggings.Push(AVnogging); } //6 traverses AR Stack <VisualPart> ARnoggings = new Stack <VisualPart>(); for (int i = 0; i < 2; i++) { Size scaled = new Size(120, 2); VisualPart ARnogging = new VisualPart(scaled, new Dictionary <string, Size>() { { "front", scaled } }); ARnogging.AddPanel("front_ARnogging", new Point(0, 0), scaled, Color.Tan); ARnoggings.Push(ARnogging); } //12 traverses GD Stack <VisualPart> GDnoggings = new Stack <VisualPart>(); for (int i = 0; i < 4; i++) { Size scaled = new Size(42, 2); VisualPart GDnogging = new VisualPart(scaled, new Dictionary <string, Size>() { { "front", scaled } }); GDnogging.AddPanel("front_GDnogging", new Point(0, 0), scaled, Color.Tan); GDnoggings.Push(GDnogging); } //1 etage int h = 36; int l = 120; int p = 42; Size lh = new Size(l, h); Size lp = new Size(l, p); Size ph = new Size(p, h); VisualPart box = new VisualPart(viewer.Size, new Dictionary <string, Size>() { { "front", lh }, { "left", ph }, { "right", ph }, { "rear", lh }, { "top", lp }, { "bottom", lp } }); //doors VisualPart Ldoor = doors.Pop(); AddVisualPart1v(box, Ldoor, "Ldoor", "front", "front", new Point(0, 2)); VisualPart Rdoor = doors.Pop(); AddVisualPart1v(box, Rdoor, "Rdoor", "front", "front", new Point(l - Rdoor.Mm_size.Width, 2)); //GDnoggings VisualPart BLnogging = GDnoggings.Pop(); AddVisualPart1v(box, BLnogging, "BLnogging", "front", "left", new Point(0, h - BLnogging.Mm_size.Height)); VisualPart HLnogging = GDnoggings.Pop(); AddVisualPart1v(box, HLnogging, "HLnogging", "front", "left", new Point(0, 0)); VisualPart BRnogging = GDnoggings.Pop(); AddVisualPart1v(box, BRnogging, "BRnogging", "front", "right", new Point(0, h - BRnogging.Mm_size.Height)); VisualPart HRnogging = GDnoggings.Pop(); AddVisualPart1v(box, HRnogging, "HRnogging", "front", "right", new Point(0, 0)); //AVnoggings VisualPart BAVnogging = AVnoggings.Pop(); AddVisualPart1v(box, BAVnogging, "BAVnogging", "front", "front", new Point(0, h - BAVnogging.Mm_size.Height)); VisualPart HAVnogging = AVnoggings.Pop(); AddVisualPart1v(box, HAVnogging, "HAVnogging", "front", "front", new Point(0, 0)); //ARnoggings VisualPart BARnogging = ARnoggings.Pop(); AddVisualPart1v(box, BARnogging, "BARnogging", "front", "rear", new Point(0, h - BARnogging.Mm_size.Height)); VisualPart HARnogging = ARnoggings.Pop(); AddVisualPart1v(box, HARnogging, "HARnogging", "front", "rear", new Point(0, 0)); //HBpanels VisualPart Hpanel = HBpanels.Pop(); AddVisualPart1v(box, Hpanel, "Hpanel", "front", "top", new Point(0, 0)); VisualPart Bpanel = HBpanels.Pop(); AddVisualPart1v(box, Bpanel, "Bpanel", "front", "bottom", new Point(0, 0)); //GDpanels VisualPart Gpanel = GDpanels.Pop(); AddVisualPart1v(box, Gpanel, "Gpanel", "front", "left", new Point(0, 2)); VisualPart Dpanel = GDpanels.Pop(); AddVisualPart1v(box, Dpanel, "Dpanel", "front", "right", new Point(0, 2)); //ARpanels VisualPart Apanel = ARpanels.Pop(); AddVisualPart1v(box, Apanel, "Apanel", "front", "rear", new Point(0, 2)); current = box; //DimensionTester.Panel1.Controls.Add(current.Views["front"]); Dictionary <string, VPPanel> views = current.Display(); viewer.Controls.Add(views["front"]); }
//TestVisualPart public void TestVisualPart(VisualPart part) { part.ChangeScaling(screen.Size); screen.Controls.Add(part.Display()["front"]); screen.Visible = true; }