Exemplo n.º 1
0
 private VocabularyBookSettings()
 {
     InitializeComponent();
     specialCharDialog = new SpecialCharKeyboard();
     specialCharDialog.Initialize(this, BtnSpecialChar);
     specialCharDialog.RegisterTextBox(TbMotherTongue);
 }
Exemplo n.º 2
0
        public MergeFiles()
        {
            InitializeComponent();
            Icon = Icon.FromHandle(Icons.MergeFiles.GetHicon());
            specialCharDialog = new SpecialCharKeyboard();
            specialCharDialog.Initialize(this, BtnSpecialChar);
            specialCharDialog.RegisterTextBox(TbMotherTongue);

            books = new List <VocabularyBook>();
        }
Exemplo n.º 3
0
        public VocabularyWordDialog(VocabularyBook book)
        {
            InitializeComponent();

            specialCharDialog = new SpecialCharKeyboard();
            specialCharDialog.Initialize(this, BtnSpecialChar);

            this.book           = book;
            LbMotherTongue.Text = book.MotherTongue;
            LbForeignLang.Text  = book.ForeignLang;
            LbSynonym.Text      = $"{book.ForeignLang} ({Words.Synonym})";
        }
Exemplo n.º 4
0
        public PracticeDialog(VocabularyBook book, List <VocabularyWordPractice> practiceList)
        {
            InitializeComponent();

            Icon = Icon.FromHandle(Icons.LightningBolt.GetHicon());

            evaluator = new Evaluator
            {
                OptionalExpressions     = Settings.Default.EvaluateOptionalExpressions,
                TolerateArticle         = Settings.Default.EvaluateTolerateArticle,
                TolerateNoSynonym       = Settings.Default.EvaluateTolerateNoSynonym,
                ToleratePunctuationMark = Settings.Default.EvaluateToleratePunctuationMark,
                TolerateSpecialChar     = Settings.Default.EvaluateTolerateSpecialChar,
                TolerateWhiteSpace      = Settings.Default.EvaluateTolerateWhiteSpace
            };

            player = new SoundPlayer();

            this.book         = book;
            this.practiceList = practiceList;
            index             = 0;
            currentPractice   = practiceList[0];
            currentWord       = currentPractice.VocabularyWord;

            specialCharDialog = new SpecialCharKeyboard();
            specialCharDialog.Initialize(this, BtnSpecialChar);

            if (Settings.Default.UserEvaluates)
            {
                MinimumSize = new Size(MinimumSize.Width, LogicalToDeviceUnits(380)); // All other controls are adjusted by anchor
            }

            LbMotherTongue.Text = book.MotherTongue;
            LbForeignLang.Text  = book.ForeignLang;

            if (book.PracticeMode == PracticeMode.AskForForeignLang)
            {
                GroupPractice.Text = string.Format(Words.TranslateFromTo, book.MotherTongue, book.ForeignLang);
            }
            else
            {
                GroupPractice.Text = string.Format(Words.TranslateFromTo, book.ForeignLang, book.MotherTongue);
            }
        }