Merge branch 'vnext' of github.com:pazof/yavsc into vnext
This commit is contained in:
@ -16,6 +16,8 @@
|
|||||||
// along with yavsc. If not, see <http://www.gnu.org/licenses/>.
|
// along with yavsc. If not, see <http://www.gnu.org/licenses/>.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
using System;
|
||||||
|
|
||||||
namespace Yavsc.Models.Identity
|
namespace Yavsc.Models.Identity
|
||||||
{
|
{
|
||||||
public interface IGCMDeclaration
|
public interface IGCMDeclaration
|
||||||
@ -25,7 +27,7 @@ namespace Yavsc.Models.Identity
|
|||||||
string Model { get; set; }
|
string Model { get; set; }
|
||||||
string Platform { get; set; }
|
string Platform { get; set; }
|
||||||
string Version { get; set; }
|
string Version { get; set; }
|
||||||
|
DateTime LatestActivityUpdate { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface IGoogleCloudMobileDeclaration: IGCMDeclaration
|
public interface IGoogleCloudMobileDeclaration: IGCMDeclaration
|
||||||
|
@ -47,12 +47,15 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="IAccountBalance.cs" />
|
<Compile Include="IAccountBalance.cs" />
|
||||||
|
<Compile Include="IActivity.cs" />
|
||||||
<Compile Include="IApplicationUser.cs" />
|
<Compile Include="IApplicationUser.cs" />
|
||||||
<Compile Include="IBaseTrackedEntity.cs" />
|
<Compile Include="IBaseTrackedEntity.cs" />
|
||||||
<Compile Include="IBlog.cs" />
|
<Compile Include="IBlog.cs" />
|
||||||
<Compile Include="ICircle.cs" />
|
<Compile Include="ICircle.cs" />
|
||||||
<Compile Include="ICircleMember.cs" />
|
<Compile Include="ICircleMember.cs" />
|
||||||
|
<Compile Include="ICommandForm.cs" />
|
||||||
<Compile Include="IContact.cs" />
|
<Compile Include="IContact.cs" />
|
||||||
|
<Compile Include="ICoWorking.cs" />
|
||||||
<Compile Include="IGoogleCloudMobileDeclaration.cs" />
|
<Compile Include="IGoogleCloudMobileDeclaration.cs" />
|
||||||
<Compile Include="ILocation.cs" />
|
<Compile Include="ILocation.cs" />
|
||||||
<Compile Include="IPosition.cs" />
|
<Compile Include="IPosition.cs" />
|
||||||
|
@ -32,7 +32,6 @@ using XLabs.Platform.Services.Email;
|
|||||||
using XLabs.Platform.Services.Media;
|
using XLabs.Platform.Services.Media;
|
||||||
using XLabs.Serialization;
|
using XLabs.Serialization;
|
||||||
using XLabs.Serialization.JsonNET;
|
using XLabs.Serialization.JsonNET;
|
||||||
using Yavsc.Helpers;
|
|
||||||
using Yavsc.Models.Identity;
|
using Yavsc.Models.Identity;
|
||||||
|
|
||||||
namespace ZicMoove.Droid
|
namespace ZicMoove.Droid
|
||||||
@ -327,8 +326,8 @@ namespace ZicMoove.Droid
|
|||||||
{
|
{
|
||||||
var auth = new YaOAuth2Authenticator(
|
var auth = new YaOAuth2Authenticator(
|
||||||
clientId: Constants.APIKey,
|
clientId: Constants.APIKey,
|
||||||
clientSecret: "blouh",
|
clientSecret: Constants.APISecret,
|
||||||
scope: "profile",
|
scope: Constants.Scope,
|
||||||
authorizeUrl: new Uri(Constants.AuthorizeUrl),
|
authorizeUrl: new Uri(Constants.AuthorizeUrl),
|
||||||
redirectUrl: new Uri(Constants.RedirectUrl),
|
redirectUrl: new Uri(Constants.RedirectUrl),
|
||||||
accessTokenUrl: new Uri(Constants.AccessTokenUrl));
|
accessTokenUrl: new Uri(Constants.AccessTokenUrl));
|
||||||
@ -401,43 +400,7 @@ namespace ZicMoove.Droid
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
public IGCMDeclaration GetDeviceInfo()
|
|
||||||
{
|
|
||||||
var devinfo = CrossDeviceInfo.Current;
|
|
||||||
return new GCMRegIdDeclaration
|
|
||||||
{
|
|
||||||
DeviceId = devinfo.Id,
|
|
||||||
GCMRegistrationId = MainSettings.GoogleRegId,
|
|
||||||
Model = devinfo.Model,
|
|
||||||
Platform = devinfo.Platform.ToString(),
|
|
||||||
Version = devinfo.Version
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
[Obsolete("Use RemoteEntity to manage entities from API")]
|
|
||||||
public TAnswer InvokeApi<TAnswer>(string method, object arg)
|
|
||||||
{
|
|
||||||
using (var m =
|
|
||||||
new SimpleJsonPostMethod(
|
|
||||||
method, "Bearer " +
|
|
||||||
MainSettings.CurrentUser.YavscTokens.AccessToken
|
|
||||||
))
|
|
||||||
{
|
|
||||||
return m.Invoke<TAnswer>(arg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public object InvokeApi(string method, object arg)
|
|
||||||
{
|
|
||||||
using (var m =
|
|
||||||
new SimpleJsonPostMethod(
|
|
||||||
method, "Bearer " +
|
|
||||||
MainSettings.CurrentUser.YavscTokens.AccessToken
|
|
||||||
))
|
|
||||||
{
|
|
||||||
return m.InvokeJson(arg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public T Resolve<T>()
|
public T Resolve<T>()
|
||||||
{
|
{
|
||||||
|
@ -64,7 +64,7 @@ namespace ZicMoove.Droid
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
var senderid = MainSettings.GoogleSenderId;
|
var senderid = Constants.GoogleSenderId;
|
||||||
var token = instanceID.GetToken ( senderid,
|
var token = instanceID.GetToken ( senderid,
|
||||||
GoogleCloudMessaging.InstanceIdScope, null);
|
GoogleCloudMessaging.InstanceIdScope, null);
|
||||||
|
|
||||||
|
@ -112,8 +112,7 @@ namespace ZicMoove.Droid
|
|||||||
void SubscribeGCM ()
|
void SubscribeGCM ()
|
||||||
{
|
{
|
||||||
Context context = this.ApplicationContext;
|
Context context = this.ApplicationContext;
|
||||||
string senders = MainSettings.GoogleSenderId;
|
string senders = Constants.GoogleSenderId;
|
||||||
// Resources.GetString(GoogleSenderId);
|
|
||||||
Intent intent = new Intent ("com.google.android.c2dm.intent.REGISTER");
|
Intent intent = new Intent ("com.google.android.c2dm.intent.REGISTER");
|
||||||
intent.SetPackage ("com.google.android.gsf");
|
intent.SetPackage ("com.google.android.gsf");
|
||||||
intent.PutExtra ("app", PendingIntent.GetBroadcast (context, 0, new Intent (), 0));
|
intent.PutExtra ("app", PendingIntent.GetBroadcast (context, 0, new Intent (), 0));
|
||||||
|
@ -352,7 +352,6 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="Accounts\YavscAccountAuthenticator.cs" />
|
<Compile Include="Accounts\YavscAccountAuthenticator.cs" />
|
||||||
<Compile Include="Helpers\Settings.cs" />
|
<Compile Include="Helpers\Settings.cs" />
|
||||||
<Compile Include="Helpers\SimpleJsonPostMethod.cs" />
|
|
||||||
<Compile Include="Helpers\YavscHelpers.cs" />
|
<Compile Include="Helpers\YavscHelpers.cs" />
|
||||||
<Compile Include="Html.cs" />
|
<Compile Include="Html.cs" />
|
||||||
<Compile Include="Interfaces\IGCMessageHandler.cs" />
|
<Compile Include="Interfaces\IGCMessageHandler.cs" />
|
||||||
|
@ -32,6 +32,10 @@ namespace ZicMoove
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Model.Social;
|
using Model.Social;
|
||||||
using Settings;
|
using Settings;
|
||||||
|
using Helpers;
|
||||||
|
using Model.Auth;
|
||||||
|
using Plugin.DeviceInfo;
|
||||||
|
using Yavsc.Models.Identity;
|
||||||
|
|
||||||
public partial class App : Application // superclass new in 1.3
|
public partial class App : Application // superclass new in 1.3
|
||||||
{
|
{
|
||||||
@ -67,12 +71,10 @@ namespace ZicMoove
|
|||||||
app.Startup += OnStartup;
|
app.Startup += OnStartup;
|
||||||
app.Suspended += OnSuspended;
|
app.Suspended += OnSuspended;
|
||||||
MainSettings.UserChanged += MainSettings_UserChanged;
|
MainSettings.UserChanged += MainSettings_UserChanged;
|
||||||
CrossConnectivity.Current.ConnectivityChanged += (conSender, args) =>
|
|
||||||
{ App.IsConnected = args.IsConnected; };
|
|
||||||
SetupHubConnection();
|
SetupHubConnection();
|
||||||
MainSettings_UserChanged(this, null);
|
MainSettings_UserChanged(this, null);
|
||||||
|
StartConnexion();
|
||||||
StartConnexion();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// omg
|
// omg
|
||||||
@ -334,22 +336,7 @@ namespace ZicMoove
|
|||||||
|
|
||||||
|
|
||||||
public static INavigationService NavigationService { protected set; get; }
|
public static INavigationService NavigationService { protected set; get; }
|
||||||
public static bool isConnected;
|
public static bool IsConnected { get { return CrossConnectivity.Current.IsConnected; } }
|
||||||
public static bool IsConnected { get { return isConnected; }
|
|
||||||
private set
|
|
||||||
{
|
|
||||||
if (isConnected != value)
|
|
||||||
{
|
|
||||||
isConnected = value;
|
|
||||||
if (isConnected)
|
|
||||||
{
|
|
||||||
// TODO Start all cloud related stuff
|
|
||||||
StartConnexion();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
private static HubConnection chatHubConnection = null;
|
private static HubConnection chatHubConnection = null;
|
||||||
public static HubConnection ChatHubConnection
|
public static HubConnection ChatHubConnection
|
||||||
{
|
{
|
||||||
@ -453,11 +440,57 @@ namespace ZicMoove
|
|||||||
|
|
||||||
public static void PostDeviceInfo()
|
public static void PostDeviceInfo()
|
||||||
{
|
{
|
||||||
var info = PlatformSpecificInstance.GetDeviceInfo();
|
var info = GetDeviceInfo();
|
||||||
if (!string.IsNullOrWhiteSpace(info.GCMRegistrationId))
|
if (!string.IsNullOrWhiteSpace(info.GCMRegistrationId))
|
||||||
PlatformSpecificInstance.InvokeApi("gcm/register", info);
|
{
|
||||||
|
if (MainSettings.CurrentUser != null)
|
||||||
|
{
|
||||||
|
InvokeApi("gcm/register", info);
|
||||||
|
DataManager.Instance.Activities.Execute(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public static IGCMDeclaration GetDeviceInfo()
|
||||||
|
{
|
||||||
|
var devinfo = CrossDeviceInfo.Current;
|
||||||
|
return new GCMRegIdDeclaration
|
||||||
|
{
|
||||||
|
DeviceId = devinfo.Id,
|
||||||
|
GCMRegistrationId = MainSettings.GoogleRegId,
|
||||||
|
Model = devinfo.Model,
|
||||||
|
Platform = devinfo.Platform.ToString(),
|
||||||
|
Version = devinfo.Version,
|
||||||
|
LatestActivityUpdate = DataManager.Instance.Activities.Aggregate(
|
||||||
|
(a,b)=> a.DateModified > b.DateModified ? a : b
|
||||||
|
).DateModified
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Obsolete("Use RemoteEntity to manage entities from API")]
|
||||||
|
public async Task<TAnswer> InvokeApi<TAnswer>(string method, object arg)
|
||||||
|
{
|
||||||
|
using (var m =
|
||||||
|
new SimpleJsonPostMethod(
|
||||||
|
method, "Bearer " +
|
||||||
|
MainSettings.CurrentUser.YavscTokens.AccessToken
|
||||||
|
))
|
||||||
|
{
|
||||||
|
return await m.Invoke<TAnswer>(arg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static object InvokeApi(string method, object arg)
|
||||||
|
{
|
||||||
|
using (var m =
|
||||||
|
new SimpleJsonPostMethod(
|
||||||
|
method, "Bearer " +
|
||||||
|
MainSettings.CurrentUser.YavscTokens.AccessToken
|
||||||
|
))
|
||||||
|
{
|
||||||
|
return m.InvokeJson(arg);
|
||||||
|
}
|
||||||
|
}
|
||||||
public static void ShowBookQuery (BookQuery query)
|
public static void ShowBookQuery (BookQuery query)
|
||||||
{
|
{
|
||||||
var page = new BookQueryPage
|
var page = new BookQueryPage
|
||||||
|
@ -11,7 +11,6 @@ namespace ZicMoove
|
|||||||
{
|
{
|
||||||
|
|
||||||
public static readonly string AuthorizeUrl = YavscHomeUrl + "/authorize";
|
public static readonly string AuthorizeUrl = YavscHomeUrl + "/authorize";
|
||||||
public static readonly string RedirectUrl = YavscHomeUrl + "/oauth/success";
|
|
||||||
public static readonly string AccessTokenUrl = YavscHomeUrl + "/token";
|
public static readonly string AccessTokenUrl = YavscHomeUrl + "/token";
|
||||||
|
|
||||||
public static readonly string YavscApiUrl = YavscHomeUrl + "/api";
|
public static readonly string YavscApiUrl = YavscHomeUrl + "/api";
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
{
|
{
|
||||||
// TODO estimatetemplate rating service product tag
|
// TODO estimatetemplate rating service product tag
|
||||||
public RemoteEntityRO<BookQuery, long> BookQueries { get; set; }
|
public RemoteEntityRO<BookQuery, long> BookQueries { get; set; }
|
||||||
|
public RemoteEntityRO<Activity, string> Activities { get; set; }
|
||||||
public ChatUserCollection ChatUsers { get; set; }
|
public ChatUserCollection 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; }
|
||||||
@ -47,7 +48,6 @@
|
|||||||
BookQueries = new RemoteEntityRO<BookQuery, long>("bookquery", q => q.Id);
|
BookQueries = new RemoteEntityRO<BookQuery, long>("bookquery", q => q.Id);
|
||||||
Estimates = new EstimateEntity();
|
Estimates = new EstimateEntity();
|
||||||
Blogspot = new RemoteEntity<Blog, long>("blog", x=>x.Id);
|
Blogspot = new RemoteEntity<Blog, long>("blog", x=>x.Id);
|
||||||
|
|
||||||
Contacts = new LocalEntity<ClientProviderInfo, string>(c => c.UserId);
|
Contacts = new LocalEntity<ClientProviderInfo, string>(c => c.UserId);
|
||||||
AppState = new LocalEntity<PageState, int>(s => s.Position);
|
AppState = new LocalEntity<PageState, int>(s => s.Position);
|
||||||
EstimationCache = new LocalEntity<EditEstimateViewModel, long>(e => e.Query.Id);
|
EstimationCache = new LocalEntity<EditEstimateViewModel, long>(e => e.Query.Id);
|
||||||
@ -56,6 +56,7 @@
|
|||||||
RemoteFiles = new RemoteFilesEntity ();
|
RemoteFiles = new RemoteFilesEntity ();
|
||||||
BlackList = new RemoteEntity<BlackListed, long>("blacklist",u => u.Id);
|
BlackList = new RemoteEntity<BlackListed, long>("blacklist",u => u.Id);
|
||||||
ChatUsers = new ChatUserCollection();
|
ChatUsers = new ChatUserCollection();
|
||||||
|
Activities = new RemoteEntityRO<Activity,string>("activity",a=>a.Code);
|
||||||
PrivateMessages.Load();
|
PrivateMessages.Load();
|
||||||
BookQueries.Load();
|
BookQueries.Load();
|
||||||
Estimates.Load();
|
Estimates.Load();
|
||||||
@ -67,6 +68,7 @@
|
|||||||
RemoteFiles.Load();
|
RemoteFiles.Load();
|
||||||
BlackList.Load();
|
BlackList.Load();
|
||||||
ChatUsers.Load();
|
ChatUsers.Load();
|
||||||
|
Activities.Load();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@ using System;
|
|||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using ZicMoove;
|
using ZicMoove;
|
||||||
|
|
||||||
namespace Yavsc.Helpers
|
namespace ZicMoove.Helpers
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Simple json post method.
|
/// Simple json post method.
|
||||||
@ -46,10 +46,9 @@ namespace Yavsc.Helpers
|
|||||||
request.Method = "POST";
|
request.Method = "POST";
|
||||||
request.Accept = "application/json";
|
request.Accept = "application/json";
|
||||||
request.ContentType = "application/json";
|
request.ContentType = "application/json";
|
||||||
request.SendChunked = true;
|
|
||||||
request.TransferEncoding = "UTF-8";
|
if (authorizationHeader != null)
|
||||||
if (authorizationHeader!=null)
|
request.Headers["Authorization"] = authorizationHeader;
|
||||||
request.Headers.Add($"Authorization: {authorizationHeader}");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string BasePath { get; private set; } = Constants.YavscApiUrl;
|
public static string BasePath { get; private set; } = Constants.YavscApiUrl;
|
||||||
@ -63,21 +62,20 @@ namespace Yavsc.Helpers
|
|||||||
/// Invoke the specified query.
|
/// Invoke the specified query.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="query">Query.</param>
|
/// <param name="query">Query.</param>
|
||||||
public TAnswer Invoke<TAnswer>(object query)
|
public async Task<TAnswer> Invoke<TAnswer>(object query)
|
||||||
{
|
{
|
||||||
|
|
||||||
using (Stream streamQuery = request.GetRequestStream()) {
|
using (Stream streamQuery = await request.GetRequestStreamAsync()) {
|
||||||
using (StreamWriter writer = new StreamWriter(streamQuery)) {
|
using (StreamWriter writer = new StreamWriter(streamQuery)) {
|
||||||
writer.Write (JsonConvert.SerializeObject(query));
|
writer.Write (JsonConvert.SerializeObject(query));
|
||||||
}}
|
}}
|
||||||
TAnswer ans = default (TAnswer);
|
TAnswer ans = default (TAnswer);
|
||||||
using (WebResponse response = request.GetResponse ()) {
|
using (WebResponse response = await request.GetResponseAsync ()) {
|
||||||
using (Stream responseStream = response.GetResponseStream ()) {
|
using (Stream responseStream = response.GetResponseStream ()) {
|
||||||
using (StreamReader rdr = new StreamReader (responseStream)) {
|
using (StreamReader rdr = new StreamReader (responseStream)) {
|
||||||
ans = (TAnswer) JsonConvert.DeserializeObject<TAnswer> (rdr.ReadToEnd ());
|
ans = (TAnswer) JsonConvert.DeserializeObject<TAnswer> (rdr.ReadToEnd ());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
response.Close();
|
|
||||||
}
|
}
|
||||||
return ans;
|
return ans;
|
||||||
}
|
}
|
||||||
@ -88,31 +86,30 @@ namespace Yavsc.Helpers
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
using (Stream streamQuery = request.GetRequestStream())
|
using (Stream streamQuery = await request.GetRequestStreamAsync())
|
||||||
{
|
{
|
||||||
using (StreamWriter writer = new StreamWriter(streamQuery))
|
using (StreamWriter writer = new StreamWriter(streamQuery))
|
||||||
{
|
{
|
||||||
writer.Write(JsonConvert.SerializeObject(query));
|
writer.Write(JsonConvert.SerializeObject(query));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
using (WebResponse response = request.GetResponse())
|
using (WebResponse response = await request.GetResponseAsync())
|
||||||
{
|
{
|
||||||
using (Stream stream = response.GetResponseStream())
|
using (Stream stream = response.GetResponseStream())
|
||||||
{
|
{
|
||||||
if (stream.Length > 0)
|
if (stream.Length > 0)
|
||||||
jsonDoc = await Task.Run(() => JsonObject.Load(stream));
|
jsonDoc = await Task.Run(() => JsonObject.Load(stream));
|
||||||
}
|
}
|
||||||
response.Close();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (WebException ex)
|
catch (WebException ex)
|
||||||
{
|
{
|
||||||
// TODO err logging
|
// TODO err logging
|
||||||
Debug.Print($"Web request failed: {request.ToString()}\n" + ex.ToString());
|
Debug.WriteLine($"Web request failed: {request.ToString()}\n" + ex.ToString());
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
Debug.Print($"Web request failed: {request.ToString()}\n" + ex.ToString());
|
Debug.WriteLine($"Web request failed: {request.ToString()}\n" + ex.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
return jsonDoc;
|
return jsonDoc;
|
@ -17,12 +17,6 @@ namespace ZicMoove.Interfaces
|
|||||||
void AddAccount();
|
void AddAccount();
|
||||||
|
|
||||||
void RevokeAccount(string userName);
|
void RevokeAccount(string userName);
|
||||||
|
|
||||||
IGCMDeclaration GetDeviceInfo();
|
|
||||||
|
|
||||||
TAnswer InvokeApi<TAnswer>(string method, object arg);
|
|
||||||
|
|
||||||
object InvokeApi(string method, object arg);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,6 +15,9 @@ namespace ZicMoove.Model.Auth
|
|||||||
public string GCMRegistrationId
|
public string GCMRegistrationId
|
||||||
{ get; set; }
|
{ get; set; }
|
||||||
|
|
||||||
|
public DateTime LatestActivityUpdate
|
||||||
|
{ get; set; }
|
||||||
|
|
||||||
public string Model
|
public string Model
|
||||||
{ get; set; }
|
{ get; set; }
|
||||||
|
|
||||||
|
@ -1,63 +0,0 @@
|
|||||||
using ZicMoove.Model.Social;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Collections.ObjectModel;
|
|
||||||
using System.Windows.Input;
|
|
||||||
|
|
||||||
namespace ZicMoove
|
|
||||||
{
|
|
||||||
[Obsolete("Use Helpers.DataManager")]
|
|
||||||
public static class Manager
|
|
||||||
{
|
|
||||||
static Manager ()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public static ICommand RefreshBookQueries;
|
|
||||||
// TODO WIP TEST rop this
|
|
||||||
private static Location[] _places = new Location[] {
|
|
||||||
new Location { Latitude = 48.8626458, Longitude = 2.2065559, Address = "2 bd Aristide Briand - Suresnes" },
|
|
||||||
new Location{ Latitude =48.8632757, Longitude =2.2023099, Address ="Théatre Jean Villard - Suresnes" },
|
|
||||||
new Location{ Latitude =48.8647120, Longitude =2.2054588,Address = "Place de la Paix - Suresnes" },
|
|
||||||
new Location{ Latitude =48.8640133, Longitude =2.2056573, Address ="Restaurant" },
|
|
||||||
new Location{ Latitude =48.8634839, Longitude =2.2064137,Address = "Square" },
|
|
||||||
new Location{ Latitude =48.8653649, Longitude =2.2014945,Address = "Stade de foot" },
|
|
||||||
};
|
|
||||||
// TODO WIP TEST rop this
|
|
||||||
private static ObservableCollection<LocalizedEvent> _your_events = new ObservableCollection<LocalizedEvent> {
|
|
||||||
new LocalizedEvent {
|
|
||||||
|
|
||||||
Title = "Yavsc Party",
|
|
||||||
Description = "Lancement en fanfare de la version 1.0 de ZicMoove, l'appli des fétards",
|
|
||||||
ProviderId = "paul",
|
|
||||||
ProviderName = "Yavsc Fondation",
|
|
||||||
EventWebPage = "http://lua.pschneider.fr/",
|
|
||||||
Location = _places[0]
|
|
||||||
},
|
|
||||||
new LocalizedEvent {
|
|
||||||
Title = "Evenement de test",
|
|
||||||
Description = "Blah bli lo qui est errare, ma no. Blou test allo 3!",
|
|
||||||
ProviderId = "provid3",
|
|
||||||
ProviderName = "Prov Entreprise 3",
|
|
||||||
EventWebPage = "http://lua.pschneider.fr/events/test3",
|
|
||||||
Location = _places[1]
|
|
||||||
},
|
|
||||||
new LocalizedEvent {
|
|
||||||
Title = "DjFx feat XamCoder, en Concert gratuit",
|
|
||||||
Description = "Hip Hop à Suresnes",
|
|
||||||
ProviderId = "brahim",
|
|
||||||
ProviderName = "Totem Production",
|
|
||||||
EventWebPage = "http://lua.pschneider.fr/events/totem",
|
|
||||||
Location = _places[2]
|
|
||||||
}
|
|
||||||
};
|
|
||||||
// TODO WIP TEST rop this
|
|
||||||
public static ObservableCollection<LocalizedEvent> Events {
|
|
||||||
get {
|
|
||||||
return _your_events;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
65
ZicMoove/ZicMoove/Model/Workflow/Activity.cs
Normal file
65
ZicMoove/ZicMoove/Model/Workflow/Activity.cs
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
using System;
|
||||||
|
using YavscLib;
|
||||||
|
|
||||||
|
namespace ZicMoove.Model.Workflow
|
||||||
|
{
|
||||||
|
public class Activity : IActivity
|
||||||
|
{
|
||||||
|
public string Code
|
||||||
|
{
|
||||||
|
get; set;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DateTime DateCreated
|
||||||
|
{
|
||||||
|
get; set;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DateTime DateModified
|
||||||
|
{
|
||||||
|
get; set;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string ModeratorGroupName
|
||||||
|
{
|
||||||
|
get; set;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string Name
|
||||||
|
{
|
||||||
|
get; set;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string ParentCode
|
||||||
|
{
|
||||||
|
get; set;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string Photo
|
||||||
|
{
|
||||||
|
get; set;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int Rate
|
||||||
|
{
|
||||||
|
get; set;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string SettingsClassName
|
||||||
|
{
|
||||||
|
get; set;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string UserCreated
|
||||||
|
{
|
||||||
|
get; set;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string UserModified
|
||||||
|
{
|
||||||
|
get; set;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CommandForm[] Forms { get; set; }
|
||||||
|
}
|
||||||
|
}
|
32
ZicMoove/ZicMoove/Model/Workflow/CommandForm.cs
Normal file
32
ZicMoove/ZicMoove/Model/Workflow/CommandForm.cs
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using YavscLib;
|
||||||
|
|
||||||
|
namespace ZicMoove.Model.Workflow
|
||||||
|
{
|
||||||
|
public class CommandForm : ICommandForm
|
||||||
|
{
|
||||||
|
public string Action
|
||||||
|
{
|
||||||
|
get; set;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string ActivityCode
|
||||||
|
{
|
||||||
|
get; set;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long Id
|
||||||
|
{
|
||||||
|
get; set;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string Title
|
||||||
|
{
|
||||||
|
get; set;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -43,7 +43,6 @@ namespace ZicMoove.Settings
|
|||||||
string.Empty;
|
string.Empty;
|
||||||
private static readonly bool PushNotificationsDefault = false;
|
private static readonly bool PushNotificationsDefault = false;
|
||||||
|
|
||||||
public static readonly string GoogleSenderId = "325408689282";
|
|
||||||
|
|
||||||
private const string MusicalKey = "musical_prefs";
|
private const string MusicalKey = "musical_prefs";
|
||||||
private const string EnvironKey = "environ_prefs";
|
private const string EnvironKey = "environ_prefs";
|
||||||
|
@ -67,6 +67,7 @@
|
|||||||
<Compile Include="Data\ApiCallFailedException.cs" />
|
<Compile Include="Data\ApiCallFailedException.cs" />
|
||||||
<Compile Include="Data\EstimateEntity.cs" />
|
<Compile Include="Data\EstimateEntity.cs" />
|
||||||
<Compile Include="Data\NonCrUD\RemoteFiles.cs" />
|
<Compile Include="Data\NonCrUD\RemoteFiles.cs" />
|
||||||
|
<Compile Include="Helpers\SimpleJsonPostMethod.cs" />
|
||||||
<Compile Include="Model\Access\BlackListed.cs" />
|
<Compile Include="Model\Access\BlackListed.cs" />
|
||||||
<Compile Include="Model\Auth\GCRegIdDeclaration.cs" />
|
<Compile Include="Model\Auth\GCRegIdDeclaration.cs" />
|
||||||
<Compile Include="Model\Booking\MusicalPreference.cs" />
|
<Compile Include="Model\Booking\MusicalPreference.cs" />
|
||||||
@ -77,6 +78,8 @@
|
|||||||
<Compile Include="Model\Social\Chat\ChatStatus.cs" />
|
<Compile Include="Model\Social\Chat\ChatStatus.cs" />
|
||||||
<Compile Include="Model\Social\Chat\ChatMessage.cs" />
|
<Compile Include="Model\Social\Chat\ChatMessage.cs" />
|
||||||
<Compile Include="Model\Social\LocationType.cs" />
|
<Compile Include="Model\Social\LocationType.cs" />
|
||||||
|
<Compile Include="Model\Workflow\Activity.cs" />
|
||||||
|
<Compile Include="Model\Workflow\CommandForm.cs" />
|
||||||
<Compile Include="Pages\ClientPages\SearchPage.xaml.cs">
|
<Compile Include="Pages\ClientPages\SearchPage.xaml.cs">
|
||||||
<DependentUpon>SearchPage.xaml</DependentUpon>
|
<DependentUpon>SearchPage.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
@ -180,7 +183,6 @@
|
|||||||
<Compile Include="Model\Booking\BookQuery.cs" />
|
<Compile Include="Model\Booking\BookQuery.cs" />
|
||||||
<Compile Include="Model\Market\BaseProduct.cs" />
|
<Compile Include="Model\Market\BaseProduct.cs" />
|
||||||
<Compile Include="Pages\EstimatePages\BillingLine.cs" />
|
<Compile Include="Pages\EstimatePages\BillingLine.cs" />
|
||||||
<Compile Include="Model\Manager.cs" />
|
|
||||||
<Compile Include="Model\Auth\MobileAppDeclaration.cs" />
|
<Compile Include="Model\Auth\MobileAppDeclaration.cs" />
|
||||||
<Compile Include="Model\Auth\passwrecovery.cs" />
|
<Compile Include="Model\Auth\passwrecovery.cs" />
|
||||||
<Compile Include="Model\Social\Calendar\OpenDay.cs" />
|
<Compile Include="Model\Social\Calendar\OpenDay.cs" />
|
||||||
@ -300,6 +302,12 @@
|
|||||||
<Reference Include="Plugin.Connectivity.Abstractions">
|
<Reference Include="Plugin.Connectivity.Abstractions">
|
||||||
<HintPath>..\..\packages\Xam.Plugin.Connectivity.2.2.12\lib\MonoAndroid10\Plugin.Connectivity.Abstractions.dll</HintPath>
|
<HintPath>..\..\packages\Xam.Plugin.Connectivity.2.2.12\lib\MonoAndroid10\Plugin.Connectivity.Abstractions.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="Plugin.DeviceInfo">
|
||||||
|
<HintPath>..\..\packages\Xam.Plugin.DeviceInfo.2.0.2\lib\portable-net45+wp8+wpa81+win8+MonoAndroid10+MonoTouch10+Xamarin.iOS10+UAP10\Plugin.DeviceInfo.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Plugin.DeviceInfo.Abstractions">
|
||||||
|
<HintPath>..\..\packages\Xam.Plugin.DeviceInfo.2.0.2\lib\portable-net45+wp8+wpa81+win8+MonoAndroid10+MonoTouch10+Xamarin.iOS10+UAP10\Plugin.DeviceInfo.Abstractions.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="Plugin.Geolocator">
|
<Reference Include="Plugin.Geolocator">
|
||||||
<HintPath>..\..\packages\Xam.Plugin.Geolocator.3.0.4\lib\portable-net45+wp8+wpa81+win8+MonoAndroid10+MonoTouch10+Xamarin.iOS10+UAP10\Plugin.Geolocator.dll</HintPath>
|
<HintPath>..\..\packages\Xam.Plugin.Geolocator.3.0.4\lib\portable-net45+wp8+wpa81+win8+MonoAndroid10+MonoTouch10+Xamarin.iOS10+UAP10\Plugin.Geolocator.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
@ -328,6 +336,9 @@
|
|||||||
<HintPath>..\..\packages\SQLite.Net-PCL.3.1.1\lib\portable-win8+net45+wp8+wpa81+MonoAndroid1+MonoTouch1\SQLite.Net.dll</HintPath>
|
<HintPath>..\..\packages\SQLite.Net-PCL.3.1.1\lib\portable-win8+net45+wp8+wpa81+MonoAndroid1+MonoTouch1\SQLite.Net.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="System.Json">
|
||||||
|
<HintPath>..\..\..\..\..\..\..\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Json.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="System.Net.Http.Extensions, Version=1.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="System.Net.Http.Extensions, Version=1.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\..\packages\Microsoft.Net.Http.2.2.29\lib\portable-net45+win8+wpa81\System.Net.Http.Extensions.dll</HintPath>
|
<HintPath>..\..\packages\Microsoft.Net.Http.2.2.29\lib\portable-net45+win8+wpa81\System.Net.Http.Extensions.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
|
Reference in New Issue
Block a user