mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Code restyling.
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright © 2011-2018 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using System.Threading.Tasks;
|
||||
@@ -41,12 +42,12 @@ using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace Aaru.XamMac
|
||||
{
|
||||
class Program
|
||||
internal class Program
|
||||
{
|
||||
internal static bool Verbose;
|
||||
internal static bool Debug;
|
||||
internal static string AssemblyCopyright;
|
||||
internal static string AssemblyTitle;
|
||||
internal static bool Verbose;
|
||||
internal static bool Debug;
|
||||
internal static string AssemblyCopyright;
|
||||
internal static string AssemblyTitle;
|
||||
internal static AssemblyInformationalVersionAttribute AssemblyVersion;
|
||||
|
||||
[STAThread]
|
||||
@@ -54,38 +55,47 @@ namespace Aaru.XamMac
|
||||
{
|
||||
object[] attributes = typeof(Program).Assembly.GetCustomAttributes(typeof(AssemblyTitleAttribute), false);
|
||||
AssemblyTitle = ((AssemblyTitleAttribute)attributes[0]).Title;
|
||||
attributes = typeof(Program).Assembly.GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false);
|
||||
attributes = typeof(Program).Assembly.GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false);
|
||||
|
||||
AssemblyVersion =
|
||||
Attribute.GetCustomAttribute(typeof(Program).Assembly, typeof(AssemblyInformationalVersionAttribute)) as
|
||||
AssemblyInformationalVersionAttribute;
|
||||
|
||||
AssemblyCopyright = ((AssemblyCopyrightAttribute)attributes[0]).Copyright;
|
||||
|
||||
Settings.Settings.LoadSettings();
|
||||
|
||||
DicContext ctx = DicContext.Create(Settings.Settings.LocalDbPath);
|
||||
var ctx = AaruContext.Create(Settings.Settings.LocalDbPath);
|
||||
ctx.Database.Migrate();
|
||||
ctx.SaveChanges();
|
||||
|
||||
// TODO: Update database on GUI
|
||||
|
||||
DicContext mctx = DicContext.Create(Settings.Settings.MasterDbPath);
|
||||
var mctx = AaruContext.Create(Settings.Settings.MasterDbPath);
|
||||
mctx.Database.Migrate();
|
||||
mctx.SaveChanges();
|
||||
|
||||
Statistics.LoadStats();
|
||||
if (Settings.Settings.Current.Stats != null && Settings.Settings.Current.Stats.ShareStats)
|
||||
Task.Run(() => { Statistics.SubmitStats(); });
|
||||
|
||||
foreach (string arg in args)
|
||||
switch (arg.ToLowerInvariant())
|
||||
if(Settings.Settings.Current.Stats != null &&
|
||||
Settings.Settings.Current.Stats.ShareStats)
|
||||
Task.Run(() =>
|
||||
{
|
||||
Statistics.SubmitStats();
|
||||
});
|
||||
|
||||
foreach(string arg in args)
|
||||
switch(arg.ToLowerInvariant())
|
||||
{
|
||||
case "-v":
|
||||
case "--verbose":
|
||||
Verbose = true;
|
||||
|
||||
break;
|
||||
case "-d":
|
||||
case "--debug":
|
||||
Debug = true;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user