/// <summary> /// Initializes a new instance of the <see cref="ServerSetupController"/> class. /// </summary> /// <param name="view"> The associated view. </param> /// <param name="model"> The associated model. </param> public ServerSetupController(ServerSetupWindow view, ServerSetup model) { this.view = view; this.model = model; this.view.Closed += (o, eA) => Environment.Exit(-1); this.view.ConnectBtn.Click += (o, eA) => this.ConnectClicked(); }
public Main() { var setupView = new ServerSetupWindow(); setupView.Show(); var setupModel = new ServerSetup(); this.setup = new ServerSetupController(setupView, setupModel); this.setup.Connected += this.ShowApplication; Application.Run(); }