12
Wino.Calendar/Services/ApplicationResourceManager.cs
Normal file
12
Wino.Calendar/Services/ApplicationResourceManager.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Wino.Calendar.Services
|
||||
{
|
||||
internal class ApplicationResourceManager
|
||||
{
|
||||
}
|
||||
}
|
||||
15
Wino.Calendar/Services/DialogService.cs
Normal file
15
Wino.Calendar/Services/DialogService.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using Windows.UI.Xaml;
|
||||
using Wino.Core.Domain.Interfaces;
|
||||
using Wino.Core.UWP.Services;
|
||||
|
||||
namespace Wino.Calendar.Services
|
||||
{
|
||||
public class DialogService : DialogServiceBase, ICalendarDialogService
|
||||
{
|
||||
public DialogService(IThemeService themeService,
|
||||
IConfigurationService configurationService,
|
||||
IApplicationResourceManager<ResourceDictionary> applicationResourceManager) : base(themeService, configurationService, applicationResourceManager)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
51
Wino.Calendar/Services/NavigationService.cs
Normal file
51
Wino.Calendar/Services/NavigationService.cs
Normal file
@@ -0,0 +1,51 @@
|
||||
using System;
|
||||
using Windows.UI.Xaml;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
using Wino.Calendar.Views;
|
||||
using Wino.Calendar.Views.Account;
|
||||
using Wino.Calendar.Views.Settings;
|
||||
using Wino.Core.Domain.Enums;
|
||||
using Wino.Core.Domain.Interfaces;
|
||||
using Wino.Core.Domain.Models.Navigation;
|
||||
using Wino.Core.UWP.Services;
|
||||
using Wino.Views;
|
||||
|
||||
namespace Wino.Calendar.Services
|
||||
{
|
||||
public class NavigationService : NavigationServiceBase, INavigationService
|
||||
{
|
||||
public Type GetPageType(WinoPage winoPage)
|
||||
{
|
||||
switch (winoPage)
|
||||
{
|
||||
case WinoPage.CalendarPage:
|
||||
return typeof(CalendarPage);
|
||||
case WinoPage.SettingsPage:
|
||||
return typeof(SettingsPage);
|
||||
case WinoPage.CalendarSettingsPage:
|
||||
return typeof(CalendarSettingsPage);
|
||||
case WinoPage.AccountManagementPage:
|
||||
return typeof(AccountManagementPage);
|
||||
default:
|
||||
throw new Exception("Page is not implemented yet.");
|
||||
}
|
||||
}
|
||||
|
||||
public bool Navigate(WinoPage page, object parameter = null, NavigationReferenceFrame frame = NavigationReferenceFrame.ShellFrame, NavigationTransitionType transition = NavigationTransitionType.None)
|
||||
{
|
||||
// All navigations are performed on shell frame for calendar.
|
||||
|
||||
if (Window.Current.Content is Frame appFrame && appFrame.Content is AppShell shellPage)
|
||||
{
|
||||
var shellFrame = shellPage.GetShellFrame();
|
||||
|
||||
var pageType = GetPageType(page);
|
||||
|
||||
shellFrame.Navigate(pageType, parameter);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
20
Wino.Calendar/Services/SettingsBuilderService.cs
Normal file
20
Wino.Calendar/Services/SettingsBuilderService.cs
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user