public CopyDlg(UISharedRTClient sharedClient, int topicToSelect) { InitializeComponent(); _sharedClient = sharedClient; var dId = SessionInfo.Get().discussion.Id; var disc = PrivateCenterCtx.Get().Discussion.FirstOrDefault(d0 => d0.Id == dId); var topics = disc.Topic; srcTopics = new ObservableCollection <Topic>(topics); dstTopics = new ObservableCollection <Topic>(topics); srcPoints = new ObservableCollection <ArgPoint>(); dstPoints = new ObservableCollection <ArgPoint>(); DataContext = this; //select topic that was selected in main board var selectedTopic = disc.Topic.FirstOrDefault(t0 => t0.Id == topicToSelect); lstSrcTopics.SelectedItem = selectedTopic; updateSrcPoints(selectedTopic); if (dstTopics.Count > 0) { lstDstTopics.SelectedIndex = 0; } }
public PrivateCenter3(UISharedRTClient sharedClient, Main.OnDiscFrmClosing closing) { InitializeComponent(); _closing = closing; _sharedClient = sharedClient; theBadge.Hide(); PrivateCenterCtx.DropContext(); TimingCtx.Drop(); SetListeners(true); Title2 = string.Format("{0} on {1} - private dashboard", SessionInfo.Get().person.Name, SessionInfo.Get().discussion.Subject); lstTopics.ItemsSource = TopicsOfDiscussion; lstPoints.ItemsSource = OwnArgPoints; lstOtherUsers.ItemsSource = OtherUsers; lstBadgesOfOtherUser.ItemsSource = ArgPointsOfOtherUser; lblWelcome.Content = SessionInfo.Get().person.Name; _commentDismissalRecognizer = new CommentDismissalRecognizer(bigBadgeScroller, OnDismiss); theBadge.CommentDismissalRecognizer = _commentDismissalRecognizer; initializing = true; DiscussionSelectionChanged(); initializing = false; }
private void SetListeners(UISharedRTClient sharedClient, bool doSet) { var clienRt = sharedClient.clienRt; if (clienRt == null) { return; } //explanation mode functions if (doSet) { clienRt.onBadgeViewRequest += __badgeViewEvent; clienRt.onSourceViewRequest += __sourceView; WebkitBrowserWindow.userRequestedClosing += onLocalSourceViewerClosed; ExplanationModeMediator.Inst.CloseReq += onImgViewerClosed; ExplanationModeMediator.Inst.OpenReq += onImgViewerOpened; ExplanationModeMediator.Inst.PropertyChanged += Inst_PropertyChanged; } else { clienRt.onBadgeViewRequest -= __badgeViewEvent; clienRt.onSourceViewRequest -= __sourceView; WebkitBrowserWindow.userRequestedClosing -= onLocalSourceViewerClosed; ExplanationModeMediator.Inst.CloseReq -= onImgViewerClosed; ExplanationModeMediator.Inst.OpenReq -= onImgViewerOpened; ExplanationModeMediator.Inst.PropertyChanged -= Inst_PropertyChanged; } }
private void SetListeners(UISharedRTClient sharedClient, bool doSet) { var clienRt = sharedClient.clienRt; if (clienRt == null) { return; } if (doSet) { clienRt.onlineListChanged += onlineListChanged; } else { clienRt.onlineListChanged -= onlineListChanged; } if (doSet) { clienRt.smbdLeaved += SmbdLeaved; } else { clienRt.smbdLeaved -= SmbdLeaved; } }
public void Init(UISharedRTClient sharedRt) { _sharedRt = sharedRt; SetListeners(sharedRt, true); DataContext = this; }
public SessionManagerWnd(UISharedRTClient rtClient) { InitializeComponent(); DataContext = this; this.WindowState = WindowState.Normal; _rtClient = rtClient; }
/// <summary> /// Default constructor. /// </summary> public PersonManagerWnd(UISharedRTClient sharedClient, Main.OnDiscFrmClosing closing) { InitializeComponent(); _sharedClient = sharedClient; // Add handlers for window availability events AddWindowAvailabilityHandlers(); _closing = closing; persons = new ObservableCollection <Person>(PublicBoardCtx.Get().Person); DataContext = this; this.WindowState = WindowState.Normal; }
/// <summary> /// Default constructor. /// </summary> public Dashboard(UISharedRTClient sharedClient, Main.OnDiscFrmClosing closing) { InitializeComponent(); // Add handlers for window availability events AddWindowAvailabilityHandlers(); _closing = closing; _sharedClient = sharedClient; // background.onInitNewDiscussion += onInitNewDiscussion; discussionSelector.Set(PublicBoardCtx.Get().Discussion, "Subject"); discussionSelector.onSelected += ExistingDiscussionSelected; }
private void SetListeners(UISharedRTClient sharedClient, bool doSet) { var clienRt = sharedClient.clienRt; if (clienRt == null) { return; } if (doSet) { clienRt.onlineListChanged += OnlineListChanged; } else { clienRt.onlineListChanged -= OnlineListChanged; } if (doSet) { clienRt.smbdLeaved += SmbdLeaved; } else { clienRt.smbdLeaved -= SmbdLeaved; } if (doSet) { clienRt.userAccPlusMinus += UserAccPlusMinus; } else { clienRt.userAccPlusMinus -= UserAccPlusMinus; } if (doSet) { clienRt.onStatsEvent += OnStatsEvent; } else { clienRt.onStatsEvent -= OnStatsEvent; } }
public void Init(UISharedRTClient sharedRt) { _sharedRt = sharedRt; SetListeners(sharedRt, true); if (SessionInfo.Get().discussion != null) { lblDiscussion.Content = SessionInfo.Get().discussion.Subject; } else { lblDiscussion.Content = "<NO DISCUSSION>"; } lblPlayer.Content = SessionInfo.Get().person.Name; DataContext = this; }
public PublicCenter(UISharedRTClient sharedClient, Main.OnDiscFrmClosing closing, int screenshotTopicId, int screenshotDiscussionId) { this._discussion = SessionInfo.Get().discussion; _sharedClient = sharedClient; _closing = closing; _topicId = screenshotTopicId; _discussionId = screenshotDiscussionId; InitializeComponent(); if (CurrentTopic != null) { ExplanationModeMediator.Inst.CurrentTopicId = CurrentTopic.Id; } else { ExplanationModeMediator.Inst.CurrentTopicId = null; } topicNavPanel.topicChanged += topicSelectionChanged; topicNavPanel.discussion = SessionInfo.Get().discussion; topicNavPanel.topicAnimate += TopicAnimate; btnExplanationMode.DataContext = ExplanationModeMediator.Inst; btnLaserPointer.DataContext = ExplanationModeMediator.Inst; localAccount.DataContext = SessionInfo.Get().person; _botsViewModel = new BotsViewModel(this); //btnEnlargeOpenCommentClose.DataContext = _botsViewModel; //btnEnlargeOpenAttachmentClose.DataContext = _botsViewModel; //btnSuperBotEnabled.DataContext = _botsViewModel; //btnEnlargeOpenSourceClose.DataContext = _botsViewModel; btnDEditorBotEnabled.DataContext = _botsViewModel; avaBar.Init(_sharedClient); avaBar.paletteOwnerChanged += PaletteOwnerChanged; SetListeners(_sharedClient, true); _zoomSeries = new ZoomSeriesAnalyser(OnSeriesEnd); TouchVisualizer.SetShowsVisualizations(laserScene, false); if (SessionInfo.Get().person.Name.StartsWith(DaoUtils.MODER_SUBNAME)) { startStopWatch(); } // scene.Height = 0.6 * System.Windows.SystemParameters.PrimaryScreenHeight; // inkCanv.Height = scene.Height; //var scaleTr = Matrix.Identity; //scaleTr.Translate(0, -scene.Height / 2); //scaleTr.ScaleAt(2,2, // 0.5, // 0.5); //SetWorkingAreaTransform(scaleTr, false, false, false, false); }
public StatsTrackingDbCtx(string connStr, UISharedRTClient sharedClient) : base(connStr) { this.sharedClient = sharedClient; }
public void SetRt(UISharedRTClient sharedClient) { _sharedClient = sharedClient; SetListeners(true); }