Beispiel #1
0
        private void pictureBox1_DoubleClick(object sender, EventArgs e)
        {
            Cursor = Cursors.AppStarting;
            var frm = new CharacterInfo(character);

            frm.Location      = this.ParentForm.Location;
            frm.StartPosition = FormStartPosition.Manual;
            frm.FormClosing  += delegate { frm.Dispose(); Program.CloseAllButSearch(); };
            frm.KeyDown      += new KeyEventHandler((s, key) =>
            {
                if (key.KeyCode == Keys.X)
                {
                    Console.WriteLine("key pressed");
                    this.FindForm().Show();
                    frm.Close();
                    frm.Dispose();
                }
            });
            frm.Show();
            this.ParentForm.Hide();
        }