Example #1
0
        private void FrameTextBox_TextChanged(object sender, EventArgs e)
        {
            if (isLocked || transactionManager.TransactionInProgress)
            {
                return;
            }
            TextBox textBox = (TextBox)sender;
            uint    value;

            if (uint.TryParse(textBox.Text, out value))
            {
                if (value < 0)
                {
                    value = 0;
                }
                if (value >= hamFile.Textures.Count)
                {
                    value = 0;
                }
                IndexedUnsignedTransaction transaction = new IndexedUnsignedTransaction("WClip image", clip, "Frames", wclipID, 3, (uint)FrameSpinner.Value, value);
                transaction.undoEvent += IndexedUndoEvent;
                transactionManager.ApplyTransaction(transaction);
                UpdateWallFrame((int)FrameSpinner.Value);
            }
        }
Example #2
0
        private void FrameNumTextBox_TextChanged(object sender, EventArgs e)
        {
            if (isLocked || transactionManager.TransactionInProgress)
            {
                return;
            }
            TextBox textBox = (TextBox)sender;
            uint    value;

            if (uint.TryParse(textBox.Text, out value))
            {
                IndexedUnsignedTransaction transaction = new IndexedUnsignedTransaction("VClip image", clip, "Frames", vclipID, 1, (uint)FrameSpinner.Value, value);
                transaction.undoEvent += IndexedUndoEvent;
                transactionManager.ApplyTransaction(transaction);
                UpdateAnimationFrame((int)FrameSpinner.Value);
            }
        }
Example #3
0
        private void RemapSingleImage_Click(object sender, EventArgs e)
        {
            Button        button   = (Button)sender;
            ImageSelector selector = new ImageSelector(piggyFile, palette, false);

            if (selector.ShowDialog() == DialogResult.OK)
            {
                isLocked = true;
                uint value = (uint)selector.Selection;
                IndexedUnsignedTransaction transaction = new IndexedUnsignedTransaction("VClip image", clip.Clip, "Frames", eclipID, 2, (uint)FrameSpinner.Value, value);
                transaction.undoEvent += IndexedUndoEvent;
                transactionManager.ApplyTransaction(transaction);

                UpdateEffectFrame((int)FrameSpinner.Value);
                FrameNumTextBox.Text = value.ToString();
                isLocked             = false;
            }
            selector.Dispose();
        }