diff --git a/Artemis/Artemis/App.xaml b/Artemis/Artemis/App.xaml index 39bea1e79..c80f295e0 100644 --- a/Artemis/Artemis/App.xaml +++ b/Artemis/Artemis/App.xaml @@ -8,7 +8,7 @@ - + diff --git a/Artemis/Artemis/Artemis.csproj b/Artemis/Artemis/Artemis.csproj index b24806b47..d371857ed 100644 --- a/Artemis/Artemis/Artemis.csproj +++ b/Artemis/Artemis/Artemis.csproj @@ -78,15 +78,11 @@ - ..\packages\Caliburn.Micro.Core.3.0.0-beta2\lib\net45\Caliburn.Micro.dll + ..\packages\Caliburn.Micro.Core.2.0.2\lib\net45\Caliburn.Micro.dll True - ..\packages\Caliburn.Micro.3.0.0-beta2\lib\net45\Caliburn.Micro.Platform.dll - True - - - ..\packages\Caliburn.Micro.3.0.0-beta2\lib\net45\Caliburn.Micro.Platform.Core.dll + ..\packages\Caliburn.Micro.2.0.2\lib\net45\Caliburn.Micro.Platform.dll True @@ -131,10 +127,7 @@ - - ..\packages\MahApps.Metro.1.3.0-ALPHA017\lib\net45\System.Windows.Interactivity.dll - True - + @@ -185,7 +178,7 @@ App.xaml Code - + @@ -288,6 +281,9 @@ EffectsView.xaml + + + FlyoutSettingsView.xaml DebugEffectView.xaml @@ -301,9 +297,6 @@ TypeWaveView.xaml - - FlyoutSettingsView.xaml - GamesView.xaml @@ -408,8 +401,8 @@ MSBuild:Compile - Designer MSBuild:Compile + Designer Designer diff --git a/Artemis/Artemis/AppBootStrapper.cs b/Artemis/Artemis/ArtemisBootstrapper.cs similarity index 61% rename from Artemis/Artemis/AppBootStrapper.cs rename to Artemis/Artemis/ArtemisBootstrapper.cs index 99494355c..acea28cf2 100644 --- a/Artemis/Artemis/AppBootStrapper.cs +++ b/Artemis/Artemis/ArtemisBootstrapper.cs @@ -1,14 +1,12 @@ -using System; -using System.Windows; +using System.Windows; using Artemis.ViewModels; using Caliburn.Micro; -using MessageBox = System.Windows.Forms.MessageBox; namespace Artemis { - public class AppBootstrapper : BootstrapperBase + public class ArtemisBootstrapper : BootstrapperBase { - public AppBootstrapper() + public ArtemisBootstrapper() { Initialize(); } diff --git a/Artemis/Artemis/ViewModels/FlyoutBaseViewModel.cs b/Artemis/Artemis/ViewModels/FlyoutBaseViewModel.cs index bbe2d6f62..871e508ae 100644 --- a/Artemis/Artemis/ViewModels/FlyoutBaseViewModel.cs +++ b/Artemis/Artemis/ViewModels/FlyoutBaseViewModel.cs @@ -5,50 +5,48 @@ namespace Artemis.ViewModels { public abstract class FlyoutBaseViewModel : PropertyChangedBase { - private string header; - - private bool isOpen; - - private Position position; + private string _header; + private bool _isOpen; + private Position _position; public string Header { - get { return header; } + get { return _header; } set { - if (value == header) + if (value == _header) return; - header = value; + _header = value; NotifyOfPropertyChange(() => Header); } } public bool IsOpen { - get { return isOpen; } + get { return _isOpen; } set { - if (value.Equals(isOpen)) + if (value.Equals(_isOpen)) return; - isOpen = value; + _isOpen = value; NotifyOfPropertyChange(() => IsOpen); } } public Position Position { - get { return position; } + get { return _position; } set { - if (value == position) + if (value == _position) return; - position = value; + _position = value; NotifyOfPropertyChange(() => Position); } } diff --git a/Artemis/Artemis/ViewModels/Flyouts/FlyoutSettingsViewModel.cs b/Artemis/Artemis/ViewModels/Flyouts/FlyoutSettingsViewModel.cs index 52a063159..5275a1d3d 100644 --- a/Artemis/Artemis/ViewModels/Flyouts/FlyoutSettingsViewModel.cs +++ b/Artemis/Artemis/ViewModels/Flyouts/FlyoutSettingsViewModel.cs @@ -1,4 +1,4 @@ -using MahApps.Metro.Controls; +using MahApps.Metro.Controls; namespace Artemis.ViewModels.Flyouts { diff --git a/Artemis/Artemis/ViewModels/ShellViewModel.cs b/Artemis/Artemis/ViewModels/ShellViewModel.cs index 5cf543d77..3b39d06a3 100644 --- a/Artemis/Artemis/ViewModels/ShellViewModel.cs +++ b/Artemis/Artemis/ViewModels/ShellViewModel.cs @@ -1,8 +1,9 @@ using System; +using System.Linq; using System.Windows; using Artemis.Models; +using Artemis.ViewModels.Flyouts; using Caliburn.Micro; -using MessageBox = System.Windows.Forms.MessageBox; namespace Artemis.ViewModels { @@ -18,11 +19,15 @@ namespace Artemis.ViewModels ActivateItem(new EffectsViewModel(MainModel) {DisplayName = "Effects"}); ActivateItem(new GamesViewModel(MainModel) {DisplayName = "Games"}); ActivateItem(new OverlaysViewModel(MainModel) {DisplayName = "Overlays"}); + Flyouts.Add(new FlyoutSettingsViewModel()); // By now Effects are added to the MainModel so we can savely start one ToggleEffects(); } + public IObservableCollection Flyouts { get; set; } = + new BindableCollection(); + public bool EffectsEnabled { get { return MainModel.Enabled; } @@ -51,9 +56,9 @@ namespace Artemis.ViewModels Application.Current.Shutdown(); } - public void ToggleSettings() + public void Settings() { - MessageBox.Show("Test"); + Flyouts.First().IsOpen = !Flyouts.First().IsOpen; } } } \ No newline at end of file diff --git a/Artemis/Artemis/Views/Flyouts/FlyoutSettingsView.xaml b/Artemis/Artemis/Views/Flyouts/FlyoutSettingsView.xaml index 8a7c28981..e4c4a62e3 100644 --- a/Artemis/Artemis/Views/Flyouts/FlyoutSettingsView.xaml +++ b/Artemis/Artemis/Views/Flyouts/FlyoutSettingsView.xaml @@ -3,13 +3,13 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" - xmlns:local="clr-namespace:Artemis.Views.Flyouts" + xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls" mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="300"> - + @@ -24,20 +24,6 @@ Grid.Column="0" Margin="5" VerticalAlignment="Center" - Content="Download language:" /> - - - + + + + + + + + + - - + +