private void OnHistory(object sender, EventArgs e) { if (Model is SchemeModel) { Model = HistoryModel; HistoryModel.UpdateView(); SchemeToolWindowView.Dock.Children.Remove(SchemeView); SchemeToolWindowView.Dock.Children.Add(HistoryView); } else { Model = SchemeModel; SchemeToolWindowView.Dock.Children.Remove(HistoryView); SchemeToolWindowView.Dock.Children.Add(SchemeView); } }