Control TabCreate(ExtendedControls.TabStrip t, int si)        // called by tab strip when selected index changes.. create a new one.. only create.
        {
            PopOutControl.PopOuts i = (PopOutControl.PopOuts)(si + PopOutControl.PopOuts.StartTabButtons);

            _discoveryForm.ActionRun("onPanelChange", "UserUIEvent", null, new Conditions.ConditionVariables(new string[] { "PanelTabName", PopOutControl.popoutinfo[i].WindowRefName, "PanelTabTitle", PopOutControl.popoutinfo[i].WindowTitlePrefix, "PanelName", t.Name }));

            return(PopOutControl.Create(i));
        }
        Control TabCreate(ExtendedControls.TabStrip t, int si)        // called by tab strip when selected index changes.. create a new one.. only create.
        {
            PopOutControl.PopOuts i = (PopOutControl.PopOuts)si;

            Control c = PopOutControl.Create(i);

            c.Name = PopOutControl.GetPopOutName(i);        // tabs uses Name field for display, must set it

            _discoveryForm.ActionRun("onPanelChange", "UserUIEvent", null, new Conditions.ConditionVariables(new string[] { "PanelTabName", PopOutControl.popoutinfo[i].WindowRefName, "PanelTabTitle", PopOutControl.popoutinfo[i].WindowTitlePrefix, "PanelName", t.Name }));

            return(c);
        }
Beispiel #3
0
        public void PopOut(PopOutControl.PopOuts selected)
        {
            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(selected);

            PopOutInfo poi = popoutinfo.ContainsKey(selected) ? popoutinfo[selected] : null;

            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("onPopUp", "UserUIEvent", null, new Conditions.ConditionVariables(new string[] { "PopOutName", refname, "PopOutTitle", windowtitle, "PopOutIndex", numopened.ToString() }));
            }
        }
Beispiel #4
0
        public void PopOut(PopOutControl.PopOuts selected)
        {
            int index = PopOutList.FindIndex(x => x.popoutid == selected);

            PopOut(index);
        }