示例#1
0
        public Layout_02(FlashCardController controller)
        {
            InitializeComponent();
            MainPicture.SizeMode = PictureBoxSizeMode.Zoom;
            Controller           = controller;
            SetStyle(ControlStyles.SupportsTransparentBackColor, true);
            Controller.LessonLoaded += new EventHandler(Controller_LessonLoaded);
            Controller.MenuLoad     += new EventHandler(Controller_MenuLoad);
            BtMenu.Text              = "Menu";
            lbCardCounter.Text       = string.Empty;

            BackColor = Color.Transparent;
            Options   = new OptionButton[] { optionButton1, optionButton2, optionButton3, optionButton4 };
            InitializeControls();

            WrongAnswerSound   = TryLoadSound("WrongAnswer.mp3");
            CorrectAnswerSound = TryLoadSound("CorrectAnswer.mp3");

            tbResults.ColumnHeadersVisible = false;
            tbResults.Rows.Clear();

            Synth        = new SpeechSynthesizer();
            Synth.Volume = 100;
            Synth.Rate   = -5;
        }
示例#2
0
 public MainForm()
 {
     InitializeComponent();
     Controller = new FlashCardController();
     Controller.LessonLoaded  += new EventHandler(Controller_LessonLoaded);
     Controller.LayoutChanged += new EventHandler(Controller_LayoutChanged);
     CaptionBuffer             = Text;
 }
示例#3
0
 private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (Controller.Busy)
     {
         e.Cancel = true; return;
     }
     if (Controller != null)
     {
         Controller.Dispose(); Controller = null;
     }
 }
示例#4
0
        public Settings(FlashCardController sender)
        {
            this.SetAppIcon();
            InitializeComponent();
            Controller = sender;

            //Read Settings
            chkHintSpelling.Checked          = Controller.SpellingModePlayHint;
            NumericHintInterval.Enabled      = NumericInitialHintInterval.Enabled = chkHintSpelling.Checked;
            NumericInitialHintInterval.Value = Controller.SpellingModeHintIntervalInitial / 1000;
            NumericHintInterval.Value        = Controller.SpellingModeHintInterval / 1000;
            TrackSpeechSpeed.Value           = Controller.Speech.Rate;

            CbVoices.Items.Clear();
            CbVoices.Items.AddRange(Controller.Speech.GetInstalledVoices().Select(x => x.VoiceInfo.Name).ToArray());
            CbVoices.SelectedIndex = CbVoices.Items.IndexOf(Controller.Speech.Voice.Name);

            SpeechSample = new SpeechSynthesizer();
            SpeechSample.SelectVoice(Controller.Speech.Voice.Name);
            SpeechSample.Rate = Controller.Speech.Rate;
        }
示例#5
0
        public Layout_01(FlashCardController controller)
        {
            CodeProfiler.Start("Begin Create Layout");
            InitializeComponent();

            Controller = controller;
            SetStyle(ControlStyles.SupportsTransparentBackColor, true);
            Controller.LessonLoaded += new EventHandler(Controller_LessonLoaded);
            Controller.MenuLoad     += new EventHandler(Controller_MenuLoad);

            BackColor = Color.Transparent;
            Stars.DimmedImageIndex = 2;
            InitializeControls();

            BtMenu.Text        = "Menu";
            lbCardCounter.Text = string.Empty;
            CodeProfiler.Stop("Begin Create Layout");

            Synth        = new SpeechSynthesizer();
            Synth.Volume = 100;
            Synth.Rate   = -5;
        }