Skip to content

Commit

Permalink
Tidy the MainPage implementation.
Browse files Browse the repository at this point in the history
  • Loading branch information
MouriNaruto committed Jul 18, 2023
1 parent a09bc80 commit 6ad8ce7
Show file tree
Hide file tree
Showing 8 changed files with 285 additions and 287 deletions.
38 changes: 19 additions & 19 deletions NanaGet/MainPage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ namespace winrt::NanaGet::implementation
}
}

void MainPage::TaskManagerGridNewTaskButtonClick(
void MainPage::NewTaskButtonClick(
IInspectable const& sender,
RoutedEventArgs const& e)
{
Expand All @@ -71,7 +71,7 @@ namespace winrt::NanaGet::implementation
0);
}

void MainPage::TaskManagerGridStartAllButtonClick(
void MainPage::StartAllButtonClick(
IInspectable const& sender,
RoutedEventArgs const& e)
{
Expand All @@ -88,7 +88,7 @@ namespace winrt::NanaGet::implementation
}
}

void MainPage::TaskManagerGridPauseAllButtonClick(
void MainPage::PauseAllButtonClick(
IInspectable const& sender,
RoutedEventArgs const& e)
{
Expand All @@ -105,7 +105,7 @@ namespace winrt::NanaGet::implementation
}
}

void MainPage::TaskManagerGridClearListButtonClick(
void MainPage::ClearListButtonClick(
IInspectable const& sender,
RoutedEventArgs const& e)
{
Expand All @@ -122,7 +122,7 @@ namespace winrt::NanaGet::implementation
}
}

