-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add command bar. Can now save state.
- Loading branch information
Showing
15 changed files
with
462 additions
and
149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
<Page | ||
x:Class="VBA10.HelpPage" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:local="using:VBA10" | ||
xmlns:ctl="using:VBA10.Controls" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
mc:Ignorable="d"> | ||
|
||
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> | ||
<Grid.RowDefinitions> | ||
<RowDefinition Height="Auto"/> | ||
<RowDefinition Height="*"/> | ||
</Grid.RowDefinitions> | ||
|
||
<ctl:PageHeader> | ||
<ctl:PageHeader.HeaderContent> | ||
<TextBlock x:Name="title" | ||
Style="{ThemeResource PageTitleTextBlockStyle}" Text="HELP"/> | ||
</ctl:PageHeader.HeaderContent> | ||
</ctl:PageHeader> | ||
|
||
<Pivot Grid.Row="1" > | ||
<PivotItem Header="Keyboard"> | ||
<ScrollViewer HorizontalScrollBarVisibility="Disabled" | ||
VerticalScrollBarVisibility="Auto" | ||
> | ||
<StackPanel Orientation="Vertical" | ||
HorizontalAlignment="Left" | ||
MaxWidth="440"> | ||
<TextBlock TextWrapping="Wrap" > | ||
<Run Text="Here are some keyboard shortcut"/> | ||
</TextBlock> | ||
</StackPanel> | ||
</ScrollViewer> | ||
</PivotItem> | ||
<PivotItem Header="About"> | ||
<ScrollViewer HorizontalScrollBarVisibility="Disabled" | ||
VerticalScrollBarVisibility="Auto" | ||
> | ||
<StackPanel Orientation="Vertical" | ||
HorizontalAlignment="Left" | ||
MaxWidth="440"> | ||
<TextBlock TextWrapping="Wrap" > | ||
<Run Text="VBA10"/> | ||
</TextBlock> | ||
<TextBlock TextWrapping="Wrap" Name="versionBlock" | ||
Text="Version: check .cpp"> | ||
</TextBlock> | ||
|
||
<TextBlock TextWrapping="Wrap" Name="contactBlock" | ||
Tapped="contactBlock_Tapped" | ||
> | ||
<Run>Contact:  </Run> | ||
<Underline> | ||
<Run Foreground="#4444D9">[email protected]</Run> | ||
</Underline> | ||
</TextBlock> | ||
|
||
<TextBlock TextWrapping="Wrap" > | ||
<LineBreak /> | ||
<Run Text="Feel free to report bugs or broken games."/> | ||
<LineBreak /> | ||
<LineBreak /> | ||
<Run Text="The author is not responsible for any illegal use of this software. "/> | ||
<LineBreak/> | ||
<LineBreak/> | ||
<Run Text="This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or(at your option) any later version. "/> | ||
<LineBreak/> | ||
<LineBreak/> | ||
<Run Text="This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. "/> | ||
<LineBreak/> | ||
<LineBreak/> | ||
<Run Text="You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA."/> | ||
<LineBreak/> | ||
|
||
</TextBlock> | ||
<Button Name="gplButton" Content="GNU Public License v3" | ||
Click="gplButton_Click" | ||
Margin="0,0,0,8"/> | ||
|
||
<Button Name="sourceButton" Content="Source code" | ||
Click="sourceButton_Click" | ||
Margin="0,0,0,8"/> | ||
|
||
</StackPanel> | ||
</ScrollViewer> | ||
</PivotItem> | ||
</Pivot> | ||
|
||
</Grid> | ||
</Page> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
// | ||
// HelpPage.xaml.cpp | ||
// Implementation of the HelpPage class | ||
// | ||
|
||
#include "pch.h" | ||
#include "HelpPage.xaml.h" | ||
|
||
using namespace VBA10; | ||
|
||
using namespace Platform; | ||
using namespace Windows::Foundation; | ||
using namespace Windows::Foundation::Collections; | ||
using namespace Windows::UI::Xaml; | ||
using namespace Windows::UI::Xaml::Controls; | ||
using namespace Windows::UI::Xaml::Controls::Primitives; | ||
using namespace Windows::UI::Xaml::Data; | ||
using namespace Windows::UI::Xaml::Input; | ||
using namespace Windows::UI::Xaml::Media; | ||
using namespace Windows::UI::Xaml::Navigation; | ||
|
||
// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238 | ||
|
||
HelpPage::HelpPage() | ||
{ | ||
InitializeComponent(); | ||
|
||
//get version | ||
auto myPackage = Windows::ApplicationModel::Package::Current; | ||
auto version = myPackage->Id->Version; | ||
versionBlock->Text = "Version: " + version.Major + "." + version.Minor + "." + version.Build + "." + version.Revision; | ||
|
||
} | ||
|
||
void HelpPage::gplButton_Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e) | ||
{ | ||
Windows::System::Launcher::LaunchUriAsync(ref new Windows::Foundation::Uri("http://www.gnu.org/licenses/gpl-3.0.txt")); | ||
} | ||
|
||
|
||
void HelpPage::sourceButton_Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e) | ||
{ | ||
Windows::System::Launcher::LaunchUriAsync(ref new Windows::Foundation::Uri("http://sdrv.ms/10ehg2a")); | ||
} | ||
|
||
void HelpPage::contactBlock_Tapped(Platform::Object^ sender, Windows::UI::Xaml::Input::TappedRoutedEventArgs^ e) | ||
{ | ||
auto uri = ref new Windows::Foundation::Uri("mailto:[email protected]"); | ||
|
||
// Launch the URI | ||
concurrency::task<bool> launchUriOperation(Windows::System::Launcher::LaunchUriAsync(uri)); | ||
launchUriOperation.then([](bool success) | ||
{ | ||
if (success) | ||
{ | ||
// URI launched | ||
} | ||
else | ||
{ | ||
// URI launch failed | ||
} | ||
}); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// | ||
// HelpPage.xaml.h | ||
// Declaration of the HelpPage class | ||
// | ||
|
||
#pragma once | ||
|
||
#include "HelpPage.g.h" | ||
|
||
namespace VBA10 | ||
{ | ||
/// <summary> | ||
/// An empty page that can be used on its own or navigated to within a Frame. | ||
/// </summary> | ||
[Windows::Foundation::Metadata::WebHostHidden] | ||
public ref class HelpPage sealed | ||
{ | ||
public: | ||
HelpPage(); | ||
|
||
private: | ||
void gplButton_Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e); | ||
void sourceButton_Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e); | ||
void contactBlock_Tapped(Platform::Object^ sender, Windows::UI::Xaml::Input::TappedRoutedEventArgs^ e); | ||
}; | ||
} |
Oops, something went wrong.