Skip to content

Commit fbc0dbe

Browse files
authored
Merge pull request #11 from SyncfusionExamples/Scheduler_SampleIntegrated
Recurrence Exception Appointment sample
2 parents 35740f6 + 01a68b0 commit fbc0dbe

112 files changed

Lines changed: 5191 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

AppointmentCustomization/App.xaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<Application
2+
x:Class="AppointmentCustomization.App"
3+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
4+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
5+
xmlns:local="using:AppointmentCustomization">
6+
<Application.Resources>
7+
<ResourceDictionary>
8+
<ResourceDictionary.MergedDictionaries>
9+
<XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" />
10+
<!-- Other merged dictionaries here -->
11+
</ResourceDictionary.MergedDictionaries>
12+
<!-- Other app resources here -->
13+
</ResourceDictionary>
14+
</Application.Resources>
15+
</Application>
Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.IO;
4+
using System.Linq;
5+
using System.Runtime.InteropServices.WindowsRuntime;
6+
using Windows.ApplicationModel;
7+
using Windows.ApplicationModel.Activation;
8+
using Windows.Foundation;
9+
using Windows.Foundation.Collections;
10+
using Microsoft.UI.Xaml;
11+
using Microsoft.UI.Xaml.Controls;
12+
using Microsoft.UI.Xaml.Controls.Primitives;
13+
using Microsoft.UI.Xaml.Data;
14+
using Microsoft.UI.Xaml.Input;
15+
using Microsoft.UI.Xaml.Media;
16+
using Microsoft.UI.Xaml.Navigation;
17+
18+
// To learn more about WinUI, the WinUI project structure,
19+
// and more about our project templates, see: http://aka.ms/winui-project-info.
20+
21+
namespace AppointmentCustomization
22+
{
23+
/// <summary>
24+
/// Provides application-specific behavior to supplement the default Application class.
25+
/// </summary>
26+
sealed partial class App : Application
27+
{
28+
/// <summary>
29+
/// Initializes the singleton application object. This is the first line of authored code
30+
/// executed, and as such is the logical equivalent of main() or WinMain().
31+
/// </summary>
32+
public App()
33+
{
34+
this.InitializeComponent();
35+
#if !WinUI_Desktop
36+
this.Suspending += OnSuspending;
37+
#endif
38+
}
39+
40+
#if WinUI_Desktop
41+
/// <summary>
42+
/// Invoked when the application is launched normally by the end user. Other entry points
43+
/// will be used such as when the application is launched to open a specific file.
44+
/// </summary>
45+
/// <param name="args">Details about the launch request and process.</param>
46+
protected override void OnLaunched(Microsoft.UI.Xaml.LaunchActivatedEventArgs args)
47+
{
48+
m_window = new MainWindow();
49+
m_window.Activate();
50+
}
51+
#else
52+
/// <summary>
53+
/// Invoked when the application is launched normally by the end user. Other entry points
54+
/// will be used such as when the application is launched to open a specific file.
55+
/// </summary>
56+
/// <param name="e">Details about the launch request and process.</param>
57+
protected override void OnLaunched(Microsoft.UI.Xaml.LaunchActivatedEventArgs e)
58+
{
59+
Frame rootFrame = Window.Current.Content as Frame;
60+
61+
// Do not repeat app initialization when the Window already has content,
62+
// just ensure that the window is active
63+
if (rootFrame == null)
64+
{
65+
// Create a Frame to act as the navigation context and navigate to the first page
66+
rootFrame = new Frame();
67+
68+
rootFrame.NavigationFailed += OnNavigationFailed;
69+
70+
if (e.UWPLaunchActivatedEventArgs.PreviousExecutionState == ApplicationExecutionState.Terminated)
71+
{
72+
//TODO: Load state from previously suspended application
73+
}
74+
75+
// Place the frame in the current Window
76+
Window.Current.Content = rootFrame;
77+
}
78+
79+
if (e.UWPLaunchActivatedEventArgs.PrelaunchActivated == false)
80+
{
81+
if (rootFrame.Content == null)
82+
{
83+
// When the navigation stack isn't restored navigate to the first page,
84+
// configuring the new page by passing required information as a navigation
85+
// parameter
86+
rootFrame.Navigate(typeof(MainPage), e.Arguments);
87+
}
88+
// Ensure the current window is active
89+
Window.Current.Activate();
90+
}
91+
}
92+
93+
/// <summary>
94+
/// Invoked when Navigation to a certain page fails
95+
/// </summary>
96+
/// <param name="sender">The Frame which failed navigation</param>
97+
/// <param name="e">Details about the navigation failure</param>
98+
void OnNavigationFailed(object sender, NavigationFailedEventArgs e)
99+
{
100+
throw new Exception("Failed to load Page " + e.SourcePageType.FullName);
101+
}
102+
103+
#endif
104+
105+
#if WinUI_Desktop
106+
/// <summary>
107+
/// Invoked when application execution is being suspended. Application state is saved
108+
/// without knowing whether the application will be terminated or resumed with the contents
109+
/// of memory still intact.
110+
/// </summary>
111+
/// <param name="sender">The source of the suspend request.</param>
112+
/// <param name="e">Details about the suspend request.</param>
113+
private void OnSuspending(object sender, SuspendingEventArgs e)
114+
{
115+
// Save application state and stop any background activity
116+
}
117+
private Window m_window;
118+
#else
119+
/// <summary>
120+
/// Invoked when application execution is being suspended. Application state is saved
121+
/// without knowing whether the application will be terminated or resumed with the contents
122+
/// of memory still intact.
123+
/// </summary>
124+
/// <param name="sender">The source of the suspend request.</param>
125+
/// <param name="e">Details about the suspend request.</param>
126+
private void OnSuspending(object sender, SuspendingEventArgs e)
127+
{
128+
var deferral = e.SuspendingOperation.GetDeferral();
129+
//TODO: Save application state and stop any background activity
130+
deferral.Complete();
131+
}
132+
#endif
133+
}
134+
}
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
<PropertyGroup>
3+
<OutputType>WinExe</OutputType>
4+
<TargetFramework>net5.0-windows10.0.19041.0</TargetFramework>
5+
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
6+
<RootNamespace>AppointmentCustomization</RootNamespace>
7+
<ApplicationManifest>app.manifest</ApplicationManifest>
8+
<Platforms>x86;x64;arm64</Platforms>
9+
<RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
10+
<AssemblyName>AppointmentCustomization</AssemblyName>
11+
</PropertyGroup>
12+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|arm64'">
13+
<DefineConstants>WinUI_Desktop</DefineConstants>
14+
</PropertyGroup>
15+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x86'">
16+
<DefineConstants>WinUI_Desktop</DefineConstants>
17+
</PropertyGroup>
18+
<ItemGroup>
19+
<Compile Remove="AppointmentCustomization_Desktop\**" />
20+
<Compile Remove="Model\**" />
21+
<Compile Remove="ViewModel\**" />
22+
<EmbeddedResource Remove="AppointmentCustomization_Desktop\**" />
23+
<EmbeddedResource Remove="Model\**" />
24+
<EmbeddedResource Remove="ViewModel\**" />
25+
<None Remove="AppointmentCustomization_Desktop\**" />
26+
<None Remove="Model\**" />
27+
<None Remove="ViewModel\**" />
28+
<Page Remove="AppointmentCustomization_Desktop\**" />
29+
<Page Remove="Model\**" />
30+
<Page Remove="ViewModel\**" />
31+
</ItemGroup>
32+
<ItemGroup>
33+
<Compile Remove="MainPage.xaml.cs" />
34+
<Compile Remove="Properties\AssemblyInfo.cs" />
35+
</ItemGroup>
36+
<ItemGroup>
37+
<None Remove="AppointmentCustomization_UWP_TemporaryKey.pfx" />
38+
<None Remove="MainPage.xaml" />
39+
<None Remove="Properties\Default.rd.xml" />
40+
</ItemGroup>
41+
<ItemGroup>
42+
<Page Remove="MainPage.xaml" />
43+
</ItemGroup>
44+
<ItemGroup>
45+
<Compile Include="Model\Event.cs" />
46+
<Compile Include="ViewModel\SchedulerViewModel.cs" />
47+
</ItemGroup>
48+
49+
<ItemGroup>
50+
<FrameworkReference Update="Microsoft.Windows.SDK.NET.Ref" RuntimeFrameworkVersion="10.0.19041.13" />
51+
<PackageReference Include="Microsoft.ProjectReunion" Version="0.5.0" />
52+
<PackageReference Include="Microsoft.ProjectReunion.Foundation" Version="0.5.0" />
53+
<PackageReference Include="Microsoft.ProjectReunion.WinUI" Version="0.5.0" />
54+
<PackageReference Include="Syncfusion.Core.WinUI" Version="19.1.0.56-beta" />
55+
<PackageReference Include="Syncfusion.Editors.WinUI" Version="19.1.0.56-beta" />
56+
<PackageReference Include="Syncfusion.Scheduler.WinUI" Version="19.1.0.56-beta" />
57+
<Manifest Include="$(ApplicationManifest)" />
58+
</ItemGroup>
59+
</Project>
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 16
4+
VisualStudioVersion = 16.0.31025.218
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AppointmentCustomization_Desktop", "AppointmentCustomization_Desktop.csproj", "{0CE5398D-272F-412F-8BB2-C646E845CFFB}"
7+
EndProject
8+
Project("{C7167F0D-BC9F-4E6E-AFE1-012C56B48DB5}") = "AppointmentCustomization_Desktop (Package)", "AppointmentCustomization_Desktop\AppointmentCustomization_Desktop (Package)\AppointmentCustomization_Desktop (Package).wapproj", "{1F6456EE-6034-446B-98B6-6168E7DCC625}"
9+
EndProject
10+
Global
11+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
12+
Debug|arm64 = Debug|arm64
13+
Debug|x64 = Debug|x64
14+
Debug|x86 = Debug|x86
15+
Release|arm64 = Release|arm64
16+
Release|x64 = Release|x64
17+
Release|x86 = Release|x86
18+
EndGlobalSection
19+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
20+
{0CE5398D-272F-412F-8BB2-C646E845CFFB}.Debug|arm64.ActiveCfg = Debug|arm64
21+
{0CE5398D-272F-412F-8BB2-C646E845CFFB}.Debug|arm64.Build.0 = Debug|arm64
22+
{0CE5398D-272F-412F-8BB2-C646E845CFFB}.Debug|x64.ActiveCfg = Debug|x64
23+
{0CE5398D-272F-412F-8BB2-C646E845CFFB}.Debug|x64.Build.0 = Debug|x64
24+
{0CE5398D-272F-412F-8BB2-C646E845CFFB}.Debug|x86.ActiveCfg = Debug|x86
25+
{0CE5398D-272F-412F-8BB2-C646E845CFFB}.Debug|x86.Build.0 = Debug|x86
26+
{0CE5398D-272F-412F-8BB2-C646E845CFFB}.Release|arm64.ActiveCfg = Release|arm64
27+
{0CE5398D-272F-412F-8BB2-C646E845CFFB}.Release|arm64.Build.0 = Release|arm64
28+
{0CE5398D-272F-412F-8BB2-C646E845CFFB}.Release|x64.ActiveCfg = Release|x64
29+
{0CE5398D-272F-412F-8BB2-C646E845CFFB}.Release|x64.Build.0 = Release|x64
30+
{0CE5398D-272F-412F-8BB2-C646E845CFFB}.Release|x86.ActiveCfg = Release|x86
31+
{0CE5398D-272F-412F-8BB2-C646E845CFFB}.Release|x86.Build.0 = Release|x86
32+
{1F6456EE-6034-446B-98B6-6168E7DCC625}.Debug|arm64.ActiveCfg = Debug|arm64
33+
{1F6456EE-6034-446B-98B6-6168E7DCC625}.Debug|arm64.Build.0 = Debug|arm64
34+
{1F6456EE-6034-446B-98B6-6168E7DCC625}.Debug|arm64.Deploy.0 = Debug|arm64
35+
{1F6456EE-6034-446B-98B6-6168E7DCC625}.Debug|x64.ActiveCfg = Debug|x64
36+
{1F6456EE-6034-446B-98B6-6168E7DCC625}.Debug|x64.Build.0 = Debug|x64
37+
{1F6456EE-6034-446B-98B6-6168E7DCC625}.Debug|x64.Deploy.0 = Debug|x64
38+
{1F6456EE-6034-446B-98B6-6168E7DCC625}.Debug|x86.ActiveCfg = Debug|x86
39+
{1F6456EE-6034-446B-98B6-6168E7DCC625}.Debug|x86.Build.0 = Debug|x86
40+
{1F6456EE-6034-446B-98B6-6168E7DCC625}.Debug|x86.Deploy.0 = Debug|x86
41+
{1F6456EE-6034-446B-98B6-6168E7DCC625}.Release|arm64.ActiveCfg = Release|arm64
42+
{1F6456EE-6034-446B-98B6-6168E7DCC625}.Release|arm64.Build.0 = Release|arm64
43+
{1F6456EE-6034-446B-98B6-6168E7DCC625}.Release|arm64.Deploy.0 = Release|arm64
44+
{1F6456EE-6034-446B-98B6-6168E7DCC625}.Release|x64.ActiveCfg = Release|x64
45+
{1F6456EE-6034-446B-98B6-6168E7DCC625}.Release|x64.Build.0 = Release|x64
46+
{1F6456EE-6034-446B-98B6-6168E7DCC625}.Release|x64.Deploy.0 = Release|x64
47+
{1F6456EE-6034-446B-98B6-6168E7DCC625}.Release|x86.ActiveCfg = Release|x86
48+
{1F6456EE-6034-446B-98B6-6168E7DCC625}.Release|x86.Build.0 = Release|x86
49+
{1F6456EE-6034-446B-98B6-6168E7DCC625}.Release|x86.Deploy.0 = Release|x86
50+
EndGlobalSection
51+
GlobalSection(SolutionProperties) = preSolution
52+
HideSolutionNode = FALSE
53+
EndGlobalSection
54+
GlobalSection(ExtensibilityGlobals) = postSolution
55+
SolutionGuid = {3437222D-2D8C-4860-9700-8784D96B6901}
56+
EndGlobalSection
57+
EndGlobal
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup Condition="'$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '15.0'">
4+
<VisualStudioVersion>15.0</VisualStudioVersion>
5+
</PropertyGroup>
6+
<ItemGroup Label="ProjectConfigurations">
7+
<ProjectConfiguration Include="Debug|x86">
8+
<Configuration>Debug</Configuration>
9+
<Platform>x86</Platform>
10+
</ProjectConfiguration>
11+
<ProjectConfiguration Include="Release|x86">
12+
<Configuration>Release</Configuration>
13+
<Platform>x86</Platform>
14+
</ProjectConfiguration>
15+
<ProjectConfiguration Include="Debug|x64">
16+
<Configuration>Debug</Configuration>
17+
<Platform>x64</Platform>
18+
</ProjectConfiguration>
19+
<ProjectConfiguration Include="Release|x64">
20+
<Configuration>Release</Configuration>
21+
<Platform>x64</Platform>
22+
</ProjectConfiguration>
23+
<ProjectConfiguration Include="Debug|arm64">
24+
<Configuration>Debug</Configuration>
25+
<Platform>arm64</Platform>
26+
</ProjectConfiguration>
27+
<ProjectConfiguration Include="Release|arm64">
28+
<Configuration>Release</Configuration>
29+
<Platform>arm64</Platform>
30+
</ProjectConfiguration>
31+
</ItemGroup>
32+
<PropertyGroup>
33+
<WapProjPath Condition="'$(WapProjPath)'==''">$(MSBuildExtensionsPath)\Microsoft\DesktopBridge\</WapProjPath>
34+
<PathToXAMLWinRTImplementations>AppointmentCustomization_Desktop\</PathToXAMLWinRTImplementations>
35+
</PropertyGroup>
36+
<Import Project="$(WapProjPath)\Microsoft.DesktopBridge.props" />
37+
<PropertyGroup>
38+
<ProjectGuid>1f6456ee-6034-446b-98b6-6168e7dcc625</ProjectGuid>
39+
<TargetPlatformVersion>10.0.19041.0</TargetPlatformVersion>
40+
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
41+
<DefaultLanguage>en-US</DefaultLanguage>
42+
<AppxPackageSigningEnabled>false</AppxPackageSigningEnabled>
43+
<AppxTargetsLocation Condition="'$(AppxTargetsLocation)'==''">$(MSBuildThisFileDirectory)build\</AppxTargetsLocation>
44+
</PropertyGroup>
45+
<ItemGroup>
46+
<AppxManifest Include="Package.appxmanifest">
47+
<SubType>Designer</SubType>
48+
</AppxManifest>
49+
</ItemGroup>
50+
<ItemGroup>
51+
<Content Include="Images\SplashScreen.scale-200.png" />
52+
<Content Include="Images\LockScreenLogo.scale-200.png" />
53+
<Content Include="Images\Square150x150Logo.scale-200.png" />
54+
<Content Include="Images\Square44x44Logo.scale-200.png" />
55+
<Content Include="Images\Square44x44Logo.targetsize-24_altform-unplated.png" />
56+
<Content Include="Images\StoreLogo.png" />
57+
<Content Include="Images\Wide310x150Logo.scale-200.png" />
58+
</ItemGroup>
59+
<PropertyGroup>
60+
<!--PackageReference.GeneratePathProperty does not support NUGET_PACKAGES env var...-->
61+
<NuGetPackageRoot Condition="'$(NuGetPackageRoot)'==''">$(NUGET_PACKAGES)</NuGetPackageRoot>
62+
<NuGetPackageRoot Condition="'$(NuGetPackageRoot)'==''">$(UserProfile)\.nuget\packages</NuGetPackageRoot>
63+
<PkgMicrosoft_ProjectReunion Condition="'$(PkgMicrosoft_ProjectReunion)'==''">$([MSBuild]::NormalizeDirectory('$(NuGetPackageRoot)', 'Microsoft.ProjectReunion', '0.5.0-prerelease'))</PkgMicrosoft_ProjectReunion>
64+
<PkgMicrosoft_ProjectReunion Condition="!Exists($(PkgMicrosoft_ProjectReunion))">$(SolutionDir)packages\Microsoft.ProjectReunion.0.5.0-prerelease\</PkgMicrosoft_ProjectReunion>
65+
<PkgMicrosoft_ProjectReunion_WinUI Condition="'$(PkgMicrosoft_ProjectReunion_WinUI)'==''">$([MSBuild]::NormalizeDirectory('$(NuGetPackageRoot)', 'Microsoft.ProjectReunion.WinUI', '0.5.0-prerelease'))</PkgMicrosoft_ProjectReunion_WinUI>
66+
<PkgMicrosoft_ProjectReunion_WinUI Condition="!Exists($(PkgMicrosoft_ProjectReunion_WinUI))">$(SolutionDir)packages\Microsoft.ProjectReunion.WinUI.0.5.0-prerelease\</PkgMicrosoft_ProjectReunion_WinUI>
67+
<Microsoft_ProjectReunion_AppXReference_props>$([MSBuild]::NormalizeDirectory('$(PkgMicrosoft_ProjectReunion)', 'build'))Microsoft.ProjectReunion.AppXReference.props</Microsoft_ProjectReunion_AppXReference_props>
68+
<Microsoft_WinUI_AppX_targets>$([MSBuild]::NormalizeDirectory('$(PkgMicrosoft_ProjectReunion_WinUI)', 'build'))Microsoft.WinUI.AppX.targets</Microsoft_WinUI_AppX_targets>
69+
<EntryPointProjectUniqueName>..\..\AppointmentCustomization_Desktop.csproj</EntryPointProjectUniqueName>
70+
</PropertyGroup>
71+
<ItemGroup>
72+
<PackageReference Include="Microsoft.ProjectReunion" Version="0.5.0" GeneratePathProperty="true">
73+
<ExcludeAssets>all</ExcludeAssets>
74+
</PackageReference>
75+
<PackageReference Include="Microsoft.ProjectReunion.Foundation">
76+
<Version>0.5.0</Version>
77+
</PackageReference>
78+
<PackageReference Include="Microsoft.ProjectReunion.WinUI" Version="0.5.0" GeneratePathProperty="true">
79+
<ExcludeAssets>all</ExcludeAssets>
80+
</PackageReference>
81+
<PackageReference Include="Syncfusion.Core.WinUI">
82+
<Version>19.1.0.56-beta</Version>
83+
</PackageReference>
84+
<PackageReference Include="Syncfusion.Editors.WinUI">
85+
<Version>19.1.0.56-beta</Version>
86+
</PackageReference>
87+
<PackageReference Include="Syncfusion.Scheduler.WinUI">
88+
<Version>19.1.0.56-beta</Version>
89+
</PackageReference>
90+
</ItemGroup>
91+
<ItemGroup>
92+
<ProjectReference Include="..\..\AppointmentCustomization_Desktop.csproj">
93+
<SkipGetTargetFrameworkProperties>True</SkipGetTargetFrameworkProperties>
94+
</ProjectReference>
95+
</ItemGroup>
96+
<Import Project="$(WapProjPath)\Microsoft.DesktopBridge.targets" />
97+
<Import Project="$(Microsoft_ProjectReunion_AppXReference_props)" />
98+
<Import Project="$(Microsoft_WinUI_AppX_targets)" />
99+
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup />
4+
</Project>
Loading
Loading
Loading
Loading

0 commit comments

Comments
 (0)