private void ShowStartBroadcast() { var window = new StartBroadcast(); var viewModel = new StartBroadcastViewModel(); viewModel.OnClose += roomId => { uiDispatcher.BeginInvoke(new Action(() => { window.Close(); if (String.IsNullOrWhiteSpace(roomId)) { return; } this.JoinRoom(roomId); })); }; window.DataContext = viewModel; window.ShowDialog(); }
public static async Task<StartBroadcastViewModel> CreateInstance() { var instance = new StartBroadcastViewModel(); await instance.Init(); return instance; }