Пример #1
0
        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);
        }
Пример #2
0
        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);  
        }