Пример #1
0
 private static void InitLabel(ref SharpDXLabel control, string text, bool fixedWidth = false, float width = 0f, SharpDXLabel.TextAlignment alignment = SharpDXLabel.TextAlignment.Left)
 {
     control = new SharpDXLabel();
     control.FixedWidth = fixedWidth;
     control.Width = width;
     control.TextAlign = alignment;
     control.Text = text;
     control.Tag = null;
 }
Пример #2
0
        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;
        }