protected override void OnStartup(StartupEventArgs e) { UpdateIPCClient client = new UpdateIPCClient(UpdateIPCServer.PipeName); RemoteInstallerViewModel model = new RemoteInstallerViewModel(client); ISetupUI setupUi = null; setupUi = new MainWindow(model, true); client.RegisterObject("SetupUI", setupUi); client.Start(); Console.WriteLine("Client Waiting for connection"); client.WaitForConnection(); Console.WriteLine("Client connected"); client.PushMessage(new Message() { Command = Command.Start }); setupUi.Closed += (sender, _e) => { client.PushMessage(new Message() { Command = Command.Exit }); }; setupUi.Show(); base.OnStartup(e); }
public RemoteInstallerViewModel(UpdateIPCClient client) { this.client = client; client.MessageReceived += CheckPropertyChangedMessage; }