Ejemplo n.º 1
0
        //int iOffsetTop = 30;

        public Form1()
        {
            InitializeComponent();

            drawUniPanel = new DrawUniMap();
            //is this a VGA screen? HI_RES_AWARE
            if (Screen.PrimaryScreen.WorkingArea.Width > 240)
            {
                drawUniPanel.Location = new Point(0, 100);
            }
            else
            {
                drawUniPanel.Location = new Point(0, 50);
            }
            drawUniPanel.Size = new Size(this.Width, this.Height - 50);
            this.Controls.Add(drawUniPanel);

            //combo to select 'codepage'
            cboUnicodePlane.Items.Clear();
            for (int i = 0; i < 0xff; i++)
            {
                cboUnicodePlane.Items.Insert(i, i.ToString("x02"));
            }
            cboUnicodePlane.SelectedIndex = 0x04;

            //combo to select font
            cboFont.Items.Clear();
            //get a list of available fonts
            FontClass fontClass = new FontClass();

            string[] sFonts = fontClass.getFontList();
            for (int iF = 0; iF < sFonts.Length; iF++)
            {
                cboFont.Items.Insert(0, sFonts[iF]);
            }

            //add a fantasy font name to show what happens for non-existing fonts:
            //windows replaces the font request with a 'matching' existing font
            cboFont.Items.Insert(cboFont.Items.Count, "Fanatasie");

            cboFont.SelectedIndex = 1;

            drawUniPanel._bCurrCodepage = (byte)cboUnicodePlane.SelectedIndex;

            this.FormBorderStyle            = FormBorderStyle.Sizable;
            drawUniPanel.NewMessageHandler += new DrawUniMap.KlickedEventHandler(drawUni_NewMessageHandler);

            this.ResumeLayout();
        }
Ejemplo n.º 2
0
        //int iOffsetTop = 30;

        public Form1()
        {

            InitializeComponent();

            drawUniPanel = new DrawUniMap();
            //is this a VGA screen? HI_RES_AWARE
            if(Screen.PrimaryScreen.WorkingArea.Width>240)
                drawUniPanel.Location = new Point(0, 100);
            else
                drawUniPanel.Location = new Point(0, 50);
            drawUniPanel.Size = new Size(this.Width, this.Height - 50);
            this.Controls.Add(drawUniPanel);

            //combo to select 'codepage'
            cboUnicodePlane.Items.Clear();
            for (int i = 0; i < 0xff; i++)
            {
                cboUnicodePlane.Items.Insert(i, i.ToString("x02"));
            }
            cboUnicodePlane.SelectedIndex = 0x04;

            //combo to select font
            cboFont.Items.Clear();
            //get a list of available fonts
            FontClass fontClass = new FontClass();
            string[] sFonts = fontClass.getFontList();
            for (int iF = 0; iF < sFonts.Length; iF++)
            {
                cboFont.Items.Insert(0, sFonts[iF]);
            }

            //add a fantasy font name to show what happens for non-existing fonts: 
            //windows replaces the font request with a 'matching' existing font
            cboFont.Items.Insert(cboFont.Items.Count, "Fanatasie");

            cboFont.SelectedIndex = 1;

            drawUniPanel._bCurrCodepage = (byte)cboUnicodePlane.SelectedIndex;

            this.FormBorderStyle = FormBorderStyle.Sizable;
            drawUniPanel.NewMessageHandler += new DrawUniMap.KlickedEventHandler(drawUni_NewMessageHandler);

            this.ResumeLayout();
        }