فهرست منبع

1. Change default background of initial page
2. Add hide option for Change Logo
3. Add Change URL Caption function

Snoopy 3 سال پیش
والد
کامیت
ac7f6c2c74

+ 27 - 0
App.config

@@ -124,6 +124,33 @@
             <setting name="SdCardPath" serializeAs="String">
                 <value />
             </setting>
+            <setting name="IsEmcDefault" serializeAs="String">
+                <value>True</value>
+            </setting>
+            <setting name="EmcCustomImgPath" serializeAs="String">
+                <value />
+            </setting>
+            <setting name="EmcCustomImgPath_org" serializeAs="String">
+                <value />
+            </setting>
+            <setting name="IsUrlDefault" serializeAs="String">
+                <value>True</value>
+            </setting>
+            <setting name="UrlCustomImgPath" serializeAs="String">
+                <value />
+            </setting>
+            <setting name="UrlCustomImgPath_org" serializeAs="String">
+                <value />
+            </setting>
+            <setting name="IsLogoHide" serializeAs="String">
+                <value>False</value>
+            </setting>
+            <setting name="IsCompLogoHide" serializeAs="String">
+                <value>False</value>
+            </setting>
+            <setting name="IsUrlHide" serializeAs="String">
+                <value>False</value>
+            </setting>
         </Phihong_EVSE_UI_Tool.Properties.Settings>
     </userSettings>
 </configuration>

+ 6 - 6
AuthenticationUC.xaml

@@ -17,7 +17,7 @@
                 <TextBlock Text="Verify" FontSize="24" HorizontalAlignment="Left" Margin="22,6,0,8"/>
                 <TextBlock Text="Background picture for the Verify status (800x480)" HorizontalAlignment="Left" Margin="22,4,0,12"/>
                 <Image x:Name="uxVerifyImage" Source="/Background/2_verify.bmp" HorizontalAlignment="Left" Margin="22,0,0,12" Height="192" Width="320" RenderOptions.BitmapScalingMode="HighQuality"/>
-                <StackPanel Orientation="Horizontal" Margin="22,8,370,12">
+                <StackPanel Orientation="Horizontal" Margin="22,8,300,12">
                     <RadioButton x:Name="uxVerifyDefaultRadioButton" Tag="Verify" GroupName="verifySelect" Margin="0,0,36,0" Style="{StaticResource MaterialDesignRadioButton}" 
                                  Background="{Binding Path=(fd:AccentColors.ImmersiveSystemAccentBrush)}"
                                  Checked="uxDefaultRadioButton_Checked">Default</RadioButton>
@@ -25,7 +25,7 @@
                                  Background="{Binding Path=(fd:AccentColors.ImmersiveSystemAccentBrush)}"
                                  Checked="uxCustomRadioButton_Checked">Customized</RadioButton>
                 </StackPanel>
-                <StackPanel x:Name="uxVerifyCustomStackPanel" Orientation="Horizontal" Margin="22,0,450,12" 
+                <StackPanel x:Name="uxVerifyCustomStackPanel" Orientation="Horizontal" Margin="22,0,150,12" 
                             Visibility="{Binding IsChecked,ElementName=uxVerifyCustomRadioButton,Converter={StaticResource b2v}}">
                     <Button Tag="Verify" Content="Browse" HorizontalAlignment="Left" Width="90" Height="35" 
                             Style="{StaticResource ButtonRevealStyle}" Click="uxBrowseButton_Click" Foreground="Black"/>
@@ -36,7 +36,7 @@
                 <TextBlock Text="Verification Successful" FontSize="24" HorizontalAlignment="Left" Margin="22,18,0,8"/>
                 <TextBlock Text="Background picture for Verification Successful (800x480)" HorizontalAlignment="Left" Margin="22,4,0,12"/>
                 <Image x:Name="uxVerifyOkImage" Source="/Background/3_carChkok.bmp" HorizontalAlignment="Left" Margin="22,0,0,12" Height="192" Width="320" RenderOptions.BitmapScalingMode="HighQuality"/>
-                <StackPanel Orientation="Horizontal" Margin="22,8,370,12">
+                <StackPanel Orientation="Horizontal" Margin="22,8,300,12">
                     <RadioButton x:Name="uxVerifyOkDefaultRadioButton" Tag="VerifyOk" GroupName="verifyOkSelect" Margin="0,0,36,0" Style="{StaticResource MaterialDesignRadioButton}" 
                                  Background="{Binding Path=(fd:AccentColors.ImmersiveSystemAccentBrush)}"
                                  Checked="uxDefaultRadioButton_Checked">Default</RadioButton>
@@ -44,7 +44,7 @@
                                  Background="{Binding Path=(fd:AccentColors.ImmersiveSystemAccentBrush)}"
                                  Checked="uxCustomRadioButton_Checked">Customized</RadioButton>
                 </StackPanel>
-                <StackPanel x:Name="uxVerifyOkCustomStackPanel" Orientation="Horizontal" Margin="22,0,450,12" 
+                <StackPanel x:Name="uxVerifyOkCustomStackPanel" Orientation="Horizontal" Margin="22,0,150,12" 
                             Visibility="{Binding IsChecked,ElementName=uxVerifyOkCustomRadioButton,Converter={StaticResource b2v}}">
                     <Button Tag="VerifyOk" Content="Browse" HorizontalAlignment="Left" Width="90" Height="35" 
                             Style="{StaticResource ButtonRevealStyle}" Click="uxBrowseButton_Click" Foreground="Black"/>
@@ -55,7 +55,7 @@
                 <TextBlock Text="Verification Fail" FontSize="24" HorizontalAlignment="Left" Margin="22,18,0,8"/>
                 <TextBlock Text="Background picture for Verification Fail (800x480)" HorizontalAlignment="Left" Margin="22,4,0,12"/>
                 <Image x:Name="uxVerifyFailImage" Source="/Background/4_chkfail.bmp" HorizontalAlignment="Left" Margin="22,0,0,12" Height="192" Width="320" RenderOptions.BitmapScalingMode="HighQuality"/>
-                <StackPanel Orientation="Horizontal" Margin="22,8,370,12">
+                <StackPanel Orientation="Horizontal" Margin="22,8,300,12">
                     <RadioButton x:Name="uxVerifyFailDefaultRadioButton" Tag="VerifyFail" GroupName="verifyFailSelect" Margin="0,0,36,0" Style="{StaticResource MaterialDesignRadioButton}" 
                                  Background="{Binding Path=(fd:AccentColors.ImmersiveSystemAccentBrush)}"
                                  Checked="uxDefaultRadioButton_Checked">Default</RadioButton>
@@ -63,7 +63,7 @@
                                  Background="{Binding Path=(fd:AccentColors.ImmersiveSystemAccentBrush)}"
                                  Checked="uxCustomRadioButton_Checked">Customized</RadioButton>
                 </StackPanel>
-                <StackPanel x:Name="uxVerifyFailCustomStackPanel" Orientation="Horizontal" Margin="22,0,450,12" 
+                <StackPanel x:Name="uxVerifyFailCustomStackPanel" Orientation="Horizontal" Margin="22,0,150,12" 
                             Visibility="{Binding IsChecked,ElementName=uxVerifyFailCustomRadioButton,Converter={StaticResource b2v}}">
                     <Button Tag="VerifyFail" Content="Browse" HorizontalAlignment="Left" Width="90" Height="35" 
                             Style="{StaticResource ButtonRevealStyle}" Click="uxBrowseButton_Click" Foreground="Black"/>

BIN
Background/0_init.bmp


BIN
Background/10_emc.bmp


+ 2 - 1
Enums.cs

@@ -66,6 +66,7 @@
         LogoComplete, //62
         HourGlass_Complete,
         Flash_Complete,
