Browse Source

update ui layout

Robert 3 years ago
parent
commit
4ea38a1566

+ 1 - 0
Bellwether/Bellwether.csproj

@@ -191,6 +191,7 @@
     <Content Include="DLL\Newtonsoft.Json.dll" />
     <Content Include="DLL\NLPlaneRotator.dll" />
     <Content Include="DLL\SocketTransfer.dll" />
+    <Resource Include="Images\test2.png" />
     <Resource Include="Images\Historywall\menu_bg_clean.png" />
     <Resource Include="Images\Historywall\button_left.png" />
     <Resource Include="Images\Historywall\button_right.png" />

BIN
Bellwether/Images/test2.png


+ 56 - 54
Bellwether/Pages/ucFrontPage.xaml

@@ -202,7 +202,7 @@
                 <Image
                     Width="80"
                     Height="80"
-                    Margin="1005,105,-112,649"
+                    Margin="964,0,0,649"
                     HorizontalAlignment="Left"
                     VerticalAlignment="Bottom"
                     Source="pack://application:,,,/Bellwether;component/Images/SolarMonitor/solar_icon1.png" />
@@ -216,7 +216,7 @@
                 <Image
                     Width="60"
                     Height="60"
-                    Margin="116,338,787,426"
+                    Margin="116,0,0,426"
                     HorizontalAlignment="Left"
                     VerticalAlignment="Bottom"
                     Source="pack://application:,,,/Bellwether;component/Images/SolarMonitor/solar_icon3.png" />
@@ -230,28 +230,28 @@
                 <Image
                     Width="70"
                     Height="70"
-                    Margin="1016,0,-113,470"
+                    Margin="974,0,0,470"
                     HorizontalAlignment="Left"
                     VerticalAlignment="Bottom"
                     Source="pack://application:,,,/Bellwether;component/Images/SolarMonitor/solar_icon1.png" />
                 <Image
                     Width="60"
                     Height="60"
-                    Margin="1015,0,-102,379"
+                    Margin="973,0,0,379"
                     HorizontalAlignment="Left"
                     VerticalAlignment="Bottom"
                     Source="pack://application:,,,/Bellwether;component/Images/SolarMonitor/solar_icon3.png" />
                 <Image
                     Width="60"
                     Height="60"
-                    Margin="1020,0,-107,281"
+                    Margin="978,0,0,281"
                     HorizontalAlignment="Left"
                     VerticalAlignment="Bottom"
                     Source="pack://application:,,,/Bellwether;component/Images/SolarMonitor/solar_icon4.png" />
                 <Image
-                    Width="436"
+                    Width="488"
                     Height="60"
-                    Margin="1289,0,0,662"
+                    Margin="1245,0,0,662"
                     HorizontalAlignment="Left"
                     VerticalAlignment="Bottom"
                     Source="pack://application:,,,/Bellwether;component/Images/SolarMonitor/solar_text_bg_l.png"
@@ -259,26 +259,26 @@
                 <Image
                     Width="263"
                     Height="60"
-                    Margin="454,0,0,526"
+                    Margin="428,0,0,526"
                     HorizontalAlignment="Left"
                     VerticalAlignment="Bottom"
                     Source="pack://application:,,,/Bellwether;component/Images/SolarMonitor/solar_text_bg_s.png" />
                 <Image
                     Width="263"
                     Height="60"
-                    Margin="454,0,0,426"
+                    Margin="429,0,0,426"
                     HorizontalAlignment="Left"
                     VerticalAlignment="Bottom"
                     Source="pack://application:,,,/Bellwether;component/Images/SolarMonitor/solar_text_bg_s.png" />
                 <Image
                     Width="263"
                     Height="60"
-                    Margin="454,0,0,329"
+                    Margin="429,0,0,329"
                     HorizontalAlignment="Left"
                     VerticalAlignment="Bottom"
                     Source="pack://application:,,,/Bellwether;component/Images/SolarMonitor/solar_text_bg_s.png" />
                 <uicomponent:SpacedLabel
-                    Margin="1072,0,-275,660"
+                    Margin="1031,0,0,660"
                     HorizontalAlignment="Left"
                     VerticalAlignment="Bottom"
                     Text="裝置容量"
@@ -286,56 +286,56 @@
                     FontFamily="Microsoft JhengHei UI"
                     Spaceing="-10" />
                 <uicomponent:SpacedLabel
-                    Margin="183,0,0,529"
+                    Margin="182,0,0,529"
                     HorizontalAlignment="Left"
                     VerticalAlignment="Bottom"
                     Text="今日發電量"
                     FontSize="34"
                     FontFamily="Microsoft JhengHei UI"
-                    Spaceing="-10" />
+                    Spaceing="-12" />
                 <uicomponent:SpacedLabel
