Exemplo n.º 1
0
        public CMVPlayer()
        {
            InitializeComponent();

            // Paint values
            drawArea = new Rectangle(0, 0, Width, Height);

            // Draw stage constants
            magenta = Color.FromArgb(255, 255, 0, 255);

            attributes = new ImageAttributes();

            playTimer = new Timer();
            playTimer.Interval = 1000 / 25;
            playTimer.Tick += new EventHandler(timerTick);

            DoubleBuffered = true;

            Reset();

            cmv = new CMV();
            tileset = new TileSet();

            renderedTiles = new Dictionary<short, Bitmap>();
            forceRedraw = true;
        }
Exemplo n.º 2
0
        public MainForm()
        {
            InitializeComponent();

            cmv = new CMV();
            rawframes = new List<CMVFrame>();
            cmvframes = new ImmutableList<CMVFrame>(rawframes, "empty");
            copybuffer = new List<CMVFrame>();

            foregroundColourPicker.Colors = CMVColours.ForegroundColors;
            backgroundColourPicker.Colors = CMVColours.BackgroundColors;

            updateDelayTimer = new Timer();
                updateDelayTimer.Interval = 24;
                updateDelayTimer.Tick += handleUpdateDelayTimer;

            aboutBox = new AboutBox();
            aboutBox.HelpButtonClicked += new EventHandler(action_HelpTopics);

            newFileDialog = new ChooseDimensionsBox();

            loadTileset();

            RefreshControls();
        }
Exemplo n.º 3
0
        private void registerCMVWithForm(CMV cmv)
        {
            this.cmv = cmv;

            rawframes = cmv.Frames;
            cmvframes = new ImmutableList<CMVFrame>(rawframes, cmv.Filename);

            cmvInfoControl.CMV = cmv;
            cmvPlayer.TileSet = tileset;
            cmvPlayer.CMV = cmv;
        }
Exemplo n.º 4
0
        private void openFileName(string filename)
        {
            cmv = new CMV(filename);

            registerCMVWithForm(cmv);
        }
Exemplo n.º 5
0
        /* Actions */
        private void action_NewFile(object sender, EventArgs e)
        {
            int width, height;

            newFileDialog.ShowDialog(this);
            width = newFileDialog.FormWidth;
            height = newFileDialog.FormHeight;

            cmv = new CMV((uint)width, (uint)height);

            registerCMVWithForm(cmv);
        }