Пример #1
0
        private void openToolStripMenuItem_Click(object sender, EventArgs e)
        {
            DialogResult result;

            result = openFileDialog.ShowDialog(this);

            if (result == DialogResult.OK)
            {
                _file = new CfsFile(openFileDialog.FileName);

                //try
                {
                    //_file.Load();

                    FillFormData();

                    palettePanel.Palette = _file.ColorPalette;
                    palettePanel.Shadows = _file.Shadows;
                    palettePanel.Lights  = _file.Lights;

                    viewerPanel.ImageFile    = _file;
                    viewerPanel.CurrentFrame = 0;
                }
                //catch (Exception ex)
                {
                    //    MessageBox.Show(this, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }
Пример #2
0
        private void browseButton_Click(object sender, EventArgs e)
        {
            DialogResult result;
            Bitmap       bitmap;

            result = openFileDialog.ShowDialog(this);
            if (result == DialogResult.OK)
            {
                try {
                    _file  = new CfsFile(openFileDialog.FileName);
                    bitmap = _file.ToBitmap();

                    cfsPictureBox.Image = bitmap;
                } catch (Exception ex) {
                    MessageBox.Show(this, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }
Пример #3
0
        public CfsEditForm()
        {
            InitializeComponent();

            _file = null;
        }
Пример #4
0
        public Form1()
        {
            InitializeComponent();

            _file = null;
        }