-        Charge_Complete //65
+        Charge_Complete, //65
+        URL //66
     }
 }

BIN
ICO/10_hide.bmp


BIN
ICO/60.ICO


BIN
ICO/62_hide.bmp


BIN
ICO/66.bmp


BIN
ICO/66_hide.bmp


+ 6 - 6
InitialIdleUC.xaml

@@ -17,7 +17,7 @@
                 <TextBlock Text="Initial" FontSize="24" HorizontalAlignment="Left" Margin="22,6,0,8"/>
                 <TextBlock Text="Background picture for the Initial status (800x480)" HorizontalAlignment="Left" Margin="22,4,0,12"/>
                 <Image x:Name="uxInitImage" Source="/Background/0_init.bmp" HorizontalAlignment="Left" Margin="22,0,0,12" Height="192" Width="320" RenderOptions.BitmapScalingMode="HighQuality"/>
-                <StackPanel Orientation="Horizontal" Margin="22,8,370,12">
+                <StackPanel Orientation="Horizontal" Margin="22,8,300,12">
                     <RadioButton x:Name="uxInitDefaultRadioButton" Tag="Initial" GroupName="initSelect" Margin="0,0,36,0" Style="{StaticResource MaterialDesignRadioButton}" 
                                  Background="{Binding Path=(fd:AccentColors.ImmersiveSystemAccentBrush)}"
                                  Checked="uxDefaultRadioButton_Checked">Default</RadioButton>
@@ -25,10 +25,10 @@
                                  Background="{Binding Path=(fd:AccentColors.ImmersiveSystemAccentBrush)}"
                                  Checked="uxCustomRadioButton_Checked">Customized</RadioButton>
                 </StackPanel>
-                <StackPanel x:Name="uxInitCustomStackPanel" Orientation="Horizontal" Margin="22,0,370,12" 
+                <StackPanel x:Name="uxInitCustomStackPanel" Orientation="Horizontal" Margin="22,0,150,12" 
                             Visibility="{Binding IsChecked,ElementName=uxInitCustomRadioButton,Converter={StaticResource b2v}}">
                     <Button Tag="Initial" Content="Browse" HorizontalAlignment="Left" Width="90" Height="35" 
-                            Style="{StaticResource ButtonRevealStyle}" Click="uxExploreButton_Click" Foreground="Black"/>
+                            Style="{StaticResource ButtonRevealStyle}" Click="uxBrowseButton_Click" Foreground="Black"/>
                     <TextBox x:Name="uxInitExploreTextBox" VerticalContentAlignment="Center" Margin="1,0,0,0" Width="270" Height="35" 
                              Style="{StaticResource TextBoxRevealStyle}" Text="Please select an image file"/>
                 </StackPanel>
@@ -36,7 +36,7 @@
                 <TextBlock Text="Idle" FontSize="24" HorizontalAlignment="Left" Margin="22,18,0,8"/>
                 <TextBlock Text="Background picture for the Idle status (800x480)" HorizontalAlignment="Left" Margin="22,4,0,12"/>
                 <Image x:Name="uxIdleImage" Source="/Background/1_idle.bmp" HorizontalAlignment="Left" Margin="22,0,0,12" Height="192" Width="320" RenderOptions.BitmapScalingMode="HighQuality"/>
-                <StackPanel Orientation="Horizontal" Margin="22,8,370,12">
+                <StackPanel Orientation="Horizontal" Margin="22,8,300,12">
                     <RadioButton x:Name="uxIdleDefaultRadioButton" Tag="Idle" GroupName="idleSelect" Margin="0,0,36,0" Style="{StaticResource MaterialDesignRadioButton}" 
                                  Background="{Binding Path=(fd:AccentColors.ImmersiveSystemAccentBrush)}"
                                  Checked="uxDefaultRadioButton_Checked">Default</RadioButton>
@@ -44,10 +44,10 @@
                                  Background="{Binding Path=(fd:AccentColors.ImmersiveSystemAccentBrush)}"
                                  Checked="uxCustomRadioButton_Checked">Customized</RadioButton>
                 </StackPanel>
-                <StackPanel x:Name="uxIdleCustomStackPanel" Orientation="Horizontal" Margin="22,0,370,12" 
+                <StackPanel x:Name="uxIdleCustomStackPanel" Orientation="Horizontal" Margin="22,0,150,12" 
                             Visibility="{Binding IsChecked,ElementName=uxIdleCustomRadioButton,Converter={StaticResource b2v}}">
                     <Button Tag="Idle" Content="Browse" HorizontalAlignment="Left" Width="90" Height="35" 
-                            Style="{StaticResource ButtonRevealStyle}" Click="uxExploreButton_Click" Foreground="Black"/>
+                            Style="{StaticResource ButtonRevealStyle}" Click="uxBrowseButton_Click" Foreground="Black"/>
                     <TextBox x:Name="uxIdleExploreTextBox" VerticalContentAlignment="Center" Margin="1,0,0,0" Width="270" Height="35" 
                              Style="{StaticResource TextBoxRevealStyle}" Text="Please select an image file"/>
                 </StackPanel>

+ 1 - 1
InitialIdleUC.xaml.cs

@@ -98,7 +98,7 @@ namespace Phihong_EVSE_UI_Tool
             mySettings.Save();
         }
 
-        private void uxExploreButton_Click(object sender, RoutedEventArgs e)
+        private void uxBrowseButton_Click(object sender, RoutedEventArgs e)
         {
             Button btn = e.Source as Button;
             if (btn is null)

+ 2 - 0
MainWindow.xaml.cs

@@ -109,7 +109,9 @@ namespace Phihong_EVSE_UI_Tool
                 Matrix m = PresentationSource.FromVisual(this).CompositionTarget.TransformToDevice;
                 ScaleTransform dpiTransform = new ScaleTransform(1.25 / m.M11, 1.25 / m.M22);
                 if (dpiTransform.CanFreeze)
+                {
                     dpiTransform.Freeze();
+                }
                 this.LayoutTransform = dpiTransform;
             };
         }

+ 22 - 3
MaintenanceUC.xaml

@@ -6,7 +6,7 @@
              xmlns:local="clr-namespace:Phihong_EVSE_UI_Tool"
              xmlns:fd="clr-namespace:SourceChord.FluentWPF;assembly=FluentWPF"
              mc:Ignorable="d" 
-             d:DesignHeight="400" d:DesignWidth="880" FontSize="15" FontFamily="Segoe UI">
+             d:DesignHeight="750" d:DesignWidth="880" FontSize="15" FontFamily="Segoe UI">
     <UserControl.Resources>
         <BooleanToVisibilityConverter x:Key="b2v"/>
     </UserControl.Resources>
@@ -17,7 +17,7 @@
                 <TextBlock Text="Fix" FontSize="24" HorizontalAlignment="Left" Margin="22,6,0,8"/>
                 <TextBlock Text="Background picture for the Maintenance status (800x480)" HorizontalAlignment="Left" Margin="22,4,0,12"/>
                 <Image x:Name="uxMaintainImage" Source="/Background/9_fix.bmp" HorizontalAlignment="Left" Margin="22,0,0,12" Height="192" Width="320" RenderOptions.BitmapScalingMode="HighQuality"/>
-                <StackPanel Orientation="Horizontal" Margin="22,8,370,12">
+                <StackPanel Orientation="Horizontal" Margin="22,8,300,12">
                     <RadioButton x:Name="uxMaintainDefaultRadioButton" Tag="Maintain" GroupName="maintainSelect" Margin="0,0,36,0" Style="{StaticResource MaterialDesignRadioButton}" 
                                  Background="{Binding Path=(fd:AccentColors.ImmersiveSystemAccentBrush)}"
                                  Checked="uxDefaultRadioButton_Checked">Default</RadioButton>
