Exemple #1
0
        void OpenSequenceEditor(Gradient gradient)
        {
            SequenceEditor editor = new SequenceEditor(gradient.SequencePoints, targetSequence.Length);

            editor.SetDark(IsDark);
            editor.Location = new Point(0, 3);
            Controls.Add(editor);
            editor.BringToFront();
            editor.applySequence.Click   += CloseSequenceEditor;
            editor.discardSequence.Click += DiscardSequenceEditor;
            currentEditor = editor;
        }
Exemple #2
0
        private void CloseSequenceEditor(object sender, EventArgs e)
        {
            SequenceEditor editor = currentEditor;

            sequences[targetSequenceIndex] = new Sequence(editor.SequencePoints, editor.Length, targetGradient);
            currentEditor = null;
            targetGradient.SequencePoints = sequences[targetSequenceIndex].SequencePoints;
            lengthLabel.Text     = "Length: " + sequences[targetSequenceIndex].Length + " sec";
            lengthLabel.Location = new Point(435 - lengthLabel.Size.Width - 10, lengthLabel.Location.Y);
            pointsLabel.Text     = "Points: " + sequences[targetSequenceIndex].SequencePoints.Length;
            pointsLabel.Location = new Point(435 - pointsLabel.Size.Width - 10, pointsLabel.Location.Y);
            Controls.Remove((sender as Control).Parent);
            SaveSequences();
        }