-                    Margin="183,0,0,429"
+                    Margin="182,0,0,428"
                     HorizontalAlignment="Left"
                     VerticalAlignment="Bottom"
                     Text="今日減碳量"
                     FontSize="34"
                     FontFamily="Microsoft JhengHei UI"
-                    Spaceing="-10" />
+                    Spaceing="-12" />
                 <uicomponent:SpacedLabel
-                    Margin="183,0,0,331"
+                    Margin="182,0,0,330"
                     HorizontalAlignment="Left"
                     VerticalAlignment="Bottom"
-                    Text="棵樹日減碳量"
+                    Text="今日造林效益值"
                     FontSize="34"
                     FontFamily="Microsoft JhengHei UI"
-                    Spaceing="-10" />
+                    Spaceing="-12" />
 
                 <uicomponent:SpacedLabel
-                    Margin="1082,0,0,482"
+                    Margin="1040,0,0,482"
                     HorizontalAlignment="Left"
                     VerticalAlignment="Bottom"
                     Text="今年發電量"
                     FontSize="34"
                     FontFamily="Microsoft JhengHei UI"
-                    Spaceing="-10" />
+                    Spaceing="-12" />
                 <uicomponent:SpacedLabel
-                    Margin="1082,0,0,381"
+                    Margin="1039,0,0,380"
                     HorizontalAlignment="Left"
                     VerticalAlignment="Bottom"
                     Text="今年減碳量"
                     FontSize="34"
                     FontFamily="Microsoft JhengHei UI"
-                    Spaceing="-10" />
+                    Spaceing="-12" />
                 <uicomponent:SpacedLabel
-                    Margin="1082,0,0,284"
+                    Margin="1039,0,0,283"
                     HorizontalAlignment="Left"
                     VerticalAlignment="Bottom"
-                    Text="千棵樹年減碳量"
+                    Text="今年造林效益值"
                     FontSize="34"
                     FontFamily="Microsoft JhengHei UI"
-                    Spaceing="-10" />
+                    Spaceing="-12" />
                 <uicomponent:SpacedLabel
-                    Margin="1741,0,0,660"
+                    Margin="1744,0,0,660"
                     HorizontalAlignment="Left"
                     VerticalAlignment="Bottom"
                     Text="kWp"
@@ -343,15 +343,16 @@
                     FontFamily="Microsoft JhengHei UI"
                     Spaceing="-10" />
                 <uicomponent:SpacedLabel
-                    Margin="736,0,0,428"
+                    Margin="700,0,0,428"
                     HorizontalAlignment="Left"
                     VerticalAlignment="Bottom"
-                    Text="kg"
+                    Text="公斤(kg)"
                     FontSize="34"
                     FontFamily="Microsoft JhengHei UI"
-                    Spaceing="-10" />
+                    Spaceing="-9" />
                 <uicomponent:SpacedLabel
-                    Margin="736,0,0,529"
+                    Width="130"
+                    Margin="701,0,0,529"
                     HorizontalAlignment="Left"
                     VerticalAlignment="Bottom"
                     Text="kWh"
@@ -359,23 +360,24 @@
                     FontFamily="Microsoft JhengHei UI"
                     Spaceing="-10" />
                 <uicomponent:SpacedLabel
-                    Margin="736,0,0,330"
+                    Margin="702,0,0,330"
                     HorizontalAlignment="Left"
                     VerticalAlignment="Bottom"
-                    Text="trees"
+                    Text="棵樹日減碳量"
                     FontSize="34"
                     FontFamily="Microsoft JhengHei UI"
-                    Spaceing="-10" />
+                    Spaceing="-12" />
                 <uicomponent:SpacedLabel
-                    Margin="1635,0,-730,381"
+                    Margin="1558,0,0,381"
                     HorizontalAlignment="Left"
                     VerticalAlignment="Bottom"
-                    Text="kg"
+                    Text="公斤(kg)"
                     FontSize="34"
                     FontFamily="Microsoft JhengHei UI"
-                    Spaceing="-10" />
+                    Spaceing="-9" />
                 <uicomponent:SpacedLabel
-                    Margin="1635,0,-696,482"
+                    Width="130"
+                    Margin="1558,0,0,482"
                     HorizontalAlignment="Left"
                     VerticalAlignment="Bottom"
                     Text="kWh"
@@ -383,38 +385,38 @@
                     FontFamily="Microsoft JhengHei UI"
                     Spaceing="-10" />
                 <uicomponent:SpacedLabel
-                    Margin="1635,0,-798,283"
+                    Margin="1559,0,0,282"
                     HorizontalAlignment="Left"
                     VerticalAlignment="Bottom"
-                    Text="ktrees"
+                    Text="千棵樹年減碳量"
                     FontSize="34"
                     FontFamily="Microsoft JhengHei UI"