@@ -25,13 +25,32 @@
                                  Background="{Binding Path=(fd:AccentColors.ImmersiveSystemAccentBrush)}"
                                  Checked="uxCustomRadioButton_Checked">Customized</RadioButton>
                 </StackPanel>
-                <StackPanel x:Name="uxMaintainCustomStackPanel" Orientation="Horizontal" Margin="22,0,450,12" 
+                <StackPanel x:Name="uxMaintainCustomStackPanel" Orientation="Horizontal" Margin="22,0,150,12" 
                             Visibility="{Binding IsChecked,ElementName=uxMaintainCustomRadioButton,Converter={StaticResource b2v}}">
                     <Button Tag="Maintain" Content="Browse" HorizontalAlignment="Left" Width="90" Height="35" 
                             Style="{StaticResource ButtonRevealStyle}" Click="uxBrowseButton_Click" Foreground="Black"/>
                     <TextBox x:Name="uxMaintainExploreTextBox" VerticalContentAlignment="Center" Margin="1,0,0,0" Width="270" Height="35" 
                              Style="{StaticResource TextBoxRevealStyle}" Text="Please select an image file" IsReadOnly="True"/>
                 </StackPanel>
+                <!-- Emergency -->
+                <TextBlock Text="Emergency" FontSize="24" HorizontalAlignment="Left" Margin="22,18,0,8"/>
+                <TextBlock Text="Background picture for the Emergency status (800x480)" HorizontalAlignment="Left" Margin="22,4,0,12"/>
+                <Image x:Name="uxEmcImage" Source="/Background/10_emc.bmp" HorizontalAlignment="Left" Margin="22,0,0,12" Height="192" Width="320" RenderOptions.BitmapScalingMode="HighQuality"/>
+                <StackPanel Orientation="Horizontal" Margin="22,8,300,12">
+                    <RadioButton x:Name="uxEmcDefaultRadioButton" Tag="Emc" GroupName="emcSelect" Margin="0,0,36,0" Style="{StaticResource MaterialDesignRadioButton}" 
+                                 Background="{Binding Path=(fd:AccentColors.ImmersiveSystemAccentBrush)}"
+                                 Checked="uxDefaultRadioButton_Checked">Default</RadioButton>
+                    <RadioButton x:Name="uxEmcCustomRadioButton" Tag="Emc" GroupName="emcSelect" Style="{StaticResource MaterialDesignRadioButton}" 
+                                 Background="{Binding Path=(fd:AccentColors.ImmersiveSystemAccentBrush)}"
+                                 Checked="uxCustomRadioButton_Checked">Customized</RadioButton>
+                </StackPanel>
+                <StackPanel x:Name="uxEmcCustomStackPanel" Orientation="Horizontal" Margin="22,0,150,12" 
+                            Visibility="{Binding IsChecked,ElementName=uxEmcCustomRadioButton,Converter={StaticResource b2v}}">
+                    <Button Tag="Emc" Content="Browse" HorizontalAlignment="Left" Width="90" Height="35" 
+                            Style="{StaticResource ButtonRevealStyle}" Click="uxBrowseButton_Click" Foreground="Black"/>
+                    <TextBox x:Name="uxEmcExploreTextBox" VerticalContentAlignment="Center" Margin="1,0,0,0" Width="270" Height="35" 
+                             Style="{StaticResource TextBoxRevealStyle}" Text="Please select an image file"/>
+                </StackPanel>
                 <StackPanel Margin="22,0,450,10" Height="15"/>
             </StackPanel>
         </ScrollViewer>

+ 33 - 0
MaintenanceUC.xaml.cs

@@ -15,6 +15,7 @@ namespace Phihong_EVSE_UI_Tool
     {
         private Properties.Settings mySettings = Properties.Settings.Default;
         private string maintainCustomImgPath;
+        private string emcCustomImgPath;
 
         public MaintenanceUC()
         {
@@ -24,6 +25,11 @@ namespace Phihong_EVSE_UI_Tool
             uxMaintainDefaultRadioButton.IsChecked = mySettings.IsMaintainDefault;
             uxMaintainCustomRadioButton.IsChecked = !mySettings.IsMaintainDefault;
             uxMaintainExploreTextBox.Text = mySettings.MaintainCustomImgPath_org;
+
+            emcCustomImgPath = mySettings.EmcCustomImgPath;
+            uxEmcDefaultRadioButton.IsChecked = mySettings.IsEmcDefault;
+            uxEmcCustomRadioButton.IsChecked = !mySettings.IsEmcDefault;
+            uxEmcExploreTextBox.Text = mySettings.EmcCustomImgPath_org;
         }
 
         private void uxDefaultRadioButton_Checked(object sender, RoutedEventArgs e)
@@ -44,6 +50,13 @@ namespace Phihong_EVSE_UI_Tool
                     Utility.ChangedFiles[Utility.BG_MAINTAIN] = true;
                     mySettings.IsMaintainDefault = true;
                     break;
+                case "Emc":
+                    srcPath = new Uri(Path.Combine(Utility.BG_PARENTFOLDER, Utility.BG_EMERGENCY), UriKind.Relative);
+                    uxEmcImage.Source = new BitmapImage(srcPath);
+                    Utility.CopyFileFromResource(srcPath, Path.Combine(Utility.OUTPUT_DIRECTORY, Utility.BG_EMERGENCY));
+                    Utility.ChangedFiles[Utility.BG_EMERGENCY] = true;
+                    mySettings.IsEmcDefault = true;
+                    break;
                 default:
                     return;
             }
@@ -70,6 +83,15 @@ namespace Phihong_EVSE_UI_Tool
                         mySettings.IsMaintainDefault = false;
                     }
                     break;
+                case "Emc":
+                    if (File.Exists(emcCustomImgPath))
+                    {
+                        Utility.LoadImageFromPath(uxEmcImage, emcCustomImgPath);
+                        File.Copy(emcCustomImgPath, Path.Combine(Utility.OUTPUT_DIRECTORY, Utility.BG_EMERGENCY), true);
+                        Utility.ChangedFiles[Utility.BG_EMERGENCY] = true;
+                        mySettings.IsEmcDefault = false;
+                    }
+                    break;
                 default:
                     return;
             }
@@ -114,6 +136,17 @@ namespace Phihong_EVSE_UI_Tool
                         mySettings.MaintainCustomImgPath = maintainCustomImgPath;
                         mySettings.MaintainCustomImgPath_org = uxMaintainExploreTextBox.Text;
                         break;
+                    case "Emc":
+                        uxEmcExploreTextBox.Text = dlg.FileName;
+                        emcCustomImgPath = Path.Combine(Utility.CUSTOM_DIRECTORY, Utility.BG_EMERGENCY);
+                        File.Copy(dlg.FileName, emcCustomImgPath, true);
+                        File.Copy(dlg.FileName, Path.Combine(Utility.OUTPUT_DIRECTORY, Utility.BG_EMERGENCY), true);
+                        Utility.LoadImageFromPath(uxEmcImage, emcCustomImgPath);
+                        Utility.ChangedFiles[Utility.BG_EMERGENCY] = true;
+                        mySettings.IsEmcDefault = false;
+                        mySettings.EmcCustomImgPath = emcCustomImgPath;
+                        mySettings.EmcCustomImgPath_org = uxEmcExploreTextBox.Text;
+                        break;
                     default:
                         break;
                 }

+ 36 - 7
ModifyIco.xaml

@@ -7,7 +7,7 @@
              xmlns:md="http://materialdesigninxaml.net/winfx/xaml/themes"
              xmlns:fd="clr-namespace:SourceChord.FluentWPF;assembly=FluentWPF"
              mc:Ignorable="d" 
