Example #1
0
        private void englischToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var dbAccess = new DbAccess();
            dbAccess.SqlCommand("UPDATE config SET value = 'en' WHERE name = 'Language'");
            dbAccess.CloseConnection();

            GlobalVariables.Language = "en";

            Application.Restart();
        }
Example #2
0
        static void Main()
        {
            GlobalVariables.SqlitedbPath = GetApplicationsPath() + "\\" + GlobalVariables.Sqlitedb;

            //Checkt ob SQLite.db vorhanden ist, wenn ja liest er die Sprache aus
            if (File.Exists(GlobalVariables.SqlitedbPath))
            {
                var dbAccess = new DbAccess();
                GlobalVariables.Language = dbAccess.GetLanguage();
                dbAccess.CloseConnection();
            }
            else
            {
                var dbAccess = new DbAccess();
                dbAccess.CreateTables();
                dbAccess.CloseConnection();
            }

            //öffnet den Startbildschirm
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1());
        }