Commit 25556f06 by liulongfei

样式调整

parent 37a8fe70
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style x:Key="Button_Main" TargetType="Button">
<Setter Property="FocusVisualStyle" Value="{x:Null}"></Setter>
<Setter Property="Background" Value="#FF4E4BDE"></Setter>
<Setter Property="Foreground" Value="#FFF2F2F2"></Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="bg" Background="{TemplateBinding Background}">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"></ContentPresenter>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#FF5C59F6"></Setter>
</Trigger>
<Trigger Property="IsFocused" Value="True">
<Setter Property="Background" Value="#FF0078D7"></Setter>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.4"></Setter>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
\ No newline at end of file
...@@ -77,6 +77,10 @@ ...@@ -77,6 +77,10 @@
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType> <SubType>Designer</SubType>
</Page> </Page>
<Page Include="Style\Button\Button_Default.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Style\CheckBox\CheckBox_Resource.xaml"> <Page Include="Style\CheckBox\CheckBox_Resource.xaml">
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType> <SubType>Designer</SubType>
......
...@@ -12,6 +12,16 @@ ...@@ -12,6 +12,16 @@
d:Background="White" d:Background="White"
d:DesignHeight="580" d:DesignWidth="500"> d:DesignHeight="580" d:DesignWidth="500">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/VIZ.Package.Module.Resource;component/Style/Button/Button_Default.xaml"></ResourceDictionary>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>
<dxmvvm:Interaction.Behaviors> <dxmvvm:Interaction.Behaviors>
<dxmvvm:EventToCommand EventName="Loaded" Command="{Binding Path=LoadedCommand}"></dxmvvm:EventToCommand> <dxmvvm:EventToCommand EventName="Loaded" Command="{Binding Path=LoadedCommand}"></dxmvvm:EventToCommand>
</dxmvvm:Interaction.Behaviors> </dxmvvm:Interaction.Behaviors>
...@@ -98,6 +108,7 @@ ...@@ -98,6 +108,7 @@
<!-- 按钮组 --> <!-- 按钮组 -->
<Button Grid.Row="7" Height="40" Grid.Column="1" Content="登录" HorizontalAlignment="Stretch" <Button Grid.Row="7" Height="40" Grid.Column="1" Content="登录" HorizontalAlignment="Stretch"
Style="{StaticResource Button_Main}"
Command="{Binding Path=LoginCommand}"></Button> Command="{Binding Path=LoginCommand}"></Button>
</Grid> </Grid>
......
...@@ -255,8 +255,6 @@ namespace VIZ.Package.Module ...@@ -255,8 +255,6 @@ namespace VIZ.Package.Module
{ {
this.SaveProject(); this.SaveProject();
} }
ApplicationDomainEx.ProjectDbContext.Dispose();
} }
OpenProjectWindow window = new OpenProjectWindow(); OpenProjectWindow window = new OpenProjectWindow();
...@@ -269,6 +267,7 @@ namespace VIZ.Package.Module ...@@ -269,6 +267,7 @@ namespace VIZ.Package.Module
if (vm == null) if (vm == null)
return; return;
ApplicationDomainEx.ProjectDbContext.Dispose();
this.OpenProject(vm.SelectedFileModel.Path); this.OpenProject(vm.SelectedFileModel.Path);
} }
......
...@@ -13,7 +13,15 @@ ...@@ -13,7 +13,15 @@
xmlns:local="clr-namespace:VIZ.Package.Module" xmlns:local="clr-namespace:VIZ.Package.Module"
d:DataContext="{d:DesignInstance Type=local:OpenProjectWindowModel}" d:DataContext="{d:DesignInstance Type=local:OpenProjectWindowModel}"
mc:Ignorable="d" WindowStartupLocation="CenterScreen" mc:Ignorable="d" WindowStartupLocation="CenterScreen"
Title="项目管理" Height="600" Width="800"> Title="项目管理" Height="600" Width="1000">
<dx:ThemedWindow.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/VIZ.Package.Module.Resource;component/Style/Button/Button_Default.xaml"></ResourceDictionary>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</dx:ThemedWindow.Resources>
<Grid Margin="0,10,0,0"> <Grid Margin="0,10,0,0">
<Grid.RowDefinitions> <Grid.RowDefinitions>
...@@ -46,7 +54,7 @@ ...@@ -46,7 +54,7 @@
<!-- 按钮组 --> <!-- 按钮组 -->
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Row="1" Grid.ColumnSpan="2"> <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Row="1" Grid.ColumnSpan="2">
<Button Width="80" Height="40" Content="打开项目" Margin="20,0,20,0" Command="{Binding Path=OpenProjectCommand}"></Button> <Button Width="80" Height="30" Content="打开项目" Margin="20,0,20,0" Command="{Binding Path=OpenProjectCommand}" Style="{StaticResource Button_Main}"></Button>
</StackPanel> </StackPanel>
</Grid> </Grid>
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
</dxmvvm:Interaction.Behaviors> </dxmvvm:Interaction.Behaviors>
<Grid> <Grid>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="300" MinWidth="300" MaxWidth="500"></ColumnDefinition> <ColumnDefinition Width="450" MinWidth="450" MaxWidth="600"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition> <ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
<GridSplitter HorizontalAlignment="Right" Width="5" Style="{StaticResource GridSplitter_None}"></GridSplitter> <GridSplitter HorizontalAlignment="Right" Width="5" Style="{StaticResource GridSplitter_None}"></GridSplitter>
<!-- 文件列表 --> <!-- 文件列表 -->
<dxg:GridControl ItemsSource="{Binding FileModels}" ShowBorder="False" <dxg:GridControl ItemsSource="{Binding FileModels}" ShowBorder="True"
IsEnabled="{Binding Path=IsFilePanelEnabled}" IsEnabled="{Binding Path=IsFilePanelEnabled}"
IsFilterEnabled="False" Grid.Column="1" SelectionMode="Row" IsFilterEnabled="False" Grid.Column="1" SelectionMode="Row"
SelectedItem="{Binding SelectedFileModel,Mode=TwoWay}" SelectedItem="{Binding SelectedFileModel,Mode=TwoWay}"
......
...@@ -13,7 +13,14 @@ ...@@ -13,7 +13,14 @@
xmlns:local="clr-namespace:VIZ.Package.Module" xmlns:local="clr-namespace:VIZ.Package.Module"
d:DataContext="{d:DesignInstance Type=local:SaveProjectWindowModel}" d:DataContext="{d:DesignInstance Type=local:SaveProjectWindowModel}"
mc:Ignorable="d" WindowStartupLocation="CenterScreen" mc:Ignorable="d" WindowStartupLocation="CenterScreen"
Title="项目管理" Height="600" Width="800"> Title="项目管理" Height="600" Width="1000">
<dx:ThemedWindow.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/VIZ.Package.Module.Resource;component/Style/Button/Button_Default.xaml"></ResourceDictionary>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</dx:ThemedWindow.Resources>
<Grid Margin="0,10,0,0"> <Grid Margin="0,10,0,0">
<Grid.RowDefinitions> <Grid.RowDefinitions>
...@@ -47,15 +54,14 @@ ...@@ -47,15 +54,14 @@
<!-- 按钮组 --> <!-- 按钮组 -->
<Grid Grid.Row="1"> <Grid Grid.Row="1">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"></ColumnDefinition> <ColumnDefinition Width="60"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition> <ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="120"></ColumnDefinition>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal" Grid.Row="1" VerticalAlignment="Center"> <TextBlock Text="项目名:" Margin="20,0,0,0" VerticalAlignment="Center"></TextBlock>
<TextBlock Text="项目名:" Margin="20,0,0,0" VerticalAlignment="Center"></TextBlock> <dxe:TextEdit Height="30" Margin="20,0,0,0" Grid.Column="1" EditValue="{Binding Path=ProjectName,Mode=TwoWay}"></dxe:TextEdit>
<dxe:TextEdit Width="400" Margin="20,0,0,0" EditValue="{Binding Path=ProjectName,Mode=TwoWay}"></dxe:TextEdit> <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Row="1" Grid.Column="2">
</StackPanel> <Button Width="80" Height="30" Content="保存项目" Margin="20,0,20,0" Command="{Binding Path=SaveProjectCommand}" Style="{StaticResource Button_Main}"></Button>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Row="1" Grid.Column="1">
<Button Width="80" Height="40" Content="保存项目" Margin="20,0,20,0" Command="{Binding Path=SaveProjectCommand}"></Button>
</StackPanel> </StackPanel>
</Grid> </Grid>
</Grid> </Grid>
......
...@@ -4,8 +4,21 @@ ...@@ -4,8 +4,21 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:VIZ.Package.Module" xmlns:local="clr-namespace:VIZ.Package.Module"
xmlns:core="clr-namespace:VIZ.Framework.Core;assembly=VIZ.Framework.Core"
mc:Ignorable="d" mc:Ignorable="d"
d:DataContext="{d:DesignInstance Type=local:GHSceneViewModel}"
d:DesignHeight="450" d:DesignWidth="800"> d:DesignHeight="450" d:DesignWidth="800">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/VIZ.Package.Module.Resource;component/Style/Button/Button_Default.xaml"></ResourceDictionary>
</ResourceDictionary.MergedDictionaries>
<core:ObjectNotNull2BoolConverter x:Key="ObjectNotNull2BoolConverter"></core:ObjectNotNull2BoolConverter>
</ResourceDictionary>
</UserControl.Resources>
<Grid Background="Transparent"> <Grid Background="Transparent">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="*"></RowDefinition> <RowDefinition Height="*"></RowDefinition>
...@@ -28,7 +41,9 @@ ...@@ -28,7 +41,9 @@
</local:GHResourcePanel> </local:GHResourcePanel>
<!-- 按钮组 --> <!-- 按钮组 -->
<StackPanel Orientation="Horizontal" Grid.Row="1" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,10,0"> <StackPanel Orientation="Horizontal" Grid.Row="1" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,10,0">
<Button Content="添加至模板列表" Width="120" Height="30" Command="{Binding Path=AddSceneTemplateCommand}"></Button> <Button Content="添加至模板列表" Width="120" Height="30" Style="{StaticResource Button_Main}"
Command="{Binding Path=AddSceneTemplateCommand}"
IsEnabled="{Binding Path=SelectedFileModel,Mode=OneWay,Converter={StaticResource ObjectNotNull2BoolConverter}}"></Button>
</StackPanel> </StackPanel>
</Grid> </Grid>
</UserControl> </UserControl>
...@@ -14,10 +14,19 @@ ...@@ -14,10 +14,19 @@
mc:Ignorable="d" WindowStartupLocation="CenterScreen" mc:Ignorable="d" WindowStartupLocation="CenterScreen"
Title="设置" Height="800" Width="1400"> Title="设置" Height="800" Width="1400">
<dx:ThemedWindow.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/VIZ.Package.Module.Resource;component/Style/Button/Button_Default.xaml"></ResourceDictionary>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</dx:ThemedWindow.Resources>
<dxmvvm:Interaction.Behaviors> <dxmvvm:Interaction.Behaviors>
<dxmvvm:EventToCommand EventName="Loaded" Command="{Binding Path=LoadedCommand}"></dxmvvm:EventToCommand> <dxmvvm:EventToCommand EventName="Loaded" Command="{Binding Path=LoadedCommand}"></dxmvvm:EventToCommand>
</dxmvvm:Interaction.Behaviors> </dxmvvm:Interaction.Behaviors>
<Grid Margin="0,5,0,0"> <Grid Margin="0,5,0,0">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="200"></ColumnDefinition> <ColumnDefinition Width="200"></ColumnDefinition>
...@@ -47,7 +56,7 @@ ...@@ -47,7 +56,7 @@
<!-- 按钮组 --> <!-- 按钮组 -->
<StackPanel Grid.Row="1" Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Right" <StackPanel Grid.Row="1" Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Right"
Margin="0,0,20,0"> Margin="0,0,20,0">
<Button Content="保存" Width="120" Height="30" Command="{Binding Path=SaveCommand}"></Button> <Button Content="保存" Width="120" Height="30" Command="{Binding Path=SaveCommand}" Style="{StaticResource Button_Main}"></Button>
<Button Content="取消" Width="120" Height="30" Command="{Binding Path=CancelCommand}" Margin="20,0,0,0"></Button> <Button Content="取消" Width="120" Height="30" Command="{Binding Path=CancelCommand}" Margin="20,0,0,0"></Button>
</StackPanel> </StackPanel>
</Grid> </Grid>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment