Exemplo n.º 1
0
        public Form1(String[] commandLine)
        {
            this.addChar  = new AddChar(this);
            this.editChar = new EditChar(this);

            InitializeComponent();

            Reset();
            this.KeyPreview = true;

            if (commandLine.Length > 0)
            {
                String path = null;
                String ext  = null;
                try{
                    path = Path.GetFullPath(commandLine[0]);
                    ext  = Path.GetExtension(path);
                }catch (Exception e) {
                }
                if (path != null && ext == ".font")
                {
                    SetFontFile(path);
                }
            }
        }
Exemplo n.º 2
0
        private void button3_Click(object sender, EventArgs e)
        {
            if (listView1.SelectedItems.Count > 0)
            {
                if (this.editChar.IsDisposed)
                {
                    this.editChar = new EditChar(this);
                    this.editChar.UpdateImage(sourceImage);
                }

                ListViewItem item = listView1.SelectedItems[0];
                this.editChar.Setup(item, item.Text, new Rectangle(Convert.ToInt32(item.SubItems[1].Text), Convert.ToInt32(item.SubItems[2].Text), Convert.ToInt32(item.SubItems[3].Text), Convert.ToInt32(item.SubItems[4].Text)));
                this.editChar.Show();
            }
        }