diff --git a/Readme.md b/Readme.md
index 2bab146..8f25d36 100644
--- a/Readme.md
+++ b/Readme.md
@@ -1 +1 @@
-# Command Prompt for W10M
Easily access 'Windows Command Prompt' on supported Windows Mobile devices, this makes use of Telnet to make the connection
  
## Requirements:
- Windows 10 Mobile 14393 and up.
- [CMD Injected](https://github.com/fadilfadz01/CMD.Injector) to the device.
- Loopback connection enabled (details in-app)
### Acknowledgements:
- [BAstifan](https://github.com/basharast) for the TelnetClient class.
- [Fadil Fadz](https://github.com/fadilfadz01) for CMD Injector and minor help with handling stout and sterr
\ No newline at end of file
+# Command Prompt for W10M
Easily access 'Windows Command Prompt' on supported Windows Mobile devices, this makes use of Telnet to make the connection
  
## Requirements:
- Windows 10 Mobile 14393 and up.
- [CMD Injected](https://github.com/fadilfadz01/CMD.Injector) to the device.
- Loopback connection enabled (details in-app)
## Notes:
- Sometimes the session doesn't load properly, I'm trying to see why, but close and re-open. If this persists then reinstall the app
- Only simple Scripts are supported, i.e no user input needed.
- Some commands take ages, I am unsure why but looking at it
### Acknowledgements:
- [BAstifan](https://github.com/basharast) for the TelnetClient class.
- [Fadil Fadz](https://github.com/fadilfadz01) for CMD Injector and minor help with handling stout and sterr
\ No newline at end of file
diff --git a/src/Command Prompt.csproj.user b/src/Command Prompt.csproj.user
index e8dd6c8..11fc4c7 100644
--- a/src/Command Prompt.csproj.user
+++ b/src/Command Prompt.csproj.user
@@ -8,7 +8,7 @@
SideloadOnlyFalsearm
- False
+ TrueC:\Users\Empyreal96\Pictures\icons\w11_cmd_Icon8.pngC:\Users\Empyreal96\Pictures\icons\w11_cmd_Icon8.pngC:\Users\Empyreal96\Pictures\icons\w11_cmd_Icon8.png
diff --git a/src/MainPage.xaml b/src/MainPage.xaml
index ee09e5d..c19acb9 100644
--- a/src/MainPage.xaml
+++ b/src/MainPage.xaml
@@ -7,6 +7,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
RequestedTheme="Default"
+ SizeChanged="Page_SizeChanged"
NavigationCacheMode="Required"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
@@ -15,6 +16,7 @@
+
-
-
+
-
-
-
+
+
diff --git a/src/MainPage.xaml.cs b/src/MainPage.xaml.cs
index 3352001..4814aba 100644
--- a/src/MainPage.xaml.cs
+++ b/src/MainPage.xaml.cs
@@ -48,6 +48,8 @@ public MainPage()
HeaderBorder.Background = new SolidColorBrush(Colors.DimGray);
}
+
+
ApplicationData.Current.LocalFolder.CreateFileAsync("cmdstring.txt", CreationCollisionOption.ReplaceExisting);
@@ -151,7 +153,7 @@ private async void SendCommandBtn_Click(object sender, RoutedEventArgs e)
CMDtestText.Text = text.Remove(text.Length - 1);
CMDtestText.Text += $"{SendCommandText.Text}\n";
StorageFile tmp = await ApplicationData.Current.LocalFolder.GetFileAsync("cmdstring.txt");
-
+
string command = SendCommandText.Text;
if (command.Length != 0)
{
@@ -188,7 +190,7 @@ private async void SendCommandBtn_Click(object sender, RoutedEventArgs e)
}
catch (Exception ex)
{
-
+
Exceptions.ThrowFullError(ex);
ProgressBarControl(false);
@@ -245,7 +247,7 @@ private async void MenuFlyoutItem_Click_2(object sender, RoutedEventArgs e)
string results = File.ReadAllText($"{LocalPath}\\cmdstring.txt");
CMDtestText.Text += $"{results}\n\n";
-
+
await client.Send($"\"{storage.Path}\" > \"{LocalPath}\\cmdstring.txt\" 2>&1");
//string results2 = File.ReadAllText($"{LocalPath}\\cmdstring.txt");
@@ -325,17 +327,37 @@ private void ProgressBarControl(bool enable)
}
}
-
+
private void MenuFlyoutItem_Click_4(object sender, RoutedEventArgs e)
{
Exceptions.CustomMessage(
- "Command Prompt v0.1.0 for Windows 10 Mobile:\n\n" +
+ "Command Prompt v0.1.4 for Windows 10 Mobile:\n\n" +
"- Thanks to Fadil Fadz for CMD Injector and some help with output formatting.\n" +
"- Thanks to BAstifan for the TelnetClient library\n\n" +
"Note: Only simple scripts are supported at this time, example is scripts with NO user input\n\n" +
"Any Issues? Submit an issue on \"https://github.com/empyreal96/mobile-cmd\""
- ) ;
+ );
+ }
+
+ private void Page_SizeChanged(object sender, SizeChangedEventArgs e)
+ {
+ bool isInLandscapeMode =
+Windows.UI.ViewManagement.ApplicationView.GetForCurrentView().Orientation ==
+Windows.UI.ViewManagement.ApplicationViewOrientation.Landscape;
+
+ ApplicationData.Current.LocalSettings.Values["Orientation"] = isInLandscapeMode ?
+ "Landscape" : "Portrait";
+
+
+ if (isInLandscapeMode == true)
+ {
+ CMDtestText.Height = 240;
+
+ } else
+ {
+ CMDtestText.Height = 400;
+ }
}
}
}
diff --git a/src/Package.appxmanifest b/src/Package.appxmanifest
index e2ed87d..2a933d1 100644
--- a/src/Package.appxmanifest
+++ b/src/Package.appxmanifest
@@ -9,7 +9,7 @@
+ Version="0.1.4.0" />