|
| 1 | +<Window x:Class="ObsMCLauncher.Windows.DevConsoleWindow" |
| 2 | + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
| 3 | + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| 4 | + xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" |
| 5 | + Title="开发者控制台" |
| 6 | + Height="560" |
| 7 | + Width="880" |
| 8 | + MinHeight="420" |
| 9 | + MinWidth="640" |
| 10 | + Background="{DynamicResource BackgroundBrush}" |
| 11 | + WindowStartupLocation="CenterOwner" |
| 12 | + WindowStyle="None" |
| 13 | + AllowsTransparency="False" |
| 14 | + ResizeMode="CanResize" |
| 15 | + TextElement.Foreground="{DynamicResource TextBrush}" |
| 16 | + TextElement.FontWeight="Regular" |
| 17 | + TextElement.FontSize="13" |
| 18 | + FontFamily="{materialDesign:MaterialDesignFont}"> |
| 19 | + |
| 20 | + <WindowChrome.WindowChrome> |
| 21 | + <WindowChrome CaptionHeight="40" |
| 22 | + ResizeBorderThickness="5" |
| 23 | + GlassFrameThickness="0" |
| 24 | + CornerRadius="0"/> |
| 25 | + </WindowChrome.WindowChrome> |
| 26 | + |
| 27 | + <Grid> |
| 28 | + <Grid.RowDefinitions> |
| 29 | + <RowDefinition Height="40"/> |
| 30 | + <RowDefinition Height="*"/> |
| 31 | + <RowDefinition Height="Auto"/> |
| 32 | + </Grid.RowDefinitions> |
| 33 | + |
| 34 | + <!-- 标题栏 --> |
| 35 | + <Border Grid.Row="0" |
| 36 | + Background="{DynamicResource SurfaceBrush}" |
| 37 | + BorderBrush="{DynamicResource BorderBrush}" |
| 38 | + BorderThickness="0,0,0,1"> |
| 39 | + <Grid> |
| 40 | + <Grid.ColumnDefinitions> |
| 41 | + <ColumnDefinition Width="*"/> |
| 42 | + <ColumnDefinition Width="Auto"/> |
| 43 | + </Grid.ColumnDefinitions> |
| 44 | + |
| 45 | + <StackPanel Grid.Column="0" |
| 46 | + Orientation="Horizontal" |
| 47 | + Margin="15,0,0,0" |
| 48 | + VerticalAlignment="Center"> |
| 49 | + <materialDesign:PackIcon Kind="Console" |
| 50 | + Width="20" |
| 51 | + Height="20" |
| 52 | + VerticalAlignment="Center" |
| 53 | + Foreground="{StaticResource PrimaryBrush}"/> |
| 54 | + <TextBlock Text="开发者控制台" |
| 55 | + FontSize="13" |
| 56 | + FontWeight="SemiBold" |
| 57 | + Margin="10,0,0,0" |
| 58 | + VerticalAlignment="Center"/> |
| 59 | + </StackPanel> |
| 60 | + |
| 61 | + <StackPanel Grid.Column="1" |
| 62 | + Orientation="Horizontal" |
| 63 | + HorizontalAlignment="Right" |
| 64 | + WindowChrome.IsHitTestVisibleInChrome="True"> |
| 65 | + <Button x:Name="CloseButton" |
| 66 | + Click="CloseButton_Click" |
| 67 | + Width="46" |
| 68 | + Height="40" |
| 69 | + Style="{StaticResource MaterialDesignFlatButton}" |
| 70 | + Foreground="{DynamicResource TextBrush}" |
| 71 | + ToolTip="关闭"> |
| 72 | + <Button.Resources> |
| 73 | + <Style TargetType="Button" BasedOn="{StaticResource MaterialDesignFlatButton}"> |
| 74 | + <Style.Triggers> |
| 75 | + <Trigger Property="IsMouseOver" Value="True"> |
| 76 | + <Setter Property="Background" Value="#DC3545"/> |
| 77 | + </Trigger> |
| 78 | + </Style.Triggers> |
| 79 | + </Style> |
| 80 | + </Button.Resources> |
| 81 | + <materialDesign:PackIcon Kind="WindowClose" |
| 82 | + Width="16" |
| 83 | + Height="16"/> |
| 84 | + </Button> |
| 85 | + </StackPanel> |
| 86 | + </Grid> |
| 87 | + </Border> |
| 88 | + |
| 89 | + <!-- 输出区 --> |
| 90 | + <Border Grid.Row="1" |
| 91 | + Background="#151515" |
| 92 | + BorderBrush="{DynamicResource BorderBrush}" |
| 93 | + BorderThickness="0" |
| 94 | + Padding="0"> |
| 95 | + <ScrollViewer x:Name="OutputScroll" |
| 96 | + VerticalScrollBarVisibility="Auto" |
| 97 | + HorizontalScrollBarVisibility="Auto"> |
| 98 | + <TextBox x:Name="OutputTextBox" |
| 99 | + IsReadOnly="True" |
| 100 | + Background="Transparent" |
| 101 | + BorderThickness="0" |
| 102 | + Foreground="#FFFFFF" |
| 103 | + FontFamily="Consolas, Courier New" |
| 104 | + FontSize="12" |
| 105 | + TextWrapping="NoWrap" |
| 106 | + AcceptsReturn="True" |
| 107 | + Padding="12"/> |
| 108 | + </ScrollViewer> |
| 109 | + </Border> |
| 110 | + |
| 111 | + <!-- 输入区 --> |
| 112 | + <Border Grid.Row="2" |
| 113 | + Background="{DynamicResource SurfaceBrush}" |
| 114 | + BorderBrush="{DynamicResource BorderBrush}" |
| 115 | + BorderThickness="0,1,0,0" |
| 116 | + Padding="12,10"> |
| 117 | + <Grid> |
| 118 | + <Grid.ColumnDefinitions> |
| 119 | + <ColumnDefinition Width="*"/> |
| 120 | + <ColumnDefinition Width="Auto"/> |
| 121 | + </Grid.ColumnDefinitions> |
| 122 | + |
| 123 | + <TextBox x:Name="CommandTextBox" |
| 124 | + Grid.Column="0" |
| 125 | + Height="34" |
| 126 | + VerticalContentAlignment="Center" |
| 127 | + FontFamily="Consolas, Courier New" |
| 128 | + materialDesign:HintAssist.Hint="输入命令(help 查看可用命令)" |
| 129 | + KeyDown="CommandTextBox_KeyDown"/> |
| 130 | + |
| 131 | + <Button Grid.Column="1" |
| 132 | + Height="34" |
| 133 | + Margin="10,0,0,0" |
| 134 | + Padding="14,0" |
| 135 | + Style="{StaticResource MaterialDesignRaisedButton}" |
| 136 | + Background="{StaticResource PrimaryBrush}" |
| 137 | + Click="RunButton_Click"> |
| 138 | + <TextBlock Text="执行"/> |
| 139 | + </Button> |
| 140 | + </Grid> |
| 141 | + </Border> |
| 142 | + </Grid> |
| 143 | +</Window> |
| 144 | + |
0 commit comments