Esempio n. 1
0
 public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
 {
     if (((context != null) && (context.Instance != null)) && (provider != null))
     {
         base.editorService = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService));
         if (base.editorService == null)
         {
             return(value);
         }
         ArrowSelector selector1 = new ArrowSelector();
         if (value is Struct.PropertyLineMarker)
         {
             Struct.PropertyLineMarker acaadf1 = (Struct.PropertyLineMarker)value;
             string text1 = acaadf1.Id;
             if (text1.StartsWith("start"))
             {
                 text1 = text1.Substring(5);
             }
             else if (text1.StartsWith("end"))
             {
                 text1 = text1.Substring(3);
             }
             int num1 = selector1.FindString(text1);
             selector1.SelectedIndex = num1;
             acaadf1            = (Struct.PropertyLineMarker)value;
             selector1.EndArrow = acaadf1.IsEndArrow;
         }
         selector1.Height = 150;
         selector1.SelectedIndexChanged += new EventHandler(this.selector1_SelectedIndexChanged);
         base.editorService.DropDownControl(selector1);
         if (this.changed)
         {
             value = new Struct.PropertyLineMarker(selector1.SelectedArrow, null, selector1.EndArrow, string.Empty);
         }
         this.changed = false;
     }
     return(value);
 }
Esempio n. 2
0
        private void InitializeComponent()
        {
            this.Size     = new Vector2(150, 286);
            this.Position = new Vector2(SharedInformation.Config.ScreenWidth / 2 - 75, SharedInformation.Config.ScreenHeight / 2 - 143);
            this.Text     = "New Character";

            lblName           = new Label();
            lblName.Text      = "Name";
            lblName.Position  = new Vector2(6, 147);
            lblName.Font      = Gulim8B;
            lblName.ForeColor = Color.FromNonPremultiplied(90, 107, 156, 255);

            lblHairStyle           = new Label();
            lblHairStyle.Text      = "Hair Style";
            lblHairStyle.Position  = new Vector2(6, 171);
            lblHairStyle.Font      = Gulim8B;
            lblHairStyle.ForeColor = Color.FromNonPremultiplied(90, 107, 156, 255);

            lblHairColor           = new Label();
            lblHairColor.Text      = "Hair Color";
            lblHairColor.Position  = new Vector2(6, 212);
            lblHairColor.Font      = Gulim8B;
            lblHairColor.ForeColor = Color.FromNonPremultiplied(90, 107, 156, 255);

            btnOK          = new Button();
            btnOK.Text     = "Ok";
            btnOK.Position = new Vector2(104, 261);
            btnOK.Size     = new Vector2(42, 20);
            btnOK.Clicked += new Action <Nuclex.Input.MouseButtons, float, float>(btnOK_Clicked);

            btnCancel          = new Button();
            btnCancel.Text     = "Cancel";
            btnCancel.Position = new Vector2(57, 261);
            btnCancel.Size     = new Vector2(42, 20);
            btnCancel.Clicked += new Action <Nuclex.Input.MouseButtons, float, float>(btnCancel_Clicked);

            Texture2D scrollleft = SharedInformation.ContentManager.Load <Texture2D>("data\\texture\\유저인터페이스\\scroll1left.bmp");;

            ibScrollLeft          = new ImageButton(scrollleft, scrollleft, scrollleft);
            ibScrollLeft.Size     = new Vector2(13, 13);
            ibScrollLeft.Clicked += new Action <Nuclex.Input.MouseButtons, float, float>(ibScrollLeft_Clicked);
            ibScrollLeft.Position = new Vector2(22, 80);
            this.Controls.Add(ibScrollLeft);

            Texture2D scrollright = SharedInformation.ContentManager.Load <Texture2D>("data\\texture\\유저인터페이스\\scroll1right.bmp");;

            ibScrollRight          = new ImageButton(scrollright, scrollright, scrollright);
            ibScrollRight.Size     = new Vector2(13, 13);
            ibScrollRight.Clicked += new Action <Nuclex.Input.MouseButtons, float, float>(ibScrollRight_Clicked);
            ibScrollRight.Position = new Vector2(111, 80);
            this.Controls.Add(ibScrollRight);

            txtName           = new TextBox();
            txtName.Position  = new Vector2(40, 143);
            txtName.Size      = new Vector2(101, 18);
            txtName.BackColor = Color.FromNonPremultiplied(255, 255, 255, 255);

            asHead               = new ArrowSelector();
            asHead.Position      = new Vector2(13, 190);
            asHead.Size          = new Vector2(124, 13);
            asHead.ValueChanged += new Action(asHead_ValueChanged);
            asHead.Maximum       = 23;
            asHead.Minimum       = 1;
            asHead.Value         = 1;

            asHeadPalette               = new ArrowSelector();
            asHeadPalette.Position      = new Vector2(13, 230);
            asHeadPalette.Size          = new Vector2(124, 13);
            asHeadPalette.ValueChanged += new Action(asHeadPalette_ValueChanged);
            asHeadPalette.Maximum       = 8;
            asHeadPalette.Minimum       = 1;
            asHeadPalette.Value         = 1;

            chrCharacter          = new Character();
            chrCharacter.Position = new Vector2(32, 41);

            this.Controls.Add(lblName);
            this.Controls.Add(lblHairStyle);
            this.Controls.Add(lblHairColor);
            this.Controls.Add(ibScrollLeft);
            this.Controls.Add(ibScrollRight);
            this.Controls.Add(txtName);
            this.Controls.Add(asHead);
            this.Controls.Add(asHeadPalette);
            this.Controls.Add(chrCharacter);
            this.Controls.Add(btnOK);
            this.Controls.Add(btnCancel);
        }
