mirror of
https://github.com/4sval/FModel.git
synced 2026-09-30 21:19:33 -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:
@@ -1,5 +1,6 @@
|
|||||||
using FModel.Discord;
|
using FModel.Discord;
|
||||||
using FModel.Logger;
|
using FModel.Logger;
|
||||||
|
using FModel.Properties;
|
||||||
using FModel.Utils;
|
using FModel.Utils;
|
||||||
using FModel.ViewModels.StatusBar;
|
using FModel.ViewModels.StatusBar;
|
||||||
using FModel.Windows.DarkMessageBox;
|
using FModel.Windows.DarkMessageBox;
|
||||||
@@ -37,7 +38,11 @@ namespace FModel
|
|||||||
DebugHelper.WriteLine("{0} {1} {2}", "[FModel]", "[Culture]", Thread.CurrentThread.CurrentUICulture);
|
DebugHelper.WriteLine("{0} {1} {2}", "[FModel]", "[Culture]", Thread.CurrentThread.CurrentUICulture);
|
||||||
|
|
||||||
StatusBarVm.statusBarViewModel.Set(FModel.Properties.Resources.Initializing, FModel.Properties.Resources.Loading);
|
StatusBarVm.statusBarViewModel.Set(FModel.Properties.Resources.Initializing, FModel.Properties.Resources.Loading);
|
||||||
DiscordIntegration.StartClient();
|
|
||||||
|
if (FModel.Properties.Settings.Default.EnableDiscordRPC)
|
||||||
|
{
|
||||||
|
DiscordIntegration.StartClient();
|
||||||
|
}
|
||||||
|
|
||||||
base.OnStartup(e);
|
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">
|
<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>
|
<value>FModel {0} is available. You are using version {1}. Do you want to update the application now?</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="EnableDiscordRPC" xml:space="preserve">
|
||||||
|
<value>Enable Discord RPC</value>
|
||||||
|
<comment>Should Discord Rich Presence be enabled?</comment>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
20
FModel/Properties/Settings.Designer.cs
generated
20
FModel/Properties/Settings.Designer.cs
generated
@@ -1,10 +1,10 @@
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// <auto-generated>
|
// <auto-generated>
|
||||||
// Ce code a été généré par un outil.
|
// This code was generated by a tool.
|
||||||
// Version du runtime :4.0.30319.42000
|
// Runtime Version:4.0.30319.42000
|
||||||
//
|
//
|
||||||
// Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
// le code est régénéré.
|
// the code is regenerated.
|
||||||
// </auto-generated>
|
// </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.Configuration.UserScopedSettingAttribute()]
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
[global::System.Configuration.DefaultSettingValueAttribute("")]
|
[global::System.Configuration.DefaultSettingValueAttribute("")]
|
||||||
|
|||||||
@@ -17,6 +17,9 @@
|
|||||||
<Setting Name="AutoOpenSounds" Type="System.Boolean" Scope="User">
|
<Setting Name="AutoOpenSounds" Type="System.Boolean" Scope="User">
|
||||||
<Value Profile="(Default)">True</Value>
|
<Value Profile="(Default)">True</Value>
|
||||||
</Setting>
|
</Setting>
|
||||||
|
<Setting Name="EnableDiscordRPC" Type="System.Boolean" Scope="User">
|
||||||
|
<Value Profile="(Default)">True</Value>
|
||||||
|
</Setting>
|
||||||
<Setting Name="AudioPlayerDevice" Type="System.String" Scope="User">
|
<Setting Name="AudioPlayerDevice" Type="System.String" Scope="User">
|
||||||
<Value Profile="(Default)" />
|
<Value Profile="(Default)" />
|
||||||
</Setting>
|
</Setting>
|
||||||
|
|||||||
@@ -106,7 +106,7 @@
|
|||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
<RowDefinition Height="10" />
|
<RowDefinition Height="10" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<TextBlock Text="{x:Static properties:Resources.FyiTitle}"
|
<TextBlock Text="{x:Static properties:Resources.FyiTitle}"
|
||||||
FontWeight="Bold" Foreground="White" Grid.Row="1"
|
FontWeight="Bold" Foreground="White" Grid.Row="1"
|
||||||
FontFamily="Calibri" FontSize="18"/>
|
FontFamily="Calibri" FontSize="18"/>
|
||||||
@@ -120,13 +120,16 @@
|
|||||||
<RowDefinition Height="Auto"/>
|
<RowDefinition Height="Auto"/>
|
||||||
<RowDefinition Height="Auto"/>
|
<RowDefinition Height="Auto"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<CheckBox Grid.Row="0" Margin="5"
|
<CheckBox Grid.Row="0" Margin="5"
|
||||||
Content="{x:Static properties:Resources.ReloadAesKeysAtLaunch}"
|
Content="{x:Static properties:Resources.ReloadAesKeysAtLaunch}"
|
||||||
IsChecked="{Binding Source={x:Static properties:Settings.Default}, Path=ReloadAesKeys, Mode=TwoWay}"/>
|
IsChecked="{Binding Source={x:Static properties:Settings.Default}, Path=ReloadAesKeys, Mode=TwoWay}"/>
|
||||||
<CheckBox Grid.Row="1" Margin="5"
|
<CheckBox Grid.Row="1" Margin="5"
|
||||||
Content="{x:Static properties:Resources.AutoOpenSounds}"
|
Content="{x:Static properties:Resources.AutoOpenSounds}"
|
||||||
IsChecked="{Binding Source={x:Static properties:Settings.Default}, Path=AutoOpenSounds, Mode=TwoWay}"/>
|
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>
|
||||||
</Grid>
|
</Grid>
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
|
|||||||
Reference in New Issue
Block a user