Exemplo n.º 1
0
        public App()
        {
            new ForumEconomyParser().GetPostData("Galaxy");
#if RESEASE
            if (!IsUserAdministrator())
            {
                MyMessageBox.Show("Run as administrator.", "Нет прав", MessageBoxButton.OK, MessageBoxImage.Error);
                return;
            }
#endif
            if (!File.Exists(Path.GetDirectoryName(Process.GetCurrentProcess().MainModule.FileName) + "\\economy.db"))
            {
                DataBaseWorker.CreateDataBase();
            }
            ServerChanged += App_ServerChanged;
            Server         = EconomyViewer.Properties.Settings.Default.DefaultServer;
        }
Exemplo n.º 2
0
        /// Events
        #region Events

        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="args"></param>
        private void worker_DoWork(object sender, DoWorkEventArgs args)
        {
            DataBaseWorker.CreateDataBase(CData.DataBasePath);
            DataBaseWorker.ConvertExistingDataFrom(CData.DataFolder);
            DataValidation.CheckDirectoryPath(CData.TempDataFolder, true, System.IO.FileAttributes.Hidden);
        }