aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2019-04-22 09:33:28 +0300
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2019-04-22 09:33:28 +0300
commit13887d7b53fec7e2d357fd377a6a1fbd0e875e65 (patch)
treef400c960cc086a6615de95d155b5da19044e37b6 /Software/Visual_Studio/PPC/Tango.PPC.UI
parent26ede873b194b0df70979b6f1b62e0c91ca19341 (diff)
downloadTango-13887d7b53fec7e2d357fd377a6a1fbd0e875e65.tar.gz
Tango-13887d7b53fec7e2d357fd377a6a1fbd0e875e65.zip
Working on PPC optimizations...
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml.cs14
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications/DefaultNotificationProvider.cs10
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LoginView.xaml7
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MainView.xaml4
4 files changed, 23 insertions, 12 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml.cs
index 364ca8ee7..b90a1afff 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml.cs
@@ -11,7 +11,9 @@ using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Forms;
using System.Windows.Input;
+using System.Windows.Interop;
using System.Windows.Media;
+using System.Windows.Media.Animation;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
@@ -32,6 +34,8 @@ namespace Tango.PPC.UI
{
Instance = this;
+ //Timeline.DesiredFrameRateProperty.OverrideMetadata(typeof(Timeline),new FrameworkPropertyMetadata { DefaultValue = 30 });
+
InitializeComponent();
bool has_touch = false;
@@ -77,6 +81,16 @@ namespace Tango.PPC.UI
Closing += MainWindow_Closing;
}
+ protected override void OnSourceInitialized(EventArgs e)
+ {
+ //var hwndSource = PresentationSource.FromVisual(this) as HwndSource;
+
+ //if (hwndSource != null)
+ // hwndSource.CompositionTarget.RenderMode = RenderMode.SoftwareOnly;
+
+ base.OnSourceInitialized(e);
+ }
+
private void LockAspectRatio()
{
this.Width = (this.Height * (800d / 1280d)) - 10;
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications/DefaultNotificationProvider.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications/DefaultNotificationProvider.cs
index d7dca484e..5062df1d6 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications/DefaultNotificationProvider.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications/DefaultNotificationProvider.cs
@@ -140,7 +140,7 @@ namespace Tango.PPC.UI.Notifications
return ShowMessageBox(new MessageBoxVM()
{
Message = message,
- Icon = TouchIconKind.AlertOctagon,
+ Icon = TouchIconKind.AlertCircleOutline,
Title = "Error",
Brush = Application.Current.Resources["TangoMessageBoxErrorBrush"] as Brush,
});
@@ -156,7 +156,7 @@ namespace Tango.PPC.UI.Notifications
return ShowMessageBox(new MessageBoxVM()
{
Message = message,
- Icon = TouchIconKind.InfoCircleSolid,
+ Icon = TouchIconKind.AlertCircleOutline,
Title = "Information",
Brush = Application.Current.Resources["TangoMessageBoxInfoBrush"] as Brush,
});
@@ -172,7 +172,7 @@ namespace Tango.PPC.UI.Notifications
return ShowMessageBox(new MessageBoxVM()
{
Message = message,
- Icon = TouchIconKind.Alert,
+ Icon = TouchIconKind.AlertCircleOutline,
Title = "Warning",
Brush = Application.Current.Resources["TangoMessageBoxWarningBrush"] as Brush,
});
@@ -188,7 +188,7 @@ namespace Tango.PPC.UI.Notifications
return ShowMessageBox(new MessageBoxVM()
{
Message = message,
- Icon = TouchIconKind.QuestionCircleSolid,
+ Icon = TouchIconKind.QuestionCircleRegular,
Title = "Confirm",
HasCancel = true,
Brush = Application.Current.Resources["TangoMessageBoxQuestionBrush"] as Brush,
@@ -218,6 +218,8 @@ namespace Tango.PPC.UI.Notifications
/// <returns></returns>
private Task<bool> ShowMessageBox(MessageBoxVM vm)
{
+ ReleaseGlobalBusyMessage();
+
LogManager.Log($"Displaying MessagBox '{vm.Message}'.");
TaskCompletionSource<bool> source = new TaskCompletionSource<bool>();
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LoginView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LoginView.xaml
index 179d1dde3..dee4e9c7b 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LoginView.xaml
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LoginView.xaml
@@ -27,13 +27,6 @@
<TextBlock HorizontalAlignment="Center" Margin="0 20 0 0">Forgot password?</TextBlock>
</StackPanel>
- <StackPanel>
- <controls:AsyncAdornerControl Height="130" Visibility="{Binding IsLoading,Converter={StaticResource BooleanToVisibilityConverter}}">
- <StackPanel VerticalAlignment="Center">
- <touch:TouchGifAnimation Source="/Images/preloader_rectangles.gif" EnableAnimation="{Binding IsLoading}" />
- </StackPanel>
- </controls:AsyncAdornerControl>
- </StackPanel>
</StackPanel>
</StackPanel>
</Grid>
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MainView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MainView.xaml
index c63ef1e13..604c79aeb 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MainView.xaml
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MainView.xaml
@@ -28,7 +28,9 @@
ItemExpandedPropertyPath="IsExpanded"
HasDialog="{Binding NotificationProvider.HasDialog}"
CurrentDialog="{Binding NotificationProvider.CurrentDialog}"
- NotificationBarVisibility="{Binding NotificationProvider.NotificationsVisible,Converter={StaticResource BooleanToVisibilityConverter}}">
+ NotificationBarVisibility="{Binding NotificationProvider.NotificationsVisible,Converter={StaticResource BooleanToVisibilityConverter}}"
+ IsBusy="{Binding NotificationProvider.IsInGlobalBusyState}"
+ BusyMessage="{Binding NotificationProvider.GlobalBusyMessage}">
<touch:TouchPanel.NotificationTemplate>
<DataTemplate>
<touch:TouchButton Style="{StaticResource TangoFlatButton}" Padding="0" Command="{Binding PressedCommand}" components:TransformationHelper.TransformWhenPressed="False">