mirror of
https://github.com/4sval/FModel.git
synced 2026-03-22 01:34:37 -05:00
Merge pull request #57 from iAmAsval/discord_rpc_setting
Add a toggle for the user to override Discord Rich Presence
This commit is contained in:
commit
8fdff9e32d
|
|
@ -1,5 +1,6 @@
|
|||
using FModel.Discord;
|
||||
using FModel.Logger;
|
||||
using FModel.Properties;
|
||||
using FModel.Utils;
|
||||
using FModel.ViewModels.StatusBar;
|
||||
using FModel.Windows.DarkMessageBox;
|
||||
|
|
@ -37,7 +38,11 @@ namespace FModel
|
|||
DebugHelper.WriteLine("{0} {1} {2}", "[FModel]", "[Culture]", Thread.CurrentThread.CurrentUICulture);
|
||||
|
||||
StatusBarVm.statusBarViewModel.Set(FModel.Properties.Resources.Initializing, FModel.Properties.Resources.Loading);
|
||||
DiscordIntegration.StartClient();
|
||||
|
||||
if (FModel.Properties.Settings.Default.EnableDiscordRPC)
|
||||
{
|
||||
DiscordIntegration.StartClient();
|
||||
}
|
||||
|
||||
base.OnStartup(e);
|
||||
}
|
||||
|
|
|
|||
635
FModel/Properties/Resources.Designer.cs
generated
635
FModel/Properties/Resources.Designer.cs
generated
File diff suppressed because it is too large
Load Diff
|
|
@ -1081,4 +1081,8 @@ It's now the most used free software to leak on Fortnite.</value>
|
|||
<data name="UpdateAvailableConfirm" xml:space="preserve">
|
||||
<value>FModel {0} is available. You are using version {1}. Do you want to update the application now?</value>
|
||||
</data>
|
||||
<data name="EnableDiscordRPC" xml:space="preserve">
|
||||
<value>Enable Discord RPC</value>
|
||||
<comment>Should Discord Rich Presence be enabled?</comment>
|
||||
</data>
|
||||
</root>
|
||||
20
FModel/Properties/Settings.Designer.cs
generated
20
FModel/Properties/Settings.Designer.cs
generated
|
|
@ -1,10 +1,10 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Ce code a été généré par un outil.
|
||||
// Version du runtime :4.0.30319.42000
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si
|
||||
// le code est régénéré.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
|
@ -83,6 +83,18 @@ namespace FModel.Properties {
|
|||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("True")]
|
||||
public bool EnableDiscordRPC {
|
||||
get {
|
||||
return ((bool)(this["EnableDiscordRPC"]));
|
||||
}
|
||||
set {
|
||||
this["EnableDiscordRPC"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("")]
|
||||
|
|
|
|||
|
|
@ -17,6 +17,9 @@
|
|||
<Setting Name="AutoOpenSounds" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">True</Value>
|
||||
</Setting>
|
||||
<Setting Name="EnableDiscordRPC" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">True</Value>
|
||||
</Setting>
|
||||
<Setting Name="AudioPlayerDevice" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@
|
|||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="10" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
|
||||
<TextBlock Text="{x:Static properties:Resources.FyiTitle}"
|
||||
FontWeight="Bold" Foreground="White" Grid.Row="1"
|
||||
FontFamily="Calibri" FontSize="18"/>
|
||||
|
|
@ -120,13 +120,16 @@
|
|||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
|
||||
<CheckBox Grid.Row="0" Margin="5"
|
||||
Content="{x:Static properties:Resources.ReloadAesKeysAtLaunch}"
|
||||
IsChecked="{Binding Source={x:Static properties:Settings.Default}, Path=ReloadAesKeys, Mode=TwoWay}"/>
|
||||
<CheckBox Grid.Row="1" Margin="5"
|
||||
Content="{x:Static properties:Resources.AutoOpenSounds}"
|
||||
IsChecked="{Binding Source={x:Static properties:Settings.Default}, Path=AutoOpenSounds, Mode=TwoWay}"/>
|
||||
<CheckBox Grid.Row="1" Margin="5,29,5,-19"
|
||||
Content="{x:Static properties:Resources.EnableDiscordRPC}"
|
||||
IsChecked="{Binding Source={x:Static properties:Settings.Default}, Path=EnableDiscordRPC, Mode=TwoWay}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user