From 51afc4f6a17383e91a72c2ce060e82604d43c3a8 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Mon, 20 Aug 2018 19:43:15 +0300 Subject: Working on new Machine Studio DB. --- .../Controls/LoadingPanel.cs | 37 ++++++++++++++++++++++ .../Tango.MachineStudio.Common/IStudioViewModel.cs | 5 +++ .../Modules/IStudioModuleLoader.cs | 5 +++ .../Resources/MaterialDesign.xaml | 1 + .../StudioApplication/IStudioApplicationManager.cs | 5 +++ .../Tango.MachineStudio.Common/StudioViewModel.cs | 24 ++++++++++++++ .../Tango.MachineStudio.Common.csproj | 7 +++- .../Tango.MachineStudio.Common/Themes/Generic.xaml | 31 ++++++++++++++++++ 8 files changed, 114 insertions(+), 1 deletion(-) create mode 100644 Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/LoadingPanel.cs create mode 100644 Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Themes/Generic.xaml (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common') diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/LoadingPanel.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/LoadingPanel.cs new file mode 100644 index 000000000..665d6995b --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/LoadingPanel.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace Tango.MachineStudio.Common.Controls +{ + public class LoadingPanel : ContentControl + { + + + public bool IsLoading + { + get { return (bool)GetValue(IsLoadingProperty); } + set { SetValue(IsLoadingProperty, value); } + } + public static readonly DependencyProperty IsLoadingProperty = + DependencyProperty.Register("IsLoading", typeof(bool), typeof(LoadingPanel), new PropertyMetadata(false)); + + + + static LoadingPanel() + { + DefaultStyleKeyProperty.OverrideMetadata(typeof(LoadingPanel), new FrameworkPropertyMetadata(typeof(LoadingPanel))); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/IStudioViewModel.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/IStudioViewModel.cs index 4203a1e8b..76cc0433c 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/IStudioViewModel.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/IStudioViewModel.cs @@ -43,5 +43,10 @@ namespace Tango.MachineStudio.Common /// Called when the application has been started /// void OnApplicationStarted(); + + /// + /// Called when the application is ready and all modules are loaded. + /// + void OnApplicationReady(); } } diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Modules/IStudioModuleLoader.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Modules/IStudioModuleLoader.cs index 1fd72c53a..990300143 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Modules/IStudioModuleLoader.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Modules/IStudioModuleLoader.cs @@ -12,6 +12,11 @@ namespace Tango.MachineStudio.Common.Modules /// public interface IStudioModuleLoader { + /// + /// Occurs when all modules are initialized. + /// + event EventHandler ModulesLoaded; + /// /// Gets all loaded modules. /// diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/MaterialDesign.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/MaterialDesign.xaml index 07818269b..6fcf6dd72 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/MaterialDesign.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/MaterialDesign.xaml @@ -3,6 +3,7 @@ xmlns:converters="clr-namespace:MaterialDesignThemes.Wpf.Converters;assembly=MaterialDesignThemes.Wpf" xmlns:editors="clr-namespace:Tango.AutoComplete.Editors;assembly=Tango.AutoComplete" xmlns:dragAndDrop="clr-namespace:Tango.DragAndDrop;assembly=Tango.DragAndDrop" + xmlns:sharedConverters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI" xmlns:mahApps="http://metro.mahapps.com/winfx/xaml/controls" xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:local="clr-namespace:Tango.MachineStudio.Common.Resources"> diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioApplication/IStudioApplicationManager.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioApplication/IStudioApplicationManager.cs index 07f02df3a..441a4ca93 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioApplication/IStudioApplicationManager.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioApplication/IStudioApplicationManager.cs @@ -77,5 +77,10 @@ namespace Tango.MachineStudio.Common.StudioApplication /// /// The window. void RegisterOpenedWindow(Window window); + + /// + /// Raises the application ready event. + /// + void NotifyApplicationReady(); } } diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioViewModel.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioViewModel.cs index 96715dc20..36e3994ad 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioViewModel.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/StudioViewModel.cs @@ -82,6 +82,14 @@ namespace Tango.MachineStudio.Common { } + + /// + /// Called when the application is ready and all modules are loaded. + /// + public virtual void OnApplicationReady() + { + + } } /// @@ -159,6 +167,14 @@ namespace Tango.MachineStudio.Common { } + + /// + /// Called when the application is ready and all modules are loaded. + /// + public virtual void OnApplicationReady() + { + + } } /// @@ -187,6 +203,14 @@ namespace Tango.MachineStudio.Common } + /// + /// Called when the application is ready and all modules are loaded. + /// + public virtual void OnApplicationReady() + { + + } + /// /// Called when another module has wants to navigate to this module with some arguments. /// diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj index 6d6803076..fedbaf8a9 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj @@ -85,6 +85,7 @@ HiveComboControl.xaml + RealTimeGraphMultiControl.xaml @@ -163,6 +164,10 @@ Designer MSBuild:Compile + + MSBuild:Compile + Designer + @@ -293,7 +298,7 @@ - + \ No newline at end of file diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Themes/Generic.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Themes/Generic.xaml new file mode 100644 index 000000000..9cc398753 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Themes/Generic.xaml @@ -0,0 +1,31 @@ + + + + + + + -- cgit v1.3.1