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\UserDirectoryInfo.cs" />
<Compile Include="Model\FileSystem\UserFileInfo.cs" /> <Compile Include="Model\FileSystem\UserFileInfo.cs" />
<Compile Include="Model\Settings\SignatureSettings.cs" /> <Compile Include="Model\Settings\SignatureSettings.cs" />
<Compile Include="Model\Social\Messaging\ChatStatus.cs" /> <Compile Include="Model\Social\Chat\ChatStatus.cs" />
<Compile Include="Model\Social\Messaging\PrivateMessage.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"> <Compile Include="Pages\Chat\PrivateChatPage.xaml.cs">
<DependentUpon>PrivateChatPage.xaml</DependentUpon> <DependentUpon>PrivateChatPage.xaml</DependentUpon>
</Compile> </Compile>

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

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

@ -1,8 +1,4 @@
using System; using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BookAStar.Model.Social.Messaging 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 public partial class Tag
{ {

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

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

Loading…