Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename CppUnpackagedAppNotifications to CppAppNotifications #247

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<!-- Copyright (c) Microsoft Corporation.
Licensed under the MIT License. -->
<Application
x:Class="CppUnpackagedAppNotifications.App"
x:Class="CppAppNotifications.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:CppUnpackagedAppNotifications">
xmlns:local="using:CppAppNotifications">

<Application.Resources>
<!-- Application-specific resources -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace winrt
// instance variable goes out of scope, i.e.: when the App is terminated.
static NotificationManager g_notificationManager;

namespace winrt::CppUnpackagedAppNotifications::implementation
namespace winrt::CppAppNotifications::implementation
{
static App* app{ nullptr };

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "App.xaml.g.h"
#include "pch.h"

namespace winrt::CppUnpackagedAppNotifications::implementation
namespace winrt::CppAppNotifications::implementation
{
struct App : AppT<App>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<CppWinRTRootNamespaceAutoMerge>true</CppWinRTRootNamespaceAutoMerge>
<MinimalCoreWin>true</MinimalCoreWin>
<ProjectGuid>{ba5623de-515a-4d7e-9110-38d1641f5fe0}</ProjectGuid>
<ProjectName>CppUnpackagedAppNotifications</ProjectName>
<RootNamespace>CppUnpackagedAppNotifications</RootNamespace>
<ProjectName>CppAppNotifications</ProjectName>
<RootNamespace>CppAppNotifications</RootNamespace>
<!--
$(TargetName) should be same as $(RootNamespace) so that the produced binaries (.exe/.pri/etc.)
have a name that matches the .winmd
Expand All @@ -23,7 +23,7 @@
<WindowsPackageType>None</WindowsPackageType>
<ApplicationTypeRevision>10.0</ApplicationTypeRevision>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformMinVersion>10.0.17763.0</WindowsTargetPlatformMinVersion>
<WindowsTargetPlatformMinVersion>10.0.22000.0</WindowsTargetPlatformMinVersion>
<UseWinUI>true</UseWinUI>
<EnablePreviewMsixTooling>true</EnablePreviewMsixTooling>
</PropertyGroup>
Expand Down Expand Up @@ -56,7 +56,7 @@
</ItemGroup>
<PropertyGroup Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<DesktopCompatible>true</DesktopCompatible>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,4 @@
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
</Project>
</Project>
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<!-- Copyright (c) Microsoft Corporation.
Licensed under the MIT License. -->
<Page
x:Class="CppUnpackagedAppNotifications.MainPage"
x:Class="CppAppNotifications.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:CppUnpackagedAppNotifications"
xmlns:local="using:CppAppNotifications"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ namespace winrt
using namespace Windows::UI::Xaml::Interop;
}

namespace winrt::CppUnpackagedAppNotifications::implementation
namespace winrt::CppAppNotifications::implementation
{
CppUnpackagedAppNotifications::MainPage MainPage::current{ nullptr };
CppAppNotifications::MainPage MainPage::current{ nullptr };

MainPage::MainPage()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
#pragma once
#include "MainPage.g.h"

namespace winrt::CppUnpackagedAppNotifications::implementation
namespace winrt::CppAppNotifications::implementation
{
struct MainPage : MainPageT<MainPage>
{
MainPage();
static CppUnpackagedAppNotifications::MainPage Current() { return current; }
static Windows::Foundation::Collections::IVector<CppUnpackagedAppNotifications::Scenario> Scenarios() { return scenariosInner; }
static CppAppNotifications::MainPage Current() { return current; }
static Windows::Foundation::Collections::IVector<CppAppNotifications::Scenario> Scenarios() { return scenariosInner; }
void NotificationReceived(Notification const& notification);
void NotifyUser(hstring const& strMessage, Microsoft::UI::Xaml::Controls::InfoBarSeverity const& severity);
void UpdateStatus(hstring const& strMessage, Microsoft::UI::Xaml::Controls::InfoBarSeverity severity);
Expand All @@ -22,15 +22,15 @@ namespace winrt::CppUnpackagedAppNotifications::implementation

private:
static Windows::Foundation::Collections::IVector<Scenario> scenariosInner;
static CppUnpackagedAppNotifications::MainPage current;
static CppAppNotifications::MainPage current;

void NavView_NavigateToPage(winrt::Windows::UI::Xaml::Interop::TypeName const& pageType);

Windows::Foundation::Collections::IVector<IInspectable> messages;
};
}

namespace winrt::CppUnpackagedAppNotifications::factory_implementation
namespace winrt::CppAppNotifications::factory_implementation
{
struct MainPage : MainPageT<MainPage, implementation::MainPage>
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<!-- Copyright (c) Microsoft Corporation.
Licensed under the MIT License. -->
<Window
x:Class="CppUnpackagedAppNotifications.MainWindow"
x:Class="CppAppNotifications.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:CppUnpackagedAppNotifications"
xmlns:local="using:CppAppNotifications"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ namespace winrt
using namespace Microsoft::UI::Xaml;
}

namespace winrt::CppUnpackagedAppNotifications::implementation
namespace winrt::CppAppNotifications::implementation
{
MainWindow::MainWindow()
{
InitializeComponent();

Title(winrt::CppUnpackagedAppNotifications::SampleConfig::FeatureName);
Title(winrt::CppAppNotifications::SampleConfig::FeatureName);

HWND hwnd = GetWindowHandle();
LoadIcon(hwnd, L"Assets/windows-sdk.ico");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "MainWindow.g.h"
#include "pch.h"

namespace winrt::CppUnpackagedAppNotifications::implementation
namespace winrt::CppAppNotifications::implementation
{
struct MainWindow : MainWindowT<MainWindow>
{
Expand All @@ -21,7 +21,7 @@ namespace winrt::CppUnpackagedAppNotifications::implementation
};
}

namespace winrt::CppUnpackagedAppNotifications::factory_implementation
namespace winrt::CppAppNotifications::factory_implementation
{
struct MainWindow : MainWindowT<MainWindow, implementation::MainWindow>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace winrt
{
using namespace Microsoft::UI::Xaml::Controls;
using namespace Microsoft::Windows::AppNotifications;
using namespace CppUnpackagedAppNotifications::implementation;
using namespace CppAppNotifications::implementation;
}

static const std::map<unsigned, std::function<void (winrt::AppNotificationActivatedEventArgs const&)>> c_notificationHandlers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace winrt
{
using namespace Microsoft::Windows::AppNotifications;
using namespace Microsoft::Windows::AppNotifications::Builder;
using namespace CppUnpackagedAppNotifications::implementation;
using namespace CppAppNotifications::implementation;
}

const wchar_t* ToastWithAvatar::ScenarioName{ L"Local Toast with Avatar Image" };
Expand All @@ -39,7 +39,7 @@ bool ToastWithAvatar::SendToast()

void ToastWithAvatar::NotificationReceived(winrt::Microsoft::Windows::AppNotifications::AppNotificationActivatedEventArgs const& notificationActivatedEventArgs)
{
winrt::CppUnpackagedAppNotifications::Notification notification{};
winrt::CppAppNotifications::Notification notification{};
notification.Originator = ScenarioName;
notification.Action = notificationActivatedEventArgs.Arguments().Lookup(L"action");
winrt::MainPage::Current().NotificationReceived(notification);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace winrt
{
using namespace Microsoft::Windows::AppNotifications;
using namespace Microsoft::Windows::AppNotifications::Builder;
using namespace CppUnpackagedAppNotifications::implementation;
using namespace CppAppNotifications::implementation;
}

const wchar_t* ToastWithTextBox::ScenarioName{ L"Local Toast with Avatar and Text Box" };
Expand Down Expand Up @@ -48,7 +48,7 @@ void ToastWithTextBox::NotificationReceived(winrt::Microsoft::Windows::AppNotifi



winrt::CppUnpackagedAppNotifications::Notification notification{};
winrt::CppAppNotifications::Notification notification{};
notification.Originator = ScenarioName;
notification.Action = notificationActivatedEventArgs.Arguments().Lookup(L"action");
notification.HasInput = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
namespace winrt
{
using namespace Microsoft::UI::Xaml::Controls;
using namespace winrt::CppUnpackagedAppNotifications::implementation;
using namespace winrt::CppAppNotifications::implementation;
}

void NotifyUser::CouldNotSendToast()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

namespace CppUnpackagedAppNotifications
namespace CppAppNotifications
{
/* The following code is scenario/feature-specific IDL.
Samples authors should modify these runtime classes as appropriate. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ namespace winrt
using namespace Windows::Foundation::Collections;
}

namespace winrt::CppUnpackagedAppNotifications
namespace winrt::CppAppNotifications
{
IVector<Scenario> implementation::MainPage::scenariosInner = single_threaded_observable_vector<Scenario>(
{
Scenario{ ToastWithAvatar::ScenarioName, hstring(name_of<CppUnpackagedAppNotifications::Scenario1_ToastWithAvatar>())},
Scenario{ ToastWithTextBox::ScenarioName, hstring(name_of<CppUnpackagedAppNotifications::Scenario2_ToastWithTextBox>())}
Scenario{ ToastWithAvatar::ScenarioName, hstring(name_of<CppAppNotifications::Scenario1_ToastWithAvatar>())},
Scenario{ ToastWithTextBox::ScenarioName, hstring(name_of<CppAppNotifications::Scenario2_ToastWithTextBox>())}
});

hstring SampleConfig::FeatureName{ L"CppUnpackagedAppNotifications" };
hstring SampleConfig::FeatureName{ L"CppAppNotifications" };
ElementTheme SampleConfig::CurrentTheme{ ElementTheme::Default };
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#pragma once
#include "pch.h"

namespace winrt::CppUnpackagedAppNotifications
namespace winrt::CppAppNotifications
{
struct SampleConfig
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<!-- Copyright (c) Microsoft Corporation.
Licensed under the MIT License. -->
<Page
x:Class="CppUnpackagedAppNotifications.Scenario1_ToastWithAvatar"
x:Class="CppAppNotifications.Scenario1_ToastWithAvatar"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:CppUnpackagedAppNotifications"
xmlns:local="using:CppAppNotifications"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace winrt
using namespace Microsoft::Windows::AppNotifications;
}

namespace winrt::CppUnpackagedAppNotifications::implementation
namespace winrt::CppAppNotifications::implementation
{
MainPage Scenario1_ToastWithAvatar::rootPage{ nullptr };

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "Scenario1_ToastWithAvatar.g.h"
#include <winrt/Microsoft.Windows.AppNotifications.h>

namespace winrt::CppUnpackagedAppNotifications::implementation
namespace winrt::CppAppNotifications::implementation
{
struct Scenario1_ToastWithAvatar : Scenario1_ToastWithAvatarT<Scenario1_ToastWithAvatar>
{
Expand All @@ -15,11 +15,11 @@ namespace winrt::CppUnpackagedAppNotifications::implementation
void SendToast_Click(winrt::Windows::Foundation::IInspectable const&, winrt::Microsoft::UI::Xaml::RoutedEventArgs const&);

private:
static CppUnpackagedAppNotifications::MainPage rootPage;
static CppAppNotifications::MainPage rootPage;
};
}

namespace winrt::CppUnpackagedAppNotifications::factory_implementation
namespace winrt::CppAppNotifications::factory_implementation
{
struct Scenario1_ToastWithAvatar : Scenario1_ToastWithAvatarT<Scenario1_ToastWithAvatar, implementation::Scenario1_ToastWithAvatar>
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<!-- Copyright (c) Microsoft Corporation.
Licensed under the MIT License. -->
<Page
x:Class="CppUnpackagedAppNotifications.Scenario2_ToastWithTextBox"
x:Class="CppAppNotifications.Scenario2_ToastWithTextBox"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:CppUnpackagedAppNotifications"
xmlns:local="using:CppAppNotifications"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace winrt
using namespace Microsoft::Windows::AppNotifications;
}

namespace winrt::CppUnpackagedAppNotifications::implementation
namespace winrt::CppAppNotifications::implementation
{
MainPage Scenario2_ToastWithTextBox::rootPage{ nullptr };

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#include "Scenario2_ToastWithTextBox.g.h"

namespace winrt::CppUnpackagedAppNotifications::implementation
namespace winrt::CppAppNotifications::implementation
{
struct Scenario2_ToastWithTextBox : Scenario2_ToastWithTextBoxT<Scenario2_ToastWithTextBox>
{
Expand All @@ -14,11 +14,11 @@ namespace winrt::CppUnpackagedAppNotifications::implementation
void SendToast_Click(winrt::Windows::Foundation::IInspectable const&, winrt::Microsoft::UI::Xaml::RoutedEventArgs const&);

private:
static CppUnpackagedAppNotifications::MainPage rootPage;
static CppAppNotifications::MainPage rootPage;
};
}

namespace winrt::CppUnpackagedAppNotifications::factory_implementation
namespace winrt::CppAppNotifications::factory_implementation
{
struct Scenario2_ToastWithTextBox : Scenario2_ToastWithTextBoxT<Scenario2_ToastWithTextBox, implementation::Scenario2_ToastWithTextBox>
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<!-- Copyright (c) Microsoft Corporation.
Licensed under the MIT License. -->
<Page
x:Class="CppUnpackagedAppNotifications.SettingsPage"
x:Class="CppAppNotifications.SettingsPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:CppUnpackagedAppNotifications"
xmlns:local="using:CppAppNotifications"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace winrt
using namespace Windows::Foundation;
}

namespace winrt::CppUnpackagedAppNotifications::implementation
namespace winrt::CppAppNotifications::implementation
{
SettingsPage::SettingsPage()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#include "SettingsPage.g.h"

namespace winrt::CppUnpackagedAppNotifications::implementation
namespace winrt::CppAppNotifications::implementation
{
struct SettingsPage : SettingsPageT<SettingsPage>
{
Expand All @@ -15,7 +15,7 @@ namespace winrt::CppUnpackagedAppNotifications::implementation
};
}

namespace winrt::CppUnpackagedAppNotifications::factory_implementation
namespace winrt::CppAppNotifications::factory_implementation
{
struct SettingsPage : SettingsPageT<SettingsPage, implementation::SettingsPage>
{
Expand Down
Loading