private void pnl_rectColorImg_Click(object sender, EventArgs e) { if (Program.MainTimeline.SelectedKeyframe == null) { return; } if (Program.MainTimeline.SelectedKeyframe.State.GetType() != typeof(RectObject.State)) { return; } RectObject.State state = Program.MainTimeline.SelectedKeyframe.State as RectObject.State; ColorPickerDialog dlg = new ColorPickerDialog(); dlg.StartPosition = FormStartPosition.CenterParent; if (dlg.ShowDialog() == DialogResult.OK) { pnl_rectColorImg.BackColor = dlg.Color; lbl_rectColorNumbers.Text = string.Format("{0}, {1}, {2}", dlg.Color.R, dlg.Color.G, dlg.Color.B); } state.Color = dlg.Color; Program.MainTimeline.GLContext.Invalidate(); }
private void btn_rectFrameset_Click(object sender, EventArgs e) { if (Program.MainTimeline.SelectedFrameset == null) { return; } if (Program.MainTimeline.SelectedLayer.Data.GetType() != typeof(RectObject)) { return; } foreach (Keyframe frame in Program.MainTimeline.SelectedFrameset.Keyframes) { RectObject.State state = frame.State as RectObject.State; state.Color = pnl_rectColorImg.BackColor; } Program.MainTimeline.GLContext.Invalidate(); }