void MainPage::TaskManagerGridOpenDownloadsFolderButtonClick(
void MainPage::OpenDownloadsFolderButtonClick(
IInspectable const& sender,
RoutedEventArgs const& e)
{
Expand All @@ -139,7 +139,7 @@ namespace winrt::NanaGet::implementation
::ShellExecuteExW(&ExecInfo);
}

void MainPage::TaskManagerGridSettingsButtonClick(
void MainPage::SettingsButtonClick(
IInspectable const& sender,
RoutedEventArgs const& e)
{
Expand All @@ -153,7 +153,7 @@ namespace winrt::NanaGet::implementation
0);
}

void MainPage::TaskManagerGridAboutButtonClick(
void MainPage::AboutButtonClick(
IInspectable const& sender,
RoutedEventArgs const& e)
{
Expand All @@ -167,20 +167,20 @@ namespace winrt::NanaGet::implementation
0);
}

void MainPage::TaskManagerGridTaskListContainerContentChanging(
void MainPage::TaskListContainerContentChanging(
ListViewBase const& sender,
ContainerContentChangingEventArgs const& e)
{
UNREFERENCED_PARAMETER(sender);
UNREFERENCED_PARAMETER(e);

this->TaskManagerGridTaskListNoItemsTextBlock().Visibility(
this->TaskListNoItemsTextBlock().Visibility(
!sender.ItemsSource()
? Visibility::Visible
: Visibility::Collapsed);
}

void MainPage::TaskManagerGridTaskItemRetryButtonClick(
void MainPage::TaskItemRetryButtonClick(
IInspectable const& sender,
RoutedEventArgs const& e)
{
Expand All @@ -200,7 +200,7 @@ namespace winrt::NanaGet::implementation
}
}

void MainPage::TaskManagerGridTaskItemResumeButtonClick(
void MainPage::TaskItemResumeButtonClick(
IInspectable const& sender,
RoutedEventArgs const& e)
{
Expand All @@ -218,7 +218,7 @@ namespace winrt::NanaGet::implementation
}
}

void MainPage::TaskManagerGridTaskItemPauseButtonClick(
void MainPage::TaskItemPauseButtonClick(
IInspectable const& sender,
RoutedEventArgs const& e)
{
Expand All @@ -236,7 +236,7 @@ namespace winrt::NanaGet::implementation
}
}

void MainPage::TaskManagerGridTaskItemCopyLinkButtonClick(
void MainPage::TaskItemCopyLinkButtonClick(
IInspectable const& sender,
RoutedEventArgs const& e)
{
Expand All @@ -256,7 +256,7 @@ namespace winrt::NanaGet::implementation
}
}

/*void MainPage::TaskManagerGridTaskItemOpenFolderButtonClick(
/*void MainPage::TaskItemOpenFolderButtonClick(
IInspectable const& sender,
RoutedEventArgs const& e)
{
Expand All @@ -270,7 +270,7 @@ namespace winrt::NanaGet::implementation
0);
}*/

void MainPage::TaskManagerGridTaskItemCancelButtonClick(
void MainPage::TaskItemCancelButtonClick(
IInspectable const& sender,
RoutedEventArgs const& e)
{
Expand All @@ -288,7 +288,7 @@ namespace winrt::NanaGet::implementation
}
}

void MainPage::TaskManagerGridTaskItemRemoveButtonClick(
void MainPage::TaskItemRemoveButtonClick(
IInspectable const& sender,
RoutedEventArgs const& e)
{
Expand Down Expand Up @@ -427,11 +427,11 @@ namespace winrt::NanaGet::implementation
DispatcherQueuePriority::Normal,
[&]()
{
this->TaskManagerGridGlobalStatusTextBlock().Text(GlobalStatusText);
this->GlobalStatusTextBlock().Text(GlobalStatusText);

if (NeedFullRefresh)
{
this->TaskManagerGridTaskList().ItemsSource(this->m_Tasks);
this->TaskList().ItemsSource(this->m_Tasks);
}
else if(this->m_Tasks)
{
Expand All @@ -444,7 +444,7 @@ namespace winrt::NanaGet::implementation
}
catch (...)
{

}
}

Expand Down
30 changes: 15 additions & 15 deletions NanaGet/MainPage.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,63 +32,63 @@ namespace winrt::NanaGet::implementation

~MainPage();

void TaskManagerGridNewTaskButtonClick(
void NewTaskButtonClick(
IInspectable const& sender,
RoutedEventArgs const& e);

void TaskManagerGridStartAllButtonClick(
void StartAllButtonClick(
IInspectable const& sender,
RoutedEventArgs const& e);

void TaskManagerGridPauseAllButtonClick(
void PauseAllButtonClick(
IInspectable const& sender,
RoutedEventArgs const& e);

void TaskManagerGridClearListButtonClick(
void ClearListButtonClick(
IInspectable const& sender,
RoutedEventArgs const& e);

void TaskManagerGridOpenDownloadsFolderButtonClick(
void OpenDownloadsFolderButtonClick(
IInspectable const& sender,
RoutedEventArgs const& e);

void TaskManagerGridSettingsButtonClick(
void SettingsButtonClick(
IInspectable const& sender,
RoutedEventArgs const& e);

void TaskManagerGridAboutButtonClick(
void AboutButtonClick(
IInspectable const& sender,
RoutedEventArgs const& e);

void TaskManagerGridTaskListContainerContentChanging(
void TaskListContainerContentChanging(
ListViewBase const& sender,
ContainerContentChangingEventArgs const& e);

void TaskManagerGridTaskItemRetryButtonClick(
void TaskItemRetryButtonClick(
IInspectable const& sender,
RoutedEventArgs const& e);

void TaskManagerGridTaskItemResumeButtonClick(
void TaskItemResumeButtonClick(
IInspectable const& sender,
RoutedEventArgs const& e);

void TaskManagerGridTaskItemPauseButtonClick(
void TaskItemPauseButtonClick(
IInspectable const& sender,
RoutedEventArgs const& e);

void TaskManagerGridTaskItemCopyLinkButtonClick(
void TaskItemCopyLinkButtonClick(
IInspectable const& sender,
RoutedEventArgs const& e);

/*void TaskManagerGridTaskItemOpenFolderButtonClick(
/*void TaskItemOpenFolderButtonClick(
IInspectable const& sender,
RoutedEventArgs const& e);*/

void TaskManagerGridTaskItemCancelButtonClick(
void TaskItemCancelButtonClick(
IInspectable const& sender,
RoutedEventArgs const& e);

void TaskManagerGridTaskItemRemoveButtonClick(
void TaskItemRemoveButtonClick(
IInspectable const& sender,
RoutedEventArgs const& e);

Expand Down
Loading

0 comments on commit 6ad8ce7

Please sign in to comment.