예제 #1
0
        static void RunMain(string[] args)
        {
            Parser clp = new Parser();

            _parsed = clp.ParseArguments <CLSettings>(args);


            AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            XDocument xdoc = null;

            try
            {
                xdoc = XDocument.Load("https://cron.org/client/update.xml");
            }
            catch
            {
            }

            if (xdoc != null)
            {
                Version version = Assembly.GetExecutingAssembly().GetName().Version;
                Version minimum = Version.Parse(xdoc.Element("update").Attribute("minimum").Value);
                if (version < minimum)
                {
                    using (UpdateDialog dialog = new UpdateDialog(xdoc))
                    {
                        dialog.ShowDialog();
                    }
                    return;
                }
            }
            if (!InstallCertificate())
            {
                return;
            }
            using (LevelDBStore store = new LevelDBStore(Settings.Default.Paths.Chain))
                using (CronSystem = new CronSystem(store, null))
                {
                    Application.Run(MainForm = new MainForm(xdoc));
                }
        }
예제 #2
0
 public Coins(Wallet wallet, CronSystem system)
 {
     this.current_wallet = wallet;
     this.system         = system;
 }