From cac172ff1d9b3634288d68431467f9ceccb7ae3b Mon Sep 17 00:00:00 2001 From: Jake Norbut Date: Tue, 5 Dec 2017 11:53:03 -0600 Subject: [PATCH 1/4] Contract Picker Model - adding proper null checks in the func so linq won't NRE --- .../spark/mspark/ContractPicker/ContractPickerModel.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/client/spark/mspark/ContractPicker/ContractPickerModel.cs b/src/client/spark/mspark/ContractPicker/ContractPickerModel.cs index 05ef79e52..07fadb38e 100644 --- a/src/client/spark/mspark/ContractPicker/ContractPickerModel.cs +++ b/src/client/spark/mspark/ContractPicker/ContractPickerModel.cs @@ -235,14 +235,13 @@ namespace mbts.spark { if (criteria == null) return false; foreach (SecurityCriteriaClause x in criteria.clauses) { - bool iteration_result = (x.exchanges.Length == 0 || x.exchanges.Any(exchange => exchange == sec_item.Exchange)) - && (x.security_types.Length == 0 || x.security_types.Any(sec_type => sec_type == sec_item.security_type())) - && (x.symbols.Length == 0 || x.symbols.Any(sym => sym == sec_item.Symbol)) - && (x.security_keys.Count == 0 || x.security_keys.Any(sec_key => sec_key == sec_item.Id)); + bool iteration_result = ((x.exchanges == null) || (x.exchanges.Length == 0 || x.exchanges.Any(exchange => exchange == sec_item.Exchange))) + && ((x.security_types == null) || (x.security_types.Length == 0 || x.security_types.Any(sec_type => sec_type == sec_item.security_type()))) + && ((x.symbols == null) || (x.symbols.Length == 0 || x.symbols.Any(sym => sym == sec_item.Symbol))) + && ((x.security_keys == null) || (x.security_keys.Count == 0 || x.security_keys.Any(sec_key => sec_key == sec_item.Id))); if (iteration_result) return true; } return false; - } public void Dispose() From 7e84dc628d63f09d7e94957e17926c6da455c7de Mon Sep 17 00:00:00 2001 From: Eric Harding Date: Tue, 5 Dec 2017 17:24:00 -0500 Subject: [PATCH 2/4] Clean up spark subfolders --- .../{uicore => }/Images/Cursors/Grab.cur | Bin .../{uicore => }/Images/Cursors/Grabbing.cur | Bin src/client/spark/{uicore => }/Images/Icons.cs | 4 +- .../{uicore => }/Images/Icons/Abacus.png | Bin .../{uicore => }/Images/Icons/Add-New.png | Bin .../spark/{uicore => }/Images/Icons/Admin.ico | Bin .../spark/{uicore => }/Images/Icons/Admin.png | Bin .../spark/{uicore => }/Images/Icons/Admin.svg | 0 .../{uicore => }/Images/Icons/Analytics.ico | Bin .../{uicore => }/Images/Icons/Analytics.png | Bin .../{uicore => }/Images/Icons/Analytics.svg | 0 .../Images/Icons/Arrow-Diagonal-Up-Right.png | Bin .../Images/Icons/Arrowhead-Down.png | Bin .../Images/Icons/Arrowhead-Up.png | Bin .../spark/{uicore => }/Images/Icons/BTS.png | Bin .../{uicore => }/Images/Icons/BlueSpread.ico | Bin .../Images/Icons/Book-Settings.png | Bin .../Images/Icons/Cube-Molecule.png | Bin .../{uicore => }/Images/Icons/DataCopy.ico | Bin .../{uicore => }/Images/Icons/DataCopy.svg | 0 .../spark/{uicore => }/Images/Icons/Date.png | Bin .../{uicore => }/Images/Icons/Delete.png | Bin .../spark/{uicore => }/Images/Icons/Depth.ico | Bin .../spark/{uicore => }/Images/Icons/Depth.png | Bin .../spark/{uicore => }/Images/Icons/Depth.svg | 0 .../Images/Icons/FavoriteWindow.png | Bin .../{uicore => }/Images/Icons/Import.ico | Bin .../{uicore => }/Images/Icons/Import.svg | 0 .../Images/Icons/InsertionArrow.png | Bin .../{uicore => }/Images/Icons/Mathematics.png | Bin .../{uicore => }/Images/Icons/Orders.ico | Bin .../{uicore => }/Images/Icons/Orders.png | Bin .../{uicore => }/Images/Icons/Orders.svg | 0 .../Images/Icons/Quotation-Marks.png | Bin .../{uicore => }/Images/Icons/RFQArrows.png | Bin .../{uicore => }/Images/Icons/Refresh.ico | Bin .../{uicore => }/Images/Icons/Refresh.svg | 0 .../{uicore => }/Images/Icons/RubberStamp.png | Bin .../{uicore => }/Images/Icons/Sheets.ico | Bin .../{uicore => }/Images/Icons/Sheets.png | Bin .../{uicore => }/Images/Icons/Sheets.svg | 0 .../{uicore => }/Images/Icons/SheetsGreen.png | Bin .../{uicore => }/Images/Icons/SheetsRed.png | Bin .../{uicore => }/Images/Icons/Spread.ico | Bin .../{uicore => }/Images/Icons/Ticket.png | Bin .../{uicore => }/Images/Icons/Trades.ico | Bin .../{uicore => }/Images/Icons/Trades.png | Bin .../{uicore => }/Images/Icons/Trades.svg | 0 .../{uicore => }/Images/Icons/Window.png | Bin .../{uicore => }/Images/Icons/Zoom-In.png | Bin .../{uicore => }/Images/Icons/Zoom-Out.png | Bin .../spark/{uicore => }/Images/Icons/eye.ico | Bin .../spark/{uicore => }/Images/Icons/eye.png | Bin .../spark/{uicore => }/Images/Icons/eye.svg | 0 .../spark/{uicore => }/Images/Icons/logo.ico | Bin .../spark/{uicore => }/Images/Icons/mmtn.ico | Bin .../{uicore => }/Images/Icons/refresh.png | Bin .../{uicore => }/Images/Icons/reports.ico | Bin .../{uicore => }/Images/Icons/reports.png | Bin .../{uicore => }/Images/Icons/reports.svg | 0 .../spark/{uicore => }/Images/Icons/risk.ico | Bin .../spark/{uicore => }/Images/Icons/risk.png | Bin .../spark/{uicore => }/Images/Icons/risk.svg | 0 .../{uicore => }/Images/Icons/spread.png | Bin .../{uicore => }/Images/Vector/Icons.xaml | 0 src/client/spark/Spark.csproj | 3 +- .../spark/{uitests => Tests}/MakePublic.cs | 0 .../{uitests => Tests}/TestExtensions.cs | 0 .../spark/{sys => Tests}/api/Test/ApiTests.cs | 0 .../api/Test/HelloServiceServer.cs | 0 .../api/Test/ServiceContextEx.cs | 0 .../mcore/Expression/ExpressionTest.cs | 0 .../{uitests => Tests}/mcore/SecurityTests.cs | 0 .../mcore/SyncronizeCollectionTests.cs | 0 src/client/spark/Themes/generic.xaml | 2 +- src/client/spark/{ => core}/Bus/IBus.cs | 0 .../spark/{ => core}/Bus/SingletonBus.cs | 0 .../spark/{ => core}/Bus/SparkCommand.cs | 3 +- .../spark/{ => core}/Bus/SparkCommands.cs | 0 src/client/spark/{ => core}/Bus/SparkTags.cs | 0 .../Exceptions/ColorNotFoundException.cs | 0 .../Exceptions/DebugException.cs | 0 .../FontsAndColors}/BTSColor.cs | 0 .../FontsAndColors}/BTSColorExtension.cs | 0 .../FontsAndColors}/BTSColors.cs | 0 .../FontsAndColors}/BTSCoreColors.cs | 0 .../FontsAndColors}/BTSFont.cs | 0 .../FontsAndColors}/BTSFontFamily.cs | 0 .../FontsAndColors}/BTSFontStyle.cs | 0 .../FontsAndColors}/BTSFontWeight.cs | 0 .../NativeMethods/BTSNativeMethods.cs | 0 .../{uicore => core}/NativeMethods/HT.cs | 0 .../NativeMethods/NativeMethods.cs | 0 .../{uicore => core}/NativeMethods/WM.cs | 0 .../Settings/ISavedWindowFactory.cs | 0 .../Settings/ISettingsCollector.cs | 0 .../Settings/Tests/TestPersist.cs | 0 .../Settings/UISettings.proto | 0 .../Settings/UISettingsDefaults.cs | 0 .../Settings/UserPersistFactory.cs | 0 .../Settings/Workspaces/WorkspaceProtos.cs | 0 .../ShellInterface/ICloseable.cs | 0 .../ShellInterface/ILauncher.cs | 0 .../ShellInterface/IShellDaemon.cs | 0 .../ShellInterface/IShellModule.cs | 0 .../ShellInterface/IShellWindow.cs | 0 .../ShellInterface/IShellWindowFactory.cs | 0 .../IShellWindowMigrationRule.cs | 0 .../ShellInterface/IUndoActions.cs | 0 .../ShellInterface/IViewLocator.cs | 0 .../ShellInterface/IWindowManager.cs | 0 .../ShellInterface/IWindowsInterop.cs | 0 .../ShellInterface/ShellModelExtensions.cs | 0 .../ShellSerializationHeader.cs | 0 .../ShellInterface}/UISettings.cs | 0 .../Utility}/BTSApplicationBootstrapper.cs | 0 .../Utility/BeholderCollection.cs | 0 .../Utility/DelegateCommand.cs | 0 .../Utility/DispatcherHelper.cs | 0 .../Utility/ExpirationFormatter.cs | 0 .../Utility/IRequestViewClose.cs | 0 .../Utility/ObservableAppendCollection.cs | 0 .../Utility/ObservableAutoWrapper.cs | 0 .../Utility/ObservableCollectionEx.cs | 0 .../Utility/ObservableEditableCollection.cs | 0 .../Utility/ObservableFilter.cs | 0 .../Utility/ObservableSortedCollection.cs | 0 .../spark/{uicore => core}/Utility/OneOf.cs | 0 .../{uicore => core}/Utility/TupleCommand.cs | 0 .../{uicore => core}/Utility/ViewModelBase.cs | 0 .../spark/{uicore => core}/Utility/Wait.cs | 0 src/client/spark/mspark/Core/ClockSource.cs | 40 ----- .../ShellMetaModule/ISettingsLauncher.cs | 14 -- .../ShellMetaModule/MetaShellMenuModule.cs | 66 -------- .../ShellMetaModule/MetaShellMenuViewModel.cs | 64 -------- .../view/Controls/Browser/BrowserWindow.cs | 2 +- .../spark/{ => view}/Controls/SparkMenu.cs | 0 .../DragDrop/DragDropDocumentPreview.xaml | 2 +- src/client/spark/view/Resources/Buttons.xaml | 6 +- src/client/spark/view/Resources/Cursors.xaml | 4 +- src/client/spark/view/Shell/About.xaml | 2 +- .../Shell/Error/ErrorShellWindow.cs | 0 src/client/spark/view/Shell/Launcher.xaml | 2 +- .../view/Shell/Launcher/AnimatedNavWindow.cs | 145 ------------------ .../Shell/Login/LoginModel.cs | 2 +- .../spark/view/Shell/Login/LoginView.xaml | 2 +- .../spark/view/Shell/Login/LoginView.xaml.cs | 2 +- .../Login/PreloginWorkspaceEnumerator.cs | 0 src/client/spark/view/Shell/ShellBrowser.cs | 20 +-- .../{uicore => view}/Shell/ShellModel.cs | 0 .../{uicore => view}/Shell/Undo/UndoModel.cs | 0 .../{uicore => view}/Shell/ViewLocator.cs | 0 .../Shell/Workspaces/MetaShellMenuView.xaml | 103 ------------- .../Workspaces/MetaShellMenuView.xaml.cs | 81 ---------- .../Shell/Workspaces/WorkspaceViewModel.cs | 0 .../Shell/Workspaces/WorkspacesModel.cs | 0 156 files changed, 28 insertions(+), 541 deletions(-) rename src/client/spark/{uicore => }/Images/Cursors/Grab.cur (100%) rename src/client/spark/{uicore => }/Images/Cursors/Grabbing.cur (100%) rename src/client/spark/{uicore => }/Images/Icons.cs (96%) rename src/client/spark/{uicore => }/Images/Icons/Abacus.png (100%) rename src/client/spark/{uicore => }/Images/Icons/Add-New.png (100%) rename src/client/spark/{uicore => }/Images/Icons/Admin.ico (100%) rename src/client/spark/{uicore => }/Images/Icons/Admin.png (100%) rename src/client/spark/{uicore => }/Images/Icons/Admin.svg (100%) rename src/client/spark/{uicore => }/Images/Icons/Analytics.ico (100%) rename src/client/spark/{uicore => }/Images/Icons/Analytics.png (100%) rename src/client/spark/{uicore => }/Images/Icons/Analytics.svg (100%) rename src/client/spark/{uicore => }/Images/Icons/Arrow-Diagonal-Up-Right.png (100%) rename src/client/spark/{uicore => }/Images/Icons/Arrowhead-Down.png (100%) rename src/client/spark/{uicore => }/Images/Icons/Arrowhead-Up.png (100%) rename src/client/spark/{uicore => }/Images/Icons/BTS.png (100%) rename src/client/spark/{uicore => }/Images/Icons/BlueSpread.ico (100%) rename src/client/spark/{uicore => }/Images/Icons/Book-Settings.png (100%) rename src/client/spark/{uicore => }/Images/Icons/Cube-Molecule.png (100%) rename src/client/spark/{uicore => }/Images/Icons/DataCopy.ico (100%) rename src/client/spark/{uicore => }/Images/Icons/DataCopy.svg (100%) rename src/client/spark/{uicore => }/Images/Icons/Date.png (100%) rename src/client/spark/{uicore => }/Images/Icons/Delete.png (100%) rename src/client/spark/{uicore => }/Images/Icons/Depth.ico (100%) rename src/client/spark/{uicore => }/Images/Icons/Depth.png (100%) rename src/client/spark/{uicore => }/Images/Icons/Depth.svg (100%) rename src/client/spark/{uicore => }/Images/Icons/FavoriteWindow.png (100%) rename src/client/spark/{uicore => }/Images/Icons/Import.ico (100%) rename src/client/spark/{uicore => }/Images/Icons/Import.svg (100%) rename src/client/spark/{uicore => }/Images/Icons/InsertionArrow.png (100%) rename src/client/spark/{uicore => }/Images/Icons/Mathematics.png (100%) rename src/client/spark/{uicore => }/Images/Icons/Orders.ico (100%) rename src/client/spark/{uicore => }/Images/Icons/Orders.png (100%) rename src/client/spark/{uicore => }/Images/Icons/Orders.svg (100%) rename src/client/spark/{uicore => }/Images/Icons/Quotation-Marks.png (100%) rename src/client/spark/{uicore => }/Images/Icons/RFQArrows.png (100%) rename src/client/spark/{uicore => }/Images/Icons/Refresh.ico (100%) rename src/client/spark/{uicore => }/Images/Icons/Refresh.svg (100%) rename src/client/spark/{uicore => }/Images/Icons/RubberStamp.png (100%) rename src/client/spark/{uicore => }/Images/Icons/Sheets.ico (100%) rename src/client/spark/{uicore => }/Images/Icons/Sheets.png (100%) rename src/client/spark/{uicore => }/Images/Icons/Sheets.svg (100%) rename src/client/spark/{uicore => }/Images/Icons/SheetsGreen.png (100%) rename src/client/spark/{uicore => }/Images/Icons/SheetsRed.png (100%) rename src/client/spark/{uicore => }/Images/Icons/Spread.ico (100%) rename src/client/spark/{uicore => }/Images/Icons/Ticket.png (100%) rename src/client/spark/{uicore => }/Images/Icons/Trades.ico (100%) rename src/client/spark/{uicore => }/Images/Icons/Trades.png (100%) rename src/client/spark/{uicore => }/Images/Icons/Trades.svg (100%) rename src/client/spark/{uicore => }/Images/Icons/Window.png (100%) rename src/client/spark/{uicore => }/Images/Icons/Zoom-In.png (100%) rename src/client/spark/{uicore => }/Images/Icons/Zoom-Out.png (100%) rename src/client/spark/{uicore => }/Images/Icons/eye.ico (100%) rename src/client/spark/{uicore => }/Images/Icons/eye.png (100%) rename src/client/spark/{uicore => }/Images/Icons/eye.svg (100%) rename src/client/spark/{uicore => }/Images/Icons/logo.ico (100%) rename src/client/spark/{uicore => }/Images/Icons/mmtn.ico (100%) rename src/client/spark/{uicore => }/Images/Icons/refresh.png (100%) rename src/client/spark/{uicore => }/Images/Icons/reports.ico (100%) rename src/client/spark/{uicore => }/Images/Icons/reports.png (100%) rename src/client/spark/{uicore => }/Images/Icons/reports.svg (100%) rename src/client/spark/{uicore => }/Images/Icons/risk.ico (100%) rename src/client/spark/{uicore => }/Images/Icons/risk.png (100%) rename src/client/spark/{uicore => }/Images/Icons/risk.svg (100%) rename src/client/spark/{uicore => }/Images/Icons/spread.png (100%) rename src/client/spark/{uicore => }/Images/Vector/Icons.xaml (100%) rename src/client/spark/{uitests => Tests}/MakePublic.cs (100%) rename src/client/spark/{uitests => Tests}/TestExtensions.cs (100%) rename src/client/spark/{sys => Tests}/api/Test/ApiTests.cs (100%) rename src/client/spark/{sys => Tests}/api/Test/HelloServiceServer.cs (100%) rename src/client/spark/{sys => Tests}/api/Test/ServiceContextEx.cs (100%) rename src/client/spark/{uitests => Tests}/mcore/Expression/ExpressionTest.cs (100%) rename src/client/spark/{uitests => Tests}/mcore/SecurityTests.cs (100%) rename src/client/spark/{uitests => Tests}/mcore/SyncronizeCollectionTests.cs (100%) rename src/client/spark/{ => core}/Bus/IBus.cs (100%) rename src/client/spark/{ => core}/Bus/SingletonBus.cs (100%) rename src/client/spark/{ => core}/Bus/SparkCommand.cs (94%) rename src/client/spark/{ => core}/Bus/SparkCommands.cs (100%) rename src/client/spark/{ => core}/Bus/SparkTags.cs (100%) rename src/client/spark/{uicore => core}/Exceptions/ColorNotFoundException.cs (100%) rename src/client/spark/{uicore => core}/Exceptions/DebugException.cs (100%) rename src/client/spark/{uicore => core/FontsAndColors}/BTSColor.cs (100%) rename src/client/spark/{uicore => core/FontsAndColors}/BTSColorExtension.cs (100%) rename src/client/spark/{uicore => core/FontsAndColors}/BTSColors.cs (100%) rename src/client/spark/{uicore => core/FontsAndColors}/BTSCoreColors.cs (100%) rename src/client/spark/{uicore => core/FontsAndColors}/BTSFont.cs (100%) rename src/client/spark/{uicore => core/FontsAndColors}/BTSFontFamily.cs (100%) rename src/client/spark/{uicore => core/FontsAndColors}/BTSFontStyle.cs (100%) rename src/client/spark/{uicore => core/FontsAndColors}/BTSFontWeight.cs (100%) rename src/client/spark/{uicore => core}/NativeMethods/BTSNativeMethods.cs (100%) rename src/client/spark/{uicore => core}/NativeMethods/HT.cs (100%) rename src/client/spark/{uicore => core}/NativeMethods/NativeMethods.cs (100%) rename src/client/spark/{uicore => core}/NativeMethods/WM.cs (100%) rename src/client/spark/{uicore => core}/Settings/ISavedWindowFactory.cs (100%) rename src/client/spark/{uicore => core}/Settings/ISettingsCollector.cs (100%) rename src/client/spark/{uicore => core}/Settings/Tests/TestPersist.cs (100%) rename src/client/spark/{uicore => core}/Settings/UISettings.proto (100%) rename src/client/spark/{uicore => core}/Settings/UISettingsDefaults.cs (100%) rename src/client/spark/{uicore => core}/Settings/UserPersistFactory.cs (100%) rename src/client/spark/{uicore => core}/Settings/Workspaces/WorkspaceProtos.cs (100%) rename src/client/spark/{uicore => core}/ShellInterface/ICloseable.cs (100%) rename src/client/spark/{uicore => core}/ShellInterface/ILauncher.cs (100%) rename src/client/spark/{uicore => core}/ShellInterface/IShellDaemon.cs (100%) rename src/client/spark/{uicore => core}/ShellInterface/IShellModule.cs (100%) rename src/client/spark/{uicore => core}/ShellInterface/IShellWindow.cs (100%) rename src/client/spark/{uicore => core}/ShellInterface/IShellWindowFactory.cs (100%) rename src/client/spark/{uicore => core}/ShellInterface/IShellWindowMigrationRule.cs (100%) rename src/client/spark/{uicore => core}/ShellInterface/IUndoActions.cs (100%) rename src/client/spark/{uicore => core}/ShellInterface/IViewLocator.cs (100%) rename src/client/spark/{uicore => core}/ShellInterface/IWindowManager.cs (100%) rename src/client/spark/{uicore => core}/ShellInterface/IWindowsInterop.cs (100%) rename src/client/spark/{uicore => core}/ShellInterface/ShellModelExtensions.cs (100%) rename src/client/spark/{uicore => core}/ShellInterface/ShellSerializationHeader.cs (100%) rename src/client/spark/{sys/persist => core/ShellInterface}/UISettings.cs (100%) rename src/client/spark/{uicore => core/Utility}/BTSApplicationBootstrapper.cs (100%) rename src/client/spark/{uicore => core}/Utility/BeholderCollection.cs (100%) rename src/client/spark/{uicore => core}/Utility/DelegateCommand.cs (100%) rename src/client/spark/{uicore => core}/Utility/DispatcherHelper.cs (100%) rename src/client/spark/{uicore => core}/Utility/ExpirationFormatter.cs (100%) rename src/client/spark/{uicore => core}/Utility/IRequestViewClose.cs (100%) rename src/client/spark/{uicore => core}/Utility/ObservableAppendCollection.cs (100%) rename src/client/spark/{uicore => core}/Utility/ObservableAutoWrapper.cs (100%) rename src/client/spark/{uicore => core}/Utility/ObservableCollectionEx.cs (100%) rename src/client/spark/{uicore => core}/Utility/ObservableEditableCollection.cs (100%) rename src/client/spark/{uicore => core}/Utility/ObservableFilter.cs (100%) rename src/client/spark/{uicore => core}/Utility/ObservableSortedCollection.cs (100%) rename src/client/spark/{uicore => core}/Utility/OneOf.cs (100%) rename src/client/spark/{uicore => core}/Utility/TupleCommand.cs (100%) rename src/client/spark/{uicore => core}/Utility/ViewModelBase.cs (100%) rename src/client/spark/{uicore => core}/Utility/Wait.cs (100%) delete mode 100644 src/client/spark/mspark/Core/ClockSource.cs delete mode 100644 src/client/spark/uicore/Shell/ShellMetaModule/ISettingsLauncher.cs delete mode 100644 src/client/spark/uicore/Shell/ShellMetaModule/MetaShellMenuModule.cs delete mode 100644 src/client/spark/uicore/Shell/ShellMetaModule/MetaShellMenuViewModel.cs rename src/client/spark/{ => view}/Controls/SparkMenu.cs (100%) rename src/client/spark/{uicore => view}/Shell/Error/ErrorShellWindow.cs (100%) delete mode 100644 src/client/spark/view/Shell/Launcher/AnimatedNavWindow.cs rename src/client/spark/{uicore => view}/Shell/Login/LoginModel.cs (96%) rename src/client/spark/{uicore => view}/Shell/Login/PreloginWorkspaceEnumerator.cs (100%) rename src/client/spark/{uicore => view}/Shell/ShellModel.cs (100%) rename src/client/spark/{uicore => view}/Shell/Undo/UndoModel.cs (100%) rename src/client/spark/{uicore => view}/Shell/ViewLocator.cs (100%) delete mode 100644 src/client/spark/view/Shell/Workspaces/MetaShellMenuView.xaml delete mode 100644 src/client/spark/view/Shell/Workspaces/MetaShellMenuView.xaml.cs rename src/client/spark/{uicore => view}/Shell/Workspaces/WorkspaceViewModel.cs (100%) rename src/client/spark/{uicore => view}/Shell/Workspaces/WorkspacesModel.cs (100%) diff --git a/src/client/spark/uicore/Images/Cursors/Grab.cur b/src/client/spark/Images/Cursors/Grab.cur similarity index 100% rename from src/client/spark/uicore/Images/Cursors/Grab.cur rename to src/client/spark/Images/Cursors/Grab.cur diff --git a/src/client/spark/uicore/Images/Cursors/Grabbing.cur b/src/client/spark/Images/Cursors/Grabbing.cur similarity index 100% rename from src/client/spark/uicore/Images/Cursors/Grabbing.cur rename to src/client/spark/Images/Cursors/Grabbing.cur diff --git a/src/client/spark/uicore/Images/Icons.cs b/src/client/spark/Images/Icons.cs similarity index 96% rename from src/client/spark/uicore/Images/Icons.cs rename to src/client/spark/Images/Icons.cs index 1cd4be3ad..a05687622 100644 --- a/src/client/spark/uicore/Images/Icons.cs +++ b/src/client/spark/Images/Icons.cs @@ -10,8 +10,8 @@ namespace mbts.ui { public class Icons { - static readonly string base_uri = "pack://application:,,,/uicore/Images/Icons/"; - private static ResourceDictionary _resources = (ResourceDictionary)Application.LoadComponent(new Uri("/uicore/Images/Vector/Icons.xaml", UriKind.RelativeOrAbsolute)); + static readonly string base_uri = "pack://application:,,,/Images/Icons/"; + private static ResourceDictionary _resources = (ResourceDictionary)Application.LoadComponent(new Uri("/Images/Vector/Icons.xaml", UriKind.RelativeOrAbsolute)); private static Uri uri(string filename) { return new Uri(base_uri + filename); diff --git a/src/client/spark/uicore/Images/Icons/Abacus.png b/src/client/spark/Images/Icons/Abacus.png similarity index 100% rename from src/client/spark/uicore/Images/Icons/Abacus.png rename to src/client/spark/Images/Icons/Abacus.png diff --git a/src/client/spark/uicore/Images/Icons/Add-New.png b/src/client/spark/Images/Icons/Add-New.png similarity index 100% rename from src/client/spark/uicore/Images/Icons/Add-New.png rename to src/client/spark/Images/Icons/Add-New.png diff --git a/src/client/spark/uicore/Images/Icons/Admin.ico b/src/client/spark/Images/Icons/Admin.ico similarity index 100% rename from src/client/spark/uicore/Images/Icons/Admin.ico rename to src/client/spark/Images/Icons/Admin.ico diff --git a/src/client/spark/uicore/Images/Icons/Admin.png b/src/client/spark/Images/Icons/Admin.png similarity index 100% rename from src/client/spark/uicore/Images/Icons/Admin.png rename to src/client/spark/Images/Icons/Admin.png diff --git a/src/client/spark/uicore/Images/Icons/Admin.svg b/src/client/spark/Images/Icons/Admin.svg similarity index 100% rename from src/client/spark/uicore/Images/Icons/Admin.svg rename to src/client/spark/Images/Icons/Admin.svg diff --git a/src/client/spark/uicore/Images/Icons/Analytics.ico b/src/client/spark/Images/Icons/Analytics.ico similarity index 100% rename from src/client/spark/uicore/Images/Icons/Analytics.ico rename to src/client/spark/Images/Icons/Analytics.ico diff --git a/src/client/spark/uicore/Images/Icons/Analytics.png b/src/client/spark/Images/Icons/Analytics.png similarity index 100% rename from src/client/spark/uicore/Images/Icons/Analytics.png rename to src/client/spark/Images/Icons/Analytics.png diff --git a/src/client/spark/uicore/Images/Icons/Analytics.svg b/src/client/spark/Images/Icons/Analytics.svg similarity index 100% rename from src/client/spark/uicore/Images/Icons/Analytics.svg rename to src/client/spark/Images/Icons/Analytics.svg diff --git a/src/client/spark/uicore/Images/Icons/Arrow-Diagonal-Up-Right.png b/src/client/spark/Images/Icons/Arrow-Diagonal-Up-Right.png similarity index 100% rename from src/client/spark/uicore/Images/Icons/Arrow-Diagonal-Up-Right.png rename to src/client/spark/Images/Icons/Arrow-Diagonal-Up-Right.png diff --git a/src/client/spark/uicore/Images/Icons/Arrowhead-Down.png b/src/client/spark/Images/Icons/Arrowhead-Down.png similarity index 100% rename from src/client/spark/uicore/Images/Icons/Arrowhead-Down.png rename to src/client/spark/Images/Icons/Arrowhead-Down.png diff --git a/src/client/spark/uicore/Images/Icons/Arrowhead-Up.png b/src/client/spark/Images/Icons/Arrowhead-Up.png similarity index 100% rename from src/client/spark/uicore/Images/Icons/Arrowhead-Up.png rename to src/client/spark/Images/Icons/Arrowhead-Up.png diff --git a/src/client/spark/uicore/Images/Icons/BTS.png b/src/client/spark/Images/Icons/BTS.png similarity index 100% rename from src/client/spark/uicore/Images/Icons/BTS.png rename to src/client/spark/Images/Icons/BTS.png diff --git a/src/client/spark/uicore/Images/Icons/BlueSpread.ico b/src/client/spark/Images/Icons/BlueSpread.ico similarity index 100% rename from src/client/spark/uicore/Images/Icons/BlueSpread.ico rename to src/client/spark/Images/Icons/BlueSpread.ico diff --git a/src/client/spark/uicore/Images/Icons/Book-Settings.png b/src/client/spark/Images/Icons/Book-Settings.png similarity index 100% rename from src/client/spark/uicore/Images/Icons/Book-Settings.png rename to src/client/spark/Images/Icons/Book-Settings.png diff --git a/src/client/spark/uicore/Images/Icons/Cube-Molecule.png b/src/client/spark/Images/Icons/Cube-Molecule.png similarity index 100% rename from src/client/spark/uicore/Images/Icons/Cube-Molecule.png rename to src/client/spark/Images/Icons/Cube-Molecule.png diff --git a/src/client/spark/uicore/Images/Icons/DataCopy.ico b/src/client/spark/Images/Icons/DataCopy.ico similarity index 100% rename from src/client/spark/uicore/Images/Icons/DataCopy.ico rename to src/client/spark/Images/Icons/DataCopy.ico diff --git a/src/client/spark/uicore/Images/Icons/DataCopy.svg b/src/client/spark/Images/Icons/DataCopy.svg similarity index 100% rename from src/client/spark/uicore/Images/Icons/DataCopy.svg rename to src/client/spark/Images/Icons/DataCopy.svg diff --git a/src/client/spark/uicore/Images/Icons/Date.png b/src/client/spark/Images/Icons/Date.png similarity index 100% rename from src/client/spark/uicore/Images/Icons/Date.png rename to src/client/spark/Images/Icons/Date.png diff --git a/src/client/spark/uicore/Images/Icons/Delete.png b/src/client/spark/Images/Icons/Delete.png similarity index 100% rename from src/client/spark/uicore/Images/Icons/Delete.png rename to src/client/spark/Images/Icons/Delete.png diff --git a/src/client/spark/uicore/Images/Icons/Depth.ico b/src/client/spark/Images/Icons/Depth.ico similarity index 100% rename from src/client/spark/uicore/Images/Icons/Depth.ico rename to src/client/spark/Images/Icons/Depth.ico diff --git a/src/client/spark/uicore/Images/Icons/Depth.png b/src/client/spark/Images/Icons/Depth.png similarity index 100% rename from src/client/spark/uicore/Images/Icons/Depth.png rename to src/client/spark/Images/Icons/Depth.png diff --git a/src/client/spark/uicore/Images/Icons/Depth.svg b/src/client/spark/Images/Icons/Depth.svg similarity index 100% rename from src/client/spark/uicore/Images/Icons/Depth.svg rename to src/client/spark/Images/Icons/Depth.svg diff --git a/src/client/spark/uicore/Images/Icons/FavoriteWindow.png b/src/client/spark/Images/Icons/FavoriteWindow.png similarity index 100% rename from src/client/spark/uicore/Images/Icons/FavoriteWindow.png rename to src/client/spark/Images/Icons/FavoriteWindow.png diff --git a/src/client/spark/uicore/Images/Icons/Import.ico b/src/client/spark/Images/Icons/Import.ico similarity index 100% rename from src/client/spark/uicore/Images/Icons/Import.ico rename to src/client/spark/Images/Icons/Import.ico diff --git a/src/client/spark/uicore/Images/Icons/Import.svg b/src/client/spark/Images/Icons/Import.svg similarity index 100% rename from src/client/spark/uicore/Images/Icons/Import.svg rename to src/client/spark/Images/Icons/Import.svg diff --git a/src/client/spark/uicore/Images/Icons/InsertionArrow.png b/src/client/spark/Images/Icons/InsertionArrow.png similarity index 100% rename from src/client/spark/uicore/Images/Icons/InsertionArrow.png rename to src/client/spark/Images/Icons/InsertionArrow.png diff --git a/src/client/spark/uicore/Images/Icons/Mathematics.png b/src/client/spark/Images/Icons/Mathematics.png similarity index 100% rename from src/client/spark/uicore/Images/Icons/Mathematics.png rename to src/client/spark/Images/Icons/Mathematics.png diff --git a/src/client/spark/uicore/Images/Icons/Orders.ico b/src/client/spark/Images/Icons/Orders.ico similarity index 100% rename from src/client/spark/uicore/Images/Icons/Orders.ico rename to src/client/spark/Images/Icons/Orders.ico diff --git a/src/client/spark/uicore/Images/Icons/Orders.png b/src/client/spark/Images/Icons/Orders.png similarity index 100% rename from src/client/spark/uicore/Images/Icons/Orders.png rename to src/client/spark/Images/Icons/Orders.png diff --git a/src/client/spark/uicore/Images/Icons/Orders.svg b/src/client/spark/Images/Icons/Orders.svg similarity index 100% rename from src/client/spark/uicore/Images/Icons/Orders.svg rename to src/client/spark/Images/Icons/Orders.svg diff --git a/src/client/spark/uicore/Images/Icons/Quotation-Marks.png b/src/client/spark/Images/Icons/Quotation-Marks.png similarity index 100% rename from src/client/spark/uicore/Images/Icons/Quotation-Marks.png rename to src/client/spark/Images/Icons/Quotation-Marks.png diff --git a/src/client/spark/uicore/Images/Icons/RFQArrows.png b/src/client/spark/Images/Icons/RFQArrows.png similarity index 100% rename from src/client/spark/uicore/Images/Icons/RFQArrows.png rename to src/client/spark/Images/Icons/RFQArrows.png diff --git a/src/client/spark/uicore/Images/Icons/Refresh.ico b/src/client/spark/Images/Icons/Refresh.ico similarity index 100% rename from src/client/spark/uicore/Images/Icons/Refresh.ico rename to src/client/spark/Images/Icons/Refresh.ico diff --git a/src/client/spark/uicore/Images/Icons/Refresh.svg b/src/client/spark/Images/Icons/Refresh.svg similarity index 100% rename from src/client/spark/uicore/Images/Icons/Refresh.svg rename to src/client/spark/Images/Icons/Refresh.svg diff --git a/src/client/spark/uicore/Images/Icons/RubberStamp.png b/src/client/spark/Images/Icons/RubberStamp.png similarity index 100% rename from src/client/spark/uicore/Images/Icons/RubberStamp.png rename to src/client/spark/Images/Icons/RubberStamp.png diff --git a/src/client/spark/uicore/Images/Icons/Sheets.ico b/src/client/spark/Images/Icons/Sheets.ico similarity index 100% rename from src/client/spark/uicore/Images/Icons/Sheets.ico rename to src/client/spark/Images/Icons/Sheets.ico diff --git a/src/client/spark/uicore/Images/Icons/Sheets.png b/src/client/spark/Images/Icons/Sheets.png similarity index 100% rename from src/client/spark/uicore/Images/Icons/Sheets.png rename to src/client/spark/Images/Icons/Sheets.png diff --git a/src/client/spark/uicore/Images/Icons/Sheets.svg b/src/client/spark/Images/Icons/Sheets.svg similarity index 100% rename from src/client/spark/uicore/Images/Icons/Sheets.svg rename to src/client/spark/Images/Icons/Sheets.svg diff --git a/src/client/spark/uicore/Images/Icons/SheetsGreen.png b/src/client/spark/Images/Icons/SheetsGreen.png similarity index 100% rename from src/client/spark/uicore/Images/Icons/SheetsGreen.png rename to src/client/spark/Images/Icons/SheetsGreen.png diff --git a/src/client/spark/uicore/Images/Icons/SheetsRed.png b/src/client/spark/Images/Icons/SheetsRed.png similarity index 100% rename from src/client/spark/uicore/Images/Icons/SheetsRed.png rename to src/client/spark/Images/Icons/SheetsRed.png diff --git a/src/client/spark/uicore/Images/Icons/Spread.ico b/src/client/spark/Images/Icons/Spread.ico similarity index 100% rename from src/client/spark/uicore/Images/Icons/Spread.ico rename to src/client/spark/Images/Icons/Spread.ico diff --git a/src/client/spark/uicore/Images/Icons/Ticket.png b/src/client/spark/Images/Icons/Ticket.png similarity index 100% rename from src/client/spark/uicore/Images/Icons/Ticket.png rename to src/client/spark/Images/Icons/Ticket.png diff --git a/src/client/spark/uicore/Images/Icons/Trades.ico b/src/client/spark/Images/Icons/Trades.ico similarity index 100% rename from src/client/spark/uicore/Images/Icons/Trades.ico rename to src/client/spark/Images/Icons/Trades.ico diff --git a/src/client/spark/uicore/Images/Icons/Trades.png b/src/client/spark/Images/Icons/Trades.png similarity index 100% rename from src/client/spark/uicore/Images/Icons/Trades.png rename to src/client/spark/Images/Icons/Trades.png diff --git a/src/client/spark/uicore/Images/Icons/Trades.svg b/src/client/spark/Images/Icons/Trades.svg similarity index 100% rename from src/client/spark/uicore/Images/Icons/Trades.svg rename to src/client/spark/Images/Icons/Trades.svg diff --git a/src/client/spark/uicore/Images/Icons/Window.png b/src/client/spark/Images/Icons/Window.png similarity index 100% rename from src/client/spark/uicore/Images/Icons/Window.png rename to src/client/spark/Images/Icons/Window.png diff --git a/src/client/spark/uicore/Images/Icons/Zoom-In.png b/src/client/spark/Images/Icons/Zoom-In.png similarity index 100% rename from src/client/spark/uicore/Images/Icons/Zoom-In.png rename to src/client/spark/Images/Icons/Zoom-In.png diff --git a/src/client/spark/uicore/Images/Icons/Zoom-Out.png b/src/client/spark/Images/Icons/Zoom-Out.png similarity index 100% rename from src/client/spark/uicore/Images/Icons/Zoom-Out.png rename to src/client/spark/Images/Icons/Zoom-Out.png diff --git a/src/client/spark/uicore/Images/Icons/eye.ico b/src/client/spark/Images/Icons/eye.ico similarity index 100% rename from src/client/spark/uicore/Images/Icons/eye.ico rename to src/client/spark/Images/Icons/eye.ico diff --git a/src/client/spark/uicore/Images/Icons/eye.png b/src/client/spark/Images/Icons/eye.png similarity index 100% rename from src/client/spark/uicore/Images/Icons/eye.png rename to src/client/spark/Images/Icons/eye.png diff --git a/src/client/spark/uicore/Images/Icons/eye.svg b/src/client/spark/Images/Icons/eye.svg similarity index 100% rename from src/client/spark/uicore/Images/Icons/eye.svg rename to src/client/spark/Images/Icons/eye.svg diff --git a/src/client/spark/uicore/Images/Icons/logo.ico b/src/client/spark/Images/Icons/logo.ico similarity index 100% rename from src/client/spark/uicore/Images/Icons/logo.ico rename to src/client/spark/Images/Icons/logo.ico diff --git a/src/client/spark/uicore/Images/Icons/mmtn.ico b/src/client/spark/Images/Icons/mmtn.ico similarity index 100% rename from src/client/spark/uicore/Images/Icons/mmtn.ico rename to src/client/spark/Images/Icons/mmtn.ico diff --git a/src/client/spark/uicore/Images/Icons/refresh.png b/src/client/spark/Images/Icons/refresh.png similarity index 100% rename from src/client/spark/uicore/Images/Icons/refresh.png rename to src/client/spark/Images/Icons/refresh.png diff --git a/src/client/spark/uicore/Images/Icons/reports.ico b/src/client/spark/Images/Icons/reports.ico similarity index 100% rename from src/client/spark/uicore/Images/Icons/reports.ico rename to src/client/spark/Images/Icons/reports.ico diff --git a/src/client/spark/uicore/Images/Icons/reports.png b/src/client/spark/Images/Icons/reports.png similarity index 100% rename from src/client/spark/uicore/Images/Icons/reports.png rename to src/client/spark/Images/Icons/reports.png diff --git a/src/client/spark/uicore/Images/Icons/reports.svg b/src/client/spark/Images/Icons/reports.svg similarity index 100% rename from src/client/spark/uicore/Images/Icons/reports.svg rename to src/client/spark/Images/Icons/reports.svg diff --git a/src/client/spark/uicore/Images/Icons/risk.ico b/src/client/spark/Images/Icons/risk.ico similarity index 100% rename from src/client/spark/uicore/Images/Icons/risk.ico rename to src/client/spark/Images/Icons/risk.ico diff --git a/src/client/spark/uicore/Images/Icons/risk.png b/src/client/spark/Images/Icons/risk.png similarity index 100% rename from src/client/spark/uicore/Images/Icons/risk.png rename to src/client/spark/Images/Icons/risk.png diff --git a/src/client/spark/uicore/Images/Icons/risk.svg b/src/client/spark/Images/Icons/risk.svg similarity index 100% rename from src/client/spark/uicore/Images/Icons/risk.svg rename to src/client/spark/Images/Icons/risk.svg diff --git a/src/client/spark/uicore/Images/Icons/spread.png b/src/client/spark/Images/Icons/spread.png similarity index 100% rename from src/client/spark/uicore/Images/Icons/spread.png rename to src/client/spark/Images/Icons/spread.png diff --git a/src/client/spark/uicore/Images/Vector/Icons.xaml b/src/client/spark/Images/Vector/Icons.xaml similarity index 100% rename from src/client/spark/uicore/Images/Vector/Icons.xaml rename to src/client/spark/Images/Vector/Icons.xaml diff --git a/src/client/spark/Spark.csproj b/src/client/spark/Spark.csproj index 9c5c0190f..6f37af1a2 100644 --- a/src/client/spark/Spark.csproj +++ b/src/client/spark/Spark.csproj @@ -44,7 +44,7 @@ - + @@ -57,7 +57,6 @@ - diff --git a/src/client/spark/uitests/MakePublic.cs b/src/client/spark/Tests/MakePublic.cs similarity index 100% rename from src/client/spark/uitests/MakePublic.cs rename to src/client/spark/Tests/MakePublic.cs diff --git a/src/client/spark/uitests/TestExtensions.cs b/src/client/spark/Tests/TestExtensions.cs similarity index 100% rename from src/client/spark/uitests/TestExtensions.cs rename to src/client/spark/Tests/TestExtensions.cs diff --git a/src/client/spark/sys/api/Test/ApiTests.cs b/src/client/spark/Tests/api/Test/ApiTests.cs similarity index 100% rename from src/client/spark/sys/api/Test/ApiTests.cs rename to src/client/spark/Tests/api/Test/ApiTests.cs diff --git a/src/client/spark/sys/api/Test/HelloServiceServer.cs b/src/client/spark/Tests/api/Test/HelloServiceServer.cs similarity index 100% rename from src/client/spark/sys/api/Test/HelloServiceServer.cs rename to src/client/spark/Tests/api/Test/HelloServiceServer.cs diff --git a/src/client/spark/sys/api/Test/ServiceContextEx.cs b/src/client/spark/Tests/api/Test/ServiceContextEx.cs similarity index 100% rename from src/client/spark/sys/api/Test/ServiceContextEx.cs rename to src/client/spark/Tests/api/Test/ServiceContextEx.cs diff --git a/src/client/spark/uitests/mcore/Expression/ExpressionTest.cs b/src/client/spark/Tests/mcore/Expression/ExpressionTest.cs similarity index 100% rename from src/client/spark/uitests/mcore/Expression/ExpressionTest.cs rename to src/client/spark/Tests/mcore/Expression/ExpressionTest.cs diff --git a/src/client/spark/uitests/mcore/SecurityTests.cs b/src/client/spark/Tests/mcore/SecurityTests.cs similarity index 100% rename from src/client/spark/uitests/mcore/SecurityTests.cs rename to src/client/spark/Tests/mcore/SecurityTests.cs diff --git a/src/client/spark/uitests/mcore/SyncronizeCollectionTests.cs b/src/client/spark/Tests/mcore/SyncronizeCollectionTests.cs similarity index 100% rename from src/client/spark/uitests/mcore/SyncronizeCollectionTests.cs rename to src/client/spark/Tests/mcore/SyncronizeCollectionTests.cs diff --git a/src/client/spark/Themes/generic.xaml b/src/client/spark/Themes/generic.xaml index ae31a535a..217972247 100644 --- a/src/client/spark/Themes/generic.xaml +++ b/src/client/spark/Themes/generic.xaml @@ -3,7 +3,7 @@ xmlns:mbts="clr-namespace:mbts.ui" xmlns:control="clr-namespace:mbts.ui.controls"> - + diff --git a/src/client/spark/Bus/IBus.cs b/src/client/spark/core/Bus/IBus.cs similarity index 100% rename from src/client/spark/Bus/IBus.cs rename to src/client/spark/core/Bus/IBus.cs diff --git a/src/client/spark/Bus/SingletonBus.cs b/src/client/spark/core/Bus/SingletonBus.cs similarity index 100% rename from src/client/spark/Bus/SingletonBus.cs rename to src/client/spark/core/Bus/SingletonBus.cs diff --git a/src/client/spark/Bus/SparkCommand.cs b/src/client/spark/core/Bus/SparkCommand.cs similarity index 94% rename from src/client/spark/Bus/SparkCommand.cs rename to src/client/spark/core/Bus/SparkCommand.cs index 70e0cdc6f..f2c9e13f4 100644 --- a/src/client/spark/Bus/SparkCommand.cs +++ b/src/client/spark/core/Bus/SparkCommand.cs @@ -94,7 +94,8 @@ namespace bts.spark { event EventHandler ICommand.CanExecuteChanged { add {} remove {} } bool ICommand.CanExecute(object parameter) => _cmd.canExecute(); - void ICommand.Execute(object parameter) { + async void ICommand.Execute(object parameter) { + await Task.Yield(); _cmd.execute(_bus); } } diff --git a/src/client/spark/Bus/SparkCommands.cs b/src/client/spark/core/Bus/SparkCommands.cs similarity index 100% rename from src/client/spark/Bus/SparkCommands.cs rename to src/client/spark/core/Bus/SparkCommands.cs diff --git a/src/client/spark/Bus/SparkTags.cs b/src/client/spark/core/Bus/SparkTags.cs similarity index 100% rename from src/client/spark/Bus/SparkTags.cs rename to src/client/spark/core/Bus/SparkTags.cs diff --git a/src/client/spark/uicore/Exceptions/ColorNotFoundException.cs b/src/client/spark/core/Exceptions/ColorNotFoundException.cs similarity index 100% rename from src/client/spark/uicore/Exceptions/ColorNotFoundException.cs rename to src/client/spark/core/Exceptions/ColorNotFoundException.cs diff --git a/src/client/spark/uicore/Exceptions/DebugException.cs b/src/client/spark/core/Exceptions/DebugException.cs similarity index 100% rename from src/client/spark/uicore/Exceptions/DebugException.cs rename to src/client/spark/core/Exceptions/DebugException.cs diff --git a/src/client/spark/uicore/BTSColor.cs b/src/client/spark/core/FontsAndColors/BTSColor.cs similarity index 100% rename from src/client/spark/uicore/BTSColor.cs rename to src/client/spark/core/FontsAndColors/BTSColor.cs diff --git a/src/client/spark/uicore/BTSColorExtension.cs b/src/client/spark/core/FontsAndColors/BTSColorExtension.cs similarity index 100% rename from src/client/spark/uicore/BTSColorExtension.cs rename to src/client/spark/core/FontsAndColors/BTSColorExtension.cs diff --git a/src/client/spark/uicore/BTSColors.cs b/src/client/spark/core/FontsAndColors/BTSColors.cs similarity index 100% rename from src/client/spark/uicore/BTSColors.cs rename to src/client/spark/core/FontsAndColors/BTSColors.cs diff --git a/src/client/spark/uicore/BTSCoreColors.cs b/src/client/spark/core/FontsAndColors/BTSCoreColors.cs similarity index 100% rename from src/client/spark/uicore/BTSCoreColors.cs rename to src/client/spark/core/FontsAndColors/BTSCoreColors.cs diff --git a/src/client/spark/uicore/BTSFont.cs b/src/client/spark/core/FontsAndColors/BTSFont.cs similarity index 100% rename from src/client/spark/uicore/BTSFont.cs rename to src/client/spark/core/FontsAndColors/BTSFont.cs diff --git a/src/client/spark/uicore/BTSFontFamily.cs b/src/client/spark/core/FontsAndColors/BTSFontFamily.cs similarity index 100% rename from src/client/spark/uicore/BTSFontFamily.cs rename to src/client/spark/core/FontsAndColors/BTSFontFamily.cs diff --git a/src/client/spark/uicore/BTSFontStyle.cs b/src/client/spark/core/FontsAndColors/BTSFontStyle.cs similarity index 100% rename from src/client/spark/uicore/BTSFontStyle.cs rename to src/client/spark/core/FontsAndColors/BTSFontStyle.cs diff --git a/src/client/spark/uicore/BTSFontWeight.cs b/src/client/spark/core/FontsAndColors/BTSFontWeight.cs similarity index 100% rename from src/client/spark/uicore/BTSFontWeight.cs rename to src/client/spark/core/FontsAndColors/BTSFontWeight.cs diff --git a/src/client/spark/uicore/NativeMethods/BTSNativeMethods.cs b/src/client/spark/core/NativeMethods/BTSNativeMethods.cs similarity index 100% rename from src/client/spark/uicore/NativeMethods/BTSNativeMethods.cs rename to src/client/spark/core/NativeMethods/BTSNativeMethods.cs diff --git a/src/client/spark/uicore/NativeMethods/HT.cs b/src/client/spark/core/NativeMethods/HT.cs similarity index 100% rename from src/client/spark/uicore/NativeMethods/HT.cs rename to src/client/spark/core/NativeMethods/HT.cs diff --git a/src/client/spark/uicore/NativeMethods/NativeMethods.cs b/src/client/spark/core/NativeMethods/NativeMethods.cs similarity index 100% rename from src/client/spark/uicore/NativeMethods/NativeMethods.cs rename to src/client/spark/core/NativeMethods/NativeMethods.cs diff --git a/src/client/spark/uicore/NativeMethods/WM.cs b/src/client/spark/core/NativeMethods/WM.cs similarity index 100% rename from src/client/spark/uicore/NativeMethods/WM.cs rename to src/client/spark/core/NativeMethods/WM.cs diff --git a/src/client/spark/uicore/Settings/ISavedWindowFactory.cs b/src/client/spark/core/Settings/ISavedWindowFactory.cs similarity index 100% rename from src/client/spark/uicore/Settings/ISavedWindowFactory.cs rename to src/client/spark/core/Settings/ISavedWindowFactory.cs diff --git a/src/client/spark/uicore/Settings/ISettingsCollector.cs b/src/client/spark/core/Settings/ISettingsCollector.cs similarity index 100% rename from src/client/spark/uicore/Settings/ISettingsCollector.cs rename to src/client/spark/core/Settings/ISettingsCollector.cs diff --git a/src/client/spark/uicore/Settings/Tests/TestPersist.cs b/src/client/spark/core/Settings/Tests/TestPersist.cs similarity index 100% rename from src/client/spark/uicore/Settings/Tests/TestPersist.cs rename to src/client/spark/core/Settings/Tests/TestPersist.cs diff --git a/src/client/spark/uicore/Settings/UISettings.proto b/src/client/spark/core/Settings/UISettings.proto similarity index 100% rename from src/client/spark/uicore/Settings/UISettings.proto rename to src/client/spark/core/Settings/UISettings.proto diff --git a/src/client/spark/uicore/Settings/UISettingsDefaults.cs b/src/client/spark/core/Settings/UISettingsDefaults.cs similarity index 100% rename from src/client/spark/uicore/Settings/UISettingsDefaults.cs rename to src/client/spark/core/Settings/UISettingsDefaults.cs diff --git a/src/client/spark/uicore/Settings/UserPersistFactory.cs b/src/client/spark/core/Settings/UserPersistFactory.cs similarity index 100% rename from src/client/spark/uicore/Settings/UserPersistFactory.cs rename to src/client/spark/core/Settings/UserPersistFactory.cs diff --git a/src/client/spark/uicore/Settings/Workspaces/WorkspaceProtos.cs b/src/client/spark/core/Settings/Workspaces/WorkspaceProtos.cs similarity index 100% rename from src/client/spark/uicore/Settings/Workspaces/WorkspaceProtos.cs rename to src/client/spark/core/Settings/Workspaces/WorkspaceProtos.cs diff --git a/src/client/spark/uicore/ShellInterface/ICloseable.cs b/src/client/spark/core/ShellInterface/ICloseable.cs similarity index 100% rename from src/client/spark/uicore/ShellInterface/ICloseable.cs rename to src/client/spark/core/ShellInterface/ICloseable.cs diff --git a/src/client/spark/uicore/ShellInterface/ILauncher.cs b/src/client/spark/core/ShellInterface/ILauncher.cs similarity index 100% rename from src/client/spark/uicore/ShellInterface/ILauncher.cs rename to src/client/spark/core/ShellInterface/ILauncher.cs diff --git a/src/client/spark/uicore/ShellInterface/IShellDaemon.cs b/src/client/spark/core/ShellInterface/IShellDaemon.cs similarity index 100% rename from src/client/spark/uicore/ShellInterface/IShellDaemon.cs rename to src/client/spark/core/ShellInterface/IShellDaemon.cs diff --git a/src/client/spark/uicore/ShellInterface/IShellModule.cs b/src/client/spark/core/ShellInterface/IShellModule.cs similarity index 100% rename from src/client/spark/uicore/ShellInterface/IShellModule.cs rename to src/client/spark/core/ShellInterface/IShellModule.cs diff --git a/src/client/spark/uicore/ShellInterface/IShellWindow.cs b/src/client/spark/core/ShellInterface/IShellWindow.cs similarity index 100% rename from src/client/spark/uicore/ShellInterface/IShellWindow.cs rename to src/client/spark/core/ShellInterface/IShellWindow.cs diff --git a/src/client/spark/uicore/ShellInterface/IShellWindowFactory.cs b/src/client/spark/core/ShellInterface/IShellWindowFactory.cs similarity index 100% rename from src/client/spark/uicore/ShellInterface/IShellWindowFactory.cs rename to src/client/spark/core/ShellInterface/IShellWindowFactory.cs diff --git a/src/client/spark/uicore/ShellInterface/IShellWindowMigrationRule.cs b/src/client/spark/core/ShellInterface/IShellWindowMigrationRule.cs similarity index 100% rename from src/client/spark/uicore/ShellInterface/IShellWindowMigrationRule.cs rename to src/client/spark/core/ShellInterface/IShellWindowMigrationRule.cs diff --git a/src/client/spark/uicore/ShellInterface/IUndoActions.cs b/src/client/spark/core/ShellInterface/IUndoActions.cs similarity index 100% rename from src/client/spark/uicore/ShellInterface/IUndoActions.cs rename to src/client/spark/core/ShellInterface/IUndoActions.cs diff --git a/src/client/spark/uicore/ShellInterface/IViewLocator.cs b/src/client/spark/core/ShellInterface/IViewLocator.cs similarity index 100% rename from src/client/spark/uicore/ShellInterface/IViewLocator.cs rename to src/client/spark/core/ShellInterface/IViewLocator.cs diff --git a/src/client/spark/uicore/ShellInterface/IWindowManager.cs b/src/client/spark/core/ShellInterface/IWindowManager.cs similarity index 100% rename from src/client/spark/uicore/ShellInterface/IWindowManager.cs rename to src/client/spark/core/ShellInterface/IWindowManager.cs diff --git a/src/client/spark/uicore/ShellInterface/IWindowsInterop.cs b/src/client/spark/core/ShellInterface/IWindowsInterop.cs similarity index 100% rename from src/client/spark/uicore/ShellInterface/IWindowsInterop.cs rename to src/client/spark/core/ShellInterface/IWindowsInterop.cs diff --git a/src/client/spark/uicore/ShellInterface/ShellModelExtensions.cs b/src/client/spark/core/ShellInterface/ShellModelExtensions.cs similarity index 100% rename from src/client/spark/uicore/ShellInterface/ShellModelExtensions.cs rename to src/client/spark/core/ShellInterface/ShellModelExtensions.cs diff --git a/src/client/spark/uicore/ShellInterface/ShellSerializationHeader.cs b/src/client/spark/core/ShellInterface/ShellSerializationHeader.cs similarity index 100% rename from src/client/spark/uicore/ShellInterface/ShellSerializationHeader.cs rename to src/client/spark/core/ShellInterface/ShellSerializationHeader.cs diff --git a/src/client/spark/sys/persist/UISettings.cs b/src/client/spark/core/ShellInterface/UISettings.cs similarity index 100% rename from src/client/spark/sys/persist/UISettings.cs rename to src/client/spark/core/ShellInterface/UISettings.cs diff --git a/src/client/spark/uicore/BTSApplicationBootstrapper.cs b/src/client/spark/core/Utility/BTSApplicationBootstrapper.cs similarity index 100% rename from src/client/spark/uicore/BTSApplicationBootstrapper.cs rename to src/client/spark/core/Utility/BTSApplicationBootstrapper.cs diff --git a/src/client/spark/uicore/Utility/BeholderCollection.cs b/src/client/spark/core/Utility/BeholderCollection.cs similarity index 100% rename from src/client/spark/uicore/Utility/BeholderCollection.cs rename to src/client/spark/core/Utility/BeholderCollection.cs diff --git a/src/client/spark/uicore/Utility/DelegateCommand.cs b/src/client/spark/core/Utility/DelegateCommand.cs similarity index 100% rename from src/client/spark/uicore/Utility/DelegateCommand.cs rename to src/client/spark/core/Utility/DelegateCommand.cs diff --git a/src/client/spark/uicore/Utility/DispatcherHelper.cs b/src/client/spark/core/Utility/DispatcherHelper.cs similarity index 100% rename from src/client/spark/uicore/Utility/DispatcherHelper.cs rename to src/client/spark/core/Utility/DispatcherHelper.cs diff --git a/src/client/spark/uicore/Utility/ExpirationFormatter.cs b/src/client/spark/core/Utility/ExpirationFormatter.cs similarity index 100% rename from src/client/spark/uicore/Utility/ExpirationFormatter.cs rename to src/client/spark/core/Utility/ExpirationFormatter.cs diff --git a/src/client/spark/uicore/Utility/IRequestViewClose.cs b/src/client/spark/core/Utility/IRequestViewClose.cs similarity index 100% rename from src/client/spark/uicore/Utility/IRequestViewClose.cs rename to src/client/spark/core/Utility/IRequestViewClose.cs diff --git a/src/client/spark/uicore/Utility/ObservableAppendCollection.cs b/src/client/spark/core/Utility/ObservableAppendCollection.cs similarity index 100% rename from src/client/spark/uicore/Utility/ObservableAppendCollection.cs rename to src/client/spark/core/Utility/ObservableAppendCollection.cs diff --git a/src/client/spark/uicore/Utility/ObservableAutoWrapper.cs b/src/client/spark/core/Utility/ObservableAutoWrapper.cs similarity index 100% rename from src/client/spark/uicore/Utility/ObservableAutoWrapper.cs rename to src/client/spark/core/Utility/ObservableAutoWrapper.cs diff --git a/src/client/spark/uicore/Utility/ObservableCollectionEx.cs b/src/client/spark/core/Utility/ObservableCollectionEx.cs similarity index 100% rename from src/client/spark/uicore/Utility/ObservableCollectionEx.cs rename to src/client/spark/core/Utility/ObservableCollectionEx.cs diff --git a/src/client/spark/uicore/Utility/ObservableEditableCollection.cs b/src/client/spark/core/Utility/ObservableEditableCollection.cs similarity index 100% rename from src/client/spark/uicore/Utility/ObservableEditableCollection.cs rename to src/client/spark/core/Utility/ObservableEditableCollection.cs diff --git a/src/client/spark/uicore/Utility/ObservableFilter.cs b/src/client/spark/core/Utility/ObservableFilter.cs similarity index 100% rename from src/client/spark/uicore/Utility/ObservableFilter.cs rename to src/client/spark/core/Utility/ObservableFilter.cs diff --git a/src/client/spark/uicore/Utility/ObservableSortedCollection.cs b/src/client/spark/core/Utility/ObservableSortedCollection.cs similarity index 100% rename from src/client/spark/uicore/Utility/ObservableSortedCollection.cs rename to src/client/spark/core/Utility/ObservableSortedCollection.cs diff --git a/src/client/spark/uicore/Utility/OneOf.cs b/src/client/spark/core/Utility/OneOf.cs similarity index 100% rename from src/client/spark/uicore/Utility/OneOf.cs rename to src/client/spark/core/Utility/OneOf.cs diff --git a/src/client/spark/uicore/Utility/TupleCommand.cs b/src/client/spark/core/Utility/TupleCommand.cs similarity index 100% rename from src/client/spark/uicore/Utility/TupleCommand.cs rename to src/client/spark/core/Utility/TupleCommand.cs diff --git a/src/client/spark/uicore/Utility/ViewModelBase.cs b/src/client/spark/core/Utility/ViewModelBase.cs similarity index 100% rename from src/client/spark/uicore/Utility/ViewModelBase.cs rename to src/client/spark/core/Utility/ViewModelBase.cs diff --git a/src/client/spark/uicore/Utility/Wait.cs b/src/client/spark/core/Utility/Wait.cs similarity index 100% rename from src/client/spark/uicore/Utility/Wait.cs rename to src/client/spark/core/Utility/Wait.cs diff --git a/src/client/spark/mspark/Core/ClockSource.cs b/src/client/spark/mspark/Core/ClockSource.cs deleted file mode 100644 index fbeeeee40..000000000 --- a/src/client/spark/mspark/Core/ClockSource.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.ComponentModel.Composition; -using System.Threading; -using mbts.ui; - -namespace mbts.spark -{ - [Export(typeof(IInitializable))] - public class ClockSource : IInitializable - { - private readonly bts.api.IBus _bus; - private readonly TimeSpan _period = TimeSpan.FromMilliseconds(50.0); - - [ImportingConstructor] - public ClockSource(bts.api.IBus bus) - { - _bus = bus; - } - - private void _clock_thread() - { - while (true) - { - _bus.post(SparkTags.ClockTag, DateTime.Now); - System.Threading.Thread.Sleep(_period); - } - } - - public int priority { get { return 1; } } - - public void initialize() - { - new System.Threading.Thread(_clock_thread) { IsBackground = true }.Start(); - } - } -} diff --git a/src/client/spark/uicore/Shell/ShellMetaModule/ISettingsLauncher.cs b/src/client/spark/uicore/Shell/ShellMetaModule/ISettingsLauncher.cs deleted file mode 100644 index e3317957d..000000000 --- a/src/client/spark/uicore/Shell/ShellMetaModule/ISettingsLauncher.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace mbts.ui.shell -{ - public interface ISettingsLauncher - { - void launch_settings_editor(); - void launch_tick_settings_editor(); - } -} diff --git a/src/client/spark/uicore/Shell/ShellMetaModule/MetaShellMenuModule.cs b/src/client/spark/uicore/Shell/ShellMetaModule/MetaShellMenuModule.cs deleted file mode 100644 index 7a8d6279b..000000000 --- a/src/client/spark/uicore/Shell/ShellMetaModule/MetaShellMenuModule.cs +++ /dev/null @@ -1,66 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.Composition; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using mbts.ui.settings; -using System.Reflection; -using ProtoBuf; -using bts.spark; - -namespace mbts.ui.shell -{ - // - // This shell module is responsible for helping the user manage other aspects of the shell - // - // 1. Keeps a list of saved workspaces - // 2. Keeps a list of saved windows - // 3. Keeps a list of recently closed windows - // 4. Owns web browser IShellWindows - // - //[Export(typeof(IShellModule))] - public class MetaShellMenuModule : IShellModule - { - MetaShellMenuViewModel _viewmodel; - IViewLocator _viewfinder; - IBrowserWindowManager _bwm; - - [ImportingConstructor] - public MetaShellMenuModule(IViewLocator view, WorkspacesModel model, [Import("workspace")]string initial_workspace, IUndoActions undo, IBrowserWindowManager ibwm) - { - _viewfinder = view; - _viewmodel = new MetaShellMenuViewModel(model, undo as UndoModel, ibwm); - model.init(initial_workspace).ignore(); - _bwm = ibwm; - } - - #region IShellModule members - public System.Windows.Media.ImageSource icon { get { return Icons.FavoriteWindow; } } - public string name {get { return "Windows"; } } - public int priority { get { return -1024; } } - public Task create(System.IO.Stream load_stream) { - var header = ProtoBuf.Serializer.DeserializeWithLengthPrefix(load_stream, PrefixStyle.Fixed32); - if (header != null && header.name == "Browser") { - var state = ProtoBuf.Serializer.DeserializeWithLengthPrefix(load_stream, PrefixStyle.Fixed32); - var window = _bwm.create_hidden(new Uri(state.uri, UriKind.RelativeOrAbsolute)); - return Task.FromResult(window); - } - throw new ArgumentException("load_stream"); - } - - public IEnumerable actions => throw new NotImplementedException(); - #endregion - - public void Dispose() { } - } - - #region Browser window SaveState - [ProtoContract] - public class BrowserWindowState - { - [ProtoMember(10)] - public string uri; - } - #endregion -} diff --git a/src/client/spark/uicore/Shell/ShellMetaModule/MetaShellMenuViewModel.cs b/src/client/spark/uicore/Shell/ShellMetaModule/MetaShellMenuViewModel.cs deleted file mode 100644 index 23980b25f..000000000 --- a/src/client/spark/uicore/Shell/ShellMetaModule/MetaShellMenuViewModel.cs +++ /dev/null @@ -1,64 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.ComponentModel.Composition; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Input; -using System.Windows.Media; - -namespace mbts.ui.shell -{ - public class MetaShellMenuViewModel : ViewModelBaseWithValidation - { - private WorkspacesModel _work_model; - private UndoModel _undo_model; - - public MetaShellMenuViewModel(WorkspacesModel wmodel, UndoModel umodel, IBrowserWindowManager browser) { - _work_model = wmodel; - _undo_model = umodel; - ShowWorkspaces = true; - ShowUndo = true; - manual_command = new DelegateCommand(_ => browser.Pages.Add(new Uri("bts://m/"))); - } - - #region Workspaces - public ObservableCollection Workspaces { get { return _work_model.Workspaces; } } - public string SaveName { get; set; } - public bool IsPublicWorkspace { get; set; } - public bool ShowWorkspaces { get; set; } - - public ICommand SaveWorkspace { - get { - return new DelegateCommand(arg => { - // Check for errors in the input - if (string.IsNullOrEmpty(SaveName)) { - set_error("SaveName", "Workspace must be named"); - return; - } - if (SaveName.Contains(WorkspacesModel.ACTIVE_WORKSPACE_PREFIX)) { - set_error("SaveName", "Workspace name cannot contains '{0}'".fmt(WorkspacesModel.ACTIVE_WORKSPACE_PREFIX)); - return; - } - else { - clear_error("SaveName"); - } - // Save - _work_model.save_workspace(SaveName, ispublic: IsPublicWorkspace); - }); - } - } - - - #endregion - public ICommand launch_settings_editor { get; private set; } - - public ICommand launch_tick_settings_editor { get; private set; } - - public ICommand manual_command { get; private set; } - - public ObservableCollection UndoItems { get { return _undo_model == null ? null : _undo_model.Items; } } - public bool ShowUndo { get; set; } - } -} diff --git a/src/client/spark/view/Controls/Browser/BrowserWindow.cs b/src/client/spark/view/Controls/Browser/BrowserWindow.cs index a158a52c5..6e559f1c0 100644 --- a/src/client/spark/view/Controls/Browser/BrowserWindow.cs +++ b/src/client/spark/view/Controls/Browser/BrowserWindow.cs @@ -76,7 +76,7 @@ namespace mbts.ui.controls public void GetState(System.IO.Stream save_here) { ProtoBuf.Serializer.SerializeWithLengthPrefix(save_here, new ShellSerializationHeader() { version = 1, name = "Browser" }, PrefixStyle.Fixed32); - ProtoBuf.Serializer.SerializeWithLengthPrefix(save_here, new mbts.ui.shell.BrowserWindowState() { uri = uri.ToString() }, PrefixStyle.Fixed32); + //ProtoBuf.Serializer.SerializeWithLengthPrefix(save_here, new mbts.ui.shell.BrowserWindowState() { uri = uri.ToString() }, PrefixStyle.Fixed32); } public void Dispose() { diff --git a/src/client/spark/Controls/SparkMenu.cs b/src/client/spark/view/Controls/SparkMenu.cs similarity index 100% rename from src/client/spark/Controls/SparkMenu.cs rename to src/client/spark/view/Controls/SparkMenu.cs diff --git a/src/client/spark/view/DragDrop/DragDropDocumentPreview.xaml b/src/client/spark/view/DragDrop/DragDropDocumentPreview.xaml index c7cbddbc0..399f0c8c3 100644 --- a/src/client/spark/view/DragDrop/DragDropDocumentPreview.xaml +++ b/src/client/spark/view/DragDrop/DragDropDocumentPreview.xaml @@ -14,6 +14,6 @@ --> - + diff --git a/src/client/spark/view/Resources/Buttons.xaml b/src/client/spark/view/Resources/Buttons.xaml index cf39c0f74..429c5fcf1 100644 --- a/src/client/spark/view/Resources/Buttons.xaml +++ b/src/client/spark/view/Resources/Buttons.xaml @@ -205,7 +205,7 @@ - + @@ -266,7 +266,7 @@ - + @@ -392,7 +392,7 @@ MinHeight="20" SnapsToDevicePixels="True"> - + diff --git a/src/client/spark/view/Resources/Cursors.xaml b/src/client/spark/view/Resources/Cursors.xaml index efc21b6e1..42cca5868 100644 --- a/src/client/spark/view/Resources/Cursors.xaml +++ b/src/client/spark/view/Resources/Cursors.xaml @@ -3,6 +3,6 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mbts="clr-namespace:mbts.ui"> - /uicore/Images/Cursors/Grab.cur - /uicore/Images/Cursors/Grabbing.cur + /Images/Cursors/Grab.cur + /Images/Cursors/Grabbing.cur \ No newline at end of file diff --git a/src/client/spark/view/Shell/About.xaml b/src/client/spark/view/Shell/About.xaml index 993f57395..4319a8092 100644 --- a/src/client/spark/view/Shell/About.xaml +++ b/src/client/spark/view/Shell/About.xaml @@ -13,7 +13,7 @@ - + BTS EDGE diff --git a/src/client/spark/uicore/Shell/Error/ErrorShellWindow.cs b/src/client/spark/view/Shell/Error/ErrorShellWindow.cs similarity index 100% rename from src/client/spark/uicore/Shell/Error/ErrorShellWindow.cs rename to src/client/spark/view/Shell/Error/ErrorShellWindow.cs diff --git a/src/client/spark/view/Shell/Launcher.xaml b/src/client/spark/view/Shell/Launcher.xaml index 910d53f18..2d7627ecb 100644 --- a/src/client/spark/view/Shell/Launcher.xaml +++ b/src/client/spark/view/Shell/Launcher.xaml @@ -10,7 +10,7 @@ mc:Ignorable="d" WindowStyle="None" ResizeMode="NoResize" - Icon="/uicore/Images/Icons/logo.ico" + Icon="/Images/Icons/logo.ico" ShowInTaskbar="True" SizeToContent="WidthAndHeight" Topmost="{Binding Topmost}" diff --git a/src/client/spark/view/Shell/Launcher/AnimatedNavWindow.cs b/src/client/spark/view/Shell/Launcher/AnimatedNavWindow.cs deleted file mode 100644 index c80eb6c2f..000000000 --- a/src/client/spark/view/Shell/Launcher/AnimatedNavWindow.cs +++ /dev/null @@ -1,145 +0,0 @@ -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.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Imaging; - -namespace mbts.ui.shell -{ - // TODO: replace this with a simple form with a VSM - could even move things to different files and flip the content around. - public class AnimatedNavMenu : IShellWindow, IShellMenu - { - Frame _frame = new Frame() { - Focusable = false, - MinWidth = 300, - Height = 300, - MaxHeight = (double)Application.Current.Resources["MaxMenuHeight"] /*700*/ }; - FrameworkElement _content; - Image _cover = new Image(); - FrameworkElement _initial_view; - bool _suspend_animation = false; - - public TimeSpan AnimationDuration { get; set; } - - public AnimatedNavMenu(FrameworkElement view) { - _initial_view = view; - _frame.Content = view; - _frame.DataContext = view.DataContext; - _frame.NavigationUIVisibility = System.Windows.Navigation.NavigationUIVisibility.Hidden; - _frame.DataContextChanged += _frame_DataContextChanged; - _frame.Navigating += _frame_Navigating; - _frame.Navigated += _frame_Navigated; - _frame.RenderTransform = new TranslateTransform(); - - _cover.Visibility = Visibility.Collapsed; - _cover.RenderTransform = new TranslateTransform(); - - _content = new System.Windows.Controls.Grid() { - ClipToBounds = true, - Children = { - _cover, - _frame - } - }; - - AnimationDuration = TimeSpan.FromSeconds(0.5); - } - - void _frame_Navigating(object sender, System.Windows.Navigation.NavigatingCancelEventArgs e) { - if (_suspend_animation) return; - var width = _frame.ActualWidth; - if (width < 1 || _frame.Content == null) return; - - // Take a quick snapshot of the current frame contents - // Display this on top of the frame while allowing the navigation to complete - // Animate out the image of the old content while animating the frame with the new content into place - - _cover.Source = render(_frame); - _cover.Visibility = Visibility.Visible; - DoubleAnimation slide_out = new DoubleAnimation() { - From = 0, - To = -width, - Duration = new Duration(AnimationDuration) - }; - slide_out.Completed += (o, _) => { - _cover.Visibility = Visibility.Collapsed; - _cover.Source = null; // free the image - }; - _cover.RenderTransform.BeginAnimation(TranslateTransform.XProperty, slide_out); - - DoubleAnimation slide_in = new DoubleAnimation() { - From = width, - To = 0, - Duration = new Duration(AnimationDuration) - }; - _frame.RenderTransform.BeginAnimation(TranslateTransform.XProperty, slide_in); - } - - #region data context - void _frame_DataContextChanged(object sender, DependencyPropertyChangedEventArgs e) { - if (_frame.Content != null && _frame.Content is FrameworkElement) { - ((FrameworkElement)_frame.Content).DataContext = _frame.DataContext; - } - } - void _frame_Navigated(object sender, System.Windows.Navigation.NavigationEventArgs e) { - var fe = _frame.Content as FrameworkElement; - if (fe != null) { - fe.DataContext = _frame.DataContext; - // todo: Make sure the startMenuForeground color is set - } - } - #endregion - - #region Utility - // Render an element to an image - public ImageSource render(FrameworkElement element) { - var ps = PresentationSource.FromVisual(element); - if (ps == null) return null; - var matrix = ps.CompositionTarget.TransformToDevice; - var dpi_x = matrix.M11 * 96.0; - var dpi_y = matrix.M22 * 96.0; - int width = (int)element.ActualWidth; - int height = (int)element.ActualHeight; - VisualBrush brush = new VisualBrush(element); - DrawingVisual visual = new DrawingVisual(); - var dc = visual.RenderOpen(); - dc.DrawRectangle(brush, null, new Rect(0, 0, width, height)); - dc.Close(); - RenderTargetBitmap bitmap = new RenderTargetBitmap((int)(width * matrix.M11), (int)(height * matrix.M22), dpi_x, dpi_y, PixelFormats.Default); - bitmap.Render(visual); - return bitmap; - } - #endregion - - #region IShellWindow - public string Title { get; set; } - public event Action TitleChanged = () => { }; - public System.Windows.Media.ImageSource Icon { get; set; } - public event Action IconChanged = () =>{}; - public void Dispose() { } - public IShellModule Owner { get;set;} - public virtual void GetState(System.IO.Stream save_here) { throw new NotImplementedException(); } - public ShellWindowUI GetContent() { return new ShellWindowUI(_content); } - #endregion - - public void opening() { } - - public void closing() { - try { - _suspend_animation = true; - if (_frame.Content != _initial_view) { - _frame.Content = _initial_view; - } - } - finally { _suspend_animation = false; } - } - - public double Width { get { return _frame.Width; } set { _frame.Width = value; } } - public double height { get { return _frame.Height; } set { _frame.Height = value; } } - } -} diff --git a/src/client/spark/uicore/Shell/Login/LoginModel.cs b/src/client/spark/view/Shell/Login/LoginModel.cs similarity index 96% rename from src/client/spark/uicore/Shell/Login/LoginModel.cs rename to src/client/spark/view/Shell/Login/LoginModel.cs index 04ec1e89a..4275837a8 100644 --- a/src/client/spark/uicore/Shell/Login/LoginModel.cs +++ b/src/client/spark/view/Shell/Login/LoginModel.cs @@ -109,7 +109,7 @@ namespace mbts.ui.shell Array.Sort(UserNames); } else { - ErrorMessage = response.error_message; + ErrorMessage = "Logon: " + response.error_message; HasFatalError = true; } Ready?.Invoke(); diff --git a/src/client/spark/view/Shell/Login/LoginView.xaml b/src/client/spark/view/Shell/Login/LoginView.xaml index 37bc2674d..4778ea279 100644 --- a/src/client/spark/view/Shell/Login/LoginView.xaml +++ b/src/client/spark/view/Shell/Login/LoginView.xaml @@ -127,7 +127,7 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Shared - - - - - - - - - - - - - - - - - - - - - diff --git a/src/client/spark/view/Shell/Workspaces/MetaShellMenuView.xaml.cs b/src/client/spark/view/Shell/Workspaces/MetaShellMenuView.xaml.cs deleted file mode 100644 index 867467fc9..000000000 --- a/src/client/spark/view/Shell/Workspaces/MetaShellMenuView.xaml.cs +++ /dev/null @@ -1,81 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.Composition; -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 mbts.ui.shell.view -{ - [View(Model = typeof(MetaShellMenuViewModel))] - public partial class MetaShellMenuView : UserControl, IShellWindow, IView - { - public MetaShellMenuView() { - InitializeComponent(); - } - - // Most of the IShellWindow properties aren't very useful since this is used in the Launcher menu - #region IShellWindow - public string Title {get;set;} - public event Action TitleChanged = () => { }; - public ImageSource Icon { get; set; } - public event Action IconChanged = () => { }; - public IShellModule Owner { get; set; } - - public ShellWindowUI GetContent() { - return new ShellWindowUI(this); - } - - public void GetState(System.IO.Stream save_here) { - throw new NotImplementedException(); - } - - public void Dispose() { } - #endregion - } - -#if DEBUG - class WindowManagementDesignViewModel : ViewModelBaseWithValidation - { - public WindowManagementDesignViewModel() { - Workspaces = new object[] { - new { Name = "Workspace 1", IsPublic = false, Icon=Icons.Window }, - new { Name = "Workspace 2", IsPublic = true, Icon = Icons.ActiveWindow }, - new { Name = "Workspace 3", IsPublic = false, Icon = Icons.Window }, - }; - - Favorites = new object[] { - new { Name = "SPX shared", IsPublic = true }, - new { Name = "Cool Spreads", IsPublic = false }, - new { Name = "My Trades", IsPublic = false } - }; - - UndoItems = new object[] { - new { Name = "Re-Open Window: 'ES'" }, - new { Name = "Restore workspace: 'temp'" } - }; - - //SaveName = Environment.MachineName + " Workspace"; - } - - public object[] Workspaces { get; set; } - public string SaveName { get; set; } - public bool ShowWorkspaces { get; set; } - - public object[] Favorites { get; set; } - public bool ShowFavorites { get; set; } - - public object[] UndoItems { get; set; } - public bool ShowUndo { get; set; } - } -#endif -} diff --git a/src/client/spark/uicore/Shell/Workspaces/WorkspaceViewModel.cs b/src/client/spark/view/Shell/Workspaces/WorkspaceViewModel.cs similarity index 100% rename from src/client/spark/uicore/Shell/Workspaces/WorkspaceViewModel.cs rename to src/client/spark/view/Shell/Workspaces/WorkspaceViewModel.cs diff --git a/src/client/spark/uicore/Shell/Workspaces/WorkspacesModel.cs b/src/client/spark/view/Shell/Workspaces/WorkspacesModel.cs similarity index 100% rename from src/client/spark/uicore/Shell/Workspaces/WorkspacesModel.cs rename to src/client/spark/view/Shell/Workspaces/WorkspacesModel.cs From 02a0279903c84c7ea9a40de4a255e883d28df814 Mon Sep 17 00:00:00 2001 From: Eric Harding Date: Tue, 5 Dec 2017 17:29:35 -0500 Subject: [PATCH 3/4] Found a test folder in the wrong place --- .../{view/Tests => Tests/ViewTests}/TestSavedWindowFactory.cs | 0 .../{view/Tests => Tests/ViewTests}/TestSettingsCollector.cs | 0 .../spark/{view/Tests => Tests/ViewTests}/TestShellWindow.cs | 0 src/client/spark/{view/Tests => Tests/ViewTests}/TestUndo.cs | 0 .../{view/Tests => Tests/ViewTests}/WindowManagementTests.cs | 0 5 files changed, 0 insertions(+), 0 deletions(-) rename src/client/spark/{view/Tests => Tests/ViewTests}/TestSavedWindowFactory.cs (100%) rename src/client/spark/{view/Tests => Tests/ViewTests}/TestSettingsCollector.cs (100%) rename src/client/spark/{view/Tests => Tests/ViewTests}/TestShellWindow.cs (100%) rename src/client/spark/{view/Tests => Tests/ViewTests}/TestUndo.cs (100%) rename src/client/spark/{view/Tests => Tests/ViewTests}/WindowManagementTests.cs (100%) diff --git a/src/client/spark/view/Tests/TestSavedWindowFactory.cs b/src/client/spark/Tests/ViewTests/TestSavedWindowFactory.cs similarity index 100% rename from src/client/spark/view/Tests/TestSavedWindowFactory.cs rename to src/client/spark/Tests/ViewTests/TestSavedWindowFactory.cs diff --git a/src/client/spark/view/Tests/TestSettingsCollector.cs b/src/client/spark/Tests/ViewTests/TestSettingsCollector.cs similarity index 100% rename from src/client/spark/view/Tests/TestSettingsCollector.cs rename to src/client/spark/Tests/ViewTests/TestSettingsCollector.cs diff --git a/src/client/spark/view/Tests/TestShellWindow.cs b/src/client/spark/Tests/ViewTests/TestShellWindow.cs similarity index 100% rename from src/client/spark/view/Tests/TestShellWindow.cs rename to src/client/spark/Tests/ViewTests/TestShellWindow.cs diff --git a/src/client/spark/view/Tests/TestUndo.cs b/src/client/spark/Tests/ViewTests/TestUndo.cs similarity index 100% rename from src/client/spark/view/Tests/TestUndo.cs rename to src/client/spark/Tests/ViewTests/TestUndo.cs diff --git a/src/client/spark/view/Tests/WindowManagementTests.cs b/src/client/spark/Tests/ViewTests/WindowManagementTests.cs similarity index 100% rename from src/client/spark/view/Tests/WindowManagementTests.cs rename to src/client/spark/Tests/ViewTests/WindowManagementTests.cs From 6141d2969eab0dad805753981bedb89f9428dee1 Mon Sep 17 00:00:00 2001 From: Jake Norbut Date: Tue, 5 Dec 2017 16:29:58 -0600 Subject: [PATCH 4/4] Contract Picker - fixing bool logic --- .../ContractPicker/ContractPickerModel.cs | 22 ++++++++++++++----- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/src/client/spark/mspark/ContractPicker/ContractPickerModel.cs b/src/client/spark/mspark/ContractPicker/ContractPickerModel.cs index 07fadb38e..0a8e9accc 100644 --- a/src/client/spark/mspark/ContractPicker/ContractPickerModel.cs +++ b/src/client/spark/mspark/ContractPicker/ContractPickerModel.cs @@ -232,14 +232,24 @@ namespace mbts.spark { public static bool security_in_criteria(SecurityCriteria criteria, SecurityImmutable sec_item) { - if (criteria == null) return false; foreach (SecurityCriteriaClause x in criteria.clauses) { - bool iteration_result = ((x.exchanges == null) || (x.exchanges.Length == 0 || x.exchanges.Any(exchange => exchange == sec_item.Exchange))) - && ((x.security_types == null) || (x.security_types.Length == 0 || x.security_types.Any(sec_type => sec_type == sec_item.security_type()))) - && ((x.symbols == null) || (x.symbols.Length == 0 || x.symbols.Any(sym => sym == sec_item.Symbol))) - && ((x.security_keys == null) || (x.security_keys.Count == 0 || x.security_keys.Any(sec_key => sec_key == sec_item.Id))); - if (iteration_result) return true; + bool check_exchanges = !(x.exchanges == null || x.exchanges.Length == 0); + bool check_security_types = !(x.exchanges == null || x.security_types.Length == 0); + bool check_symbols = !(x.symbols == null || x.symbols.Length == 0); + bool check_security_keys = !(x.security_keys == null || x.security_keys.Count == 0); + bool check_something_in_clause = check_exchanges || check_security_types || check_symbols || check_security_keys; + + if (check_something_in_clause) + { + // we're checking something in here, so we want this to be a no-op in an && clause, so it has to be true + bool iteration_result = true; + if (check_exchanges) iteration_result = iteration_result && x.exchanges.Any(exchange => exchange == sec_item.Exchange); + if (check_security_types) iteration_result = iteration_result && x.security_types.Any(sec_type => sec_type == sec_item.security_type()); + if (check_symbols) iteration_result = iteration_result && x.symbols.Any(sym => sym == sec_item.Symbol); + if (check_security_keys) iteration_result = iteration_result && x.security_keys.Any(sec_key => sec_key == sec_item.Id); + if (iteration_result) return true; + } } return false; }