Beispiel #1
0
        public DCSGUIDesigner()
        {
            InitializeComponent();

            IntPtr iconPtr = TokenIDE.Properties.Resources.icon_guiedit.GetHicon();

            using (Icon icon = Icon.FromHandle(iconPtr)) {
                this.Icon = icon;
            }

            for (GUINums i = 0; i < GUINums._end; i++)
            {
                int t;
                if (!int.TryParse(i.ToString(), out t))
                {
                    ListViewItem item = new ListViewItem(i.ToString());
                    item.Name = ((int)i).ToString();
                    toolBox.Items.Add(item);
                }
            }
            canvas.Width  = screenWidth * zoom;
            canvas.Height = screenHeight * zoom;
            try {
                pfc.AddFontFile("TI-83P Font.ttf");
                GUIItem.DCSFont = new Font(pfc.Families[0], 7.5f, FontStyle.Regular);
            } catch {
                GUIItem.DCSFont = new Font(FontFamily.GenericMonospace, 7.5f, FontStyle.Regular);
            }
        }