aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/Flexo-Black.otfbin0 -> 112924 bytes
-rw-r--r--Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/Flexo-BlackIt.otfbin0 -> 121948 bytes
-rw-r--r--Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/Flexo-Bold.otfbin0 -> 112436 bytes
-rw-r--r--Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/Flexo-BoldIt.otfbin0 -> 121352 bytes
-rw-r--r--Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/Flexo-Demi.otfbin0 -> 112936 bytes
-rw-r--r--Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/Flexo-DemiIt.otfbin0 -> 122096 bytes
-rw-r--r--Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/Flexo-Heavy.otfbin0 -> 112632 bytes
-rw-r--r--Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/Flexo-HeavyIt.otfbin0 -> 122220 bytes
-rw-r--r--Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/Flexo-It.otfbin0 -> 120816 bytes
-rw-r--r--Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/Flexo-Light.otfbin0 -> 112116 bytes
-rw-r--r--Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/Flexo-LightIt.otfbin0 -> 120472 bytes
-rw-r--r--Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/Flexo-Medium.otfbin0 -> 112016 bytes
-rw-r--r--Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/Flexo-MediumIt.otfbin0 -> 121092 bytes
-rw-r--r--Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/Flexo-Regular.otfbin0 -> 111924 bytes
-rw-r--r--Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/Flexo-Thin.otfbin0 -> 112040 bytes
-rw-r--r--Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/Flexo-ThinIt.otfbin0 -> 120108 bytes
-rw-r--r--Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/digital-7.ttfbin0 -> 34360 bytes
-rw-r--r--Software/Visual_Studio/FSE/Tango.FSE.Common/Notifications/INotificationProvider.cs8
-rw-r--r--Software/Visual_Studio/FSE/Tango.FSE.Common/Notifications/MessageBoxVM.cs4
-rw-r--r--Software/Visual_Studio/FSE/Tango.FSE.Common/Resources/Colors.xaml30
-rw-r--r--Software/Visual_Studio/FSE/Tango.FSE.Common/Resources/Fonts.xaml3
-rw-r--r--Software/Visual_Studio/FSE/Tango.FSE.Common/Tango.FSE.Common.csproj17
-rw-r--r--Software/Visual_Studio/FSE/Tango.FSE.UI/App.xaml8
-rw-r--r--Software/Visual_Studio/FSE/Tango.FSE.UI/MainWindow.xaml2
-rw-r--r--Software/Visual_Studio/FSE/Tango.FSE.UI/Notifications/DefaultNotificationProvider.cs21
-rw-r--r--Software/Visual_Studio/FSE/Tango.FSE.UI/ViewModels/LoginViewVM.cs7
-rw-r--r--Software/Visual_Studio/FSE/Tango.FSE.UI/Views/LoginView.xaml2
-rw-r--r--Software/Visual_Studio/FSE/Tango.FSE.UI/Views/MainView.xaml163
-rw-r--r--Software/Visual_Studio/FSE/Tango.FSE.UI/Views/MainView.xaml.cs16
29 files changed, 197 insertions, 84 deletions
diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/Flexo-Black.otf b/Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/Flexo-Black.otf
new file mode 100644
index 000000000..0341d05db
--- /dev/null
+++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/Flexo-Black.otf
Binary files differ
diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/Flexo-BlackIt.otf b/Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/Flexo-BlackIt.otf
new file mode 100644
index 000000000..e0823abdf
--- /dev/null
+++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/Flexo-BlackIt.otf
Binary files differ
diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/Flexo-Bold.otf b/Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/Flexo-Bold.otf
new file mode 100644
index 000000000..2b9144e5c
--- /dev/null
+++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/Flexo-Bold.otf
Binary files differ
diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/Flexo-BoldIt.otf b/Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/Flexo-BoldIt.otf
new file mode 100644
index 000000000..f21ed044d
--- /dev/null
+++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/Flexo-BoldIt.otf
Binary files differ
diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/Flexo-Demi.otf b/Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/Flexo-Demi.otf
new file mode 100644
index 000000000..ada716012
--- /dev/null
+++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/Flexo-Demi.otf
Binary files differ
diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/Flexo-DemiIt.otf b/Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/Flexo-DemiIt.otf
new file mode 100644
index 000000000..ab9a133a5
--- /dev/null
+++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/Flexo-DemiIt.otf
Binary files differ
diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/Flexo-Heavy.otf b/Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/Flexo-Heavy.otf
new file mode 100644
index 000000000..b3630c982
--- /dev/null
+++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/Flexo-Heavy.otf
Binary files differ
diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/Flexo-HeavyIt.otf b/Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/Flexo-HeavyIt.otf
new file mode 100644
index 000000000..e47f75546
--- /dev/null
+++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/Flexo-HeavyIt.otf
Binary files differ
diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/Flexo-It.otf b/Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/Flexo-It.otf
new file mode 100644
index 000000000..6f9b5fa49
--- /dev/null
+++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/Flexo-It.otf
Binary files differ
diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/Flexo-Light.otf b/Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/Flexo-Light.otf
new file mode 100644
index 000000000..27af39094
--- /dev/null
+++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/Flexo-Light.otf
Binary files differ
diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/Flexo-LightIt.otf b/Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/Flexo-LightIt.otf
new file mode 100644
index 000000000..89085eeca
--- /dev/null
+++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/Flexo-LightIt.otf
Binary files differ
diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/Flexo-Medium.otf b/Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/Flexo-Medium.otf
new file mode 100644
index 000000000..04b2a8853
--- /dev/null
+++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/Flexo-Medium.otf
Binary files differ
diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/Flexo-MediumIt.otf b/Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/Flexo-MediumIt.otf
new file mode 100644
index 000000000..91996979e
--- /dev/null
+++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/Flexo-MediumIt.otf
Binary files differ
diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/Flexo-Regular.otf b/Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/Flexo-Regular.otf
new file mode 100644
index 000000000..2703ba3f3
--- /dev/null
+++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/Flexo-Regular.otf
Binary files differ
diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/Flexo-Thin.otf b/Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/Flexo-Thin.otf
new file mode 100644
index 000000000..666c69931
--- /dev/null
+++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/Flexo-Thin.otf
Binary files differ
diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/Flexo-ThinIt.otf b/Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/Flexo-ThinIt.otf
new file mode 100644
index 000000000..b039daffe
--- /dev/null
+++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/Flexo-ThinIt.otf
Binary files differ
diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/digital-7.ttf b/Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/digital-7.ttf
new file mode 100644
index 000000000..5dbe6f908
--- /dev/null
+++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Fonts/digital-7.ttf
Binary files differ
diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Notifications/INotificationProvider.cs b/Software/Visual_Studio/FSE/Tango.FSE.Common/Notifications/INotificationProvider.cs
index ce567a354..26ca57567 100644
--- a/Software/Visual_Studio/FSE/Tango.FSE.Common/Notifications/INotificationProvider.cs
+++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Notifications/INotificationProvider.cs
@@ -100,7 +100,13 @@ namespace Tango.FSE.Common.Notifications
/// Shows a question message box.
/// </summary>
/// <param name="message">The message.</param>
- Task<bool> ShowQuestion(String message);
+ Task<bool> ShowQuestion(String message, String okText = null, String cancelText = null);
+
+ /// <summary>
+ /// Shows a warning question message box.
+ /// </summary>
+ /// <param name="message">The message.</param>
+ Task<bool> ShowWarningQuestion(String message, String okText = null, String cancelText = null);
/// <summary>
/// Inserts the notification item to the bottom of the notifications collection.
diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Notifications/MessageBoxVM.cs b/Software/Visual_Studio/FSE/Tango.FSE.Common/Notifications/MessageBoxVM.cs
index 710939a8a..03bda6a90 100644
--- a/Software/Visual_Studio/FSE/Tango.FSE.Common/Notifications/MessageBoxVM.cs
+++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Notifications/MessageBoxVM.cs
@@ -18,5 +18,9 @@ namespace Tango.FSE.Common.Notifications
public String Message { get; set; }
public bool HasCancel { get; set; }
+
+ public String OKText { get; set; } = "OK";
+
+ public String CancelText { get; set; } = "CANCEL";
}
}
diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Resources/Colors.xaml b/Software/Visual_Studio/FSE/Tango.FSE.Common/Resources/Colors.xaml
index f58d24aa2..7e5a50a0d 100644
--- a/Software/Visual_Studio/FSE/Tango.FSE.Common/Resources/Colors.xaml
+++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Resources/Colors.xaml
@@ -3,21 +3,25 @@
xmlns:local="clr-namespace:Tango.FSE.Common.Resources">
<!--COLORS-->
+ <Color x:Key="FSE_PrimaryBackgroundDarkColor">#202020</Color>
<Color x:Key="FSE_PrimaryBackgroundColor">#303030</Color>
+ <Color x:Key="FSE_PrimaryBackgroundLightColor">#404040</Color>
<Color x:Key="FSE_PrimaryForegroundColor">#EEEEEE</Color>
<Color x:Key="FSE_SemiTransparentColor">#45000000</Color>
- <Color x:Key="FSE_GrayColor">#07D10F</Color>
+ <Color x:Key="FSE_BorderColor">#707070</Color>
- <Color x:Key="FSE_ErrorColor">#FF0000</Color>
- <Color x:Key="FSE_WarningColor">#FF6200</Color>
- <Color x:Key="FSE_SuccessColor">#07D10F</Color>
+ <Color x:Key="FSE_ErrorColor">#FF4C4C</Color>
+ <Color x:Key="FSE_WarningColor">#FF914C</Color>
+ <Color x:Key="FSE_SuccessColor">#6DFF72</Color>
<Color x:Key="FSE_MessageBoxTitleHeaderBackgroundColor">#404040</Color>
<!--BRUSHES-->
+ <SolidColorBrush x:Key="FSE_PrimaryBackgroundDarkBrush" Color="{StaticResource FSE_PrimaryBackgroundDarkColor}"></SolidColorBrush>
<SolidColorBrush x:Key="FSE_PrimaryBackgroundBrush" Color="{StaticResource FSE_PrimaryBackgroundColor}"></SolidColorBrush>
+ <SolidColorBrush x:Key="FSE_PrimaryBackgroundLightBrush" Color="{StaticResource FSE_PrimaryBackgroundLightColor}"></SolidColorBrush>
<SolidColorBrush x:Key="FSE_PrimaryForegroundBrush" Color="{StaticResource FSE_PrimaryForegroundColor}"></SolidColorBrush>
<SolidColorBrush x:Key="FSE_SemiTransparentBrush" Color="{StaticResource FSE_SemiTransparentColor}"></SolidColorBrush>
- <SolidColorBrush x:Key="FSE_GrayBrush" Color="{StaticResource FSE_GrayColor}"></SolidColorBrush>
+ <SolidColorBrush x:Key="FSE_BorderBrush" Color="{StaticResource FSE_BorderColor}"></SolidColorBrush>
<SolidColorBrush x:Key="FSE_ErrorBrush" Color="{StaticResource FSE_ErrorColor}"></SolidColorBrush>
<SolidColorBrush x:Key="FSE_WarningBrush" Color="{StaticResource FSE_WarningColor}"></SolidColorBrush>
@@ -31,13 +35,13 @@
<SolidColorBrush x:Key="PrimaryHueMidForegroundBrush" Color="{StaticResource FSE_PrimaryForegroundColor}"/>
<!-- primary -->
- <!--<SolidColorBrush x:Key="PrimaryHueLightBrush" Color="#744CE0"/>-->
- <!--<SolidColorBrush x:Key="PrimaryHueLightForegroundBrush" Color="#FFFFFF"/>-->
- <!--<SolidColorBrush x:Key="PrimaryHueMidBrush" Color="#6134D9"/>-->
- <!--<SolidColorBrush x:Key="PrimaryHueDarkBrush" Color="#4D1DCF"/>-->
- <!--<SolidColorBrush x:Key="PrimaryHueDarkForegroundBrush" Color="#FFFFFF"/>-->
- <!-- accent -->
- <!--<SolidColorBrush x:Key="SecondaryAccentBrush" Color="#5C5B5E"/>-->
- <!--<SolidColorBrush x:Key="SecondaryAccentForegroundBrush" Color="#FFFFFF"/>-->
+ <SolidColorBrush x:Key="PrimaryHueLightBrush" Color="{StaticResource FSE_PrimaryBackgroundLightColor}"/>
+ <SolidColorBrush x:Key="PrimaryHueLightForegroundBrush" Color="{StaticResource FSE_PrimaryForegroundColor}"/>
+ <!--<SolidColorBrush x:Key="PrimaryHueMidBrush" Color="#6134D9"/>
+ <SolidColorBrush x:Key="PrimaryHueDarkBrush" Color="#4D1DCF"/>
+ <SolidColorBrush x:Key="PrimaryHueDarkForegroundBrush" Color="#FFFFFF"/>-->
+ <!--accent--><!--
+ <SolidColorBrush x:Key="SecondaryAccentBrush" Color="#5C5B5E"/>
+ <SolidColorBrush x:Key="SecondaryAccentForegroundBrush" Color="#FFFFFF"/>-->
</ResourceDictionary> \ No newline at end of file
diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Resources/Fonts.xaml b/Software/Visual_Studio/FSE/Tango.FSE.Common/Resources/Fonts.xaml
index 08e8dea6f..e3ac57536 100644
--- a/Software/Visual_Studio/FSE/Tango.FSE.Common/Resources/Fonts.xaml
+++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Resources/Fonts.xaml
@@ -3,6 +3,9 @@
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:local="clr-namespace:Tango.FSE.Common.Resources">
+ <FontFamily x:Key="digital-7">../Fonts/#digital-7</FontFamily>
+ <FontFamily x:Key="flexo">../Fonts/#flexo</FontFamily>
+
<sys:Double x:Key="FSE_MessageBoxTitleFontSize">16</sys:Double>
</ResourceDictionary> \ No newline at end of file
diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Tango.FSE.Common.csproj b/Software/Visual_Studio/FSE/Tango.FSE.Common/Tango.FSE.Common.csproj
index 6fdd7acf2..17bc35b80 100644
--- a/Software/Visual_Studio/FSE/Tango.FSE.Common/Tango.FSE.Common.csproj
+++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Tango.FSE.Common.csproj
@@ -140,6 +140,23 @@
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<None Include="App.config" />
+ <Resource Include="Fonts\digital-7.ttf" />
+ <Resource Include="Fonts\Flexo-Black.otf" />
+ <Resource Include="Fonts\Flexo-BlackIt.otf" />
+ <Resource Include="Fonts\Flexo-Bold.otf" />
+ <Resource Include="Fonts\Flexo-BoldIt.otf" />
+ <Resource Include="Fonts\Flexo-Demi.otf" />
+ <Resource Include="Fonts\Flexo-DemiIt.otf" />
+ <Resource Include="Fonts\Flexo-Heavy.otf" />
+ <Resource Include="Fonts\Flexo-HeavyIt.otf" />
+ <Resource Include="Fonts\Flexo-It.otf" />
+ <Resource Include="Fonts\Flexo-Light.otf" />
+ <Resource Include="Fonts\Flexo-LightIt.otf" />
+ <Resource Include="Fonts\Flexo-Medium.otf" />
+ <Resource Include="Fonts\Flexo-MediumIt.otf" />
+ <Resource Include="Fonts\Flexo-Regular.otf" />
+ <Resource Include="Fonts\Flexo-Thin.otf" />
+ <Resource Include="Fonts\Flexo-ThinIt.otf" />
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
diff --git a/Software/Visual_Studio/FSE/Tango.FSE.UI/App.xaml b/Software/Visual_Studio/FSE/Tango.FSE.UI/App.xaml
index b2ba0b65d..9b095328c 100644
--- a/Software/Visual_Studio/FSE/Tango.FSE.UI/App.xaml
+++ b/Software/Visual_Studio/FSE/Tango.FSE.UI/App.xaml
@@ -7,14 +7,14 @@
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
- <!--<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colors.xaml" />
+ <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colors.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseDark.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/VS/Colors.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/VS/Styles.xaml" />
- <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />-->
+ <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
- <!--<materialDesign:BundledTheme BaseTheme="Dark" PrimaryColor="LightBlue" SecondaryColor="Cyan" />
- <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml" />-->
+ <materialDesign:BundledTheme BaseTheme="Dark" PrimaryColor="LightBlue" SecondaryColor="Cyan" />
+ <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml">
</ResourceDictionary>
diff --git a/Software/Visual_Studio/FSE/Tango.FSE.UI/MainWindow.xaml b/Software/Visual_Studio/FSE/Tango.FSE.UI/MainWindow.xaml
index 4802e7b57..ef62d08da 100644
--- a/Software/Visual_Studio/FSE/Tango.FSE.UI/MainWindow.xaml
+++ b/Software/Visual_Studio/FSE/Tango.FSE.UI/MainWindow.xaml
@@ -14,7 +14,7 @@
Background="{StaticResource FSE_PrimaryBackgroundBrush}"
TextElement.FontWeight="Medium"
TextElement.FontSize="14"
- TitleCharacterCasing="Normal" EnableDWMDropShadow="True" BorderThickness="1" BorderBrush="Gray">
+ TitleCharacterCasing="Normal" EnableDWMDropShadow="True" BorderThickness="1" BorderBrush="Gray" FontFamily="{StaticResource flexo}">
<Grid>
<views:MainView/>
diff --git a/Software/Visual_Studio/FSE/Tango.FSE.UI/Notifications/DefaultNotificationProvider.cs b/Software/Visual_Studio/FSE/Tango.FSE.UI/Notifications/DefaultNotificationProvider.cs
index c3c541486..8240fc02b 100644
--- a/Software/Visual_Studio/FSE/Tango.FSE.UI/Notifications/DefaultNotificationProvider.cs
+++ b/Software/Visual_Studio/FSE/Tango.FSE.UI/Notifications/DefaultNotificationProvider.cs
@@ -189,7 +189,7 @@ namespace Tango.FSE.UI.Notifications
/// </summary>
/// <param name="message">The message.</param>
/// <returns></returns>
- public Task<bool> ShowQuestion(string message)
+ public Task<bool> ShowQuestion(string message, String okText = null, String cancelText = null)
{
return ShowMessageBox(new MessageBoxVM()
{
@@ -197,6 +197,25 @@ namespace Tango.FSE.UI.Notifications
Title = "Confirm",
HasCancel = true,
Type = MessageType.Info,
+ OKText = okText != null ? okText : "YES",
+ CancelText = cancelText != null ? cancelText : "NO"
+ });
+ }
+
+ /// <summary>
+ /// Shows a warning question message box.
+ /// </summary>
+ /// <param name="message">The message.</param>
+ public Task<bool> ShowWarningQuestion(String message, String okText = null, String cancelText = null)
+ {
+ return ShowMessageBox(new MessageBoxVM()
+ {
+ Message = message,
+ Title = "Warning",
+ HasCancel = true,
+ Type = MessageType.Warning,
+ OKText = okText != null ? okText : "YES",
+ CancelText = cancelText != null ? cancelText : "NO"
});
}
diff --git a/Software/Visual_Studio/FSE/Tango.FSE.UI/ViewModels/LoginViewVM.cs b/Software/Visual_Studio/FSE/Tango.FSE.UI/ViewModels/LoginViewVM.cs
index 77b15adc4..77e730a78 100644
--- a/Software/Visual_Studio/FSE/Tango.FSE.UI/ViewModels/LoginViewVM.cs
+++ b/Software/Visual_Studio/FSE/Tango.FSE.UI/ViewModels/LoginViewVM.cs
@@ -37,7 +37,7 @@ namespace Tango.FSE.UI.ViewModels
public LoginViewVM()
{
- LoginCommand = new RelayCommand(Login,() => Email.IsNotNullOrEmpty() && Password.IsNotNullOrEmpty() && SelectedEnvironment != null);
+ LoginCommand = new RelayCommand(Login, () => Email.IsNotNullOrEmpty() && Password.IsNotNullOrEmpty() && SelectedEnvironment != null);
}
public override void OnApplicationStarted()
@@ -66,6 +66,11 @@ namespace Tango.FSE.UI.ViewModels
catch (Exception ex)
{
await NotificationProvider.ShowError(ex.Message);
+ await NotificationProvider.ShowWarning(ex.Message);
+ await NotificationProvider.ShowSuccess(ex.Message);
+ await NotificationProvider.ShowInfo(ex.Message);
+ await NotificationProvider.ShowQuestion("Are you sure ?");
+ await NotificationProvider.ShowWarningQuestion("Are you really really sure ?", "YES, I'M", "SORRY");
}
}
}
diff --git a/Software/Visual_Studio/FSE/Tango.FSE.UI/Views/LoginView.xaml b/Software/Visual_Studio/FSE/Tango.FSE.UI/Views/LoginView.xaml
index 769b28021..d0959e6c3 100644
--- a/Software/Visual_Studio/FSE/Tango.FSE.UI/Views/LoginView.xaml
+++ b/Software/Visual_Studio/FSE/Tango.FSE.UI/Views/LoginView.xaml
@@ -17,7 +17,7 @@
<ComboBox Margin="0 20 0 0" ItemsSource="{Binding GatewayService.Environments}" SelectedItem="{Binding SelectedEnvironment}" DisplayMemberPath="Description" material:ComboBoxAssist.ShowSelectedItem="True"></ComboBox>
- <Button Margin="0 20 0 0" Height="40" Command="{Binding LoginCommand}">LOGIN</Button>
+ <Button IsDefault="True" Margin="0 20 0 0" Height="40" Command="{Binding LoginCommand}">LOGIN</Button>
</StackPanel>
</Grid>
</UserControl>
diff --git a/Software/Visual_Studio/FSE/Tango.FSE.UI/Views/MainView.xaml b/Software/Visual_Studio/FSE/Tango.FSE.UI/Views/MainView.xaml
index ac5cbfcf6..c3208d6fd 100644
--- a/Software/Visual_Studio/FSE/Tango.FSE.UI/Views/MainView.xaml
+++ b/Software/Visual_Studio/FSE/Tango.FSE.UI/Views/MainView.xaml
@@ -21,72 +21,111 @@
<local:LoginView/>
<local:LayoutView/>
</controls:NavigationControl>
-
- <!--DIALOGS-->
- <Grid Background="{StaticResource FSE_SemiTransparentBrush}" Visibility="{Binding NotificationProvider.HasMessageBox,Converter={StaticResource BooleanToVisibilityConverter}}">
- <Grid Height="400" Margin="20" RenderTransformOrigin="0.5,0.5">
- <Grid.Style>
- <Style TargetType="Grid">
- <Setter Property="RenderTransform">
- <Setter.Value>
- <ScaleTransform ScaleX="0" ScaleY="0" />
- </Setter.Value>
- </Setter>
- <Style.Triggers>
- <DataTrigger Binding="{Binding NotificationProvider.HasMessageBox}" Value="True">
- <DataTrigger.EnterActions>
- <BeginStoryboard>
- <Storyboard>
- <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX" From="0" To="1" Duration="00:00:0.2" />
- <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" From="0" To="1" Duration="00:00:0.2" />
- </Storyboard>
- </BeginStoryboard>
- </DataTrigger.EnterActions>
- <DataTrigger.ExitActions>
- <BeginStoryboard>
- <Storyboard>
- <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX" From="1" To="0" Duration="00:00:0.2" />
- <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" From="1" To="0" Duration="00:00:0.2" />
- </Storyboard>
- </BeginStoryboard>
- </DataTrigger.ExitActions>
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </Grid.Style>
- <Border DataContext="{Binding NotificationProvider.CurrentMessageBox}" Background="{StaticResource FSE_PrimaryBackgroundBrush}" CornerRadius="5" Margin="10">
- <Border.Effect>
- <DropShadowEffect BlurRadius="10" />
- </Border.Effect>
- <Grid ClipToBounds="True">
- <DockPanel>
- <Grid DockPanel.Dock="Top">
- <Border CornerRadius="5 5 0 0" BorderBrush="{StaticResource FSE_GrayBrush}" BorderThickness="0 0 0 1" Padding="30" Background="{StaticResource FSE_MessageBoxTitleHeaderBackgroundBrush}">
- <StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
- <material:PackIcon Width="24" Height="24" Margin="0 0 20 0">
- <material:PackIcon.Style>
- <Style TargetType="material:PackIcon">
- <Setter Property="Foreground" Value="{StaticResource FSE_InfoBrush}"></Setter>
- </Style>
- </material:PackIcon.Style>
- </material:PackIcon>
- <TextBlock Text="{Binding Title}" FontSize="{StaticResource FSE_MessageBoxTitleFontSize}" FontWeight="Normal"></TextBlock>
- </StackPanel>
- </Border>
- <Button Background="Transparent" Style="{StaticResource MaterialDesignToolForegroundButton}" Command="{Binding CloseCommand}" CommandParameter="{Binding}" HorizontalAlignment="Right" MaxHeight="90" Width="{Binding RelativeSource={RelativeSource Self},Path=ActualHeight}" Foreground="{StaticResource FSE_PrimaryForegroundBrush}" Opacity="0.5" />
- </Grid>
+ <!--DIALOGS-->
+ <Grid x:Name="gridDialogs" IsVisibleChanged="GridDialogs_IsVisibleChanged" Background="{StaticResource FSE_SemiTransparentBrush}" Visibility="{Binding NotificationProvider.HasMessageBox,Converter={StaticResource BooleanToVisibilityConverter}}">
+ <Grid>
+ <Grid.RowDefinitions>
+ <RowDefinition Height="100*"/>
+ <RowDefinition Height="155*" MaxHeight="350" MinHeight="300" />
+ <RowDefinition Height="100*"/>
+ </Grid.RowDefinitions>
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="100*"/>
+ <ColumnDefinition Width="200*" MaxWidth="780" MinWidth="400" />
+ <ColumnDefinition Width="100*"/>
+ </Grid.ColumnDefinitions>
+ <Grid Margin="20" RenderTransformOrigin="0.5,0.5" Grid.Column="1" Grid.Row="1">
+ <Grid.Style>
+ <Style TargetType="Grid">
+ <Setter Property="RenderTransform">
+ <Setter.Value>
+ <ScaleTransform ScaleX="0" ScaleY="0" />
+ </Setter.Value>
+ </Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding NotificationProvider.HasMessageBox}" Value="True">
+ <DataTrigger.EnterActions>
+ <BeginStoryboard>
+ <Storyboard>
+ <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX" From="0" To="1" Duration="00:00:0.1" />
+ <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" From="0" To="1" Duration="00:00:0.1" />
+ </Storyboard>
+ </BeginStoryboard>
+ </DataTrigger.EnterActions>
+ <DataTrigger.ExitActions>
+ <BeginStoryboard>
+ <Storyboard>
+ <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX" From="1" To="0" Duration="00:00:0.1" />
+ <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" From="1" To="0" Duration="00:00:0.1" />
+ </Storyboard>
+ </BeginStoryboard>
+ </DataTrigger.ExitActions>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </Grid.Style>
- <StackPanel Orientation="Horizontal" DockPanel.Dock="Bottom" HorizontalAlignment="Center" Height="50" Margin="0 0 0 40">
- <Button x:Name="btnCancel" Style="{StaticResource MaterialDesignToolForegroundButton}" FontWeight="Normal" Width="220" Margin="0 0 30 0" Command="{Binding CloseCommand}" Visibility="{Binding HasCancel,Converter={StaticResource BooleanToVisibilityConverter}}">CANCEL</Button>
- <Button x:Name="btnOK" Style="{StaticResource MaterialDesignToolForegroundButton}" FontWeight="Normal" Width="220" Margin="30 0 0 0" Command="{Binding OKCommand}">OK</Button>
- </StackPanel>
+ <Border DataContext="{Binding NotificationProvider.CurrentMessageBox}" Background="{StaticResource FSE_PrimaryBackgroundBrush}" CornerRadius="5" Margin="10">
+ <Border.Effect>
+ <DropShadowEffect BlurRadius="10" />
+ </Border.Effect>
+ <Grid ClipToBounds="True">
+ <Grid>
+ <Grid.RowDefinitions>
+ <RowDefinition Height="30*" />
+ <RowDefinition Height="80*" />
+ <RowDefinition Height="35*" />
+ </Grid.RowDefinitions>
+ <Grid>
+ <Border CornerRadius="5 5 0 0" Background="{StaticResource FSE_PrimaryBackgroundLightBrush}"></Border>
+ <Border CornerRadius="5 5 0 0" BorderBrush="{StaticResource FSE_BorderBrush}" BorderThickness="0 0 0 1">
+ <StackPanel VerticalAlignment="Center" Margin="10 0 0 0" Orientation="Horizontal" HorizontalAlignment="Left">
+ <material:PackIcon Width="24" Height="24" Margin="0 0 10 0" x:Name="msgIcon">
+ <material:PackIcon.Style>
+ <Style TargetType="material:PackIcon">
+ <Setter Property="Foreground" Value="{StaticResource FSE_InfoBrush}"></Setter>
+ <Setter Property="Kind" Value="InfoOutline"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding Type}" Value="Warning">
+ <Setter Property="Foreground" Value="{StaticResource FSE_WarningBrush}"></Setter>
+ <Setter Property="Kind" Value="AlertOutline"></Setter>
+ </DataTrigger>
+ <DataTrigger Binding="{Binding Type}" Value="Error">
+ <Setter Property="Foreground" Value="{StaticResource FSE_ErrorBrush}"></Setter>
+ <Setter Property="Kind" Value="AlertCircleOutline"></Setter>
+ </DataTrigger>
+ <DataTrigger Binding="{Binding Type}" Value="Success">
+ <Setter Property="Foreground" Value="{StaticResource FSE_SuccessBrush}"></Setter>
+ <Setter Property="Kind" Value="Check"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </material:PackIcon.Style>
+ </material:PackIcon>
+ <TextBlock VerticalAlignment="Center" Foreground="{Binding ElementName=msgIcon,Path=Foreground}" Text="{Binding Title}" FontSize="{StaticResource FSE_MessageBoxTitleFontSize}"></TextBlock>
+ </StackPanel>
+ </Border>
+ <Button Background="Transparent" Style="{StaticResource MaterialDesignToolForegroundButton}" Command="{Binding CloseCommand}" CommandParameter="{Binding}" HorizontalAlignment="Right" Width="{Binding RelativeSource={RelativeSource Self},Path=ActualHeight}" Foreground="{StaticResource FSE_PrimaryForegroundBrush}" Opacity="0.5">
+ <material:PackIcon Kind="Close" />
+ </Button>
+ </Grid>
- <TextBlock Text="{Binding Message}" VerticalAlignment="Center" HorizontalAlignment="Center" TextWrapping="Wrap"></TextBlock>
+ <TextBlock Grid.Row="1" Margin="40" Text="{Binding Message}" VerticalAlignment="Top" HorizontalAlignment="Left" TextWrapping="Wrap"></TextBlock>
- </DockPanel>
- </Grid>
- </Border>
+ <Grid Grid.Row="2" Margin="10">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="80*" />
+ <ColumnDefinition Width="50*" />
+ <ColumnDefinition Width="50*" />
+ </Grid.ColumnDefinitions>
+ <Button Grid.Column="1" x:Name="btnCancel" Height="Auto" Style="{StaticResource MaterialDesignRaisedLightButton}" FontWeight="Normal" Margin="0 0 10 0" Command="{Binding CloseCommand}" Visibility="{Binding HasCancel,Converter={StaticResource BooleanToVisibilityConverter}}" Content="{Binding CancelText}"></Button>
+ <Button Grid.Column="2" x:Name="btnOK" IsDefault="True" Style="{StaticResource MaterialDesignRaisedLightButton}" Height="Auto" FontWeight="Normal" Margin="0 0 0 0" Command="{Binding OKCommand}" Content="{Binding OKText}"></Button>
+ </Grid>
+ </Grid>
+ </Grid>
+ </Border>
+ </Grid>
</Grid>
</Grid>
<!--DIALOGS-->
diff --git a/Software/Visual_Studio/FSE/Tango.FSE.UI/Views/MainView.xaml.cs b/Software/Visual_Studio/FSE/Tango.FSE.UI/Views/MainView.xaml.cs
index c410a4fa3..38ab523c4 100644
--- a/Software/Visual_Studio/FSE/Tango.FSE.UI/Views/MainView.xaml.cs
+++ b/Software/Visual_Studio/FSE/Tango.FSE.UI/Views/MainView.xaml.cs
@@ -20,6 +20,8 @@ namespace Tango.FSE.UI.Views
/// </summary>
public partial class MainView : UserControl
{
+ private UIElement _previousFocusedElement;
+
public static MainView Instance { get; set; }
public MainView()
@@ -27,5 +29,19 @@ namespace Tango.FSE.UI.Views
Instance = this;
InitializeComponent();
}
+
+ private async void GridDialogs_IsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e)
+ {
+ if (gridDialogs.IsVisible)
+ {
+ _previousFocusedElement = Keyboard.FocusedElement as UIElement;
+ await Task.Delay(100);
+ btnOK.Focus();
+ }
+ else
+ {
+ _previousFocusedElement?.Focus();
+ }
+ }
}
}