-             d:DesignHeight="500" d:DesignWidth="880" FontSize="15" FontFamily="Segoe UI">
+             d:DesignHeight="700" d:DesignWidth="880" FontSize="15" FontFamily="Segoe UI">
     <UserControl.Resources>
         <BooleanToVisibilityConverter x:Key="b2v"/>
     </UserControl.Resources>
@@ -18,15 +18,18 @@
                 <TextBlock Text="Change Main Logo" FontSize="24" HorizontalAlignment="Left" Margin="22,6,0,8"/>
                 <TextBlock Text="Logo image (255x34)" HorizontalAlignment="Left" Margin="22,6,0,6"/>
                 <Image x:Name="uxLogoImage" Source="/ICO/10.bmp" HorizontalAlignment="Left" Margin="22,0,0,6" Height="60" Width="260" RenderOptions.BitmapScalingMode="HighQuality"/>
-                <StackPanel Orientation="Horizontal" Margin="22,0,370,12">
+                <StackPanel Orientation="Horizontal" Margin="22,0,300,12">
                     <RadioButton x:Name="uxLogoDefaultRadioButton" Tag="Logo" GroupName="logoSelect" Margin="0,0,36,0" Style="{StaticResource MaterialDesignRadioButton}" 
                                  Background="{Binding Path=(fd:AccentColors.ImmersiveSystemAccentBrush)}"
                                  Checked="uxDefaultRadioButton_Checked">Default</RadioButton>
-                    <RadioButton x:Name="uxLogoCustomRadioButton" Tag="Logo" GroupName="logoSelect" Style="{StaticResource MaterialDesignRadioButton}" 
+                    <RadioButton x:Name="uxLogoCustomRadioButton" Tag="Logo" GroupName="logoSelect" Margin="0,0,36,0" Style="{StaticResource MaterialDesignRadioButton}" 
                                  Background="{Binding Path=(fd:AccentColors.ImmersiveSystemAccentBrush)}"
                                  Checked="uxCustomRadioButton_Checked">Customized</RadioButton>
+                    <RadioButton x:Name="uxLogoHideRadioButton" Tag="Logo" GroupName="logoSelect" Style="{StaticResource MaterialDesignRadioButton}" 
+                                 Background="{Binding Path=(fd:AccentColors.ImmersiveSystemAccentBrush)}"
+                                 Checked="uxHideRadioButton_Checked">Hide</RadioButton>
                 </StackPanel>
-                <StackPanel x:Name="uxLogoCustomStackPanel" Orientation="Horizontal" Margin="22,0,450,12" 
+                <StackPanel x:Name="uxLogoCustomStackPanel" Orientation="Horizontal" Margin="22,0,150,12" 
                             Visibility="{Binding IsChecked,ElementName=uxLogoCustomRadioButton,Converter={StaticResource b2v}}">
                     <Button Tag="Logo" Content="Browse" HorizontalAlignment="Left" Width="90" Height="35"
                             Style="{StaticResource ButtonRevealStyle}" Click="uxBrowseButton_Click" Foreground="Black"/>
@@ -38,15 +41,18 @@
                 <TextBlock Text="Change Logo (charging complete page)" FontSize="24" HorizontalAlignment="Left" Margin="22,24,0,8"/>
                 <TextBlock Text="Logo image (255x34)" HorizontalAlignment="Left" Margin="22,6,0,6"/>
                 <Image x:Name="uxCompLogoImage" Source="/ICO/62.bmp" HorizontalAlignment="Left" Margin="22,0,0,6" Height="60" Width="260" RenderOptions.BitmapScalingMode="HighQuality"/>
-                <StackPanel Orientation="Horizontal" Margin="22,0,370,12">
+                <StackPanel Orientation="Horizontal" Margin="22,0,300,12">
                     <RadioButton x:Name="uxCompLogoDefaultRadioButton" Tag="CompLogo" GroupName="complogoSelect" Margin="0,0,36,0" Style="{StaticResource MaterialDesignRadioButton}" 
                                  Background="{Binding Path=(fd:AccentColors.ImmersiveSystemAccentBrush)}"
                                  Checked="uxDefaultRadioButton_Checked">Default</RadioButton>
-                    <RadioButton x:Name="uxCompLogoCustomRadioButton" Tag="CompLogo" GroupName="complogoSelect" Style="{StaticResource MaterialDesignRadioButton}" 
+                    <RadioButton x:Name="uxCompLogoCustomRadioButton" Tag="CompLogo" GroupName="complogoSelect" Margin="0,0,36,0" Style="{StaticResource MaterialDesignRadioButton}" 
                                  Background="{Binding Path=(fd:AccentColors.ImmersiveSystemAccentBrush)}"
                                  Checked="uxCustomRadioButton_Checked">Customized</RadioButton>
+                    <RadioButton x:Name="uxCompLogoHideRadioButton" Tag="CompLogo" GroupName="complogoSelect" Style="{StaticResource MaterialDesignRadioButton}" 
+                                 Background="{Binding Path=(fd:AccentColors.ImmersiveSystemAccentBrush)}"
+                                 Checked="uxHideRadioButton_Checked">Hide</RadioButton>
                 </StackPanel>
-                <StackPanel x:Name="uxCompLogoCustomStackPanel" Orientation="Horizontal" Margin="22,0,450,12" 
+                <StackPanel x:Name="uxCompLogoCustomStackPanel" Orientation="Horizontal" Margin="22,0,150,12" 
                             Visibility="{Binding IsChecked,ElementName=uxCompLogoCustomRadioButton,Converter={StaticResource b2v}}">
                     <Button Tag="CompLogo" Content="Browse" HorizontalAlignment="Left" Width="90" Height="35"
                             Style="{StaticResource ButtonRevealStyle}" Click="uxBrowseButton_Click" Foreground="Black"/>
@@ -54,6 +60,29 @@
                              Style="{StaticResource TextBoxRevealStyle}" Text="Please select logo image" IsReadOnly="True"/>
                 </StackPanel>
 
+                <!-- URL Caption -->
+                <TextBlock Text="Change URL Caption (initial page)" FontSize="24" HorizontalAlignment="Left" Margin="22,24,0,8"/>
+                <TextBlock Text="URL image (233x28)" HorizontalAlignment="Left" Margin="22,6,0,6"/>
+                <Image x:Name="uxUrlImage" Source="/ICO/66.bmp" HorizontalAlignment="Left" Margin="22,0,0,6" Height="60" Width="238" RenderOptions.BitmapScalingMode="HighQuality"/>
+                <StackPanel Orientation="Horizontal" Margin="22,0,300,12">
+                    <RadioButton x:Name="uxUrlDefaultRadioButton" Tag="Url" GroupName="urlSelect" Margin="0,0,36,0" Style="{StaticResource MaterialDesignRadioButton}" 
+                                 Background="{Binding Path=(fd:AccentColors.ImmersiveSystemAccentBrush)}"
+                                 Checked="uxDefaultRadioButton_Checked">Default</RadioButton>
+                    <RadioButton x:Name="uxUrlCustomRadioButton" Tag="Url" GroupName="urlSelect" Margin="0,0,36,0" Style="{StaticResource MaterialDesignRadioButton}" 
+                                 Background="{Binding Path=(fd:AccentColors.ImmersiveSystemAccentBrush)}"
+                                 Checked="uxCustomRadioButton_Checked">Customized</RadioButton>
+                    <RadioButton x:Name="uxUrlHideRadioButton" Tag="Url" GroupName="urlSelect" Style="{StaticResource MaterialDesignRadioButton}" 
+                                 Background="{Binding Path=(fd:AccentColors.ImmersiveSystemAccentBrush)}"
+                                 Checked="uxHideRadioButton_Checked">Hide</RadioButton>
+                </StackPanel>
+                <StackPanel x:Name="uxUrlCustomStackPanel" Orientation="Horizontal" Margin="22,0,150,12" 
+                            Visibility="{Binding IsChecked,ElementName=uxUrlCustomRadioButton,Converter={StaticResource b2v}}">
+                    <Button Tag="Url" Content="Browse" HorizontalAlignment="Left" Width="90" Height="35"
+                            Style="{StaticResource ButtonRevealStyle}" Click="uxBrowseButton_Click" Foreground="Black"/>
+                    <TextBox x:Name="uxUrlBrowseTextBox" VerticalContentAlignment="Center" Margin="1,0,0,0" Width="270" Height="35" 
+                             Style="{StaticResource TextBoxRevealStyle}" Text="Please select url caption image" IsReadOnly="True"/>
+                </StackPanel>
+
                 <!-- Ico Preview -->
                 <TextBlock Text="ICO Preview" FontSize="24" HorizontalAlignment="Left" Margin="22,24,0,0"/>
                 <Viewbox x:Name="viewbox" Stretch="Uniform" Margin="22,12,20,12" RenderOptions.BitmapScalingMode="HighQuality">