-                    Spaceing="-10" />
+                    Spaceing="-12" />
                 <Image
                     Width="263"
                     Height="60"
-                    Margin="1353,0,-215,479"
+                    Margin="1282,0,0,479"
                     HorizontalAlignment="Left"
                     VerticalAlignment="Bottom"
                     Source="/Bellwether;component/Images/SolarMonitor/solar_text_bg_s.png" />
                 <Image
                     Width="263"
                     Height="60"
-                    Margin="1353,0,-215,379"
+                    Margin="1282,0,0,379"
                     HorizontalAlignment="Left"
                     VerticalAlignment="Bottom"
                     Source="/Bellwether;component/Images/SolarMonitor/solar_text_bg_s.png" />
                 <Image
                     Width="263"
                     Height="60"
-                    Margin="1353,0,-215,282"
+                    Margin="1282,0,0,282"
                     HorizontalAlignment="Left"
                     VerticalAlignment="Bottom"
                     Source="/Bellwether;component/Images/SolarMonitor/solar_text_bg_s.png" />
                 <Grid
-                    Width="436"
+                    Width="488"
                     Height="60"
-                    Margin="1289,0,-376,662"
+                    Margin="1245,0,0,662"
                     HorizontalAlignment="Left"
                     VerticalAlignment="Bottom">
                     <uicomponent:SpacedLabel
@@ -429,14 +431,14 @@
                 <Grid
                     Width="263"
                     Height="60"
-                    Margin="454,0,0,526"
+                    Margin="428,0,0,526"
                     HorizontalAlignment="Left"
                     VerticalAlignment="Bottom">
                     <uicomponent:SpacedLabel
                         x:Name="uxEnergy_Today"
                         HorizontalAlignment="Center"
                         VerticalAlignment="Center"
-                        Text="0000"
+                        Text="1234567890"
                         FontSize="34"
                         FontFamily="Microsoft JhengHei UI"
                         Spaceing="-5" />
@@ -444,7 +446,7 @@
                 <Grid
                     Width="263"
                     Height="60"
-                    Margin="454,0,0,426"
+                    Margin="429,0,0,426"
                     HorizontalAlignment="Left"
                     VerticalAlignment="Bottom">
                     <uicomponent:SpacedLabel
@@ -459,7 +461,7 @@
                 <Grid
                     Width="263"
                     Height="60"
-                    Margin="454,0,0,329"
+                    Margin="429,0,0,329"
                     HorizontalAlignment="Left"
                     VerticalAlignment="Bottom">
                     <uicomponent:SpacedLabel
@@ -474,14 +476,14 @@
                 <Grid
                     Width="263"
                     Height="60"
-                    Margin="1353,0,-215,479"
+                    Margin="1282,0,0,479"
                     HorizontalAlignment="Left"
                     VerticalAlignment="Bottom">
                     <uicomponent:SpacedLabel
                         x:Name="uxEnergy_ThisYear"
                         HorizontalAlignment="Center"
                         VerticalAlignment="Center"
-                        Text="0000"
+                        Text="1234567890"
                         FontSize="34"
                         FontFamily="Microsoft JhengHei UI"
                         Spaceing="-5" />
@@ -489,14 +491,14 @@
                 <Grid
                     Width="263"
                     Height="60"
-                    Margin="1353,0,-215,379"
+                    Margin="1282,0,0,379"
                     HorizontalAlignment="Left"
                     VerticalAlignment="Bottom">
                     <uicomponent:SpacedLabel
                         x:Name="uxCO2EmissionSaved_ThisYear"
                         HorizontalAlignment="Center"
                         VerticalAlignment="Center"
-                        Text="0000"
+                        Text="85775.123"
                         FontSize="34"
                         FontFamily="Microsoft JhengHei UI"
                         Spaceing="-5" />
@@ -504,7 +506,7 @@
                 <Grid
                     Width="263"
                     Height="60"
-                    Margin="1353,0,-215,282"
+                    Margin="1282,0,0,282"
                     HorizontalAlignment="Left"
                     VerticalAlignment="Bottom">
                     <uicomponent:SpacedLabel

+ 3 - 4
Bellwether/Pages/ucFrontPage.xaml.cs

@@ -234,19 +234,18 @@ namespace Bellwether.Pages
 
         private async void ExecuteExternal()
         {
-            //uxMediaViewer.Stop();
+            uxMediaViewer.Stop();
+            await Task.Delay(100);
             try
             {
-                uxMediaViewer.Stop();
-                await Task.Delay(100);
                 var p = Process.Start(Properties.Settings.Default.Screensaver);
                 p.WaitForExit();
-                uxMediaViewer.Play();
             }
             catch(Exception e)
             {
                 MessageBox.Show("螢幕保護程式啟動失敗,請確認程式存在且路徑非C:\\Windows\\System32");
             }
+            uxMediaViewer.Play();
         }
     }