public MainViewModel(IMessagerSercive service, IPackageOut pkgOut, NetSource netSource, SynchronizationContext context) { _context = context; IsLoading = true; this.messagerService = service; _Stickies = LoadAllSitcky(); _handler = SimpleIoc.Default.GetInstance <IPackageHandler[]>(); _UserMessages = new UserMessageCollection(); #if DEBUG _UserMessages = GetSampleGroup(); #endif _OnlineUsers = new UserCollection(); _ContentVistable = false; client = netSource; client.Received += Client_Received; client.ReceiveAsync(); client.Disconnected += Client_Disconnected; Out = pkgOut; User.UserName = client.Config.UserName; Out.SendUserConnect(); Task.Delay(2000).ContinueWith((task) => { Out.SendGetAllUser(); }).ContinueWith((t) => IsLoading = false); }
UserMessageCollection GetSampleGroup() { UserMessageCollection coll = new UserMessageCollection(); UserMessage g = new UserMessage(); g.UnReadCount = 4; UserInfo u = new UserInfo(); u.UserID = 1; u.UserName = "******"; UserInfo u1 = new UserInfo(); u1.UserID = 2; u1.UserName = "******"; g.User = u1; Message info = new Message(); info.Content = "String message content"; info.Type = eMessageType.Text; info.IDSender = 1; g.Messages.Add(info); info = new Message(); info.Content = "ms-appx:///Assets/nao.jpg"; info.Type = eMessageType.Image; info.IsReceived = true; info.IDSender = 1; g.Messages.Add(info); g.CurrentContent = "Current content"; coll.Add(g); return(coll); }
private void CreateCourseDom() { var d = new DomDocument<Manifest>(); ADL.SCORM.Namespaces.LoadNamespaceMappings(d); pMessages = new UserMessageCollection(); if (d.Load(this.pMessages, this.pManifestFileInfo)) { this.pManifest = d.DocumentElement; } else { throw new ApplicationException("The imsmanifet that was selected could not be loaded."); } }
private void CreateCourseDom() { var d = new DomDocument <Manifest>(); ADL.SCORM.Namespaces.LoadNamespaceMappings(d); pMessages = new UserMessageCollection(); if (d.Load(this.pMessages, this.pManifestFileInfo)) { this.pManifest = d.DocumentElement; } else { throw new ApplicationException("The imsmanifet that was selected could not be loaded."); } }