From a2c7ebd96bd5c99b671b612ac7319c8014f14948 Mon Sep 17 00:00:00 2001 From: Christopher - RtF <58520035+christopher-rtf@users.noreply.github.com> Date: Sat, 20 Mar 2021 15:26:39 -0400 Subject: [PATCH 1/2] Update main menu and scaffold settings panel --- Morphic.Client/App.xaml.cs | 1 + Morphic.Client/Dialogs/SettingsWindow.xaml | 145 ++++++++++++++++++ Morphic.Client/Dialogs/SettingsWindow.xaml.cs | 48 ++++++ Morphic.Client/Menu/MorphicMenu.xaml | 13 +- Morphic.Client/Menu/MorphicMenu.xaml.cs | 22 ++- 5 files changed, 221 insertions(+), 8 deletions(-) create mode 100644 Morphic.Client/Dialogs/SettingsWindow.xaml create mode 100644 Morphic.Client/Dialogs/SettingsWindow.xaml.cs diff --git a/Morphic.Client/App.xaml.cs b/Morphic.Client/App.xaml.cs index 5e773652..fcfd58fa 100644 --- a/Morphic.Client/App.xaml.cs +++ b/Morphic.Client/App.xaml.cs @@ -457,6 +457,7 @@ private void ConfigureServices(IServiceCollection services) services.AddTransient(); services.AddTransient(); services.AddTransient(); + services.AddTransient(); services.AddSingleton(); services.AddTransient(); services.AddSingleton(s => BarPresets.Default); diff --git a/Morphic.Client/Dialogs/SettingsWindow.xaml b/Morphic.Client/Dialogs/SettingsWindow.xaml new file mode 100644 index 00000000..53087089 --- /dev/null +++ b/Morphic.Client/Dialogs/SettingsWindow.xaml @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 100% + + + + + Show MorphicBar at start-up if shown at shutdown + + + + + + + Large + Small + + + + + + Docked + Not Docked + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Remind me weekly + No reminders + + + + + + + + + + + diff --git a/Morphic.Client/Dialogs/SettingsWindow.xaml.cs b/Morphic.Client/Dialogs/SettingsWindow.xaml.cs new file mode 100644 index 00000000..8aeebdc7 --- /dev/null +++ b/Morphic.Client/Dialogs/SettingsWindow.xaml.cs @@ -0,0 +1,48 @@ +// Copyright 2021 Raising the Floor - International +// +// Licensed under the New BSD license. You may not use this file except in +// compliance with this License. +// +// You may obtain a copy of the License at +// https://github.com/GPII/universal/blob/master/LICENSE.txt +// +// The R&D leading to these results received funding from the: +// * Rehabilitation Services Administration, US Dept. of Education under +// grant H421A150006 (APCP) +// * National Institute on Disability, Independent Living, and +// Rehabilitation Research (NIDILRR) +// * Administration for Independent Living & Dept. of Education under grants +// H133E080022 (RERC-IT) and H133E130028/90RE5003-01-00 (UIITA-RERC) +// * European Union's Seventh Framework Programme (FP7/2007-2013) grant +// agreement nos. 289016 (Cloud4all) and 610510 (Prosperity4All) +// * William and Flora Hewlett Foundation +// * Ontario Ministry of Research and Innovation +// * Canadian Foundation for Innovation +// * Adobe Foundation +// * Consumer Electronics Association Foundation + +using System; +using System.Collections.Generic; +using System.Text; +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.Shapes; + +namespace Morphic.Client.Dialogs +{ + /// + /// Interaction logic for SettingsWindow.xaml + /// + public partial class SettingsWindow : Window + { + public SettingsWindow() + { + InitializeComponent(); + } + } +} diff --git a/Morphic.Client/Menu/MorphicMenu.xaml b/Morphic.Client/Menu/MorphicMenu.xaml index 5bc88b5a..7f89506c 100644 --- a/Morphic.Client/Menu/MorphicMenu.xaml +++ b/Morphic.Client/Menu/MorphicMenu.xaml @@ -16,17 +16,19 @@ + + + - - - + + @@ -58,8 +60,9 @@ - - + + + \ No newline at end of file diff --git a/Morphic.Client/Menu/MorphicMenu.xaml.cs b/Morphic.Client/Menu/MorphicMenu.xaml.cs index d8f1079f..240b4290 100644 --- a/Morphic.Client/Menu/MorphicMenu.xaml.cs +++ b/Morphic.Client/Menu/MorphicMenu.xaml.cs @@ -36,8 +36,9 @@ protected override void OnInitialized(EventArgs e) // if ConfigurableFeatures.CloudSettingsTransferIsEnabled is false, then hide the settings which can transfer/restore settings if (ConfigurableFeatures.CloudSettingsTransferIsEnabled == false) { - this.CopySettingsBetweenComputersMenuItem.Visibility = Visibility.Collapsed; - this.RestoreSettingsFromBackupMenuItem.Visibility = Visibility.Collapsed; + this.ChangeSetupMenuItem.Visibility = Visibility.Collapsed; + this.SaveMySetupMenuItem.Visibility = Visibility.Collapsed; + //this.RestoreSettingsFromBackupMenuItem.Visibility = Visibility.Collapsed; this.CloudSettingsSeparator.Visibility = Visibility.Collapsed; } @@ -205,6 +206,15 @@ private async void StopKeyRepeatToggle(object sender, RoutedEventArgs e) } } + #region Settings + private async void SettingsItemClicked(object sender, RoutedEventArgs e) + { + var args = new Dictionary(); + await App.Current.Dialogs.OpenDialogAsync(args); + } + + #endregion + #region TrayIcon private MorphicHybridTrayIcon? _trayIcon = null; @@ -283,7 +293,13 @@ private async void ExploreMorphicClicked(object sender, RoutedEventArgs e) await App.Current.Countly_RecordEventAsync("exploreMorphic", 1, segmentation); } - private async void QuickDemoMoviesClicked(object sender, RoutedEventArgs e) + private async void HowToCopySetupsClicked(object sender, RoutedEventArgs e) + { + var segmentation = CreateMenuOpenedSourceSegmentation(_menuOpenedSource); + await App.Current.Countly_RecordEventAsync("howToCopySetups", 1, segmentation); + } + + private async void QuickDemoVideosClicked(object sender, RoutedEventArgs e) { var segmentation = CreateMenuOpenedSourceSegmentation(_menuOpenedSource); segmentation.Add("category", "main"); From 25d8223c83b112c9229f509184880dccd1f3a10e Mon Sep 17 00:00:00 2001 From: Christopher - RtF <58520035+christopher-rtf@users.noreply.github.com> Date: Fri, 26 Mar 2021 19:30:35 -0400 Subject: [PATCH 2/2] Update menu item --- Morphic.Client/Menu/MorphicMenu.xaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Morphic.Client/Menu/MorphicMenu.xaml b/Morphic.Client/Menu/MorphicMenu.xaml index 7f89506c..d014418e 100644 --- a/Morphic.Client/Menu/MorphicMenu.xaml +++ b/Morphic.Client/Menu/MorphicMenu.xaml @@ -16,7 +16,7 @@ - +