/// <summary> /// View a previously generated model file. If no model is loaded, show an open /// file dialog and set the model path, and load the model into a ModelLabelView /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void ViewModelButton_Click(object sender, EventArgs e) { ResultsRepresentation model = null; try { model = new ResultsRepresentation(Controller.ModelFilePath); } catch (Exception ex) { Console.WriteLine(ex); bool didSelect = SetModelFilePath_Action(sender, e); //If the user didn't actually select a model, cancelling the dialog, do nothing if (!didSelect) { return; } model = new ResultsRepresentation(Controller.ModelFilePath); } var modelView = new ModelLabelView(model); modelView.Show(); }
/// <summary> /// Given a ResultsRepresentation, show them in a ModelLabelView /// </summary> /// <param name="preparedModelData"></param> private void ShowModelLabelView(ResultsRepresentation preparedModelData) { Console.WriteLine("Showing Model Label View"); ModelLabelView labelView = new ModelLabelView(preparedModelData); labelView.Show(); }