Ejemplo n.º 1
0
        private void DesignForm_Load(object sender, EventArgs e)
        {
            // get horizontal and vertical number of segments (6x8 now)
            this.pbCharDesign.Size = new System.Drawing.Size((int)ld.HorizontalSegments * 25,
                                                             (int)ld.VerticalSegments * 25);
            this.pbCharPreview.Size = new System.Drawing.Size((int)ld.HorizontalSegments * 6,
                                                              (int)ld.VerticalSegments * 6);
            // get control backcolor
            pbCharDesign.BackColor  = ld.BackColor;
            pbCharPreview.BackColor = ld.BackColor;

            // get space between segments
            nudSpace.Value = ld.SegmentSpace;

            // get the current list af characters in dictionary and show them in combobox
            cbSelectCharacter.Items.AddRange(ld.GetKeys().ToArray());

            // select the first character, if any
            if (cbSelectCharacter.Items.Count > 0)
            {
                cbSelectCharacter.SelectedIndex = 0;
            }

            txtNoOfChars.Text = cbSelectCharacter.Items.Count.ToString(); // no. of chars in dictiobary
        }