Пример #1
0
        private void openFileDialog1FileOk(object sender, CancelEventArgs e)
        {
            _keyHeld = false;             // the hackiest hack

            var        kind = (FormatKind)(openFileDialog1.FilterIndex - 1);
            var        data = File.ReadAllBytes(openFileDialog1.FileName);
            FileFormat fmt  = _formatList[kind];

            closeWorkspace(null, null);

            this.colorTableToolStripMenuItem.Enabled = fmt.ColorTable is ColorList;

            inputWnd.Load(this, fmt, data);
            Control c = Utils.FindControl(inputWnd["Controls"].Panel, "inputSend");

            Utils.ApplyEvents(c, _sendTileEvents);

            spriteWnd.FormatToLoad = fmt;
            spriteWnd.Prompt       = "Drag or send a tile to begin!";

            inputWnd.ToggleMenu(true);
            spriteWnd.EnablePaste();

            toolBox.Activate(inputWnd);

            this.PerformLayout();
        }