Esempio n. 3
0
        private void InitializeComponent()
        {
            this.Size     = new Vector2(width, height);
            this.Position = new Vector2(SharedInformation.Config.ScreenWidth / 2 - width / 2, SharedInformation.Config.ScreenHeight / 2 - height / 2);
            this.Text     = "Controltest";

            lblTextbox          = new Label();
            lblTextbox.Text     = "Textbox";
            lblTextbox.Position = new Vector2(15, 30);
            lblTextbox.Font     = Gulim8B;

            txtTextbox           = new TextBox();
            txtTextbox.Position  = new Vector2(15, 45);
            txtTextbox.Size      = new Vector2(140, 18);
            txtTextbox.BackColor = Color.FromNonPremultiplied(242, 242, 242, 255);

            lblPassword          = new Label();
            lblPassword.Text     = "Password";
            lblPassword.Position = new Vector2(15, 80);
            lblPassword.Font     = Gulim8B;

            txtPassword           = new TextBox();
            txtPassword.Position  = new Vector2(15, 95);
            txtPassword.Size      = new Vector2(140, 18);
            txtPassword.TextMask  = "*";
            txtPassword.BackColor = Color.FromNonPremultiplied(242, 242, 242, 255);

            lblListbox          = new Label();
            lblListbox.Text     = "Listbox";
            lblListbox.Position = new Vector2(15, 130);
            lblListbox.Font     = Gulim8B;

            lstListbox          = new Listbox();
            lstListbox.Position = new Vector2(15, 145);
            lstListbox.Size     = new Vector2(140, 80);
            lstListbox.Items.Add("Listboxentry 1");
            lstListbox.Items.Add("Listboxentry 2");
            lstListbox.Items.Add("Listboxentry 3");
            lstListbox.Items.Add("Listboxentry 4");

            lblCheckbox          = new Label();
            lblCheckbox.Text     = "Checkbox";
            lblCheckbox.Position = new Vector2(15, 240);
            lblCheckbox.Font     = Gulim8B;

            chkCheckbox          = new CheckBox();
            chkCheckbox.Position = new Vector2(15, 255);
            chkCheckbox.Text     = "Check me";

            lblButton          = new Label();
            lblButton.Text     = "Button";
            lblButton.Position = new Vector2(15, 290);
            lblButton.Font     = Gulim8B;

            btnButton          = new Button();
            btnButton.Text     = "Button";
            btnButton.Position = new Vector2(15, 305);
            btnButton.Size     = new Vector2(60, 20);
            btnButton.Clicked += new Action <Nuclex.Input.MouseButtons, float, float>(btnButton_Clicked);

            lblArrowSelector          = new Label();
            lblArrowSelector.Text     = "Arrow Selector";
            lblArrowSelector.Position = new Vector2(180, 30);
            lblArrowSelector.Font     = Gulim8B;

            asArrowSelector               = new ArrowSelector();
            asArrowSelector.Position      = new Vector2(180, 45);
            asArrowSelector.Size          = new Vector2(124, 18);
            asArrowSelector.Maximum       = 10;
            asArrowSelector.ValueChanged += new Action(asArrowSelector_ValueChanged);

            asArrowSelector2               = new ArrowSelector();
            asArrowSelector2.Position      = new Vector2(180, 60);
            asArrowSelector2.Size          = new Vector2(124, 18);
            asArrowSelector2.Maximum       = 5;
            asArrowSelector2.ValueChanged += new Action(asArrowSelector_ValueChanged);

            lstDebug          = new Listbox();
            lstDebug.Position = new Vector2(15, height - 130);
            lstDebug.Size     = new Vector2(width - 30, 130 - 30);

            chrCharacter          = new Character();
            chrCharacter.Position = new Vector2(180, 110);

            this.Controls.Add(this.txtTextbox);
            this.Controls.Add(this.lblTextbox);

            this.Controls.Add(this.txtPassword);
            this.Controls.Add(this.lblPassword);

            this.Controls.Add(this.lstListbox);
            this.Controls.Add(this.lblListbox);

            this.Controls.Add(this.lblCheckbox);
            this.Controls.Add(this.chkCheckbox);

            this.Controls.Add(this.lblButton);
            this.Controls.Add(this.btnButton);

            this.Controls.Add(this.lblArrowSelector);
            this.Controls.Add(this.asArrowSelector);
            this.Controls.Add(this.asArrowSelector2);
            this.Controls.Add(chrCharacter);

            this.Controls.Add(this.lstDebug);
        }