Skip to content

Commit

Permalink
Various improvements & fixes
Browse files Browse the repository at this point in the history
- Added .gitignore
- Added check for malicious commands
- Added Tabs
- Added Font settings
- Added About page
- Remove reghelp.txt
- Fixed cls command not working
- Fixed output of commands like bcdedit
- Move BasicCommandsPage to Help
  • Loading branch information
Pinguin2001 committed Aug 12, 2022
1 parent 640ded9 commit bc4bcd0
Show file tree
Hide file tree
Showing 24 changed files with 845 additions and 761 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.vs
src/AppPackages
src/bin
src/obj
src/BundleArtifacts
51 changes: 51 additions & 0 deletions Command Prompt.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.2.32630.192
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Command Prompt", "src\Command Prompt.csproj", "{581F8149-D518-4CD8-8BEB-929820259AC7}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|ARM = Debug|ARM
Debug|ARM64 = Debug|ARM64
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|ARM = Release|ARM
Release|ARM64 = Release|ARM64
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{581F8149-D518-4CD8-8BEB-929820259AC7}.Debug|ARM.ActiveCfg = Debug|ARM
{581F8149-D518-4CD8-8BEB-929820259AC7}.Debug|ARM.Build.0 = Debug|ARM
{581F8149-D518-4CD8-8BEB-929820259AC7}.Debug|ARM.Deploy.0 = Debug|ARM
{581F8149-D518-4CD8-8BEB-929820259AC7}.Debug|ARM64.ActiveCfg = Debug|ARM64
{581F8149-D518-4CD8-8BEB-929820259AC7}.Debug|ARM64.Build.0 = Debug|ARM64
{581F8149-D518-4CD8-8BEB-929820259AC7}.Debug|ARM64.Deploy.0 = Debug|ARM64
{581F8149-D518-4CD8-8BEB-929820259AC7}.Debug|x64.ActiveCfg = Debug|x64
{581F8149-D518-4CD8-8BEB-929820259AC7}.Debug|x64.Build.0 = Debug|x64
{581F8149-D518-4CD8-8BEB-929820259AC7}.Debug|x64.Deploy.0 = Debug|x64
{581F8149-D518-4CD8-8BEB-929820259AC7}.Debug|x86.ActiveCfg = Debug|x86
{581F8149-D518-4CD8-8BEB-929820259AC7}.Debug|x86.Build.0 = Debug|x86
{581F8149-D518-4CD8-8BEB-929820259AC7}.Debug|x86.Deploy.0 = Debug|x86
{581F8149-D518-4CD8-8BEB-929820259AC7}.Release|ARM.ActiveCfg = Release|ARM
{581F8149-D518-4CD8-8BEB-929820259AC7}.Release|ARM.Build.0 = Release|ARM
{581F8149-D518-4CD8-8BEB-929820259AC7}.Release|ARM.Deploy.0 = Release|ARM
{581F8149-D518-4CD8-8BEB-929820259AC7}.Release|ARM64.ActiveCfg = Release|ARM64
{581F8149-D518-4CD8-8BEB-929820259AC7}.Release|ARM64.Build.0 = Release|ARM64
{581F8149-D518-4CD8-8BEB-929820259AC7}.Release|ARM64.Deploy.0 = Release|ARM64
{581F8149-D518-4CD8-8BEB-929820259AC7}.Release|x64.ActiveCfg = Release|x64
{581F8149-D518-4CD8-8BEB-929820259AC7}.Release|x64.Build.0 = Release|x64
{581F8149-D518-4CD8-8BEB-929820259AC7}.Release|x64.Deploy.0 = Release|x64
{581F8149-D518-4CD8-8BEB-929820259AC7}.Release|x86.ActiveCfg = Release|x86
{581F8149-D518-4CD8-8BEB-929820259AC7}.Release|x86.Build.0 = Release|x86
{581F8149-D518-4CD8-8BEB-929820259AC7}.Release|x86.Deploy.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {F70F5B0F-7285-428F-9DDD-E3E8BE98CADD}
EndGlobalSection
EndGlobal
10 changes: 9 additions & 1 deletion src/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,13 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Command_Prompt">

<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" />
<!-- Other merged dictionaries here -->
</ResourceDictionary.MergedDictionaries>
<SolidColorBrush x:Key="TextControlBorderBrushFocused" Opacity="0" />
</ResourceDictionary>
</Application.Resources>
</Application>
13 changes: 1 addition & 12 deletions src/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,19 +1,10 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.ApplicationModel;
using Windows.ApplicationModel.Activation;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.Storage;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;

namespace Command_Prompt
Expand Down Expand Up @@ -67,19 +58,17 @@ protected override void OnLaunched(LaunchActivatedEventArgs e)
// When the navigation stack isn't restored navigate to the first page,
// configuring the new page by passing required information as a navigation
// parameter
// rootFrame.Navigate(typeof(MainPage), e.Arguments);

