void userJoins(DiscUser usr) { if (usr.usrDbId == loginInfo.person.Id && wndCtx == null) { var topic = DbCtx.Get().Topic.FirstOrDefault(t0 => t0.Name.StartsWith("d-editor")); wndCtx = new EditorWndCtx(scene, inkCanv, palette, inkPalette, this,//surface window for focus fix topic.Id, topic.Discussion.Id); DataContext = this; rt.clienRt.SendInitialSceneLoadRequest(topic.Id); } }
void userJoins(DiscUser usr) { if (usr.usrDbId == loginInfo.person.Id && wndCtx == null) { var topic = DbCtx.Get().Topic.FirstOrDefault(t0 => t0.Name.StartsWith("d-editor")); wndCtx = new EditorWndCtx(scene, inkCanv, palette, inkPalette, this,//surface window for focus fix topic.Id, topic.Discussion.Id); DataContext = this; rt.clienRt.SendInitialSceneLoadRequest(topic.Id); } }
private void CreateEditCtx() { CleanupEditCtx(); avaBar.SelectCurrentUser(); editCtx = new EditorWndCtx(scene, inkCanv, palette, inkPalette, this, //surface window for focus fix _topicId != -1 ? _topicId : CurrentTopic.Id, _discussionId != -1 ? _discussionId : CurrentTopic.Discussion.Id, _shapesVisibile); editCtx.ZoomManipulator.Delta += Window_ManipulationDelta; DataContext = this; _sharedClient.clienRt.SendInitialSceneLoadRequest(_topicId != -1 ? _topicId : CurrentTopic.Id); }
private void CleanupEditCtx() { if (editCtx != null) { editCtx.ZoomManipulator.Delta -= Window_ManipulationDelta; editCtx.CleanupScene(); editCtx = null; } }