Skip to content

Commit

Permalink
测试一些基础API运行情况
Browse files Browse the repository at this point in the history
  • Loading branch information
zsh2401 committed May 30, 2019
1 parent 01e05dd commit 06c3b03
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 14 deletions.
20 changes: 11 additions & 9 deletions AutumnBox.CoreModules/Extensions/NoMatter/EHoldMyHand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*************************************************/
using AutumnBox.Basic.Calling;
using AutumnBox.Basic.Device;
using AutumnBox.CoreModules.Extensions.Poweron.Dpm;
using AutumnBox.Logging;
using AutumnBox.OpenFramework.Content;
using AutumnBox.OpenFramework.Extension;
Expand All @@ -29,20 +30,21 @@ namespace AutumnBox.CoreModules.Extensions.Hidden
internal class EHoldMyHand : LeafExtensionBase
{
[LMain]
public void Main(IDevice device, ILeafUI ui, IClassTextManager text)
public void Main(IDevice device, ILeafUI ui, IClassTextManager text, IEmbeddedFileManager emb, ITemporaryFloder tmp)
{
using (ui)
{
ui.Title = "TEST";
ui.Show();
//storageManager = OpenApiFactory.Get<IStorageManager>(this, "123");
ui.WriteLine(text["fuck"]);
ui.WriteLine(this.GetType().Namespace);
ui.ShowMessage("wow");
ui.WriteOutput(ui.DoYN("wwww", "yes", "no"));
ui.WriteOutput(ui.DoChoice("www"));
ui.WriteOutput(ui.SelectFrom(null, "a", "b", "c", "d"));
//throw new System.Exception(); ;
////storageManager = OpenApiFactory.Get<IStorageManager>(this, "123");
//ui.WriteLine(text["fuck"]);
//ui.WriteLine(this.GetType().Namespace);
//ui.ShowMessage("wow");
//ui.WriteOutput(ui.DoYN("wwww", "yes", "no"));
//ui.WriteOutput(ui.DoChoice("www"));
//ui.WriteOutput(ui.SelectFrom(null, "a", "b", "c", "d"));
var dpmpro = new DpmPro(new CommandExecutor(), emb, tmp, new UsbDevice("aaabbb", DeviceState.Poweron));
dpmpro.Extract();
ui.Finish();
}
}
Expand Down
4 changes: 2 additions & 2 deletions AutumnBox.CoreModules/Extensions/NoMatter/ERestartApp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ namespace AutumnBox.CoreModules.Extensions.NoMatter
[ExtIcon("Icons.restart.png")]
[ExtRequiredDeviceStates(LeafConstants.NoMatter)]
[ExtText("msg","Reboot to which mode?","zh-cn:重启到哪一个模式?")]
[ExtText("user", "用户", "zh-cn:User")]
[ExtText("admin", "管理员", "zh-cn:Administrator")]
[ExtText("user", "User", "zh-cn:用户")]
[ExtText("admin", "Administrator", "zh-cn:管理员")]
internal class ERestartApp : LeafExtensionBase
{
[LMain]
Expand Down
2 changes: 1 addition & 1 deletion AutumnBox.GUI/View/Controls/MainMenu.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<Grid>
<Menu DockPanel.Dock="Top">
<MenuItem Header="{DynamicResource Menu.File}">
<MenuItem Header="{DynamicResource Menu.Restart}" Command="{Binding Restart}"/>
<MenuItem Header="{DynamicResource Menu.Restart}" InputGestureText="Shift + R" Command="{Binding Restart}"/>
<MenuItem Command="{Binding Exit}" Header="{DynamicResource Menu.Exit}" InputGestureText="Alt + F4">
<MenuItem.Icon>
<Image Source="/Resources/MenuIcon/exit.png"></Image>
Expand Down
5 changes: 3 additions & 2 deletions AutumnBox.GUI/View/Windows/MainWindowV2.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@
<KeyBinding Modifiers="Ctrl" Key="F1" Command="{Binding OpenGoUrl}" CommandParameter="{DynamicResource AGoHelp}" />
<KeyBinding Modifiers="Shift" Key="C" Command="{Binding Path=DataContext.OpenShell,ElementName=Menu}" CommandParameter="cmd.exe"/>
<KeyBinding Modifiers="Shift" Key="V" Command="{Binding Path=DataContext.OpenShell,ElementName=Menu}" CommandParameter="powershell.exe"/>
<KeyBinding Modifiers="Shift" Key="G" Command="{Binding Path=DataContext.DlExt,ElementName=Menu}" />
<KeyBinding Modifiers="Shift" Key="G" Command="{Binding OpenGoUrl}" CommandParameter="{DynamicResource AGoDownloadExtensions}" />
<KeyBinding Modifiers="Shift" Key="O" Command="{Binding Path=DataContext.OpenExtFloder,ElementName=Menu}" />
<KeyBinding Modifiers="Shift" Key="D" Command="{Binding Path=DataContext.OpenLoggingWindow,ElementName=Menu}" />
<KeyBinding Modifiers="Shift" Key="R" Command="{Binding Path=DataContext.Restart,ElementName=Menu}" />
</Window.InputBindings>
<controls:Window.NonClientAreaContent>
<StackPanel Orientation="Horizontal">
Expand All @@ -40,7 +41,7 @@
<ContentControl x:Name="MainGrid">
<panel:PanelLoading/>
</ContentControl>
<ScrollViewer Margin="0,0,0,30" VerticalScrollBarVisibility="Hidden" VerticalAlignment="Bottom" HorizontalAlignment="Right" Grid.Column="1">
<ScrollViewer Margin="0,0,0,30" VerticalScrollBarVisibility="Hidden" VerticalAlignment="Top" HorizontalAlignment="Right" Grid.Column="1">
<StackPanel controls:Growl.Token="main" controls:Growl.GrowlParent="True" Margin="0,10,10,10"/>
</ScrollViewer>
</Grid>
Expand Down

0 comments on commit 06c3b03

Please sign in to comment.