-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathAstroPhysicsTools.cs
49 lines (38 loc) · 1.53 KB
/
AstroPhysicsTools.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#region "copyright"
/*
Copyright Dale Ghent <[email protected]>
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/
*/
#endregion "copyright"
using Settings = DaleGhent.NINA.AstroPhysicsTools.Properties.Settings;
using NINA.Core.Utility;
using NINA.Plugin;
using NINA.Plugin.Interfaces;
using NINA.Profile.Interfaces;
using System.ComponentModel.Composition;
using System.Threading.Tasks;
using System;
namespace DaleGhent.NINA.AstroPhysicsTools {
[Export(typeof(IPluginManifest))]
public class AstroPhysicsTools : PluginBase {
[ImportingConstructor]
public AstroPhysicsTools(IProfileService profileService) {
if (Settings.Default.UpgradeSettings) {
Settings.Default.Upgrade();
Settings.Default.UpgradeSettings = false;
CoreUtil.SaveSettings(Settings.Default);
}
if (AstroPhysicsToolsOptions == null) {
AstroPhysicsToolsOptions = new AstroPhysicsToolsOptions(profileService);
}
}
public override Task Teardown() {
AstroPhysicsToolsOptions.RemoveProfileHandler();
return base.Teardown();
}
public static Version MinAppmVersion = new Version(1, 9, 2, 3);
public static AstroPhysicsToolsOptions AstroPhysicsToolsOptions { get; private set; }
}
}