private void AddControlToTab(TabPage tab, MhoraControl mcontrol) { MhoraControlContainer container = new MhoraControlContainer(mcontrol); container.Dock = DockStyle.Fill; tab.Controls.Add(container); }
protected void SplitViewHorizontal(object sender, System.EventArgs e) { MhoraControlContainer c_this = (MhoraControlContainer)this.Parent; MhoraSplitContainer c_grand = (MhoraSplitContainer)c_this.Parent; DivisionalChart dc1 = new DivisionalChart(h); MhoraControlContainer c_dc1 = new MhoraControlContainer(dc1); DivisionalChart dc2 = new DivisionalChart(h); MhoraControlContainer c_cd2 = new MhoraControlContainer(dc2); MhoraSplitContainer ns = new MhoraSplitContainer(c_dc1); ns.Control1 = c_cd2; ns.DrawDock = MhoraSplitContainer.DrawStyle.UpDown; c_grand.Control2 = ns; return; //c_grand.Control2 = c_dc; //c_dc.Dock = DockStyle.Fill; //return; /* * MhoraSplitContainer new_split = new MhoraSplitContainer (c_this); * new_split.Control2 = c_this; * new_split.DrawDock = MhoraSplitContainer.DrawStyle.UpDown; * new_split.Dock = DockStyle.Fill; * * c_grand.Control2 = new_split; * c_grand.Show(); */ }
private void menuLayout2by2_Click(object sender, System.EventArgs e) { if (Contents != null) { this.Controls.Remove(Contents); } DasaControl dc1 = new DasaControl(h, new VimsottariDasa(h)); MhoraControlContainer c_dc1 = new MhoraControlContainer(dc1); BasicCalculationsControl dc2 = new BasicCalculationsControl(h); MhoraControlContainer c_dc2 = new MhoraControlContainer(dc2); DivisionalChart div_rasi = new DivisionalChart(h); MhoraControlContainer c_div_rasi = new MhoraControlContainer(div_rasi); DivisionalChart div_nav = new DivisionalChart(h); div_nav.options.Varga = new Division(Basics.DivisionType.Navamsa); div_nav.SetOptions(div_nav.options); MhoraControlContainer c_div_nav = new MhoraControlContainer(div_nav); MhoraSplitContainer sp_ud = new MhoraSplitContainer(c_div_rasi); sp_ud.Control2 = c_div_nav; sp_ud.DrawDock = MhoraSplitContainer.DrawStyle.UpDown; MhoraSplitContainer sp_ud2 = new MhoraSplitContainer(c_dc1); sp_ud2.Control2 = c_dc2; sp_ud2.DrawDock = MhoraSplitContainer.DrawStyle.UpDown; MhoraSplitContainer sp_dc = new MhoraSplitContainer(sp_ud2); MhoraSplitContainer sp_lr = new MhoraSplitContainer(sp_ud); sp_lr.Control2 = sp_dc; int sz = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Height / 2 - 50; sp_lr.Control1.Width = sz; sp_ud.Control1.Height = sz; sp_ud2.Control1.Height = sz; this.Controls.AddRange(new Control[] { sp_lr }); Contents = sp_lr; }
private void menuLayout3by3_Click(object sender, System.EventArgs e) { if (Contents != null) { this.Controls.Remove(Contents); } DivisionalChart d1 = new DivisionalChart(h); MhoraControlContainer c_d1 = new MhoraControlContainer(d1); DivisionalChart d2 = new DivisionalChart(h); d2.options.Varga = new Division(Basics.DivisionType.DrekkanaParasara); d2.SetOptions(d2.options); MhoraControlContainer c_d2 = new MhoraControlContainer(d2); DivisionalChart d3 = new DivisionalChart(h); d3.options.Varga = new Division(Basics.DivisionType.Navamsa); d3.SetOptions(d3.options); MhoraControlContainer c_d3 = new MhoraControlContainer(d3); DivisionalChart d4 = new DivisionalChart(h); d4.options.Varga = new Division(Basics.DivisionType.Saptamsa); d4.SetOptions(d4.options); MhoraControlContainer c_d4 = new MhoraControlContainer(d4); DivisionalChart d5 = new DivisionalChart(h); d5.options.Varga = new Division(Basics.DivisionType.Dasamsa); d5.SetOptions(d5.options); MhoraControlContainer c_d5 = new MhoraControlContainer(d5); DivisionalChart d6 = new DivisionalChart(h); d6.options.Varga = new Division(Basics.DivisionType.Vimsamsa); d6.SetOptions(d6.options); MhoraControlContainer c_d6 = new MhoraControlContainer(d6); MhoraSplitContainer sp_ud1 = new MhoraSplitContainer(c_d1); sp_ud1.Control2 = c_d2; sp_ud1.DrawDock = MhoraSplitContainer.DrawStyle.UpDown; MhoraSplitContainer sp_ud2 = new MhoraSplitContainer(c_d3); sp_ud2.Control2 = c_d4; sp_ud2.DrawDock = MhoraSplitContainer.DrawStyle.UpDown; MhoraSplitContainer sp_ud3 = new MhoraSplitContainer(c_d5); sp_ud3.Control2 = c_d6; sp_ud3.DrawDock = MhoraSplitContainer.DrawStyle.UpDown; MhoraSplitContainer lr2 = new MhoraSplitContainer(sp_ud2); lr2.Control2 = sp_ud3; MhoraSplitContainer lr1 = new MhoraSplitContainer(sp_ud1); lr1.Control2 = lr2; int h_sz = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Height / 2 - 30; int w_sz = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Width / 3 - 30; int sz = Math.Min(h_sz, w_sz); lr1.Control1.Width = sz; lr2.Control1.Width = sz; sp_ud1.Control1.Height = sz; sp_ud2.Control1.Height = sz; sp_ud3.Control1.Height = sz; this.Controls.AddRange(new Control[] { lr1 }); Contents = lr1; }