design: 헤더, 파일뷰, 탭 스타일 변경

prototype
HyungJune Kim 7 months ago
parent 289316a71f
commit 5b71d4e297

@ -13,11 +13,13 @@ namespace SmartAquaViewer.INI
{
private readonly string strINIPath;
[DllImport("kernel32", CharSet = CharSet.Ansi)]
private static extern long WritePrivateProfileString(String section, String key, String val, String filePath);
[DllImport("kernel32.dll", CharSet = CharSet.Unicode)]
private static extern long WritePrivateProfileString(
string section, string key, string val, string filePath);
[DllImport("kernel32", CharSet = CharSet.Ansi)]
private static extern int GetPrivateProfileString(String section, String key, String def, StringBuilder retVal, int size, String filePath);
[DllImport("kernel32.dll", CharSet = CharSet.Unicode)]
private static extern int GetPrivateProfileString(
string section, string key, string def, StringBuilder retVal, int size, string filePath);
public INIManager(String INIPath)
{

@ -24,24 +24,22 @@
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="35"/>
<RowDefinition Height="100"/>
<RowDefinition Height="48"/>
<RowDefinition Height="92"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Border Grid.ColumnSpan="2">
<Border Grid.ColumnSpan="2" Background="#1D3649"
BorderBrush="#325C80" BorderThickness="0 0 0 1">
<Grid>
<Grid.Background>
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1" Opacity="0.61">
<GradientStop Color="#394861" Offset="0.0"/>
<GradientStop Color="#232839" Offset="1"/>
</LinearGradientBrush>
</Grid.Background>
<TextBlock x:Name="appTitle" Text="{Binding AppTitle}" FontFamily="{StaticResource SCDream6}"
Margin="20 0 0 0" Foreground="White"
Margin="20 0 0 0" Foreground="White" FontSize="16"
VerticalAlignment="Center"/>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Top" WindowChrome.IsHitTestVisibleInChrome="True">
<Image Source="/Resources/Images/NIFS_logo_w.png"
HorizontalAlignment="Center" VerticalAlignment="Stretch"/>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" WindowChrome.IsHitTestVisibleInChrome="True">
<Button Style="{StaticResource WindowChromeButtonStyle}" x:Name="windowMin" Content="━" Click="WindowMin_Click" FontSize="14" FontWeight="Bold"></Button>
<Button Style="{StaticResource WindowChromeButtonStyle}" x:Name="windowMax" Click="WindowMax_Click">
<StackPanel Orientation="Vertical">
@ -59,36 +57,28 @@
</Border>
<Grid Grid.Row="1" Grid.RowSpan="2" Grid.ColumnSpan="2"
Background="#1E2241"/>
Background="#152935"/>
<Border Grid.Row="1" Grid.RowSpan="2" Margin="10"
BorderBrush="#2d374c" BorderThickness="2"> <!--파일 리스트-->
<view:FileListView x:Name="fileListView"/>
</Border>
<Border Grid.Row="1" Grid.Column="1" Margin="0 10 10 0">
<view:FileListView Grid.Row="1" Grid.RowSpan="2" x:Name="fileListView"/>
<Border Grid.Row="1" Grid.Column="1" Margin="16 12 16 0">
<UniformGrid Columns="4">
<RadioButton x:Name="rdbtnMonitoing" GroupName="contentSwap" Content="모니터링" Tag="monitoring"
Style="{StaticResource ImageRadioButtonStyle}" IsChecked="True" FontSize="30"
Style="{StaticResource RadioButtonTabStyle}" IsChecked="True" FontSize="30"
helper:RadioButtonHelper.UnPressedImage="/Resources/Images/tab_bg_off.png"
helper:RadioButtonHelper.PressedImage="/Resources/Images/tab_bg.png"
Command="{Binding SwapViewCommand}"
CommandParameter="{Binding Tag, RelativeSource={RelativeSource Self}}"/>
<RadioButton x:Name="rdbtnEnergy" GroupName="contentSwap" Content="에너지" Tag="energy"
Style="{StaticResource ImageRadioButtonStyle}" Grid.Column="1" FontSize="30"
helper:RadioButtonHelper.UnPressedImage="/Resources/Images/tab_bg_off.png"
helper:RadioButtonHelper.PressedImage="/Resources/Images/tab_bg.png"
Style="{StaticResource RadioButtonTabStyle}" Grid.Column="1" FontSize="30"
Command="{Binding SwapViewCommand}"
CommandParameter="{Binding Tag, RelativeSource={RelativeSource Self}}"/>
<RadioButton x:Name="rdBtnGreenHouseGas" GroupName="contentSwap" Content="온실가스" Tag="greenHouseGas"
Style="{StaticResource ImageRadioButtonStyle}" Grid.Column="2" FontSize="30"
helper:RadioButtonHelper.UnPressedImage="/Resources/Images/tab_bg_off.png"
helper:RadioButtonHelper.PressedImage="/Resources/Images/tab_bg.png"
Style="{StaticResource RadioButtonTabStyle}" Grid.Column="2" FontSize="30"
Command="{Binding SwapViewCommand}"
CommandParameter="{Binding Tag, RelativeSource={RelativeSource Self}}"/>
<RadioButton x:Name="rdbtnCCTV" GroupName="contentSwap" Content="CCTV" Tag="cctv"
Style="{StaticResource ImageRadioButtonStyle}" Grid.Column="3" FontSize="30"
helper:RadioButtonHelper.UnPressedImage="/Resources/Images/tab_bg_off.png"
helper:RadioButtonHelper.PressedImage="/Resources/Images/tab_bg.png"
Style="{StaticResource RadioButtonTabStyle}" Grid.Column="3" FontSize="30"
Command="{Binding SwapViewCommand}"
CommandParameter="{Binding Tag, RelativeSource={RelativeSource Self}}"/>
</UniformGrid>

@ -29,7 +29,7 @@ namespace SmartAquaViewer
private void MainWindow_Loaded(object sender, RoutedEventArgs e)
{
ConfigData.Instance.LoadConfig();
//ConfigData.Instance.LoadConfig();
CreateDirectories();
Datas.Instance.GetCCTVInfoListFromJson();

@ -107,6 +107,31 @@
</Setter>
</Style>
<Style x:Key="RadioButtonTabStyle" TargetType="RadioButton">
<Setter Property="Foreground" Value="#999"/>
<Setter Property="FontSize" Value="26"/>
<Setter Property="Background" Value="#325C80"/>
<Setter Property="Opacity" Value="0.4"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="RadioButton">
<Border Background="{TemplateBinding Background}">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"
TextElement.FontFamily="{StaticResource SCDream8}"
TextElement.FontSize="{TemplateBinding FontSize}"
TextElement.Foreground="{TemplateBinding Foreground}"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter Property="Opacity" Value="0.8"/>
<Setter Property="Foreground" Value="White"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="ImageButtonStyle" TargetType="Button">
<Setter Property="Width" Value="58"/>
<Setter Property="Height" Value="42"/>

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

@ -27,6 +27,7 @@
<None Remove="Resources\Images\background.png" />
<None Remove="Resources\Images\ListImage.png" />
<None Remove="Resources\Images\max.png" />
<None Remove="Resources\Images\NIFS_logo_w.png" />
<None Remove="Resources\Images\normal.png" />
<None Remove="Resources\Images\SegmentedControl\select_btn_1.png" />
<None Remove="Resources\Images\SegmentedControl\select_btn_1_press.png" />
@ -82,6 +83,7 @@
<Resource Include="Resources\Images\background.png" />
<Resource Include="Resources\Images\ListImage.png" />
<Resource Include="Resources\Images\max.png" />
<Resource Include="Resources\Images\NIFS_logo_w.png" />
<Resource Include="Resources\Images\normal.png" />
<Resource Include="Resources\Images\SegmentedControl\select_btn_1.png" />
<Resource Include="Resources\Images\SegmentedControl\select_btn_1_press.png" />

@ -13,7 +13,7 @@
<vm:FileListViewModel/>
</UserControl.DataContext>
<Border>
<Border Background="#264A60">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="100"/>

@ -9,6 +9,7 @@ using System.Threading.Tasks;
using System.Windows.Input;
using FFmpeg.AutoGen;
using Newtonsoft.Json;
using SmartAquaViewer.Classes;
using SmartAquaViewer.Controls;
using SmartAquaViewer.DataAnalysis;
using SmartAquaViewer.Model;
@ -37,7 +38,9 @@ namespace SmartAquaViewer.ViewModel
public MainViewModel()
{
AppTitle = "스마트양식 수처리시스템 운용 및 성능예측 소프트웨어 개발";
ConfigData.Instance.LoadConfig();
AppTitle = ConfigData.Instance.Title;
SwapViewCommand = new RelayCommand(SwapView);

@ -0,0 +1,3 @@
[CONFIG]
TITLE=SmartAquaViwer
DATA-FILE-PATH=data_folder
Loading…
Cancel
Save