private void FormClosed(Object sender, FormClosedEventArgs e) { UserControlForm tcf = (UserControlForm)sender; tabforms.Remove(tcf); discoveryform.ActionRun("onPopDown", "UserUIEvent", null, new Conditions.ConditionVariables(new string[] { "PopOutName", tcf.dbrefname.Substring(9), "PopOutTitle", tcf.wintitle })); }
private void FormClosedCallback(Object sender, FormClosedEventArgs e) // called when form closes.. by user or by us. Remove from list { UserControlForm tcf = (UserControlForm)sender; tabforms.Remove(tcf); discoveryform.ActionRun(Actions.ActionEventEDList.onPopDown, null, new Conditions.ConditionVariables(new string[] { "PopOutName", tcf.dbrefname.Substring(9), "PopOutTitle", tcf.wintitle })); }
public void PopOut(int ix) { UserControlForm tcf = usercontrolsforms.NewForm(EDDiscovery.EDDOptions.Instance.NoWindowReposition); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(EDDiscovery.EDDiscoveryForm)); tcf.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); UserControlCommonBase ctrl = Create(ix); PopOutInfo poi = PopOutList[ix]; if (ctrl != null && poi != null) { int numopened = usercontrolsforms.CountOf(ctrl.GetType()) + 1; string windowtitle = poi.WindowTitlePrefix + " " + ((numopened > 1) ? numopened.ToString() : ""); string refname = poi.WindowRefName + numopened.ToString(); tcf.Init(ctrl, windowtitle, _discoveryForm.theme.WindowsFrame, refname, _discoveryForm.TopMost); if (poi.SupportsTransparency) { tcf.InitForTransparency(poi.DefaultTransparent, _discoveryForm.theme.LabelColor, _discoveryForm.theme.SPanelColor); } ctrl.Init(_discoveryForm, _discoveryForm.TravelControl.GetTravelGrid, numopened); tcf.Show(); // this ends up, via Form Shown, calls LoadLayout in the UCCB. if (tcf.UserControl != null) { tcf.UserControl.Font = _discoveryForm.theme.GetFont; // Important. Apply font autoscaling to the user control } // ApplyToForm does not apply the font to the actual UC, only // specific children controls. The TabControl in the discoveryform ends up autoscaling most stuff // the children directly attached to the discoveryform are not autoscaled _discoveryForm.theme.ApplyToForm(tcf); ctrl.Display(_discoveryForm.TravelControl.GetTravelHistoryCurrent, _discoveryForm.history); _discoveryForm.ActionRun(Actions.ActionEventEDList.onPopUp, null, new Conditions.ConditionVariables(new string[] { "PopOutName", refname, "PopOutTitle", windowtitle, "PopOutIndex", numopened.ToString() })); } }
public UserControlCommonBase PopOut(PanelInformation.PanelIDs selected) { UserControlForm tcf = usercontrolsforms.NewForm(); tcf.Icon = Properties.Resources.edlogo_3mo_icon; UserControlCommonBase ctrl = PanelInformation.Create(selected); PanelInformation.PanelInfo poi = PanelInformation.GetPanelInfoByPanelID(selected); if (ctrl != null && poi != null) { int numopened = usercontrolsforms.CountOf(ctrl.GetType()) + 1; string windowtitle = poi.WindowTitle + " " + ((numopened > 1) ? numopened.ToString() : ""); string refname = poi.WindowRefName + numopened.ToString(); System.Diagnostics.Trace.WriteLine("PO:Make " + windowtitle + " ucf " + ctrl.GetType().Name); tcf.Init(ctrl, windowtitle, discoveryform.theme.WindowsFrame, refname, discoveryform.TopMost, poi.DefaultTransparent, discoveryform.theme.LabelColor, discoveryform.theme.SPanelColor); ctrl.Init(discoveryform, UserControls.UserControlCommonBase.DisplayNumberPopOuts + numopened - 1); tcf.Show(); // this ends up, via Form Shown, calls LoadLayout in the UCCB. if (tcf.UserControl != null) { tcf.UserControl.Font = discoveryform.theme.GetFont; // Important. Apply font autoscaling to the user control } // ApplyToForm does not apply the font to the actual UC, only // specific children controls. The TabControl in the discoveryform ends up autoscaling most stuff // the children directly attached to the discoveryform are not autoscaled discoveryform.theme.ApplyToForm(tcf); discoveryform.ActionRun(Actions.ActionEventEDList.onPopUp, null, new Conditions.ConditionVariables(new string[] { "PopOutName", refname, "PopOutTitle", windowtitle, "PopOutIndex", numopened.ToString() })); } return(ctrl); }
public void PopOut(PopOutControl.PopOuts selected) { UserControlForm tcf = usercontrolsforms.NewForm(EDDiscovery.EDDConfig.Options.NoWindowReposition); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(EDDiscovery.EDDiscoveryForm)); tcf.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); UserControlCommonBase ctrl = Create(selected); int numopened = ctrl == null ? 0 : usercontrolsforms.CountOf(ctrl.GetType()) + 1; if (ctrl != null) { PopOutInfo poi = popoutinfo.ContainsKey(selected) ? popoutinfo[selected] : new PopOutInfo(); string windowtitle = poi.WindowTitlePrefix + " " + ((numopened > 1) ? numopened.ToString() : ""); string refname = poi.WindowRefName + numopened.ToString(); tcf.Init(ctrl, windowtitle, _discoveryForm.theme.WindowsFrame, refname, _discoveryForm.TopMost); if (poi.SupportsTransparency) { tcf.InitForTransparency(poi.DefaultTransparent, _discoveryForm.theme.LabelColor, _discoveryForm.theme.SPanelColor); } _discoveryForm.TravelControl.UserControlPostCreate(numopened, ctrl); // YUK YUK YUK wire up to some internals.. at some point this needs sorting out tcf.Show(); if (tcf.UserControl != null) { tcf.UserControl.Font = _discoveryForm.theme.GetFont; // Important. Apply font autoscaling to the user control } // ApplyToForm does not apply the font to the actual UC, only // specific children controls. The TabControl in the discoveryform ends up autoscaling most stuff // the children directly attached to the discoveryform are not autoscaled _discoveryForm.theme.ApplyToForm(tcf); ctrl.Display(_discoveryForm.TravelControl.GetTravelHistoryCurrent, _discoveryForm.history); _discoveryForm.ActionRun("onPopUp", "UserUIEvent", null, new Conditions.ConditionVariables(new string[] { "PopOutName", refname, "PopOutTitle", windowtitle, "PopOutIndex", numopened.ToString() })); } }