public SharpDXWindow() : base() { this.Caption = new SharpDXLabel(); this.Panel = new SharpDXPanel(); this.Panel.DrawBackground = false; this.Panel.DrawBorder = false; this.mouseDown = false; //this.DynamicHeight = false; //this.DynamicWidth = false; this.AddChildControl(this.Caption); this.AddChildControl(this.Panel); this.MouseClickEventUp += SharpDXWindow_MouseClickEventUp; this.MouseClickEventDown += SharpDXWindow_MouseClickEventDown; this.MouseLeftEvent += SharpDXWindow_MouseLeftEvent; this.MouseMovedEvent += SharpDXWindow_MouseMovedEvent; this.TextChangedEvent += SharpDXWindow_TextChangedEvent; }
private static void InitializeComponent() { pnlPanel = new SharpDXPanel(); pnlPanel.X = 2; pnlPanel.Y = 2; lblCaption = new SharpDXLabel(); lblCaption.Text = "SteamMonsterGame"; lblDescription = new SharpDXLabel(); lblDescription.Text = "A sample of ExternalUtilsCSharp"; btnToggleMenu = new SharpDXButton(); btnToggleMenu.Text = "Toggle configuration-window"; btnToggleMenu.MouseClickEventUp += btnToggleMenu_MouseClickEventUp; wndWindow = new SharpDXWindow(); wndWindow.Text = "Configuration"; wndWindow.Width = 400; wndWindow.Height = 200; wndWindow.X = 500; wndWindow.Y = 500; wndWindow.Visible = false; lblAutomation = new SharpDXLabel(); lblAutomation.Text = "~ Automation ~"; lblAutomation.FixedWidth = true; lblAutomation.Width = 150; lblAutomation.TextAlign = SharpDXLabel.TextAlignment.Center; chbAutoClicker = new SharpDXCheckBox(); chbAutoClicker.Text = "[INS] Auto clicker"; chbMoveMouse = new SharpDXCheckBox(); chbMoveMouse.Text = "[DEL] Move mouse"; rdbUsePost = new SharpDXRadioButton(); rdbUsePost.Text = "[Use PostMessage]"; rdbUsePost.Checked = true; rdbUseSend = new SharpDXRadioButton(); rdbUseSend.Text = "[Use SendMessage]"; rdbUseSend.Checked = false; lblVisuals = new SharpDXLabel(); lblVisuals.Text = "~ Visuals ~"; lblVisuals.FixedWidth = true; lblVisuals.Width = 150; lblVisuals.TextAlign = SharpDXLabel.TextAlignment.Center; chbVisDrawClicker = new SharpDXCheckBox(); chbVisDrawClicker.Text = "Draw auto-clicker"; lblPerformance = new SharpDXLabel(); lblPerformance.Text = "~ Performance ~"; lblPerformance.FixedWidth = true; lblPerformance.Width = 150; lblPerformance.TextAlign = SharpDXLabel.TextAlignment.Center; lblFpsLogic = new SharpDXLabel(); lblFpsLogic.Text = "FPS logic: 0"; pgbFpsLogic = new SharpDXProgressBar(); pgbFpsLogic.Maximum = 60; lblFpsLogicAverage = new SharpDXLabel(); lblFpsLogicAverage.Text = "Average FPS: 0 (0 ticks total)"; lblFpsDraw = new SharpDXLabel(); lblFpsDraw.Text = "FPS logic: 0"; pgbFpsDraw = new SharpDXProgressBar(); pgbFpsDraw.Maximum = 60; lblFpsDrawAverage = new SharpDXLabel(); lblFpsDrawAverage.Text = "Average FPS: 0 (0 ticks total)"; clkWindow = new ClickerWindow(); clkWindow.X = 500; clkWindow.Y = 500; clkWindow.Width = 500; clkWindow.Height = 500; }
private static void InitToggleButton(ref SharpDXButton control, string text, SharpDXPanel tag) { control = new SharpDXButton(); control.Text = text; control.Tag = tag; control.MouseClickEventUp += button_MouseClickEventUp; }
private static void InitPanel(ref SharpDXPanel control, bool dynamicWidth = true, bool dynamicHeight = true, bool fillParent = true, bool visible = true) { control = new SharpDXPanel(); control.DynamicHeight = dynamicHeight; control.DynamicWidth = dynamicWidth; control.FillParent = fillParent; control.Visible = visible; }