76 lines
2.2 KiB
C#
76 lines
2.2 KiB
C#
// Decompiled with JetBrains decompiler
|
|
// Type: HPG_68D.My.MySettings
|
|
// Assembly: HPG-68D, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
|
// MVID: 530C99A8-8EEF-42C8-8A74-66FDE7B322C3
|
|
// Assembly location: C:\Program Files (x86)\HONGKAIDE\HPG-68D\HPG-68D.exe
|
|
|
|
using Microsoft.VisualBasic.ApplicationServices;
|
|
using Microsoft.VisualBasic.CompilerServices;
|
|
using System;
|
|
using System.CodeDom.Compiler;
|
|
using System.ComponentModel;
|
|
using System.Configuration;
|
|
using System.Diagnostics;
|
|
using System.Runtime.CompilerServices;
|
|
using System.Threading;
|
|
|
|
|
|
namespace HPG_68D.My
|
|
{
|
|
[EditorBrowsable(EditorBrowsableState.Advanced)]
|
|
[CompilerGenerated]
|
|
[GeneratedCode("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "8.0.0.0")]
|
|
internal sealed class MySettings : ApplicationSettingsBase
|
|
{
|
|
private static MySettings defaultInstance = (MySettings) Synchronized((SettingsBase) new MySettings());
|
|
private static bool addedHandler;
|
|
private static object addedHandlerLockObject = RuntimeHelpers.GetObjectValue(new object());
|
|
|
|
[DebuggerNonUserCode]
|
|
public MySettings()
|
|
{
|
|
}
|
|
|
|
[EditorBrowsable(EditorBrowsableState.Advanced)]
|
|
[DebuggerNonUserCode]
|
|
private static void AutoSaveSettings(object sender, EventArgs e)
|
|
{
|
|
if (!MyProject.Application.SaveMySettingsOnExit)
|
|
return;
|
|
MySettingsProperty.Settings.Save();
|
|
}
|
|
|
|
public static MySettings Default
|
|
{
|
|
get
|
|
{
|
|
if (!addedHandler)
|
|
{
|
|
object handlerLockObject = addedHandlerLockObject;
|
|
ObjectFlowControl.CheckForSyncLockOnValueType(handlerLockObject);
|
|
Monitor.Enter(handlerLockObject);
|
|
try
|
|
{
|
|
if (!addedHandler)
|
|
{
|
|
MyProject.Application.Shutdown += (ShutdownEventHandler) ((sender, e) =>
|
|
{
|
|
if (!MyProject.Application.SaveMySettingsOnExit)
|
|
return;
|
|
MySettingsProperty.Settings.Save();
|
|
});
|
|
addedHandler = true;
|
|
}
|
|
}
|
|
finally
|
|
{
|
|
Monitor.Exit(handlerLockObject);
|
|
}
|
|
}
|
|
MySettings defaultInstance = MySettings.defaultInstance;
|
|
return defaultInstance;
|
|
}
|
|
}
|
|
}
|
|
}
|