private void UpdateCurrentEditViews(GIFEdit gifEdit)
 {
     CurrentEdit = gifEdit;
     GIFPropertyTreeView.Nodes.Clear();
     GIFPositionScrollBar.Value = 0;
     if (gifEdit != null)
     {
         GIFPositionScrollBar.Maximum = CurrentEdit.GIFFrames.Count + 8;
         GIFPropertyTreeView.Nodes.Add(new GIFEditNode(gifEdit));
         GIFPictureBox.Image = CurrentFrame;
     }
 }
        private void LoadGIFButton_Click(object sender, EventArgs e)
        {
            var file = new OpenFileDialog();

            file.Filter = "GIF Files (*.gif)|*.gif";

            if (file.ShowDialog() == DialogResult.OK)
            {
                ClearEdits();
                CurrentEdit = new GIFEdit(file.FileName);
                UpdateCurrentEditViews(CurrentEdit);
            }
        }