This repository has been archived by the owner on May 31, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
MainPage.h
125 lines (112 loc) · 4.26 KB
/
MainPage.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
/*
* PROJECT: Nagisa
* FILE: MainPage.h
* PURPOSE: Definition for the Main Window.
*
* LICENSE: The MIT License
*
* DEVELOPER: Mouri_Naruto (Mouri_Naruto AT Outlook.com)
*/
#pragma once
#include "MainPage.g.h"
namespace winrt::Nagisa::implementation
{
using Assassin::TransferManager;
using Assassin::ITransferTask;
using Windows::Foundation::IAsyncOperation;
using Windows::UI::ViewManagement::ApplicationView;
using Windows::UI::ViewManagement::ApplicationViewTitleBar;
using Windows::UI::ViewManagement::UISettings;
using Windows::UI::Xaml::Application;
using Windows::UI::Xaml::RoutedEventArgs;
using Windows::UI::Xaml::Controls::AutoSuggestBox;
using Windows::UI::Xaml::Controls::AutoSuggestBoxQuerySubmittedEventArgs;
using Windows::UI::Xaml::Controls::AutoSuggestBoxTextChangedEventArgs;
using Windows::UI::Xaml::Controls::ContainerContentChangingEventArgs;
using Windows::UI::Xaml::Controls::ContentDialog;
using Windows::UI::Xaml::Controls::ContentDialogResult;
using Windows::UI::Xaml::Controls::ListView;
using Windows::UI::Xaml::Controls::ListViewBase;
using Windows::UI::Xaml::Data::INotifyPropertyChanged;
using Windows::UI::Xaml::Data::PropertyChangedEventHandler;
struct MainPage : MainPageT<MainPage>
{
private:
TransferManager m_TransferManager = nullptr;
UISettings m_UISettings = nullptr;
Application m_CurrentApplication = nullptr;
ApplicationViewTitleBar m_ApplicationViewTitleBar = nullptr;
IAsyncOperation<ContentDialogResult> ShowContentDialogAsync(
ContentDialog const& Dialog);
ITransferTask GetTransferTaskFromEventSender(
IInspectable const& sender);
void UpdateTitleBarColor();
void InitializeCustomTitleBar();
void ColorValuesChanged(
UISettings const& sender,
IInspectable const& e);
public:
MainPage();
TransferManager TransferManager();
void Page_Loaded(
IInspectable const& sender,
RoutedEventArgs const& e);
void TaskList_ContainerContentChanging(
ListViewBase const& sender,
ContainerContentChangingEventArgs const& e);
fire_and_forget AboutButton_Click(
IInspectable const& sender,
RoutedEventArgs const& e);
fire_and_forget NewTaskButton_Click(
IInspectable const& sender,
RoutedEventArgs const& e);
void CopyLinkMenuItem_Click(
IInspectable const& sender,
RoutedEventArgs const& e);
void SearchAutoSuggestBox_LostFocus(
IInspectable const& sender,
RoutedEventArgs const& e);
fire_and_forget RetryButton_Click(
IInspectable const& sender,
RoutedEventArgs const& e);
void ResumeButton_Click(
IInspectable const& sender,
RoutedEventArgs const& e);
void PauseButton_Click(
IInspectable const& sender,
RoutedEventArgs const& e);
void CancelMenuItem_Click(
IInspectable const& sender,
RoutedEventArgs const& e);
void RemoveMenuItem_Click(
IInspectable const& sender,
RoutedEventArgs const& e);
fire_and_forget OpenFolderMenuItem_Click(
IInspectable const& sender,
RoutedEventArgs const& e);
void StartAllAppBarButton_Click(
IInspectable const& sender,
RoutedEventArgs const& e);
void PauseAllAppBarButton_Click(
IInspectable const& sender,
RoutedEventArgs const& e);
void ClearListAppBarButton_Click(
IInspectable const& sender,
RoutedEventArgs const& e);
void SearchAppBarButton_Click(
IInspectable const& sender,
RoutedEventArgs const& e);
fire_and_forget OpenDownloadsFolderAppBarButton_Click(
IInspectable const& sender,
RoutedEventArgs const& e);
fire_and_forget SettingsAppBarButton_Click(
IInspectable const& sender,
RoutedEventArgs const& e);
};
}
namespace winrt::Nagisa::factory_implementation
{
struct MainPage : MainPageT<MainPage, implementation::MainPage>
{
};
}