vnext
Paul Schneider 8 years ago
parent 7d384f6215
commit 9c33c32674
10 changed files with 76 additions and 11 deletions

@ -60,8 +60,10 @@
<Compile Include="Model\FileSystem\UserDirectoryInfo.cs" />
<Compile Include="Model\FileSystem\UserFileInfo.cs" />
<Compile Include="Model\Settings\SignatureSettings.cs" />
<Compile Include="Model\Social\Messaging\ChatStatus.cs" />
<Compile Include="Model\Social\Messaging\PrivateMessage.cs" />
<Compile Include="Model\Social\Chat\ChatStatus.cs" />
<Compile Include="Model\Social\Chat\ChatMessage.cs" />
<Compile Include="Model\Social\Chat\ChatUserInfo.cs" />
<Compile Include="Model\Social\Chat\Connection.cs" />
<Compile Include="Pages\Chat\PrivateChatPage.xaml.cs">
<DependentUpon>PrivateChatPage.xaml</DependentUpon>
</Compile>

@ -8,11 +8,13 @@
using NonCrUD;
using ViewModels;
using Model.Access;
using Model.Social.Chat;
public class DataManager
{
// TODO estimatetemplate rating service product tag
public RemoteEntityRO<BookQueryData, long> BookQueries { get; set; }
public RemoteEntityRO<ChatUserInfo, long> ChatUsers { get; set; }
public EstimateEntity Estimates { get; set; }
public RemoteEntity<Blog, long> Blogspot { get; set; }
internal RemoteFilesEntity RemoteFiles { get; set; }
@ -49,7 +51,9 @@
EstimateLinesTemplates = new LocalEntity<BillingLine, string>(l => l.Description);
PrivateMessages = new LocalEntity<ChatMessage, int>(m=> m.GetHashCode());
RemoteFiles = new RemoteFilesEntity ();
BlackList = new RemoteEntity<BlackListed, long>("blacklist",u => u.Id);
ChatUsers = new RemoteEntityRO<ChatUserInfo, long>
("chat/users", u => u.UserId);
PrivateMessages.Load();
BookQueries.Load();
Estimates.Load();
@ -59,6 +63,7 @@
EstimationCache.Load();
EstimateLinesTemplates.Load();
RemoteFiles.Load();
BlackList.Load();
}
}
}

@ -8,7 +8,7 @@ using Yavsc.Models;
namespace BookAStar.Model.Access
{
class BlackListed : IBlackListed
public class BlackListed : IBlackListed
{
public long Id
{

@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BookAStar.Model.Social.Messaging
{

@ -0,0 +1,33 @@

using YavscLib;
namespace BookAStar.Model.Social.Chat
{
public class ChatUserInfo : IChatUserInfo
{
public string Avatar
{
get; set;
}
public IConnection[] Connections
{
get; set;
}
public string[] Roles
{
get; set;
}
public string UserId
{
get; set;
}
public string UserName
{
get; set;
}
}
}

@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using YavscLib;
namespace BookAStar.Model.Social.Chat
{
public class Connection : IConnection
{
public bool Connected
{
get; set;
}
public string ConnectionId
{
get; set;
}
public string UserAgent
{
get; set;
}
}
}

@ -1,5 +1,5 @@
namespace Yavsc.Models
namespace Yavsc.Model
{
public partial class Tag
{

@ -18,10 +18,11 @@ namespace BookAStar.Pages.Chat
InitializeComponent();
Title = "Chat";
/*
ToolbarItems.Add(new ToolbarItem(
name: "...",
icon: null,
activated: () => { }));
activated: () => { })); */
BindingContext = new ChatViewModel();
App.ChatHubConnection.StateChanged += ChatHubConnection_StateChanged;
sendButton.Clicked += async (sender, args) =>

@ -13,10 +13,11 @@ namespace BookAStar.Pages.Chat
public PrivateChatPage()
{
InitializeComponent();
/*
ToolbarItems.Add(new ToolbarItem(
name: "...",
icon: null,
activated: () => { }));
activated: () => { }));*/
}
}
}

Loading…