refactoring
This commit is contained in:
parent
71f0d756b3
commit
d327f4d77e
18 changed files with 91 additions and 96 deletions
|
|
@ -1,34 +0,0 @@
|
|||
//
|
||||
// UserPrefs.cs
|
||||
//
|
||||
// Author:
|
||||
// Paul Schneider <paulschneider@free.fr>
|
||||
//
|
||||
// Copyright (c) 2015 Paul Schneider
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Lesser General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
using System;
|
||||
using System.Web.Http;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Yavsc.ApiControllers.Calendar.Model
|
||||
{
|
||||
class UserPrefs
|
||||
{
|
||||
Circle [] Circles { get; set ; }
|
||||
Dictionary<string,double> EventTypeRatings { get; set; }
|
||||
Dictionary<string,double> LocationTypeRatings { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -20,17 +20,15 @@
|
|||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
using System;
|
||||
using System.Web.Http;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Yavsc.ApiControllers.Calendar.Model;
|
||||
using Yavsc.Helpers;
|
||||
using System.ComponentModel;
|
||||
using Yavsc.Model;
|
||||
using Yavsc.Model.RolesAndMembers;
|
||||
using System.Web.Security;
|
||||
using System.Web.Profile;
|
||||
using System.Web.Http.ModelBinding;
|
||||
using Yavsc.Model.Google;
|
||||
using Yavsc.Helpers;
|
||||
using System.Web.Profile;
|
||||
|
||||
namespace Yavsc.ApiControllers.Calendar
|
||||
|
||||
namespace Yavsc.ApiControllers
|
||||
{
|
||||
/// <summary>
|
||||
/// Night flash controller.
|
||||
|
|
@ -139,42 +137,7 @@ namespace Yavsc.ApiControllers.Calendar
|
|||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// GCM register model.
|
||||
/// </summary>
|
||||
public class GCMRegisterModel {
|
||||
/// <summary>
|
||||
/// Gets or sets the name of the user.
|
||||
/// </summary>
|
||||
/// <value>The name of the user.</value>
|
||||
[Localizable(true)]
|
||||
[Display(ResourceType=typeof(LocalizedText),Name="UserName")]
|
||||
[Required(ErrorMessage = "S'il vous plait, entrez un nom d'utilisateur")]
|
||||
public string UserName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the password.
|
||||
/// </summary>
|
||||
/// <value>The password.</value>
|
||||
[DisplayName("Mot de passe")]
|
||||
[Required(ErrorMessage = "S'il vous plait, entez un mot de passe")]
|
||||
public string Password { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the email.
|
||||
/// </summary>
|
||||
/// <value>The email.</value>
|
||||
[DisplayName("Adresse e-mail")]
|
||||
[Required(ErrorMessage = "S'il vous plait, entrez un e-mail valide")]
|
||||
public string Email { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the registration identifier against Google Clood Messaging and their info on this application.
|
||||
/// </summary>
|
||||
/// <value>The registration identifier.</value>
|
||||
public string RegistrationId { get; set; }
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Registers with push notifications enabled.
|
||||
|
|
@ -123,8 +123,6 @@
|
|||
<Folder Include="Views\PayPal\" />
|
||||
<Folder Include="ApiControllers\" />
|
||||
<Folder Include="Views\Modules\" />
|
||||
<Folder Include="ApiControllers\Calendar\" />
|
||||
<Folder Include="ApiControllers\Calendar\Model\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Controllers\HomeController.cs" />
|
||||
|
|
@ -181,22 +179,8 @@
|
|||
<Compile Include="IValueProvider.cs" />
|
||||
<Compile Include="Formatters\EstimToPdfFormatter.MSAN.cs" />
|
||||
<Compile Include="Helpers\TemplateException.cs" />
|
||||
<Compile Include="ApiControllers\Calendar\Model\OpenDay.cs" />
|
||||
<Compile Include="ApiControllers\Calendar\Model\Period.cs" />
|
||||
<Compile Include="ApiControllers\Calendar\Model\Periodicity.cs" />
|
||||
<Compile Include="ApiControllers\Calendar\Model\Position.cs" />
|
||||
<Compile Include="ApiControllers\Calendar\Model\PositionAndKeyphrase.cs" />
|
||||
<Compile Include="ApiControllers\Calendar\Model\ProvidedEvent.cs" />
|
||||
<Compile Include="ApiControllers\Calendar\Model\Publishing.cs" />
|
||||
<Compile Include="ApiControllers\Calendar\Model\Schedule.cs" />
|
||||
<Compile Include="ApiControllers\Calendar\Model\ProviderPublicInfo.cs" />
|
||||
<Compile Include="ApiControllers\Calendar\Model\WeekDay.cs" />
|
||||
<Compile Include="ApiControllers\Calendar\CalendarController.cs" />
|
||||
<Compile Include="ApiControllers\Calendar\Model\YaEvent.cs" />
|
||||
<Compile Include="ApiControllers\Calendar\Model\Circle.cs" />
|
||||
<Compile Include="ApiControllers\Calendar\Model\EventPub.cs" />
|
||||
<Compile Include="ApiControllers\Calendar\Model\UserPrefs.cs" />
|
||||
<Compile Include="Helpers\MarkdownHelper.cs" />
|
||||
<Compile Include="ApiControllers\CalendarController.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Views\Web.config" />
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ using System.Web.Http;
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using Yavsc.ApiControllers.Calendar.Model;
|
||||
using Yavsc.Model;
|
||||
using Yavsc.Model.RolesAndMembers;
|
||||
|
||||
namespace Yavsc.ApiControllers.Calendar.Model
|
||||
{
|
||||
|
|
@ -22,6 +22,7 @@
|
|||
using System;
|
||||
using System.Web.Http;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Yavsc.Model.RolesAndMembers;
|
||||
|
||||
namespace Yavsc.ApiControllers.Calendar.Model
|
||||
{
|
||||
65
yavscModel/Google/GCMRegisterModel.cs
Normal file
65
yavscModel/Google/GCMRegisterModel.cs
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
//
|
||||
// GCMRegisterModel.cs
|
||||
//
|
||||
// Author:
|
||||
// paul <>
|
||||
//
|
||||
// Copyright (c) 2015 paul
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Lesser General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Yavsc.Model.Google
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// GCM register model.
|
||||
/// </summary>
|
||||
public class GCMRegisterModel {
|
||||
/// <summary>
|
||||
/// Gets or sets the name of the user.
|
||||
/// </summary>
|
||||
/// <value>The name of the user.</value>
|
||||
[Localizable(true)]
|
||||
[Display(ResourceType=typeof(LocalizedText),Name="UserName")]
|
||||
[Required(ErrorMessage = "S'il vous plait, entrez un nom d'utilisateur")]
|
||||
public string UserName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the password.
|
||||
/// </summary>
|
||||
/// <value>The password.</value>
|
||||
[DisplayName("Mot de passe")]
|
||||
[Required(ErrorMessage = "S'il vous plait, entez un mot de passe")]
|
||||
public string Password { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the email.
|
||||
/// </summary>
|
||||
/// <value>The email.</value>
|
||||
[DisplayName("Adresse e-mail")]
|
||||
[Required(ErrorMessage = "S'il vous plait, entrez un e-mail valide")]
|
||||
public string Email { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the registration identifier against Google Clood Messaging and their info on this application.
|
||||
/// </summary>
|
||||
/// <value>The registration identifier.</value>
|
||||
public string RegistrationId { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -23,7 +23,7 @@ using System.Web.Http;
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Yavsc.ApiControllers.Calendar.Model
|
||||
namespace Yavsc.Model.RolesAndMembers
|
||||
{
|
||||
/// <summary>
|
||||
/// Circle.
|
||||
|
|
@ -22,8 +22,9 @@
|
|||
using System;
|
||||
using System.Web.Http;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Yavsc.ApiControllers.Calendar.Model;
|
||||
|
||||
namespace Yavsc.ApiControllers.Calendar.Model
|
||||
namespace Yavsc.Model.RolesAndMembers
|
||||
{
|
||||
/// <summary>
|
||||
/// Provider public info.
|
||||
|
|
@ -23,7 +23,7 @@ using System;
|
|||
using System.Web.Http;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Yavsc.ApiControllers.Calendar.Model
|
||||
namespace Yavsc.Model.RolesAndMembers
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -147,6 +147,20 @@
|
|||
<Compile Include="Google\Messaging\MessageWithPayLoad.cs" />
|
||||
<Compile Include="Google\Messaging\MessageWithPayloadResponse.cs" />
|
||||
<Compile Include="Google\Messaging\Notification.cs" />
|
||||
<Compile Include="Calendar\EventPub.cs" />
|
||||
<Compile Include="Calendar\OpenDay.cs" />
|
||||
<Compile Include="Calendar\Period.cs" />
|
||||
<Compile Include="Calendar\Periodicity.cs" />
|
||||
<Compile Include="Calendar\Position.cs" />
|
||||
<Compile Include="Calendar\PositionAndKeyphrase.cs" />
|
||||
<Compile Include="Calendar\ProvidedEvent.cs" />
|
||||
<Compile Include="Calendar\Schedule.cs" />
|
||||
<Compile Include="Calendar\WeekDay.cs" />
|
||||
<Compile Include="Calendar\YaEvent.cs" />
|
||||
<Compile Include="RolesAndMemebers\Circle.cs" />
|
||||
<Compile Include="RolesAndMemebers\Publishing.cs" />
|
||||
<Compile Include="RolesAndMemebers\ProviderPublicInfo.cs" />
|
||||
<Compile Include="Google\GCMRegisterModel.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<ItemGroup>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue