OmagVIEW 2.1i1 :

- Aggiunto il tema Dark, con cambio tema nel dialog delle Opzioni (lettura/scrittura da file INI, come per OmagCUT)
This commit is contained in:
Renzo Lanza
2019-09-24 15:08:09 +00:00
parent c74aa80e3f
commit a84450d377
28 changed files with 388 additions and 66 deletions
+9 -9
View File
@@ -34,24 +34,24 @@
<ColumnDefinition Width="3*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Border Name="LogoBrd" Grid.Column="1" Background="White">
<Image Source="Resources/LogoOmag.jpg" Stretch="Uniform"/>
<Border Name="LogoBrd" Grid.Column="1" Background="{DynamicResource Omag_LogoBackground}">
<Image Source="{DynamicResource LogoOmagImg}" Stretch="Uniform"/>
</Border>
</Grid>
<TextBlock Name="DescriptionLbl" Grid.Column="1" Grid.Row="3" HorizontalAlignment="Center"
VerticalAlignment="Center" FontSize="18" />
VerticalAlignment="Center" FontSize="18" Foreground="{DynamicResource Omag_TextColor}"/>
<TextBlock Name="VersionLbl" Grid.Column="1" Grid.Row="4" HorizontalAlignment="Center"
VerticalAlignment="Center" FontSize="18"/>
VerticalAlignment="Center" FontSize="18" Foreground="{DynamicResource Omag_TextColor}"/>
<TextBlock Name="KeyLbl" Grid.Column="1" Grid.Row="5" HorizontalAlignment="Center"
VerticalAlignment="Center" FontSize="16"/>
VerticalAlignment="Center" FontSize="16" Foreground="{DynamicResource Omag_TextColor}"/>
<TextBlock Name="MachineLbl" Grid.Column="1" Grid.Row="6" HorizontalAlignment="Center"
VerticalAlignment="Center" FontSize="18"/>
VerticalAlignment="Center" FontSize="18" Foreground="{DynamicResource Omag_TextColor}"/>
<TextBlock Name="ProjIndexLbl" Grid.Column="1" Grid.Row="7" HorizontalAlignment="Center"
VerticalAlignment="Center" FontSize="18"/>
VerticalAlignment="Center" FontSize="18" Foreground="{DynamicResource Omag_TextColor}"/>
<TextBlock Name="ProjPathLbl" Grid.Column="1" Grid.Row="8" HorizontalAlignment="Center"
VerticalAlignment="Center" FontSize="18"/>
VerticalAlignment="Center" FontSize="18" Foreground="{DynamicResource Omag_TextColor}"/>
<TextBlock Name="CopyrightLbl" Grid.Column="1" Grid.Row="9" HorizontalAlignment="Center"
VerticalAlignment="Center" FontSize="15" />
VerticalAlignment="Center" FontSize="15" Foreground="{DynamicResource Omag_TextColor}"/>
<Button Name="ExitBtn" Grid.Column="1" Grid.Row="11" IsCancel="True"
Style="{StaticResource OmagCut_WindowGrayTextButton}" Margin="1,0"/>
+12 -2
View File
@@ -4,7 +4,17 @@
StartupUri="MainWindow.xaml">
<Application.Resources>
<ResourceDictionary Source="OmagVIEWDictionary.xaml"/>
</Application.Resources>
<!--<ResourceDictionary Source="OmagVIEWDictionary.xaml"/>-->
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary x:Name="ThemeDictionary">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="OmagVIEWDarkDictionary.xaml"/>
<ResourceDictionary Source="OmagVIEWDictionary.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</Application>
+18 -2
View File
@@ -1,6 +1,22 @@
Class Application
' Application-level events, such as Startup, Exit, and DispatcherUnhandledException
' can be handled in this file.
' Application-level events, such as Startup, Exit, and DispatcherUnhandledException
' can be handled in this file.
Public Property ThemeDictionary As ResourceDictionary
' You could probably get it via its name with some query logic as well.
Get
Return Resources.MergedDictionaries(0)
End Get
Set(value As ResourceDictionary)
End Set
End Property
Public Sub ChangeTheme(uri As Uri)
ThemeDictionary.MergedDictionaries.RemoveAt(0) ' Clear()
Dim rd As ResourceDictionary = New ResourceDictionary()
rd.Source = uri
ThemeDictionary.MergedDictionaries.Add(rd) ' New ResourceDictionary()) ' Source:=uri))
End Sub
End Class
+1
View File
@@ -24,6 +24,7 @@ Module ConstIni
Public Const K_MMUNITS As String = "MmUnits"
Public Const K_PROJDIR As String = "ProjDir"
Public Const K_PREVNEXTPROJ As String = "PrevNextProj"
Public Const K_THEME As String = "Theme"
Public Const S_LANGUAGES As String = "Languages"
Public Const K_LANGUAGE As String = "Language"
+19 -19
View File
@@ -3,11 +3,11 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:OmagVIEW"
Title="MainWindow" Height="1024" Width="1280" ResizeMode="NoResize" WindowStyle="None"
FontFamily="./Resources/Fonts/#Century Gothic"
Icon="Resources/LogoOmag.jpg">
FontFamily="{DynamicResource OmagView_Font}"
Icon="{DynamicResource LogoOmagImg}">
<!-- ** Definizione della Grid della MainWindow ** -->
<Grid Name="MainWindowGrid" Background="{StaticResource OmagCut_Gray}">
<Grid Name="MainWindowGrid" Background="{DynamicResource OmagCut_MainBackground}">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="11*"/>
@@ -21,8 +21,8 @@
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Border Name="LogoBrd" Background="WhiteSmoke">
<Image Source="Resources/LogoOmag.jpg" Stretch="Uniform" Margin="1"/>
<Border Name="LogoBrd" Background="{DynamicResource Omag_LogoBackground}">
<Image Source="{DynamicResource LogoOmagImg}" Stretch="Uniform" Margin="1"/>
</Border>
<!-- ** Definizione della Grid delle tab ** -->
@@ -40,21 +40,21 @@
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Button Name="PrevBtn" Grid.Column="0" Style="{StaticResource OmagCut_BlueIconButton}">
<Image Source="Resources/UpArrow.png" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
<Button Name="PrevBtn" Grid.Column="0" Style="{DynamicResource OmagCut_BlueIconButton}">
<Image Source="{DynamicResource UpArrowImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
</Button>
<Button Name="NextBtn" Grid.Column="1" Style="{StaticResource OmagCut_BlueIconButton}">
<Image Source="Resources/DownArrow.png" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
<Button Name="NextBtn" Grid.Column="1" Style="{DynamicResource OmagCut_BlueIconButton}">
<Image Source="{DynamicResource DownArrowImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
</Button>
</Grid>
<Button Name="OptionsBtn" Grid.Column="5" Style="{StaticResource OmagCut_BlueIconButton}">
<Image Source="Resources/Options.png" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
<Button Name="OptionsBtn" Grid.Column="5" Style="{DynamicResource OmagCut_BlueIconButton}">
<Image Source="{DynamicResource OptionsImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
</Button>
</Grid>
<Button Grid.Column="7" Style="{StaticResource OmagCut_BlueIconButton}" Click="ExitBtn_Click">
<Image Source="Resources/X.png" Style="{StaticResource OmagCut_ButtonIcon}"/>
<Button Grid.Column="7" Style="{DynamicResource OmagCut_BlueIconButton}" Click="ExitBtn_Click">
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
</Grid>
@@ -75,17 +75,17 @@
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Button Name="OkAllBtn" Grid.Row="0" Style="{StaticResource OmagCut_GreenTextButton}"
<Button Name="OkAllBtn" Grid.Row="0" Style="{DynamicResource OmagCut_GreenTextButton}"
FontSize="32"/>
<Button Name="OkPartBtn" Grid.Row="1" Style="{StaticResource OmagCut_GreenTextButton}"
<Button Name="OkPartBtn" Grid.Row="1" Style="{DynamicResource OmagCut_GreenTextButton}"
FontSize="32"/>
<Button Name="RuinedPartBtn" Grid.Row="2" Style="{StaticResource OmagCut_RedTextButton}"
<Button Name="RuinedPartBtn" Grid.Row="2" Style="{DynamicResource OmagCut_RedTextButton}"
FontSize="32"/>
<Button Name="PrintBtn" Grid.Row="3" Style="{StaticResource OmagCut_BlueTextButton}"
<Button Name="PrintBtn" Grid.Row="3" Style="{DynamicResource OmagCut_BlueTextButton}"
FontSize="32"/>
<Button Name="LabelBtn" Grid.Row="4" Style="{StaticResource OmagCut_BlueTextButton}"
<Button Name="LabelBtn" Grid.Row="4" Style="{DynamicResource OmagCut_BlueTextButton}"
FontSize="32"/>
<Button Name="ConfirmBtn" Grid.Row="5" Style="{StaticResource OmagCut_BlueTextButton}"
<Button Name="ConfirmBtn" Grid.Row="5" Style="{DynamicResource OmagCut_BlueTextButton}"
FontSize="32"/>
<Border Name="OutMessageBrd" Grid.Row="6" >
<TextBlock Name="OutMessageTxBl" TextAlignment="Center"
+26
View File
@@ -31,6 +31,8 @@ Class MainWindow
Private m_nProjInd As Integer = 0
' Flag di ultimo progetto trasmesso
Private m_bLastProj As Boolean = False
' Variabile con il tema corrente
Friend m_CurrTheme As Integer = 0
' Opzioni abilitate dalla licenza attiva associata alla chiave
Private m_nKeyOptions As UInteger
Friend Enum KEY_OPT As UInteger
@@ -126,6 +128,18 @@ Class MainWindow
Dim sLogFile As String = m_sTempDir & "\" & GENLOG_FILE_NAME
Dim sLogMsg As String = My.Application.Info.Description.ToString() & " ver. " & m_sVersion
EgtInit(m_nDebug, sLogFile, sLogMsg)
' Leggo tema dal file ini
m_CurrTheme = GetPrivateProfileInt(S_GENERAL, K_THEME, 0, GetIniFile)
Dim app As Application = Application.Current
If (m_CurrTheme = 0) Then
app.ChangeTheme(New Uri("/OmagVIEW;component/OmagVIEWDictionary.xaml", UriKind.Relative))
End If
If (m_CurrTheme = 1) Then
app.ChangeTheme(New Uri("/OmagView;component/OmagViewDarkDictionary.xaml", UriKind.Relative))
Application.Current.Resources("GroupBox_CornerRadius") = 3
Application.Current.Resources("Button_CornerRadius") = 3
Application.Current.Resources("EmptyBorder_CornerRadius") = New CornerRadius(3)
End If
' Leggo direttorio dei messaggi (se manca uso direttorio di configurazione)
Dim sMsgDir As String = String.Empty
If GetPrivateProfileString(S_GENERAL, K_MESSAGESDIR, "", sMsgDir, m_sIniFile) = 0 Then
@@ -693,6 +707,18 @@ Class MainWindow
Private Sub OptionsBtn_Click(sender As Object, e As RoutedEventArgs) Handles OptionsBtn.Click
Dim OptionPage As New OptionsPageUC(Me)
Dim app As Application = Application.Current
If (m_CurrTheme = 0) Then
app.ChangeTheme(New Uri("/OmagVIEW;component/OmagVIEWDictionary.xaml", UriKind.Relative))
WritePrivateProfileString(S_GENERAL, K_THEME, 0, GetIniFile())
End If
If (m_CurrTheme = 1) Then
app.ChangeTheme(New Uri("/OmagView;component/OmagViewDarkDictionary.xaml", UriKind.Relative))
Application.Current.Resources("GroupBox_CornerRadius") = 3
Application.Current.Resources("Button_CornerRadius") = 3
Application.Current.Resources("EmptyBorder_CornerRadius") = New CornerRadius(3)
WritePrivateProfileString(S_GENERAL, K_THEME, 1, GetIniFile())
End If
End Sub
Private Sub ExitBtn_Click(sender As Object, e As RoutedEventArgs)
+3 -3
View File
@@ -42,7 +42,7 @@ Imports System.Windows
'The following GUID is for the ID of the typelib if this project is exposed to COM
<Assembly: Guid("d912881b-e176-474a-af2b-f07f2032db8b")>
<Assembly: Guid("d912881b-e176-474a-af2b-f07f2032db8b")>
' Version information for an assembly consists of the following four values:
'
@@ -55,5 +55,5 @@ Imports System.Windows
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.1.6.3")>
<Assembly: AssemblyFileVersion("2.1.6.3")>
<Assembly: AssemblyVersion("2.1.9.1")>
<Assembly: AssemblyFileVersion("2.1.9.1")>
+25 -1
View File
@@ -138,6 +138,10 @@
<DependentUpon>MainWindow.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Page Include="OmagVIEWDarkDictionary.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="OmagVIEWDictionary.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
@@ -199,11 +203,11 @@
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
</None>
<AppDesigner Include="My Project\" />
<Resource Include="Resources\Fonts\Roboto-Regular.ttf" />
<Resource Include="Resources\Fonts\gothic.ttf" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\GenericView.png" />
<Resource Include="Resources\LogoOmag.jpg" />
<Resource Include="Resources\LookFromTOP.png" />
<Resource Include="Resources\Options.png" />
<Resource Include="Resources\Pan.png" />
@@ -223,6 +227,26 @@
<ItemGroup>
<Resource Include="Resources\UpArrow.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\DarkTheme\DownArrow.png" />
<Resource Include="Resources\DarkTheme\GenericView.png" />
<Resource Include="Resources\DarkTheme\LookFromTOP.png" />
<Resource Include="Resources\DarkTheme\Pan.png" />
<Resource Include="Resources\DarkTheme\Options.png" />
<Resource Include="Resources\DarkTheme\UpArrow.png" />
<Resource Include="Resources\DarkTheme\V.png" />
<Resource Include="Resources\DarkTheme\X.png" />
<Resource Include="Resources\DarkTheme\ZoomIn.png" />
<Resource Include="Resources\DarkTheme\ZoomOut.png" />
<Resource Include="Resources\DarkTheme\ZoomAll.png" />
<Resource Include="Resources\DarkTheme\ZoomWin.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\DarkTheme\LogoOmag.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\LogoOmag.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup>
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\OmagVIEW\OmagVIEWR32.exe
+172
View File
@@ -0,0 +1,172 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:system="clr-namespace:System;assembly=mscorlib"
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
xmlns:project="clr-namespace:OmagVIEW"
xmlns:ControlExtensions="clr-namespace:OmagVIEW.ControlExtensions"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:local="clr-namespace:OmagVIEW.ArithmeticConverterNameSpace"
x:Class="OmagVIEWDarkDictionary">
<!--Importo EgtDictionary-->
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="OmagVIEWDictionary.xaml" />
</ResourceDictionary.MergedDictionaries>
<BitmapImage x:Key="DownArrowImg" UriSource="Resources/DarkTheme/DownArrow.png"></BitmapImage>
<BitmapImage x:Key="GenericViewImg" UriSource="Resources/DarkTheme/GenericView.png"></BitmapImage>
<BitmapImage x:Key="LogoOmagImg" UriSource="Resources/DarkTheme/LogoOmag.png"></BitmapImage>
<BitmapImage x:Key="LookFromTOPImg" UriSource="Resources/DarkTheme/LookFromTOP.png"></BitmapImage>
<BitmapImage x:Key="OptionsImg" UriSource="Resources/DarkTheme/Options.png"></BitmapImage>
<BitmapImage x:Key="PanImg" UriSource="Resources/DarkTheme/Pan.png"></BitmapImage>
<BitmapImage x:Key="UpArrowImg" UriSource="Resources/DarkTheme/UpArrow.png"></BitmapImage>
<BitmapImage x:Key="VImg" UriSource="Resources/DarkTheme/V.png"></BitmapImage>
<BitmapImage x:Key="XImg" UriSource="Resources/DarkTheme/X.png"></BitmapImage>
<BitmapImage x:Key="ZoomAllImg" UriSource="Resources/DarkTheme/ZoomAll.png"></BitmapImage>
<BitmapImage x:Key="ZoomInImg" UriSource="Resources/DarkTheme/ZoomIn.png"></BitmapImage>
<BitmapImage x:Key="ZoomOutImg" UriSource="Resources/DarkTheme/ZoomOut.png"></BitmapImage>
<BitmapImage x:Key="ZoomWinImg" UriSource="Resources/DarkTheme/ZoomWIn.png"></BitmapImage>
<Thickness x:Key="BorderThickness">0.5</Thickness>
<system:Double x:Key="FontSize_GroupBoxHeader">22</system:Double>
<system:Double x:Key="GroupBox_CornerRadius">9.5</system:Double> <!--2.5mm-->
<system:Double x:Key="GroupBox_FirstColumn">12.5</system:Double> <!--3.3mm-->
<CornerRadius x:Key="EmptyBorder_CornerRadius">9.5</CornerRadius> <!--2.5mm-->
<SolidColorBrush x:Key="OmagCut_MainBackground" Color="#484D55" />
<SolidColorBrush x:Key="Omag_LogoBackground" Color="#484D55" />
<SolidColorBrush x:Key="Omag_TextColor" Color="WhiteSmoke" />
<FontFamily x:Key="OmagView_Font">./Resources/Fonts/#Roboto</FontFamily>
<Style x:Key="OmagCut_RightGrayGradientYellowButton" TargetType="{x:Type Button}" BasedOn="{StaticResource OmagCut_Button}">
<Setter Property="Background" Value="#1C1D22"/>
<Setter Property="BorderBrush" Value="#1C1D22"/>
<Setter Property="Foreground" Value="White"/>
</Style>
<Style x:Key="OmagCut_Button" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
<Setter Property="BorderThickness" Value="{StaticResource BorderThickness}"/>
<Setter Property="project:ButtonExtensions.CornerRadius" Value="{DynamicResource Button_CornerRadius}"/>
<Setter Property="Margin" Value="{StaticResource Button_MarginThickness}"/>
<Setter Property="Padding" Value="5"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="TextBlock.TextAlignment" Value="Center"/>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<!--<Setter Property="Background" Value="#FFB8C3CD"/>
<Setter Property="BorderBrush" Value="#FFB8C3CD"/>-->
<Setter Property="Background" Value="#008BFF"/>
<Setter Property="BorderBrush" Value="#008BFF"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<!--<Setter Property="OpacityMask" Value="#33FF0000"/>-->
<Setter Property="Background" Value="#E1B957"/>
<Setter Property="BorderBrush" Value="#E1B957"/>
</Trigger>
<Trigger Property="ToggleButton.IsChecked" Value="True">
<Setter Property="Background" Value="Transparent"/>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Background" Value="#FFF4F4F4"/>
<Setter Property="BorderBrush" Value="#FFADB2B5"/>
<Setter Property="TextElement.Foreground" Value="#FF838383"/>
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="OmagCut_Button_Wrap" TargetType="{x:Type Button}" BasedOn="{StaticResource OmagCut_Button}">
<Setter Property="ContentTemplate" Value="{StaticResource Button_DataTemplate_Wrap}" />
<Setter Property="FontSize" Value="{DynamicResource FontSize_LowerCaseCharacter}" />
</Style>
<Style x:Key="OmagCut_BlueIconButton" TargetType="{x:Type Button}" BasedOn="{StaticResource OmagCut_Button}">
<Setter Property="Background" Value="#636974"/>
<Setter Property="BorderBrush" Value="#636974"/>
<Setter Property="Foreground" Value="White"/>
</Style>
<!--GreenTextOmagCutButton-->
<Style x:Key="OmagCut_GreenTextButton" TargetType="{x:Type Button}" BasedOn="{StaticResource OmagCut_Button_Wrap}">
<Setter Property="Background" Value="{StaticResource OmagCut_Green}"/>
<Setter Property="BorderBrush" Value="{StaticResource OmagCut_Blue}"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{StaticResource OmagCut_Green}"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="OpacityMask" Value="#33FF0000"/>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Background" Value="#FFF4F4F4"/>
<Setter Property="BorderBrush" Value="#FFADB2B5"/>
<Setter Property="TextElement.Foreground" Value="#FF838383"/>
</Trigger>
</Style.Triggers>
</Style>
<!--RedTextOmagCutButton-->
<Style x:Key="OmagCut_RedTextButton" TargetType="{x:Type Button}" BasedOn="{StaticResource OmagCut_Button_Wrap}">
<Setter Property="Background" Value="{StaticResource OmagCut_Red}"/>
<Setter Property="BorderBrush" Value="{StaticResource OmagCut_Blue}"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{StaticResource OmagCut_Red}"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="OpacityMask" Value="#33FF0000"/>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Background" Value="#FFF4F4F4"/>
<Setter Property="BorderBrush" Value="#FFADB2B5"/>
<Setter Property="TextElement.Foreground" Value="#FF838383"/>
</Trigger>
</Style.Triggers>
</Style>
<!--BlueTextOmagCutButton-->
<Style x:Key="OmagCut_BlueTextButton" TargetType="{x:Type Button}" BasedOn="{StaticResource OmagCut_Button_Wrap}">
<Setter Property="Background" Value="#2D3036"/>
<Setter Property="BorderBrush" Value="#2D3036"/>
<Setter Property="Foreground" Value="WhiteSmoke"/>
</Style>
<Style x:Key="OmagCut_WindowBorder" TargetType="{x:Type Border}" BasedOn="{StaticResource OmagCut_EmptyBorder}">
<Setter Property="CornerRadius" Value="{StaticResource Page_CornerRadius}"/>
<Setter Property="BorderBrush" Value="DarkGray"/>
<Setter Property="BorderThickness" Value="0.5"/>
<Setter Property="Background" Value="#484D55"/>
</Style>
<DataTemplate x:Key="GroupBoxHeaderTemplate">
<TextBlock Text="{Binding}" FontSize="{DynamicResource FontSize_GroupBoxHeader}" Foreground="White"/>
</DataTemplate>
<Style x:Key="OmagCut_GroupBox" TargetType="{x:Type GroupBox}" BasedOn="{StaticResource {x:Type GroupBox}}">
<Setter Property="BorderBrush" Value="LightGray"/>
<Setter Property="BorderThickness" Value="{StaticResource BorderThickness}" />
<Setter Property="HeaderTemplate" Value="{StaticResource GroupBoxHeaderTemplate}"/>
<Setter Property="ControlExtensions:GroupBoxExtensions.CornerRadius" Value="{DynamicResource GroupBox_CornerRadius}" />
<Setter Property="ControlExtensions:GroupBoxExtensions.FirstColumn" Value="{StaticResource GroupBox_FirstColumn}" />
</Style>
<Style x:Key="OmagCut_GradientBlueIconButton" TargetType="{x:Type Button}" BasedOn="{StaticResource OmagCut_Button}">
<Setter Property="Background" Value="#2D3036"/>
<Setter Property="BorderBrush" Value="#2D3036"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
</Style>
<Style x:Key="OmagCut_CenteredLowerCaseCharacterTextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource OmagCut_UpperCaseCharacterTextBlock}">
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="Foreground" Value="WhiteSmoke"/>
</Style>
<!-- *************************************************************************** -->
</ResourceDictionary>
+23 -2
View File
@@ -26,7 +26,13 @@
<SolidColorBrush x:Key="OmagCut_DarkGray" Color="#FF444444" />
<SolidColorBrush x:Key="OmagCut_White" Color="#FFFFFFFF" />
<LinearGradientBrush x:Key="OmagCut_GradientBlue" StartPoint="0,0" EndPoint="0,1" >
<SolidColorBrush x:Key="Omag_LogoBackground" Color="WhiteSmoke" />
<SolidColorBrush x:Key="Omag_TextColor" Color="Black" />
<FontFamily x:Key="OmagView_Font">./Resources/Fonts/#Century Gothic</FontFamily>
<LinearGradientBrush x:Key="OmagCut_GradientBlue" StartPoint="0,0" EndPoint="0,1" >
<GradientStop Color="LightGray"/>
<GradientStop Color="#BCB8C3CD" Offset="0.3894"/>
<GradientStop Color="#9387A6C3" Offset="0.7356"/>
@@ -81,8 +87,23 @@
<system:Double x:Key="FontSize_UnitOfMeasure">13.3</system:Double> <!--10pt-->
<Thickness x:Key="Button_MarginThickness">1</Thickness>
<CornerRadius x:Key="Page_CornerRadius">9.5</CornerRadius> <!--2.5mm-->
<SolidColorBrush x:Key="OmagCut_MainBackground" Color="#FF9E9E9E" />
<!-- ______________________________________________________________________________________________________________________ -->
<BitmapImage x:Key="DownArrowImg" UriSource="Resources/DownArrow.png"></BitmapImage>
<BitmapImage x:Key="GenericViewImg" UriSource="Resources/GenericView.png"></BitmapImage>
<BitmapImage x:Key="LogoOmagImg" UriSource="Resources/LogoOmag.png"></BitmapImage>
<BitmapImage x:Key="LookFromTOPImg" UriSource="Resources/LookFromTOP.png"></BitmapImage>
<BitmapImage x:Key="OptionsImg" UriSource="Resources/Options.png"></BitmapImage>
<BitmapImage x:Key="PanImg" UriSource="Resources/Pan.png"></BitmapImage>
<BitmapImage x:Key="UpArrowImg" UriSource="Resources/UpArrow.png"></BitmapImage>
<BitmapImage x:Key="VImg" UriSource="Resources/V.png"></BitmapImage>
<BitmapImage x:Key="XImg" UriSource="Resources/X.png"></BitmapImage>
<BitmapImage x:Key="ZoomAllImg" UriSource="Resources/ZoomAll.png"></BitmapImage>
<BitmapImage x:Key="ZoomInImg" UriSource="Resources/ZoomIn.png"></BitmapImage>
<BitmapImage x:Key="ZoomOutImg" UriSource="Resources/ZoomOut.png"></BitmapImage>
<BitmapImage x:Key="ZoomWinImg" UriSource="Resources/ZoomWIn.png"></BitmapImage>
<!-- ______________________________________________________________________________________________________________________ -->
<!--Empty Border-->
<Style x:Key="OmagCut_EmptyBorder" TargetType="{x:Type Border}">
+41 -14
View File
@@ -4,13 +4,13 @@
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
FontFamily="./Resources/Fonts/#Century Gothic"
FontFamily="{DynamicResource OmagView_Font}"
Height="682.4" Width="511.8" ResizeMode="NoResize"
ShowInTaskbar="False" AllowsTransparency="True" WindowStyle="None"
Background="Transparent">
<!-- Definizione della OptionsPage -->
<Border Style="{StaticResource OmagCut_WindowBorder}">
<Border Style="{DynamicResource OmagCut_WindowBorder}">
<Grid>
<Grid.ColumnDefinitions>
@@ -27,13 +27,15 @@
<RowDefinition Height="0.25*"/>
<RowDefinition Height="1.5*"/>
<RowDefinition Height="0.25*"/>
<RowDefinition Height="1.5*"/>
<RowDefinition Height="0.25*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="0.25*"/>
</Grid.RowDefinitions>
<TextBlock Name="OptTitle" Grid.Column="1" Grid.Row="0"
FontSize="{StaticResource FontSize_UpperCaseCharacter}" HorizontalAlignment="Center"
VerticalAlignment="Center"/>
VerticalAlignment="Center" Foreground="{DynamicResource Omag_TextColor}"/>
<GroupBox Name="LanguageGpBx" Grid.Column="1" Grid.Row="2" Style="{StaticResource OmagCut_GroupBox}">
<Grid >
<Grid.ColumnDefinitions>
@@ -42,8 +44,8 @@
<ColumnDefinition Width="0.5*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="0.25*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.2*"/>
<RowDefinition Height="0.6*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
@@ -69,9 +71,9 @@
<ColumnDefinition Width="0.5*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="0.25*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.25*"/>
<RowDefinition Height="0.2*"/>
<RowDefinition Height="0.6*"/>
<RowDefinition Height="0.2*"/>
</Grid.RowDefinitions>
<ComboBox Name="UnitsOfMeasureCmBx" Grid.Column="1" Grid.Row="1" Height="40">
@@ -94,9 +96,9 @@
<ColumnDefinition Width="0.5*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="0.25*"/>
<RowDefinition Height="0.5*"/>
<RowDefinition Height="0.25*"/>
<RowDefinition Height="0.2*"/>
<RowDefinition Height="0.6*"/>
<RowDefinition Height="0.2*"/>
</Grid.RowDefinitions>
<ComboBox Name="ViewRotCmBx" Grid.Column="1" Grid.Row="1" Height="40">
@@ -111,14 +113,39 @@
</GroupBox>
<Grid Grid.Column="1" Grid.Row="8">
<GroupBox Name="ThemesGpBx" Grid.Column="1" Grid.Row="8" Style="{StaticResource OmagCut_GroupBox}">
<Grid >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="4*"/>
<ColumnDefinition Width="0.5*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="0.2*"/>
<RowDefinition Height="0.6*"/>
<RowDefinition Height="0.2*"/>
</Grid.RowDefinitions>
<ComboBox Name="ThemesCmBx" Grid.Column="1" Grid.Row="1" Height="40">
<ComboBox.ItemTemplate>
<DataTemplate>
<Label Content="{Binding}" FontSize="20" />
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
</Grid>
</GroupBox>
<Grid Grid.Column="1" Grid.Row="10">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*"/>
</Grid.ColumnDefinitions>
<Button Name="OkBtn" Grid.Column="1" IsCancel="True" Style="{StaticResource OmagCut_GradientBlueIconButton}">
<Image Source="Resources/V.png" Width="65" Height="65" HorizontalAlignment="Center"
<Button Name="OkBtn" Grid.Column="1" IsCancel="True" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
<Image Source="{DynamicResource VImg}" Width="65" Height="65" HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Button>
</Grid>
+25
View File
@@ -8,6 +8,8 @@ Public Class OptionsPageUC
Private ViewRotsList() As String = {"0", "90", "180", "270"}
Private ThemesList() As String = {"Classic", "Dark"}
Sub New(Owner As Window)
' This call is required by the designer.
@@ -29,6 +31,8 @@ Public Class OptionsPageUC
UnitsOfMeasureCmBx.ItemsSource = UnitsList
' Associazione della lista rotazioni alla combobox
ViewRotCmBx.ItemsSource = ViewRotsList
' Associazione della lista temi alla combobox
ThemesCmBx.ItemsSource = ThemesList
' Imposto la lingua corrente
LanguageCmBx.SelectedItem = m_MainWindow.m_CurrLanguage
@@ -39,12 +43,16 @@ Public Class OptionsPageUC
' Imposto la rotazione corrente
ViewRotCmBx.SelectedIndex = m_MainWindow.m_nTopViewRotStep
' Imposto il tema corrente
ThemesCmBx.SelectedIndex = m_MainWindow.m_CurrTheme
' Messaggi
OptTitle.Text = EgtMsg(MSG_OMAGCUT + 6) ' OPZIONI
LanguageGpBx.Header = EgtMsg(MSG_OPTIONSPAGEUC + 1) ' Lingua
LanguageMsgTxBl.Text = EgtMsg(MSG_OPTIONSPAGEUC + 2) ' La nuova lingua diventerà corr...
UnitsOfMeasureGpBx.Header = EgtMsg(MSG_OPTIONSPAGEUC + 3) ' Unità di misura
ViewRotGpBx.Header = EgtMsg(MSG_OPTIONSPAGEUC + 4) ' Rotazione vista
ThemesGpBx.Header = EgtMsg(MSG_OPTIONSPAGEUC + 24) ' Tema
End Sub
Private Sub LanguageCmBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles LanguageCmBx.SelectionChanged
@@ -66,4 +74,21 @@ Public Class OptionsPageUC
EgtZoom(ZM.ALL)
End Sub
Private Sub ThemesCmBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles ThemesCmBx.SelectionChanged
'Dim app As Application = Application.Current
If (ThemesCmBx.SelectedIndex = 0) Then
' app.ChangeTheme(New Uri("/OmagVIEW;component/OmagVIEWDictionary.xaml", UriKind.Relative))
' WritePrivateProfileString(S_GENERAL, K_THEME, 0, m_MainWindow.GetIniFile())
m_MainWindow.m_CurrTheme = 0
End If
If (ThemesCmBx.SelectedIndex = 1) Then
'app.ChangeTheme(New Uri("/OmagView;component/OmagViewDarkDictionary.xaml", UriKind.Relative))
'Application.Current.Resources("GroupBox_CornerRadius") = 3
'Application.Current.Resources("Button_CornerRadius") = 3
'Application.Current.Resources("EmptyBorder_CornerRadius") = New CornerRadius(3)
'WritePrivateProfileString(S_GENERAL, K_THEME, 1, m_MainWindow.GetIniFile())
m_MainWindow.m_CurrTheme = 1
End If
End Sub
End Class
Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

