public MasterPresenter(DataManagement data, FlowchartView view, string name) { this.data = data; this.view = view; flowchart = data.LoadFlowchart(name); selectedBlock = -1; selectedEdge = new int[2]; selectedEdge[0] = -1; selectedEdge[1] = -1; }
public void CreateNew(string name, string path, string code_type) { if (name == "" || path == "") { throw new Exception("Enter name and path of code file for creating flowchart."); } view.Hide(); FlowchartView masterView = new FlowchartView(data, path, name, code_type); masterView.Show(); }
public void openClick() { if (data.GetLogin().Equals(owner)) { data.SetOwner(data.GetLogin()); data.SetReviewer(reviewer); view.Hide(); FlowchartView mView = new FlowchartView(data, flowchartName, true, reviewer); mView.Show(); } else { data.SetReviewer(data.GetLogin()); data.SetOwner(owner); view.Hide(); FlowchartView mView = new FlowchartView(data, flowchartName, false, reviewer); mView.Show(); } }
public MasterPresenter(DataManagement data, string path, FlowchartView view, string name, string type_code) { switch (type_code) { case "C++": { flowchart = new FlowchartCppFactory().CreateFlowchart(path, name); break; } default: { flowchart = new Flowchart(name); break; } } this.data = data; this.view = view; selectedBlock = -1; selectedEdge = new int[2]; selectedEdge[0] = -1; selectedEdge[1] = -1; }
public ReviewerPresenter(DataManagement data, FlowchartView view, string name) : base(data, view, name) { }