コード例 #1
0
        private void CreateControls()
        {
            // Login Input
            _loginBox = new InputControl
            {
                Bounds    = new UniRectangle(new UniScalar(0.5f, -100f), new UniScalar(0.4f, -30), 200, 30),
                IsHidden  = false,
                MaxLength = 20,
                RealText  = Settings.Default.login,
                Text      = Settings.Default.login
            };

            // Password Input
            _passwordBox = new InputControl
            {
                Bounds    = new UniRectangle(new UniScalar(0.5f, -100f), new UniScalar(0.4f, 30), 200, 30),
                IsHidden  = true,
                MaxLength = 20,
                RealText  = Settings.Default.password,
                Text      = InputControl.HiddenText(Settings.Default.password)
            };

            // Login Label
            _loginLabel = new LabelControl(Strings.User_Name)
            {
                Bounds = new UniRectangle(new UniScalar(0.5f, -32), new UniScalar(0.4f, -60), 100, 30)
            };

            // Password Label
            _passwordLabel = new LabelControl(Strings.Password)
            {
                Bounds = new UniRectangle(new UniScalar(0.5f, -32), new UniScalar(0.4f, 0), 100, 30)
            };

            // Login Button
            _loginButton = new ButtonControl
            {
                Text   = Strings.Login,
                Bounds = new UniRectangle(new UniScalar(0.5f, 110), new UniScalar(0.4f, 70), 100, 32)
            };

            // Back Button
            _exitButton = new ButtonControl
            {
                Text   = Strings.Exit,
                Bounds = new UniRectangle(new UniScalar(0.5f, -210f), new UniScalar(0.4f, 70), 100, 32),
            };

            // New Account Button
            _newAccountButton = new ButtonControl
            {
                Text   = Strings.Create_New_Account,
                Bounds = new UniRectangle(new UniScalar(0.5f, -75f), new UniScalar(0.4f, 70), 150, 32)
            };
        }
コード例 #2
0
        private void CreateControls()
        {
            // Login Input
            _loginBox = new InputControl
            {
                IsHidden = false,
                Bounds   = new UniRectangle(new UniScalar(0.5f, -100f), new UniScalar(0.4f, -30), 200, 30),
                Text     = string.Empty
            };

            // Password Input
            _passwordBox = new InputControl
            {
                IsHidden = true,
                Bounds   =
                    new UniRectangle(new UniScalar(0.5f, -100f), new UniScalar(0.4f, 30), 200, 30),
                RealText = string.Empty,
                Text     = string.Empty
            };

            // Login Label
            _loginLabel = new LabelControl("Username")
            {
                Bounds = new UniRectangle(new UniScalar(0.5f, -32), new UniScalar(0.4f, -70), 100, 30)
            };

            // Password Label
            _passwordLabel = new LabelControl("Password")
            {
                Bounds =
                    new UniRectangle(new UniScalar(0.5f, -32), new UniScalar(0.4f, 0), 100, 30)
            };

            // Back Button
            _backButton = new ButtonControl
            {
                Text   = "Back",
                Bounds =
                    new UniRectangle(new UniScalar(0.5f, -210f), new UniScalar(0.4f, 70), 100, 32)
            };

            // Login Button
            _okButton = new ButtonControl
            {
                Text   = "Create",
                Bounds = new UniRectangle(new UniScalar(0.5f, 110), new UniScalar(0.4f, 70), 100, 32)
            };
        }