public void CloseUserDashboards() { if (privateDiscBoard == null && discDashboard == null) return; if (privateDiscBoard != null) { privateDiscBoard.Close(); privateDiscBoard = null; } if (discDashboard != null) { discDashboard.Close(); discDashboard = null; } if (htmlBackgroundWnd != null) { htmlBackgroundWnd.Close(); htmlBackgroundWnd = null; } MessageDlg.Show("Moderator is offline or selected session is not running. User dashboards have been closed", "Info", MessageBoxButton.OK, MessageBoxImage.Information); }
public EnlargeOpenSourceCloseBot(PublicCenter center) { _publicCenter = center; _rnd = new Random(); _enabled = true; RunAsync().GetAwaiter().OnCompleted(()=>{}); }
public SuperBot(PublicCenter center) { _publicCenter = center; _rnd = new Random(); _enabled = true; ExplanationModeMediator.Inst.ExplanationModeEnabled = true; RunAsync().GetAwaiter().OnCompleted(() => { }); }
public void CloseAndDispose() { mainWnd = null; if (discDashboard != null) { discDashboard.Close(); discDashboard = null; //todo } if (moderDashboard != null) { moderDashboard.Close(); moderDashboard = null; } if (resViewer != null) { resViewer.Close(); resViewer = null; } if (privateDiscBoard != null) { privateDiscBoard.Close(); privateDiscBoard = null; } if (persMgr != null) { persMgr.Close(); persMgr = null; } if (htmlBackgroundWnd != null) { htmlBackgroundWnd.Close(); htmlBackgroundWnd = null; } }
/// <summary> /// Default constructor. /// </summary> public Main() { InitializeComponent(); //special case of screenshot mode if (SessionInfo.Get().ScreenshotMode) { var discId = SessionInfo.Get().screenDiscId; PrivateCenterCtx.sharedClient = sharedClient; PublicBoardCtx.sharedClient = sharedClient; SessionInfo.Get().discussion = PrivateCenterCtx.Get().Discussion.FirstOrDefault(d => d.Id == discId); SessionInfo.Get().setPerson(PrivateCenterCtx.Get().Person.FirstOrDefault(p => p.Name == "moderator")); var loginRes = new LoginResult(); loginRes.devType = DeviceType.Wpf; loginRes.discussion = SessionInfo.Get().discussion; loginRes.person = SessionInfo.Get().person; sharedClient.start(loginRes, PrivateCenterCtx.Get().Connection.DataSource, DeviceType.Wpf); this.Hide(); sharedClient.clienRt.onJoin += () => { PublicCenter pubCenter = new PublicCenter(UISharedRTClient.Instance, () => { }, SessionInfo.Get().screenTopicId, SessionInfo.Get().screenDiscId ); pubCenter.Show(); pubCenter.Hide(); Task <PublicCenter.ScreenshoReports> t = pubCenter.FinalSceneScreenshots(); t.GetAwaiter().OnCompleted(() => { pubCenter.Close(); pubCenter = null; var reports = t.Result; Utils.ScreenshotPackToMetaInfo(reports, SessionInfo.Get().screenMetaInfo); Application.Current.Shutdown(); }); }; return; } lblVersion.Content = Utils2.VersionString(); DataContext = this; PrivateCenterCtx.sharedClient = sharedClient; PublicBoardCtx.sharedClient = sharedClient; avatar.pointDown = AvatarPointDown; foreach (EventViewModel evm in DaoUtils.GetRecentEvents()) { RecentEvents.Insert(0, evm); } LoginProcedures(); lstBxPlayers.ItemsSource = UsersStatus; }
public BotsViewModel(PublicCenter publicCenter) { _publicCenter = publicCenter; }
/// <summary> /// Default constructor. /// </summary> public Main() { InitializeComponent(); //special case of screenshot mode if (SessionInfo.Get().ScreenshotMode) { var discId = SessionInfo.Get().screenDiscId; PrivateCenterCtx.sharedClient = sharedClient; PublicBoardCtx.sharedClient = sharedClient; SessionInfo.Get().discussion = PrivateCenterCtx.Get().Discussion.FirstOrDefault(d => d.Id == discId); SessionInfo.Get().setPerson(PrivateCenterCtx.Get().Person.FirstOrDefault(p => p.Name == "moderator")); var loginRes = new LoginResult(); loginRes.devType = DeviceType.Wpf; loginRes.discussion = SessionInfo.Get().discussion; loginRes.person = SessionInfo.Get().person; sharedClient.start(loginRes, PrivateCenterCtx.Get().Connection.DataSource, DeviceType.Wpf); this.Hide(); sharedClient.clienRt.onJoin += () => { PublicCenter pubCenter = new PublicCenter(UISharedRTClient.Instance, () => { }, SessionInfo.Get().screenTopicId, SessionInfo.Get().screenDiscId ); pubCenter.Show(); pubCenter.Hide(); Task<PublicCenter.ScreenshoReports> t = pubCenter.FinalSceneScreenshots(); t.GetAwaiter().OnCompleted(() => { pubCenter.Close(); pubCenter = null; var reports = t.Result; Utils.ScreenshotPackToMetaInfo(reports, SessionInfo.Get().screenMetaInfo); Application.Current.Shutdown(); }); }; return; } lblVersion.Content = Utils2.VersionString(); DataContext = this; PrivateCenterCtx.sharedClient = sharedClient; PublicBoardCtx.sharedClient = sharedClient; avatar.pointDown = AvatarPointDown; foreach (EventViewModel evm in DaoUtils.GetRecentEvents()) RecentEvents.Insert(0, evm); LoginProcedures(); lstBxPlayers.ItemsSource = UsersStatus; }