+14 -14
View File
@@ -23,26 +23,26 @@
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Button Name="ZoomAllBtn" Grid.Column="0" Style="{StaticResource OmagCut_RightGrayGradientYellowButton}">
<Image Source="Resources/ZoomAll.png" Style="{StaticResource OmagCut_ButtonIcon}"/>
<Button Name="ZoomAllBtn" Grid.Column="0" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
<Image Source="{DynamicResource ZoomAllImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="ZoomInBtn" Grid.Column="1" Style="{StaticResource OmagCut_RightGrayGradientYellowButton}">
<Image Source="Resources/ZoomIn.png" Style="{StaticResource OmagCut_ButtonIcon}"/>
<Button Name="ZoomInBtn" Grid.Column="1" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
<Image Source="{DynamicResource ZoomInImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="ZoomOutBtn" Grid.Column="2" Style="{StaticResource OmagCut_RightGrayGradientYellowButton}">
<Image Source="Resources/ZoomOut.png" Style="{StaticResource OmagCut_ButtonIcon}"/>
<Button Name="ZoomOutBtn" Grid.Column="2" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
<Image Source="{DynamicResource ZoomOutImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="ZoomWinBtn" Grid.Column="3" Style="{StaticResource OmagCut_RightGrayGradientYellowButton}">
<Image Source="Resources/ZoomWin.png" Style="{StaticResource OmagCut_ButtonIcon}"/>
<Button Name="ZoomWinBtn" Grid.Column="3" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
<Image Source="{DynamicResource ZoomWinImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="PanBtn" Grid.Column="4" Style="{StaticResource OmagCut_RightGrayGradientYellowButton}">
<Image Source="Resources/Pan.png" Style="{StaticResource OmagCut_ButtonIcon}"/>
<Button Name="PanBtn" Grid.Column="4" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
<Image Source="{DynamicResource PanImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="GenericViewBtn" Grid.Column="5" Style="{StaticResource OmagCut_RightGrayGradientYellowButton}">
<Image Source="Resources/GenericView.png" Style="{StaticResource OmagCut_ButtonIcon}"/>
<Button Name="GenericViewBtn" Grid.Column="5" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
<Image Source="{DynamicResource GenericViewImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
<Button Name="TopViewBtn" Grid.Column="6" Style="{StaticResource OmagCut_RightGrayGradientYellowButton}">
<Image Source="Resources/LookFromTOP.png" Style="{StaticResource OmagCut_ButtonIcon}"/>
<Button Name="TopViewBtn" Grid.Column="6" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
<Image Source="{DynamicResource LookFromTOPImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
</Button>
</Grid>