Ground work for Wino Calendar. (#475)

Wino Calendar abstractions.
This commit is contained in:
Burak Kaan Köse
2024-11-10 23:28:25 +01:00
committed by GitHub
parent a979e8430f
commit d1d6f12f05
486 changed files with 7969 additions and 2708 deletions

View 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
{
}
}

View 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)
{
}
}
}

View 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;
}
}
}

File diff suppressed because one or more lines are too long