+ 113 - 13
ModifyIco.xaml.cs

@@ -16,6 +16,7 @@ namespace Phihong_EVSE_UI_Tool
         private Properties.Settings mySettings = Properties.Settings.Default;
         private string logoCustomImgPath;
         private string compLogoCustomImgPath;
+        private string urlCustomImgPath;
         private int bytesPerPixel = 2;
 
         public ModifyIco()
@@ -23,17 +24,25 @@ namespace Phihong_EVSE_UI_Tool
             InitializeComponent();
 
             logoCustomImgPath = mySettings.LogoCustomImgPath;
-            uxLogoDefaultRadioButton.IsChecked = mySettings.IsLogoDefault;
-            uxLogoCustomRadioButton.IsChecked = !mySettings.IsLogoDefault;
+            uxLogoDefaultRadioButton.IsChecked = mySettings.IsLogoDefault && !mySettings.IsLogoHide;
+            uxLogoCustomRadioButton.IsChecked = !mySettings.IsLogoDefault && !mySettings.IsLogoHide;
+            uxLogoHideRadioButton.IsChecked = mySettings.IsLogoHide;
             uxLogoBrowseTextBox.Text = mySettings.LogoCustomImgPath_org;
 
             compLogoCustomImgPath = mySettings.CompLogoCustomImgPath;
-            uxCompLogoDefaultRadioButton.IsChecked = mySettings.IsCompLogoDefault;
-            uxCompLogoCustomRadioButton.IsChecked = !mySettings.IsCompLogoDefault;
+            uxCompLogoDefaultRadioButton.IsChecked = mySettings.IsCompLogoDefault && !mySettings.IsCompLogoHide;
+            uxCompLogoCustomRadioButton.IsChecked = !mySettings.IsCompLogoDefault && !mySettings.IsCompLogoHide;
+            uxCompLogoHideRadioButton.IsChecked = mySettings.IsCompLogoHide;
             uxCompLogoBrowseTextBox.Text = mySettings.CompLogoCustomImgPath_org;
+
+            urlCustomImgPath = mySettings.UrlCustomImgPath;
+            uxUrlDefaultRadioButton.IsChecked = mySettings.IsUrlDefault && !mySettings.IsUrlHide;
+            uxUrlCustomRadioButton.IsChecked = !mySettings.IsUrlDefault && !mySettings.IsUrlHide;
+            uxUrlHideRadioButton.IsChecked = mySettings.IsUrlHide;
+            uxUrlBrowseTextBox.Text = mySettings.UrlCustomImgPath_org;
         }
 