IPropertySet roamingProperties = ApplicationData.Current.RoamingSettings.Values;
if (roamingProperties.ContainsKey("FirstRunDone"))
{
// The normal case
rootFrame.Navigate(typeof(MainPage), e.Arguments);
rootFrame.Navigate(typeof(TabsPage), e.Arguments);
}
else
{
// The first-time case
rootFrame.Navigate(typeof(FirstRunPage), e.Arguments);
// roamingProperties["FirstRunDone"] = bool.TrueString; // Doesn't really matter what
}

}
Expand Down
30 changes: 0 additions & 30 deletions src/Assets/reghelp.txt

This file was deleted.

123 changes: 0 additions & 123 deletions src/BasicCommandsPage.xaml

This file was deleted.

59 changes: 46 additions & 13 deletions src/Command Prompt.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,22 @@
<AssemblyName>Command Prompt</AssemblyName>
<DefaultLanguage>en-US</DefaultLanguage>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.15063.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.14393.0</TargetPlatformMinVersion>
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.22621.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.15063.0</TargetPlatformMinVersion>
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WindowsXamlEnableOverview>true</WindowsXamlEnableOverview>
<AppxPackageSigningEnabled>True</AppxPackageSigningEnabled>
<GenerateAppInstallerFile>False</GenerateAppInstallerFile>
<PackageCertificateKeyFile>C:\Users\Empyreal96\Documents\Empyreal_Key.pfx</PackageCertificateKeyFile>
<PackageCertificateKeyFile>Command Prompt_TemporaryKey.pfx</PackageCertificateKeyFile>
<AppxPackageSigningTimestampDigestAlgorithm>SHA256</AppxPackageSigningTimestampDigestAlgorithm>
<AppxAutoIncrementPackageRevision>False</AppxAutoIncrementPackageRevision>
<GenerateTestArtifacts>True</GenerateTestArtifacts>
<AppxBundle>Always</AppxBundle>
<AppxBundlePlatforms>arm</AppxBundlePlatforms>
<HoursBetweenUpdateChecks>0</HoursBetweenUpdateChecks>
<AppxSymbolPackageEnabled>False</AppxSymbolPackageEnabled>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
Expand Down Expand Up @@ -127,9 +128,6 @@
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
</Compile>
<Compile Include="BasicCommandsPage.xaml.cs">
<DependentUpon>BasicCommandsPage.xaml</DependentUpon>
</Compile>
<Compile Include="Exceptions.cs" />
<Compile Include="FirstRunPage.xaml.cs">
<DependentUpon>FirstRunPage.xaml</DependentUpon>
Expand All @@ -138,7 +136,19 @@
<Compile Include="MainPage.xaml.cs">
<DependentUpon>MainPage.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\About.xaml.cs">
<DependentUpon>About.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\Help.xaml.cs">
<DependentUpon>Help.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\Settings.xaml.cs">
<DependentUpon>Settings.xaml</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="TabsPage.xaml.cs">
<DependentUpon>TabsPage.xaml</DependentUpon>
</Compile>
<Compile Include="TelnetClient.cs" />
</ItemGroup>
<ItemGroup>
Expand Down Expand Up @@ -193,32 +203,55 @@
<Content Include="Assets\Square44x44Logo.scale-200.png" />
<Content Include="Assets\Square44x44Logo.targetsize-24_altform-unplated.png" />
<Content Include="Assets\Wide310x150Logo.scale-200.png" />
<Content Include="Assets\reghelp.txt">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="App.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Page Include="BasicCommandsPage.xaml">
<Page Include="FirstRunPage.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="MainPage.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="FirstRunPage.xaml">
<Page Include="Pages\About.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\Help.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="MainPage.xaml">
<Page Include="Pages\Settings.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="TabsPage.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
<Version>6.2.12</Version>
<Version>6.2.14</Version>
</PackageReference>
<PackageReference Include="Microsoft.UI.Xaml">
<Version>2.5.0</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
<None Include="Command Prompt_TemporaryKey.pfx" />
<Content Include="Fonts\Lucida Console.TTF" />
<Content Include="Fonts\Cascadia Code.ttf" />
<Content Include="Fonts\Segoe UI.ttf" />
</ItemGroup>
<ItemGroup>
<SDKReference Include="WindowsMobile, Version=10.0.22621.0">
<Name>Windows Mobile Extensions for the UWP</Name>
</SDKReference>
</ItemGroup>
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
<VisualStudioVersion>14.0</VisualStudioVersion>
Expand Down
Loading

0 comments on commit bc4bcd0

Please sign in to comment.