| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- <UserControl x:Class="TeamAAS_VP.Views.DebugMod.ScriptHome"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:prism="http://prismlibrary.com/"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:vm="clr-namespace:TeamAAS_VP.ViewModels.DebugMod"
- xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
- xmlns:sys="clr-namespace:System;assembly=mscorlib"
- xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
- xmlns:avalonEdit="http://icsharpcode.net/sharpdevelop/avalonedit"
- xmlns:control="clr-namespace:TeamAAS_VP.Controls"
- prism:ViewModelLocator.AutoWireViewModel="True"
- xmlns:AvalonEdit="clr-namespace:ICSharpCode.AvalonEdit;assembly=ICSharpCode.AvalonEdit"
- xmlns:lex="http://wpflocalizeextension.codeplex.com"
- lex:LocalizeDictionary.DesignCulture="zh-CN"
- lex:ResxLocalizationProvider.DefaultAssembly="TeamAAS-VP"
- lex:ResxLocalizationProvider.DefaultDictionary="Lang"
- FontFamily="{DynamicResource DefaultFont}"
- mc:Ignorable="d"
- d:Background="White"
- d:DataContext="{d:DesignInstance Type=vm:ScriptHomeViewModel}">
- <b:Interaction.Triggers>
- <b:EventTrigger EventName="Loaded">
- <b:InvokeCommandAction Command="{Binding LoadedCommand}" />
- </b:EventTrigger>
- </b:Interaction.Triggers>
- <UserControl.Resources>
- <ResourceDictionary>
- </ResourceDictionary>
- </UserControl.Resources>
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="auto" />
- <RowDefinition Height="*" />
- </Grid.RowDefinitions>
- <StackPanel Grid.Row="0"
- Orientation="Horizontal">
- <TextBlock Text="{lex:Loc 脚本文件,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}"
- VerticalAlignment="Center" />
- <ComboBox x:Name="cmbScript"
- VerticalAlignment="Center"
- SelectedItem="{Binding SelectScript,Mode=TwoWay}"
- ItemsSource="{Binding ScriptFilesCollection}"
- materialDesign:HintAssist.Hint="{lex:Loc 选择脚本文件}"
- materialDesign:TextFieldAssist.HasClearButton="True"
- Margin="5,0">
- <b:Interaction.Triggers>
- <b:EventTrigger EventName="SelectionChanged">
- <b:InvokeCommandAction Command="{Binding SelectScriptCommand}"
- CommandParameter="{Binding ElementName=cmbScript,Path=SelectedItem}" />
- </b:EventTrigger>
- </b:Interaction.Triggers>
- <ComboBox.ItemTemplate>
- <DataTemplate>
- <StackPanel Orientation="Horizontal">
- <materialDesign:PackIcon Kind="ScriptOutline" />
- <TextBlock Text="{Binding}" />
- </StackPanel>
- </DataTemplate>
- </ComboBox.ItemTemplate>
- </ComboBox>
- <Button Content="{lex:Loc 新建脚本}"
- VerticalAlignment="Center"
- Command="{Binding CreateFileCommand}" />
- <Button Content="{lex:Loc 移除脚本}"
- VerticalAlignment="Center"
- Margin="5,0"
- Command="{Binding DelectFileCommand}"
- CommandParameter="{Binding ElementName=cmbScript,Path=SelectedItem}" />
- </StackPanel>
- <control:ScriptEditControl Grid.Row="1"
- IsEnabled="{Binding IsSelected}"
- Text="{Binding Scripting,Mode=TwoWay}"
- CompileType="BackgroundScripting"
- ScriptPath="{Binding ScriptingFilePath,Mode=TwoWay}">
- <b:Interaction.Triggers>
- <b:EventTrigger EventName="OnSaveScript">
- <b:InvokeCommandAction Command="{Binding SaveScriptCommand}" />
- </b:EventTrigger>
- </b:Interaction.Triggers>
- </control:ScriptEditControl>
- </Grid>
- </UserControl>
|