-        private void ModifyIcoContent(int index, string path)
+        private void ModifyIcoContent(int index, string path, bool isHide = false)
         {
             string icoPath = Path.Combine(Utility.OUTPUT_DIRECTORY, Utility.ICO_NAME);
             if (!File.Exists(icoPath))
@@ -45,12 +54,18 @@ namespace Phihong_EVSE_UI_Tool
             int width = 0, height = 0;
             byte[] pixels = null;
 
-            if (String.IsNullOrEmpty(path))
+            if (String.IsNullOrEmpty(path) && !isHide)
             {
                 //Default
                 Uri resourcePath = new Uri(Path.Combine(Utility.ICO_PARENTFOLDER, index.ToString() + ".bmp"), UriKind.Relative);
                 Utility.ConvertResourceToBitmap565Array(resourcePath, out width, out height, out pixels);
             }
+            else if (String.IsNullOrEmpty(path) && isHide)
+            {
+                //Hide
+                Uri resourcePath = new Uri(Path.Combine(Utility.ICO_PARENTFOLDER, index.ToString() + "_hide.bmp"), UriKind.Relative);
+                Utility.ConvertResourceToBitmap565Array(resourcePath, out width, out height, out pixels);
+            }
             else
             {
                 Utility.ConvertFileToBitmap565Array(path, out width, out height, out pixels);
@@ -171,14 +186,23 @@ namespace Phihong_EVSE_UI_Tool
                     srcPath = new Uri(Path.Combine(Utility.ICO_PARENTFOLDER, Utility.ICO_MAINLOGO), UriKind.Relative);
                     uxLogoImage.Source = new BitmapImage(srcPath);
                     mySettings.IsLogoDefault = true;
+                    mySettings.IsLogoHide = false;
                     ModifyIcoContent((int)IcoElement.Logo, String.Empty);
                     break;
                 case "CompLogo":
                     srcPath = new Uri(Path.Combine(Utility.ICO_PARENTFOLDER, Utility.ICO_COMPLETELOGO), UriKind.Relative);
                     uxCompLogoImage.Source = new BitmapImage(srcPath);
                     mySettings.IsCompLogoDefault = true;
+                    mySettings.IsCompLogoHide = false;
                     ModifyIcoContent((int)IcoElement.LogoComplete, String.Empty);
                     break;
+                case "Url":
+                    srcPath = new Uri(Path.Combine(Utility.ICO_PARENTFOLDER, Utility.ICO_URL), UriKind.Relative);
+                    uxUrlImage.Source = new BitmapImage(srcPath);
+                    mySettings.IsUrlDefault = true;
+                    mySettings.IsUrlHide = false;
+                    ModifyIcoContent((int)IcoElement.URL, String.Empty);
+                    break;
                 default:
                     return;
             }
@@ -205,6 +229,7 @@ namespace Phihong_EVSE_UI_Tool
                     {
                         Utility.LoadImageFromPath(uxLogoImage, logoCustomImgPath);
                         mySettings.IsLogoDefault = false;
+                        mySettings.IsLogoHide = false;
                         ModifyIcoContent((int)IcoElement.Logo, logoCustomImgPath);
                     }
                     break;
@@ -213,9 +238,62 @@ namespace Phihong_EVSE_UI_Tool
                     {
                         Utility.LoadImageFromPath(uxCompLogoImage, compLogoCustomImgPath);
                         mySettings.IsCompLogoDefault = false;
+                        mySettings.IsCompLogoHide = false;
                         ModifyIcoContent((int)IcoElement.LogoComplete, compLogoCustomImgPath);
                     }
                     break;
+                case "Url":
+                    if (File.Exists(urlCustomImgPath))
+                    {
+                        Utility.LoadImageFromPath(uxUrlImage, urlCustomImgPath);
+                        mySettings.IsUrlDefault = false;
+                        mySettings.IsUrlHide = false;
+                        ModifyIcoContent((int)IcoElement.URL, urlCustomImgPath);
+                    }
+                    break;
+                default:
+                    return;
+            }
+            Utility.ChangedFiles[Utility.ICO_NAME] = true;
+            mySettings.Save();
+
+            //Display Ico
+            uxIcoUniformGrid.Children.Clear();
+            DisplayDWIcoContent();
+        }
+
+        private void uxHideRadioButton_Checked(object sender, RoutedEventArgs e)
+        {
+            Uri srcPath;
+            RadioButton rb = e.Source as RadioButton;
+            if (rb is null)
+            {
+                return;
+            }
+
+            switch (rb.Tag.ToString())
+            {
+                case "Logo":
+                    srcPath = new Uri(Path.Combine(Utility.ICO_PARENTFOLDER, Utility.ICO_MAINLOGO_HIDE), UriKind.Relative);
+                    uxLogoImage.Source = new BitmapImage(srcPath);
+                    mySettings.IsLogoDefault = false;
+                    mySettings.IsLogoHide = true;
+                    ModifyIcoContent((int)IcoElement.Logo, String.Empty, true);
+                    break;
+                case "CompLogo":
+                    srcPath = new Uri(Path.Combine(Utility.ICO_PARENTFOLDER, Utility.ICO_COMPLETELOGO_HIDE), UriKind.Relative);
+                    uxCompLogoImage.Source = new BitmapImage(srcPath);
+                    mySettings.IsCompLogoDefault = false;
+                    mySettings.IsCompLogoHide = true;
+                    ModifyIcoContent((int)IcoElement.LogoComplete, String.Empty, true);
+                    break;
+                case "Url":
+                    srcPath = new Uri(Path.Combine(Utility.ICO_PARENTFOLDER, Utility.ICO_URL_HIDE), UriKind.Relative);
+                    uxUrlImage.Source = new BitmapImage(srcPath);
+                    mySettings.IsUrlDefault = false;
+                    mySettings.IsUrlHide = true;
+                    ModifyIcoContent((int)IcoElement.URL, String.Empty, true);
+                    break;
                 default:
                     return;
             }
@@ -244,16 +322,15 @@ namespace Phihong_EVSE_UI_Tool
 
             if (dlg.ShowDialog() == CommonFileDialogResult.Ok)
             {
-                if (!Utility.IsIcoLogoSizeQualified(dlg.FileName))
-                {
-                    MessageBox.Show(dlg.FileName + "\r\n" + "The resolution of the image must be 255x34",
-                                    "Incorrect Resolution", MessageBoxButton.OK, MessageBoxImage.Error);
-                    return;
-                }
-
                 switch (btn.Tag.ToString())
                 {
                     case "Logo":
+                        if (!Utility.IsIcoLogoSizeQualified(dlg.FileName))
+                        {
+                            MessageBox.Show(dlg.FileName + "\r\n" + "The resolution of the image must be 255x34",
+                                            "Incorrect Resolution", MessageBoxButton.OK, MessageBoxImage.Error);
+                            return;
+                        }
                         uxLogoBrowseTextBox.Text = dlg.FileName;
                         logoCustomImgPath = Path.Combine(Utility.CUSTOM_DIRECTORY, Utility.ICO_MAINLOGO);
                         File.Copy(dlg.FileName, logoCustomImgPath, true);
@@ -265,6 +342,12 @@ namespace Phihong_EVSE_UI_Tool
                         ModifyIcoContent((int)IcoElement.Logo, logoCustomImgPath);
                         break;
                     case "CompLogo":
+                        if (!Utility.IsIcoLogoSizeQualified(dlg.FileName))
+                        {
+                            MessageBox.Show(dlg.FileName + "\r\n" + "The resolution of the image must be 255x34",
+                                            "Incorrect Resolution", MessageBoxButton.OK, MessageBoxImage.Error);
+                            return;
+                        }
                         uxCompLogoBrowseTextBox.Text = dlg.FileName;
                         compLogoCustomImgPath = Path.Combine(Utility.CUSTOM_DIRECTORY, Utility.ICO_COMPLETELOGO);
                         File.Copy(dlg.FileName, compLogoCustomImgPath, true);
@@ -275,6 +358,23 @@ namespace Phihong_EVSE_UI_Tool
 
                         ModifyIcoContent((int)IcoElement.LogoComplete, compLogoCustomImgPath);
                         break;
+                    case "Url":
+                        if (!Utility.IsIcoUrlSizeQualified(dlg.FileName))
+                        {
+                            MessageBox.Show(dlg.FileName + "\r\n" + "The resolution of the image must be 233x28",
+                                            "Incorrect Resolution", MessageBoxButton.OK, MessageBoxImage.Error);
+                            return;
+                        }
+                        uxUrlBrowseTextBox.Text = dlg.FileName;
+                        urlCustomImgPath = Path.Combine(Utility.CUSTOM_DIRECTORY, Utility.ICO_URL);
+                        File.Copy(dlg.FileName, urlCustomImgPath, true);
+                        Utility.LoadImageFromPath(uxUrlImage, urlCustomImgPath);
+                        mySettings.IsUrlDefault = false;
+                        mySettings.UrlCustomImgPath = urlCustomImgPath;
+                        mySettings.UrlCustomImgPath_org = uxUrlBrowseTextBox.Text;
+
+                        ModifyIcoContent((int)IcoElement.URL, urlCustomImgPath);
+                        break;
                     default:
                         break;
                 }

+ 11 - 0
Phihong EVSE UI Tool.csproj

@@ -228,6 +228,17 @@
   <ItemGroup>
     <Resource Include="ICO\10.bmp" />
   </ItemGroup>
+  <ItemGroup>
+    <Resource Include="Background\10_emc.bmp" />
+  </ItemGroup>
+  <ItemGroup>
+    <Resource Include="ICO\66.bmp" />
+  </ItemGroup>
+  <ItemGroup>
+    <Resource Include="ICO\10_hide.bmp" />
+    <Resource Include="ICO\62_hide.bmp" />
+    <Resource Include="ICO\66_hide.bmp" />
+  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Import Project="packages\MaterialDesignThemes.3.2.0\build\MaterialDesignThemes.targets" Condition="Exists('packages\MaterialDesignThemes.3.2.0\build\MaterialDesignThemes.targets')" />
   <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">

+ 8 - 8
PlugChargingUC.xaml

@@ -17,7 +17,7 @@
                 <TextBlock Text="Plug" FontSize="24" HorizontalAlignment="Left" Margin="22,6,0,8"/>
                 <TextBlock Text="Background picture for the Plug status (800x480)" HorizontalAlignment="Left" Margin="22,4,0,12"/>
                 <Image x:Name="uxPlugImage" Source="/Background/5_plug.bmp" HorizontalAlignment="Left" Margin="22,0,0,12" Height="192" Width="320" RenderOptions.BitmapScalingMode="HighQuality"/>
-                <StackPanel Orientation="Horizontal" Margin="22,8,370,12">
+                <StackPanel Orientation="Horizontal" Margin="22,8,300,12">
                     <RadioButton x:Name="uxPlugDefaultRadioButton" Tag="Plug" GroupName="plugSelect" Margin="0,0,36,0" Style="{StaticResource MaterialDesignRadioButton}" 
                                  Background="{Binding Path=(fd:AccentColors.ImmersiveSystemAccentBrush)}"
                                  Checked="uxDefaultRadioButton_Checked">Default</RadioButton>
@@ -25,7 +25,7 @@
                                  Background="{Binding Path=(fd:AccentColors.ImmersiveSystemAccentBrush)}"
                                  Checked="uxCustomRadioButton_Checked">Customized</RadioButton>
                 </StackPanel>
-                <StackPanel x:Name="uxPlugCustomStackPanel" Orientation="Horizontal" Margin="22,0,450,12" 
+                <StackPanel x:Name="uxPlugCustomStackPanel" Orientation="Horizontal" Margin="22,0,150,12" 
                             Visibility="{Binding IsChecked,ElementName=uxPlugCustomRadioButton,Converter={StaticResource b2v}}">
                     <Button Tag="Plug" Content="Browse" HorizontalAlignment="Left" Width="90" Height="35" 
                             Style="{StaticResource ButtonRevealStyle}" Click="uxBrowseButton_Click" Foreground="Black"/>
@@ -36,7 +36,7 @@
                 <TextBlock Text="Precharge" FontSize="24" HorizontalAlignment="Left" Margin="22,18,0,8"/>
                 <TextBlock Text="Background picture for Precharge status (800x480)" HorizontalAlignment="Left" Margin="22,4,0,12"/>
                 <Image x:Name="uxPrechargeImage" Source="/Background/6_precharge.bmp" HorizontalAlignment="Left" Margin="22,0,0,12" Height="192" Width="320" RenderOptions.BitmapScalingMode="HighQuality"/>
-                <StackPanel Orientation="Horizontal" Margin="22,8,370,12">
+                <StackPanel Orientation="Horizontal" Margin="22,8,300,12">
                     <RadioButton x:Name="uxPrechargeDefaultRadioButton" Tag="Precharge" GroupName="prechargeSelect" Margin="0,0,36,0" Style="{StaticResource MaterialDesignRadioButton}" 
                                  Background="{Binding Path=(fd:AccentColors.ImmersiveSystemAccentBrush)}"
                                  Checked="uxDefaultRadioButton_Checked">Default</RadioButton>
@@ -44,7 +44,7 @@
                                  Background="{Binding Path=(fd:AccentColors.ImmersiveSystemAccentBrush)}"
                                  Checked="uxCustomRadioButton_Checked">Customized</RadioButton>
                 </StackPanel>
-                <StackPanel x:Name="uxPrechargeCustomStackPanel" Orientation="Horizontal" Margin="22,0,450,12" 
+                <StackPanel x:Name="uxPrechargeCustomStackPanel" Orientation="Horizontal" Margin="22,0,150,12" 
                             Visibility="{Binding IsChecked,ElementName=uxPrechargeCustomRadioButton,Converter={StaticResource b2v}}">
                     <Button Tag="Precharge" Content="Browse" HorizontalAlignment="Left" Width="90" Height="35" 
                             Style="{StaticResource ButtonRevealStyle}" Click="uxBrowseButton_Click" Foreground="Black"/>
@@ -55,7 +55,7 @@
                 <TextBlock Text="Charging" FontSize="24" HorizontalAlignment="Left" Margin="22,18,0,8"/>
                 <TextBlock Text="Background picture for Charging status (800x480)" HorizontalAlignment="Left" Margin="22,4,0,12"/>
                 <Image x:Name="uxChargingImage" Source="/Background/7_charging.bmp" HorizontalAlignment="Left" Margin="22,0,0,12" Height="192" Width="320" RenderOptions.BitmapScalingMode="HighQuality"/>
-                <StackPanel Orientation="Horizontal" Margin="22,8,370,12">
+                <StackPanel Orientation="Horizontal" Margin="22,8,300,12">
                     <RadioButton x:Name="uxChargingDefaultRadioButton" Tag="Charging" GroupName="chargingSelect" Margin="0,0,36,0" Style="{StaticResource MaterialDesignRadioButton}" 
                                  Background="{Binding Path=(fd:AccentColors.ImmersiveSystemAccentBrush)}"
                                  Checked="uxDefaultRadioButton_Checked">Default</RadioButton>
@@ -63,7 +63,7 @@
                                  Background="{Binding Path=(fd:AccentColors.ImmersiveSystemAccentBrush)}"
                                  Checked="uxCustomRadioButton_Checked">Customized</RadioButton>
                 </StackPanel>
-                <StackPanel x:Name="uxChargingCustomStackPanel" Orientation="Horizontal" Margin="22,0,450,12" 
+                <StackPanel x:Name="uxChargingCustomStackPanel" Orientation="Horizontal" Margin="22,0,150,12" 
                             Visibility="{Binding IsChecked,ElementName=uxChargingCustomRadioButton,Converter={StaticResource b2v}}">
                     <Button Tag="Charging" Content="Browse" HorizontalAlignment="Left" Width="90" Height="35" 
                             Style="{StaticResource ButtonRevealStyle}" Click="uxBrowseButton_Click" Foreground="Black"/>
@@ -74,7 +74,7 @@
                 <TextBlock Text="Complete" FontSize="24" HorizontalAlignment="Left" Margin="22,18,0,8"/>
                 <TextBlock Text="Background picture for Complete status (800x480)" HorizontalAlignment="Left" Margin="22,4,0,12"/>
                 <Image x:Name="uxCompleteImage" Source="/Background/8_complete.bmp" HorizontalAlignment="Left" Margin="22,0,0,12" Height="192" Width="320" RenderOptions.BitmapScalingMode="HighQuality"/>
-                <StackPanel Orientation="Horizontal" Margin="22,8,370,12">
+                <StackPanel Orientation="Horizontal" Margin="22,8,300,12">
                     <RadioButton x:Name="uxCompleteDefaultRadioButton" Tag="Complete" GroupName="completeSelect" Margin="0,0,36,0" Style="{StaticResource MaterialDesignRadioButton}" 
                                  Background="{Binding Path=(fd:AccentColors.ImmersiveSystemAccentBrush)}"
                                  Checked="uxDefaultRadioButton_Checked">Default</RadioButton>
@@ -82,7 +82,7 @@
                                  Background="{Binding Path=(fd:AccentColors.ImmersiveSystemAccentBrush)}"
                                  Checked="uxCustomRadioButton_Checked">Customized</RadioButton>
                 </StackPanel>
-                <StackPanel x:Name="uxCompleteCustomStackPanel" Orientation="Horizontal" Margin="22,0,450,12" 
+                <StackPanel x:Name="uxCompleteCustomStackPanel" Orientation="Horizontal" Margin="22,0,150,12" 
                             Visibility="{Binding IsChecked,ElementName=uxCompleteCustomRadioButton,Converter={StaticResource b2v}}">
                     <Button Tag="Complete" Content="Browse" HorizontalAlignment="Left" Width="90" Height="35" 
                             Style="{StaticResource ButtonRevealStyle}" Click="uxBrowseButton_Click" Foreground="Black"/>

+ 2 - 2
Properties/AssemblyInfo.cs

@@ -49,5 +49,5 @@ using System.Windows;
 // 您可以指定所有的值,也可以使用 '*' 將組建和修訂編號
 // 設為預設,如下所示:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.2103.0")]
-[assembly: AssemblyFileVersion("1.0.2103.0")]
+[assembly: AssemblyVersion("1.1.2109.1")]
+[assembly: AssemblyFileVersion("1.1.2109.1")]

+ 109 - 1
Properties/Settings.Designer.cs

@@ -12,7 +12,7 @@ namespace Phihong_EVSE_UI_Tool.Properties {
     
     
     [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
-    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.7.0.0")]
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.8.1.0")]
     internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
         
         private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
@@ -478,5 +478,113 @@ namespace Phihong_EVSE_UI_Tool.Properties {
                 this["SdCardPath"] = value;
             }
         }
+        
+        [global::System.Configuration.UserScopedSettingAttribute()]
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.Configuration.DefaultSettingValueAttribute("True")]
+        public bool IsEmcDefault {
+            get {
+                return ((bool)(this["IsEmcDefault"]));
+            }
+            set {
+                this["IsEmcDefault"] = value;
+            }
+        }
+        
+        [global::System.Configuration.UserScopedSettingAttribute()]
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.Configuration.DefaultSettingValueAttribute("")]
+        public string EmcCustomImgPath {
+            get {
+                return ((string)(this["EmcCustomImgPath"]));
+            }
+            set {
+                this["EmcCustomImgPath"] = value;
+            }
+        }
+        
+        [global::System.Configuration.UserScopedSettingAttribute()]
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.Configuration.DefaultSettingValueAttribute("")]
+        public string EmcCustomImgPath_org {
+            get {
+                return ((string)(this["EmcCustomImgPath_org"]));
+            }
+            set {
+                this["EmcCustomImgPath_org"] = value;
+            }
+        }
+        
+        [global::System.Configuration.UserScopedSettingAttribute()]
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.Configuration.DefaultSettingValueAttribute("True")]
+        public bool IsUrlDefault {
+            get {
+                return ((bool)(this["IsUrlDefault"]));
+            }
+            set {
+                this["IsUrlDefault"] = value;
+            }
+        }
+        
+        [global::System.Configuration.UserScopedSettingAttribute()]
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.Configuration.DefaultSettingValueAttribute("")]
+        public string UrlCustomImgPath {
+            get {
+                return ((string)(this["UrlCustomImgPath"]));
+            }
+            set {
+                this["UrlCustomImgPath"] = value;
+            }
+        }
+        
+        [global::System.Configuration.UserScopedSettingAttribute()]
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.Configuration.DefaultSettingValueAttribute("")]
+        public string UrlCustomImgPath_org {
+            get {
+                return ((string)(this["UrlCustomImgPath_org"]));
+            }
+            set {
+                this["UrlCustomImgPath_org"] = value;
+            }
+        }
+        
+        [global::System.Configuration.UserScopedSettingAttribute()]
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.Configuration.DefaultSettingValueAttribute("False")]
+        public bool IsLogoHide {
+            get {
+                return ((bool)(this["IsLogoHide"]));
+            }
+            set {
+                this["IsLogoHide"] = value;
+            }
+        }
+        
+        [global::System.Configuration.UserScopedSettingAttribute()]
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.Configuration.DefaultSettingValueAttribute("False")]
+        public bool IsCompLogoHide {
+            get {
+                return ((bool)(this["IsCompLogoHide"]));
+            }
+            set {
+                this["IsCompLogoHide"] = value;
+            }
+        }
+        
+        [global::System.Configuration.UserScopedSettingAttribute()]
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.Configuration.DefaultSettingValueAttribute("False")]
+        public bool IsUrlHide {
+            get {
+                return ((bool)(this["IsUrlHide"]));
+            }
+            set {
+                this["IsUrlHide"] = value;
+            }
+        }
     }
 }

