Exemplo n.º 1
0
        public FormConfig(ConfigHandler config)
        {
            InitializeComponent();
            configHandler = config;

            cbShowID.Checked = (configHandler.getFlags() % 2 == 1);
            cbx_trainer_timer.Checked = configHandler.getTrainerTimerEnabled();
            num_timer1.Value = (configHandler.getTrainerTimerInterval() < 2) ? 1 : (decimal)configHandler.getTrainerTimerInterval();
            num_timer2.Value = (configHandler.getTrainerTimerInterval2() < 2) ? 1 : (decimal)configHandler.getTrainerTimerInterval2();
            num_timer1.Enabled = num_timer2.Enabled = lbl_timer1.Enabled = lbl_timer2.Enabled = lbl_timer3.Enabled = lbl_timer4.Enabled = (cbx_trainer_timer.Checked);
        }
Exemplo n.º 2
0
 public FormSingular(char sessionType, ConfigHandler configHandler)
 {
     singularCreator = new SingularCreator(sessionType, configHandler);
     config = configHandler;
     paused = false;
     InitializeComponent();
     setupConfig();
     newSingular();
     setVisualsLabels();
     config.timeEnable += instantiateBarTimer;
     pbx_play_pause.Image = (paused) ? JapaneseTrainer.Properties.Resources.pause : JapaneseTrainer.Properties.Resources.play;
 }
Exemplo n.º 3
0
        public SentenceCreator(Label japaneseLabel, Label englishLabel, ConfigHandler configHandler, string audioURI)
        {
            JapaneseLabel = japaneseLabel;
            EnglishLabel = englishLabel;
            Config = configHandler;
            uri = audioURI;

            //SQLiteConnection.CreateFile("JapaneseDatabase.sqlite");
            dbConnection = new SQLiteConnection("Data Source=../../databases/dbKanji.sqlite;Version=" + sqliteVersion+";");
            dbConnection.Open();

            string sql = "SELECT COUNT(*) FROM SENTENCES";
            SQLiteCommand cmd = new SQLiteCommand(sql, dbConnection);
            SQLiteDataReader read = cmd.ExecuteReader();
            if(Int32.TryParse(read[0].ToString(), out totalEntries))
                Console.WriteLine("Total read = " + totalEntries);
        }
Exemplo n.º 4
0
        public Form1()
        {
            //Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("ja-JP");
            InitializeComponent();

            uri = System.Reflection.Assembly.GetExecutingAssembly().Location;
            string[] array = uri.Split('\\');
            uri = "";
            for (int x = 0; x < (array.Length - 1); x++)
            {
                uri += array[x] + "\\";
            }
            uri += "Audio\\";
            Console.WriteLine(uri);

            configHandler = new ConfigHandler(this.Size);
            this.Size = configHandler.getFormSize();

            sentenceCreator = new SentenceCreator(lblJapanese, lblMeaning, configHandler, uri);

            lblJapanese.Font = new Font(lblJapanese.Font.FontFamily, configHandler.getFontSize());
        }