public CreateRangeObject()
        {
            InitializeComponent();

            foreach (var type in RangeObject.ValidTypes)
            {
                var typeName = RangeObject.GetTypeNameFromId(type);

                types.Add(typeName, type);

                cmbType.Items.Add(typeName);
            }

            if (RangeObject.ValidTypes.Length > 0)
            {
                cmbType.SelectedIndex = 0;
            }

            Text           = Strings.CreateRangeObject;
            lblId.Text     = Strings.ID;
            lblMapId.Text  = Strings.MapID;
            lblType.Text   = Strings.Type;
            lblX1.Text     = Strings.X1Pos;
            lblY1.Text     = Strings.Y1Pos;
            lblX2.Text     = Strings.X2Pos;
            lblY2.Text     = Strings.Y2Pos;
            btnCreate.Text = Strings.Create;

            this.SetFonts();
        }
Example #2
0
        public RangeObjectForm()
        {
            InitializeComponent();

            // Initialize localization
            idHeader.Text    = Strings.ID;
            typeHeader.Text  = Strings.Type;
            mapIdHeader.Text = Strings.MapID;
            x1PosHeader.Text = Strings.X1Pos;
            y1PosHeader.Text = Strings.Y1Pos;
            x2PosHeader.Text = Strings.X2Pos;
            y2PosHeader.Text = Strings.Y2Pos;

            btnCreate.Text = Strings.Create;
            btnDelete.Text = Strings.Delete;
            btnEdit.Text   = Strings.Edit;

            foreach (var type in RangeObject.ValidTypes)
            {
                var typeName = RangeObject.GetTypeNameFromId(type);

                types.Add(typeName, type);
            }
        }