+ 27 - 0
Properties/Settings.settings

@@ -116,5 +116,32 @@
     <Setting Name="SdCardPath" Type="System.String" Scope="User">
       <Value Profile="(Default)" />
     </Setting>
+    <Setting Name="IsEmcDefault" Type="System.Boolean" Scope="User">
+      <Value Profile="(Default)">True</Value>
+    </Setting>
+    <Setting Name="EmcCustomImgPath" Type="System.String" Scope="User">
+      <Value Profile="(Default)" />
+    </Setting>
+    <Setting Name="EmcCustomImgPath_org" Type="System.String" Scope="User">
+      <Value Profile="(Default)" />
+    </Setting>
+    <Setting Name="IsUrlDefault" Type="System.Boolean" Scope="User">
+      <Value Profile="(Default)">True</Value>
+    </Setting>
+    <Setting Name="UrlCustomImgPath" Type="System.String" Scope="User">
+      <Value Profile="(Default)" />
+    </Setting>
+    <Setting Name="UrlCustomImgPath_org" Type="System.String" Scope="User">
+      <Value Profile="(Default)" />
+    </Setting>
+    <Setting Name="IsLogoHide" Type="System.Boolean" Scope="User">
+      <Value Profile="(Default)">False</Value>
+    </Setting>
+    <Setting Name="IsCompLogoHide" Type="System.Boolean" Scope="User">
+      <Value Profile="(Default)">False</Value>
+    </Setting>
+    <Setting Name="IsUrlHide" Type="System.Boolean" Scope="User">
+      <Value Profile="(Default)">False</Value>
+    </Setting>
   </Settings>
 </SettingsFile>

