public void Init(EDDiscovery.UserControls.UserControlCommonBase c, string title, bool winborder, string rf, bool deftopmostp, bool deftransparentp, Color labelnormal, Color labeltransparent) { UserControl = c; c.Dock = DockStyle.None; c.Location = new Point(0, 10); c.Size = new Size(200, 200); this.Controls.Add(c); deftransparent = deftransparentp; // only applied if allowed to be transparent. labelnormalcolour = labelnormal; labeltransparentcolour = labeltransparent; transparencycolor = c.ColorTransparency; wintitle = label_index.Text = this.Text = title; // label index always contains the wintitle, but may not be shown curwindowsborder = defwindowsborder = winborder; dbrefname = "PopUpForm" + rf; this.Name = rf; deftopmost = deftopmostp; deftransparent = false; labelControlText.Text = ""; // always starts blank.. this.ShowInTaskbar = SQLiteDBClass.GetSettingBool(dbrefname + "Taskbar", true); displayTitle = SQLiteDBClass.GetSettingBool(dbrefname + "ShowTitle", true); #if !__MonoCS__ idk = DirectInputDevices.InputDeviceKeyboard.CreateKeyboard(); #endif UpdateControls(); Invalidate(); }
public void Init(EDDiscovery.UserControls.UserControlCommonBase c, string title, bool winborder, string rf, bool deftopmostp, bool deftransparentp, Color labelnormal, Color labeltransparent) { //System.Diagnostics.Debug.WriteLine("UCF Init+"); RestoreFormPositionRegKey = "PopUpForm" + rf; // position remember key UserControl = c; c.Dock = DockStyle.None; c.Location = new Point(0, 10); c.Size = new Size(200, 200); this.Controls.Add(c); deftransparent = deftransparentp; // only applied if allowed to be transparent. labelnormalcolour = labelnormal; labeltransparentcolour = labeltransparent; transparencycolor = c.ColorTransparency; wintitle = label_index.Text = this.Text = title; // label index always contains the wintitle, but may not be shown curwindowsborder = defwindowsborder = winborder; dbrefname = "PopUpForm" + rf; this.Name = rf; deftopmost = deftopmostp; deftransparent = false; labelControlText.Text = ""; // always starts blank.. this.ShowInTaskbar = EliteDangerousCore.DB.UserDatabase.Instance.GetSettingBool(dbrefname + "Taskbar", true); displayTitle = EliteDangerousCore.DB.UserDatabase.Instance.GetSettingBool(dbrefname + "ShowTitle", true); if (Environment.OSVersion.Platform == PlatformID.Win32NT) { idk = DirectInputDevices.InputDeviceKeyboard.CreateKeyboard(); } UpdateControls(); Invalidate(); BaseUtils.Translator.Instance.Translate(toolTip1, this); //System.Diagnostics.Debug.WriteLine("UCF Init-"); }
public void Init(EDDiscovery.UserControls.UserControlCommonBase c, string title, bool winborder, string rf, bool deftopmostp, Color labelnormal, Color labeltransparent, Color transparentkey) { //System.Diagnostics.Debug.WriteLine("UCF Init+"); RestoreFormPositionRegKey = "PopUpForm" + rf; // position remember key UserControl = c; UserControl.Dock = DockStyle.None; UserControl.Location = new Point(0, 10); UserControl.Size = new Size(200, 200); this.Controls.Add(c); labelnormalcolour = labelnormal; labeltransparentcolour = labeltransparent; TransparencyColorKey = UserControl.SupportTransparency ? transparentkey : Color.Transparent; WinTitle = label_index.Text = this.Text = title; // label index always contains the wintitle, but may not be shown curwindowsborder = defwindowsborder = winborder; DBRefName = "PopUpForm" + rf; this.Name = rf; deftopmost = deftopmostp; labelControlText.Text = ""; // always starts blank.. this.ShowInTaskbar = EliteDangerousCore.DB.UserDatabase.Instance.GetSettingBool(DBRefName + "Taskbar", true); DisplayTitle = EliteDangerousCore.DB.UserDatabase.Instance.GetSettingBool(DBRefName + "ShowTitle", true); if (Environment.OSVersion.Platform == PlatformID.Win32NT) { idk = DirectInputDevices.InputDeviceKeyboard.CreateKeyboard(); } UpdateControls(); Invalidate(); var enumlisttt = new Enum[] { EDTx.UserControlForm_panel_showtitle_ToolTip, EDTx.UserControlForm_panel_minimize_ToolTip, EDTx.UserControlForm_panel_ontop_ToolTip, EDTx.UserControlForm_panel_taskbaricon_ToolTip, EDTx.UserControlForm_panel_transparent_ToolTip, EDTx.UserControlForm_panel_close_ToolTip }; BaseUtils.Translator.Instance.TranslateTooltip(toolTip, enumlisttt, this); //System.Diagnostics.Debug.WriteLine("UCF Init-"); }