mirror of
https://github.com/knah/VRCMelonAssistant.git
synced 2024-06-29 03:20:18 +12:00
Closes #29
This commit is contained in:
parent
c9893cfe06
commit
8c4ecc5b81
|
@ -41,6 +41,9 @@
|
||||||
<setting name="UpgradeRequired" serializeAs="String">
|
<setting name="UpgradeRequired" serializeAs="String">
|
||||||
<value>True</value>
|
<value>True</value>
|
||||||
</setting>
|
</setting>
|
||||||
|
<setting name="LastTab" serializeAs="String">
|
||||||
|
<value />
|
||||||
|
</setting>
|
||||||
</ModAssistant.Properties.Settings>
|
</ModAssistant.Properties.Settings>
|
||||||
<ModAssistant.Settings1>
|
<ModAssistant.Settings1>
|
||||||
<setting name="InstallFolder" serializeAs="String">
|
<setting name="InstallFolder" serializeAs="String">
|
||||||
|
|
|
@ -60,8 +60,6 @@ namespace ModAssistant
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Main.Content = Intro.Instance;
|
|
||||||
|
|
||||||
List<string> versions;
|
List<string> versions;
|
||||||
string json = string.Empty;
|
string json = string.Empty;
|
||||||
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(Utils.Constants.BeatModsAPIUrl + "version");
|
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(Utils.Constants.BeatModsAPIUrl + "version");
|
||||||
|
@ -94,6 +92,34 @@ namespace ModAssistant
|
||||||
{
|
{
|
||||||
MainWindow.Instance.ModsButton.IsEnabled = true;
|
MainWindow.Instance.ModsButton.IsEnabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!Properties.Settings.Default.Agreed || String.IsNullOrEmpty(Properties.Settings.Default.LastTab))
|
||||||
|
{
|
||||||
|
Main.Content = Intro.Instance;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
switch (Properties.Settings.Default.LastTab)
|
||||||
|
{
|
||||||
|
case "Intro":
|
||||||
|
Main.Content = Intro.Instance;
|
||||||
|
break;
|
||||||
|
case "Mods":
|
||||||
|
Mods.Instance.LoadMods();
|
||||||
|
ModsOpened = true;
|
||||||
|
Main.Content = Mods.Instance;
|
||||||
|
break;
|
||||||
|
case "About":
|
||||||
|
Main.Content = About.Instance;
|
||||||
|
break;
|
||||||
|
case "Options":
|
||||||
|
Main.Content = Options.Instance;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
Main.Content = Intro.Instance;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private string GetGameVersion(List<string> versions)
|
private string GetGameVersion(List<string> versions)
|
||||||
|
@ -122,6 +148,8 @@ namespace ModAssistant
|
||||||
private void ModsButton_Click(object sender, RoutedEventArgs e)
|
private void ModsButton_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
Main.Content = Mods.Instance;
|
Main.Content = Mods.Instance;
|
||||||
|
Properties.Settings.Default.LastTab = "Mods";
|
||||||
|
Properties.Settings.Default.Save();
|
||||||
|
|
||||||
if (!ModsOpened)
|
if (!ModsOpened)
|
||||||
{
|
{
|
||||||
|
@ -140,16 +168,22 @@ namespace ModAssistant
|
||||||
private void IntroButton_Click(object sender, RoutedEventArgs e)
|
private void IntroButton_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
Main.Content = Intro.Instance;
|
Main.Content = Intro.Instance;
|
||||||
|
Properties.Settings.Default.LastTab = "Intro";
|
||||||
|
Properties.Settings.Default.Save();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void AboutButton_Click(object sender, RoutedEventArgs e)
|
private void AboutButton_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
Main.Content = About.Instance;
|
Main.Content = About.Instance;
|
||||||
|
Properties.Settings.Default.LastTab = "About";
|
||||||
|
Properties.Settings.Default.Save();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OptionsButton_Click(object sender, RoutedEventArgs e)
|
private void OptionsButton_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
Main.Content = Options.Instance;
|
Main.Content = Options.Instance;
|
||||||
|
Properties.Settings.Default.LastTab = "Options";
|
||||||
|
Properties.Settings.Default.Save();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void InstallButton_Click(object sender, RoutedEventArgs e)
|
private void InstallButton_Click(object sender, RoutedEventArgs e)
|
||||||
|
|
14
ModAssistant/Properties/Settings.Designer.cs
generated
14
ModAssistant/Properties/Settings.Designer.cs
generated
|
@ -12,7 +12,7 @@ namespace ModAssistant.Properties {
|
||||||
|
|
||||||
|
|
||||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.5.0.0")]
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.1.0.0")]
|
||||||
public sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
public sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||||
|
|
||||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||||
|
@ -142,5 +142,17 @@ namespace ModAssistant.Properties {
|
||||||
this["UpgradeRequired"] = value;
|
this["UpgradeRequired"] = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||||
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
[global::System.Configuration.DefaultSettingValueAttribute("")]
|
||||||
|
public string LastTab {
|
||||||
|
get {
|
||||||
|
return ((string)(this["LastTab"]));
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
this["LastTab"] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,5 +32,8 @@
|
||||||
<Setting Name="UpgradeRequired" Type="System.Boolean" Scope="User">
|
<Setting Name="UpgradeRequired" Type="System.Boolean" Scope="User">
|
||||||
<Value Profile="(Default)">True</Value>
|
<Value Profile="(Default)">True</Value>
|
||||||
</Setting>
|
</Setting>
|
||||||
|
<Setting Name="LastTab" Type="System.String" Scope="User">
|
||||||
|
<Value Profile="(Default)" />
|
||||||
|
</Setting>
|
||||||
</Settings>
|
</Settings>
|
||||||
</SettingsFile>
|
</SettingsFile>
|
Loading…
Reference in a new issue