BIN
Required/13触控配置文件.bin


BIN
Required/14变量配置文件.bin


BIN
Required/22_Config.bin


+ 2 - 2
Required/CONFIG.txt

@@ -1,7 +1,7 @@
 R1=07      ;波特率,07=115200
-R2=04      ;Sys_CFG
+R2=0C      ;Sys_CFG
 R3=5A      ;
 RA=A5      ;
 STOP_DWIN_OS;
-RC=00      ;
+RC=20      ;
 

+ 1 - 1
SaveSdCard.xaml

@@ -31,7 +31,7 @@
                     <RadioButton x:Name="uxSaveChangedRadioButton" Tag="Save" GroupName="saveSelect" Style="{StaticResource MaterialDesignRadioButton}" 
                                  Background="{Binding Path=(fd:AccentColors.ImmersiveSystemAccentBrush)}">Save changed files</RadioButton>
                 </StackPanel>
-                <StackPanel Orientation="Horizontal" Margin="22,6,350,12">
+                <StackPanel Orientation="Horizontal" Margin="22,6,150,12">
                     <Button Tag="Save" Content="Save" HorizontalAlignment="Left" Width="90" Height="35"
                             Style="{StaticResource ButtonRevealStyle}" Click="uxBrowseButton_Click" Foreground="Black"/>
                     <TextBlock x:Name="uxMessageTextBlock" VerticalAlignment="Center" Margin="18,0,0,0"

+ 25 - 1
Utility.cs

@@ -21,11 +21,16 @@ namespace Phihong_EVSE_UI_Tool
         public const string BG_CHARGING = "7_charging.bmp";
         public const string BG_COMPLETE = "8_complete.bmp";
         public const string BG_MAINTAIN = "9_fix.bmp";
+        public const string BG_EMERGENCY = "10_emc.bmp";
 
         public const string ICO_PARENTFOLDER = "ICO";
         public const string ICO_NAME = "60.ICO";
         public const string ICO_MAINLOGO = "10.bmp";
+        public const string ICO_MAINLOGO_HIDE = "10_hide.bmp";
         public const string ICO_COMPLETELOGO = "62.bmp";
+        public const string ICO_COMPLETELOGO_HIDE = "62_hide.bmp";
+        public const string ICO_URL = "66.bmp";
+        public const string ICO_URL_HIDE = "66_hide.bmp";
 
         public const string REQ_PARENTFOLDER = "Required";
         public static List<string> REQ_FILELIST = new List<string>()
@@ -45,7 +50,7 @@ namespace Phihong_EVSE_UI_Tool
             {BG_INITIAL, false}, {BG_IDLE, false}, {BG_VERIFY, false},
             {BG_VERIFYOK, false}, {BG_VERIFYFAIL, false}, {BG_PLUG, false},
             {BG_PRECHARGE, false}, {BG_CHARGING, false}, {BG_COMPLETE, false},
-            {BG_MAINTAIN, false}, {ICO_NAME, false}
+            {BG_MAINTAIN, false}, {BG_EMERGENCY, false}, {ICO_NAME, false}
         };
 
         public static void CopyFileFromResource(Uri uriString, string destPath)
@@ -132,6 +137,25 @@ namespace Phihong_EVSE_UI_Tool
             return true;
         }
 
+        public static bool IsIcoUrlSizeQualified(string path)
+        {
+            FileStream fstream = new FileStream(path, FileMode.Open);
+
+            BitmapImage bitmap = new BitmapImage();
+            bitmap.BeginInit();
+            bitmap.StreamSource = fstream;
+            bitmap.CacheOption = BitmapCacheOption.OnLoad;
+            bitmap.EndInit();
+            fstream.Close();
+
+            if (bitmap.PixelWidth != 233 || bitmap.PixelHeight != 28)
+            {
+                return false;
+            }
+
+            return true;
+        }
+
         public static void ConvertFileToBitmap565Array(string path, out int width, out int height, out byte[] pixels)
         {
             FileStream fstream = new FileStream(path, FileMode.Open);