69 lines
2.2 KiB
C#
69 lines
2.2 KiB
C#
// Decompiled with JetBrains decompiler
|
|
// Type: CarotDAV.My.MySettings
|
|
// Assembly: CarotDAV, Version=1.13.2.18337, Culture=neutral, PublicKeyToken=null
|
|
// MVID: C31F2651-A4A8-4D09-916A-8C6106F5E7C8
|
|
// Assembly location: F:\Eigene Dateien\Dropbox\portable Collection\Progs\CarotDAV\CarotDAV.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 CarotDAV.My
|
|
{
|
|
[CompilerGenerated]
|
|
[EditorBrowsable(EditorBrowsableState.Advanced)]
|
|
[GeneratedCode("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
|
|
internal sealed class MySettings : ApplicationSettingsBase
|
|
{
|
|
private static MySettings defaultInstance = (MySettings) SettingsBase.Synchronized((SettingsBase) new MySettings());
|
|
private static object addedHandlerLockObject = RuntimeHelpers.GetObjectValue(new object());
|
|
private static bool addedHandler;
|
|
|
|
[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 (!MySettings.addedHandler)
|
|
{
|
|
object handlerLockObject = MySettings.addedHandlerLockObject;
|
|
ObjectFlowControl.CheckForSyncLockOnValueType(handlerLockObject);
|
|
Monitor.Enter(handlerLockObject);
|
|
try
|
|
{
|
|
if (!MySettings.addedHandler)
|
|
{
|
|
MyProject.Application.Shutdown += (ShutdownEventHandler) ((sender, e) =>
|
|
{
|
|
if (!MyProject.Application.SaveMySettingsOnExit)
|
|
return;
|
|
MySettingsProperty.Settings.Save();
|
|
});
|
|
MySettings.addedHandler = true;
|
|
}
|
|
}
|
|
finally
|
|
{
|
|
Monitor.Exit(handlerLockObject);
|
|
}
|
|
}
|
|
return MySettings.defaultInstance;
|
|
}
|
|
}
|
|
}
|
|
}
|