상속: CaveTube.CaveTalk.Utils.ViewModelBase
예제 #1
0
        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();
        }
예제 #2
0
 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();
 }
예제 #3
0
		public static async Task<StartBroadcastViewModel> CreateInstance() {
			var instance = new StartBroadcastViewModel();
			await instance.Init();
			return instance;
		}