mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
Fixed profile model crash, cleaned up Nuget packages, UI improvements
This commit is contained in:
parent
ddb0b5474e
commit
7a15bb398a
@ -6,15 +6,16 @@ using Artemis.Modules.Effects.ProfilePreview;
|
|||||||
using Artemis.ViewModels.Abstract;
|
using Artemis.ViewModels.Abstract;
|
||||||
using Artemis.ViewModels.Profiles;
|
using Artemis.ViewModels.Profiles;
|
||||||
using Caliburn.Micro;
|
using Caliburn.Micro;
|
||||||
|
using Ninject.Extensions.Logging;
|
||||||
|
|
||||||
namespace Artemis.Modules.Effects.WindowsProfile
|
namespace Artemis.Modules.Effects.WindowsProfile
|
||||||
{
|
{
|
||||||
// TODO: This effect is a hybrid between a regular effect and a game, may want to clean this up
|
// TODO: This effect is a hybrid between a regular effect and a game, may want to clean this up
|
||||||
public sealed class WindowsProfileViewModel : EffectViewModel, IHandle<ActiveEffectChanged>
|
public sealed class WindowsProfileViewModel : EffectViewModel, IHandle<ActiveEffectChanged>
|
||||||
{
|
{
|
||||||
public WindowsProfileViewModel(MainManager main, IEventAggregator events, IProfileEditorVmFactory pFactory,
|
public WindowsProfileViewModel(ILogger logger, MainManager main, IEventAggregator events,
|
||||||
ProfilePreviewModel profilePreviewModel)
|
IProfileEditorVmFactory pFactory, ProfilePreviewModel profilePreviewModel)
|
||||||
: base(main, new WindowsProfileModel(main, new WindowsProfileSettings()))
|
: base(main, new WindowsProfileModel(logger, main, new WindowsProfileSettings()))
|
||||||
{
|
{
|
||||||
DisplayName = "Windows Profile";
|
DisplayName = "Windows Profile";
|
||||||
PFactory = pFactory;
|
PFactory = pFactory;
|
||||||
|
|||||||
@ -9,22 +9,29 @@ using Artemis.Settings;
|
|||||||
using Artemis.Utilities.Memory;
|
using Artemis.Utilities.Memory;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
|
using NLog;
|
||||||
|
|
||||||
namespace Artemis.Utilities
|
namespace Artemis.Utilities
|
||||||
{
|
{
|
||||||
public static class Updater
|
public static class Updater
|
||||||
{
|
{
|
||||||
public static int CurrentVersion = 110;
|
public static int CurrentVersion = 111;
|
||||||
|
private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
|
||||||
|
|
||||||
public static async Task<Action> CheckForUpdate(MetroDialogService dialogService)
|
public static async Task<Action> CheckForUpdate(MetroDialogService dialogService)
|
||||||
{
|
{
|
||||||
|
Logger.Info("Checking for updates - Current version: 1.1.1");
|
||||||
if (!General.Default.CheckForUpdates)
|
if (!General.Default.CheckForUpdates)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
var newRelease = IsUpdateAvailable();
|
var newRelease = IsUpdateAvailable();
|
||||||
if (newRelease == null)
|
if (newRelease == null)
|
||||||
|
{
|
||||||
|
Logger.Info("No update found.");
|
||||||
return null;
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
Logger.Info("Found new version - {0}.", newRelease["tag_name"].Value<string>());
|
||||||
var viewUpdate = await
|
var viewUpdate = await
|
||||||
dialogService.ShowQuestionMessageBox("ApplyProperties available",
|
dialogService.ShowQuestionMessageBox("ApplyProperties available",
|
||||||
$"A new version of Artemis is available, version {newRelease["tag_name"].Value<string>()}.\n" +
|
$"A new version of Artemis is available, version {newRelease["tag_name"].Value<string>()}.\n" +
|
||||||
|
|||||||
@ -105,7 +105,7 @@
|
|||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<TextBlock Grid.Row="0" Grid.ColumnSpan="2" x:Name="ActiveEffectName" />
|
<TextBlock Grid.Row="0" Grid.ColumnSpan="2" x:Name="ActiveEffectName" />
|
||||||
<TextBlock Grid.Row="1" Grid.Column="0" Text="Artemis 1.1.0" VerticalAlignment="Center"
|
<TextBlock Grid.Row="1" Grid.Column="0" Text="Artemis 1.1.1" VerticalAlignment="Center"
|
||||||
HorizontalAlignment="Left" />
|
HorizontalAlignment="Left" />
|
||||||
<Button Grid.Row="1" Grid.Column="1" Focusable="False"
|
<Button Grid.Row="1" Grid.Column="1" Focusable="False"
|
||||||
Style="{StaticResource AccentedSquareButtonStyle}"
|
Style="{StaticResource AccentedSquareButtonStyle}"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user