Example #1
0
        private void UserControlForm_Shown(object sender, EventArgs e)          // as launched, it may not be in front (as its launched from a control).. bring to front
        {
            this.BringToFront();

            if (IsTransparencySupported)
            {
                transparentmode = (TransparencyMode)SQLiteDBClass.GetSettingInt(dbrefname + "Transparent", deftransparent ? (int)TransparencyMode.On : (int)TransparencyMode.Off);
            }

            bool wantedTopMost = SQLiteDBClass.GetSettingBool(dbrefname + "TopMost", deftopmost);

            //kludge
            SetTopMost(wantedTopMost);
            SetTopMost(!wantedTopMost);
            SetTopMost(wantedTopMost); // this also establishes transparency

            var top = SQLiteDBClass.GetSettingInt(dbrefname + "Top", -999);

            //System.Diagnostics.Debug.WriteLine("Position Top is {0} {1}", dbrefname, top);

            if (UserControl != null)
            {
                UserControl.SetCursor(UserControl.discoveryform.PrimaryCursor);
                UserControl.LoadLayout();
                UserControl.InitialDisplay();
            }

            IsLoaded = true;
        }
Example #2
0
        private void UserControlForm_Shown(object sender, EventArgs e)          // as launched, it may not be in front (as its launched from a control).. bring to front
        {
            //System.Diagnostics.Debug.WriteLine("UCF Shown+");
            this.BringToFront();

            if (IsTransparencySupported)
            {
                TransparentMode = (TransparencyMode)EliteDangerousCore.DB.UserDatabase.Instance.GetSettingInt(DBRefName + "Transparent", deftransparent ? (int)TransparencyMode.On : (int)TransparencyMode.Off);
            }

            bool wantedTopMost = EliteDangerousCore.DB.UserDatabase.Instance.GetSettingBool(DBRefName + "TopMost", deftopmost);

            //kludge
            SetTopMost(wantedTopMost);
            SetTopMost(!wantedTopMost);
            SetTopMost(wantedTopMost); // this also establishes transparency

            var top = EliteDangerousCore.DB.UserDatabase.Instance.GetSettingInt(DBRefName + "Top", -999);

            //System.Diagnostics.Debug.WriteLine("Position Top is {0} {1}", dbrefname, top);

            if (UserControl != null)
            {
                System.Diagnostics.Debug.WriteLine("UCCB Call set curosr, load layout, initial display");
                UserControl.SetCursor(UserControl.discoveryform.PrimaryCursor);
                UserControl.LoadLayout();
                UserControl.InitialDisplay();
            }

            IsLoaded = true;
            //System.Diagnostics.Debug.WriteLine("UCF Shown-");
        }