Skip to content

Commit

Permalink
separate .net standard project for datepicker plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
solo-developer committed Aug 16, 2021
1 parent 1629599 commit 66999ed
Show file tree
Hide file tree
Showing 26 changed files with 55 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System.Text;
using Xamarin.Forms;

namespace Xam.Views.NepaliDatePicker.Converters
namespace Xam.Plugins.NepaliDatePicker.Converters
{
public class IntToDayNameConverter : IValueConverter
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System.Text;
using Xamarin.Forms;

namespace Xam.Views.NepaliDatePicker.Converters
namespace Xam.Plugins.NepaliDatePicker.Converters
{
public class IntToMonthNameConverter : IValueConverter
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Globalization;
using Xamarin.Forms;

namespace Xam.Views.NepaliDatePicker.Converters
namespace Xam.Plugins.NepaliDatePicker.Converters
{
public class NegateBoolConverter : IValueConverter
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Globalization;
using Xamarin.Forms;

namespace Xam.Views.NepaliDatePicker.Converters
namespace Xam.Plugins.NepaliDatePicker.Converters
{
public class SelectedDateToNameConverter : IMultiValueConverter
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using System;
using Xam.Views.NepaliDatePicker.Dto;
using Xam.Plugins.NepaliDatePicker.Dto;
using Xamarin.Forms;
using static DateConverter.Core.EnglishDate;

namespace Xam.Views.NepaliDatePicker.CustomControls
namespace Xam.Plugins.NepaliDatePicker.CustomControls
{
public class NepaliDatePickerEntry : Entry
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8" ?>
<pages:PopupPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Xam.Views.NepaliDatePicker.DatePickerPopupPage"
x:Class="Xam.Plugins.NepaliDatePicker.DatePickerPopupPage"
xmlns:pages="clr-namespace:Rg.Plugins.Popup.Pages;assembly=Rg.Plugins.Popup"
xmlns:converters="clr-namespace:Xam.Views.NepaliDatePicker.Converters"
xmlns:viewModel="clr-namespace:Xam.Views.NepaliDatePicker.ViewModel"
xmlns:converters="clr-namespace:Xam.Plugins.NepaliDatePicker.Converters"
xmlns:viewModel="clr-namespace:Xam.Plugins.NepaliDatePicker.ViewModel"
BackgroundColor="Transparent">
<ContentPage.Resources>
<ResourceDictionary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using Xam.Views.NepaliDatePicker.ViewModel;
using Xam.Plugins.NepaliDatePicker.ViewModel;
using Xamarin.Forms.Xaml;
using System;
using Xamarin.Forms;
using System.Linq;
using Xam.Views.NepaliDatePicker.Dto;
using Xam.Plugins.NepaliDatePicker.Dto;

namespace Xam.Views.NepaliDatePicker
namespace Xam.Plugins.NepaliDatePicker
{
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class DatePickerPopupPage : Rg.Plugins.Popup.Pages.PopupPage
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Xam.Views.NepaliDatePicker.Dto
namespace Xam.Plugins.NepaliDatePicker.Dto
{
public class DateDetailDto
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;

namespace Xam.Views.NepaliDatePicker.ViewModel
namespace Xam.Plugins.NepaliDatePicker.ViewModel
{
public class AvailableYear
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
using DateConverter.Core;
using DateConverter.Core.Library;
using System.Collections.ObjectModel;
using Xam.Views.NepaliDatePicker.Dto;
using Xam.Plugins.NepaliDatePicker.Dto;
using Xamarin.Forms;
using Unity;
using System.Linq;

namespace Xam.Views.NepaliDatePicker.ViewModel
namespace Xam.Plugins.NepaliDatePicker.ViewModel
{
public class DatePickerPopupViewModel : ViewModelBase
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.ComponentModel;
using System.Runtime.CompilerServices;

namespace Xam.Views.NepaliDatePicker.ViewModel
namespace Xam.Plugins.NepaliDatePicker.ViewModel
{
public abstract class ViewModelBase : INotifyPropertyChanged
{
Expand Down
19 changes: 19 additions & 0 deletions Xam.Plugins.NepaliDatePicker/Xam.Plugins.NepaliDatePicker.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Rg.Plugins.Popup" Version="2.0.0.12" />
<PackageReference Include="Unity" Version="5.11.10" />
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2012" />
</ItemGroup>

<ItemGroup>
<Compile Update="DatePickerPopupPage.xaml.cs">
<DependentUpon>%(Filename)</DependentUpon>
</Compile>
</ItemGroup>

</Project>
20 changes: 17 additions & 3 deletions Xam.Views.NepaliDatePicker.sln
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31521.260
# Visual Studio Version 16
VisualStudioVersion = 16.0.31605.320
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Xam.Views.NepaliDatePicker.Android", "Xam.Views.NepaliDatePicker.Android\Xam.Views.NepaliDatePicker.Android.csproj", "{56508DF1-89D8-4E96-9DDD-22D2C857F1E2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Xam.Views.NepaliDatePicker.iOS", "Xam.Views.NepaliDatePicker.iOS\Xam.Views.NepaliDatePicker.iOS.csproj", "{26D06287-C9A7-4902-BA73-93237D2E4988}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Xam.Views.NepaliDatePicker", "Xam.Views.NepaliDatePicker\Xam.Views.NepaliDatePicker.csproj", "{FEAAF046-45D5-4B9F-B25E-2CF0F7F38115}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Xam.Views.NepaliDatePicker", "Xam.Views.NepaliDatePicker\Xam.Views.NepaliDatePicker.csproj", "{FEAAF046-45D5-4B9F-B25E-2CF0F7F38115}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Xam.Plugins.NepaliDatePicker", "Xam.Plugins.NepaliDatePicker\Xam.Plugins.NepaliDatePicker.csproj", "{A5761B2A-3553-44BF-94F7-DE3D2F1DC23D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down Expand Up @@ -73,6 +75,18 @@ Global
{FEAAF046-45D5-4B9F-B25E-2CF0F7F38115}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{FEAAF046-45D5-4B9F-B25E-2CF0F7F38115}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{FEAAF046-45D5-4B9F-B25E-2CF0F7F38115}.Release|iPhoneSimulator.Deploy.0 = Release|Any CPU
{A5761B2A-3553-44BF-94F7-DE3D2F1DC23D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A5761B2A-3553-44BF-94F7-DE3D2F1DC23D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A5761B2A-3553-44BF-94F7-DE3D2F1DC23D}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{A5761B2A-3553-44BF-94F7-DE3D2F1DC23D}.Debug|iPhone.Build.0 = Debug|Any CPU
{A5761B2A-3553-44BF-94F7-DE3D2F1DC23D}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{A5761B2A-3553-44BF-94F7-DE3D2F1DC23D}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{A5761B2A-3553-44BF-94F7-DE3D2F1DC23D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A5761B2A-3553-44BF-94F7-DE3D2F1DC23D}.Release|Any CPU.Build.0 = Release|Any CPU
{A5761B2A-3553-44BF-94F7-DE3D2F1DC23D}.Release|iPhone.ActiveCfg = Release|Any CPU
{A5761B2A-3553-44BF-94F7-DE3D2F1DC23D}.Release|iPhone.Build.0 = Release|Any CPU
{A5761B2A-3553-44BF-94F7-DE3D2F1DC23D}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{A5761B2A-3553-44BF-94F7-DE3D2F1DC23D}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
2 changes: 1 addition & 1 deletion Xam.Views.NepaliDatePicker/MainPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Xam.Views.NepaliDatePicker.MainPage"
xmlns:CustomControls="clr-namespace:Xam.Views.NepaliDatePicker.CustomControls"
xmlns:CustomControls="clr-namespace:Xam.Plugins.NepaliDatePicker.CustomControls;assembly=Xam.Plugins.NepaliDatePicker"
BackgroundColor="LightGreen">

<StackLayout VerticalOptions="Center" HorizontalOptions="Center">
Expand Down
4 changes: 1 addition & 3 deletions Xam.Views.NepaliDatePicker/Xam.Views.NepaliDatePicker.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
</ItemGroup>

<ItemGroup>
<EmbeddedResource Update="DatePickerPopupPage.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource>
<ProjectReference Include="..\Xam.Plugins.NepaliDatePicker\Xam.Plugins.NepaliDatePicker.csproj" />
</ItemGroup>
</Project>

0 comments on commit 66999ed

Please sign in to comment.