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; }
public MainForm() { InitializeComponent(); Controller = new FlashCardController(); Controller.LessonLoaded += new EventHandler(Controller_LessonLoaded); Controller.LayoutChanged += new EventHandler(Controller_LayoutChanged); CaptionBuffer = Text; }
private void MainForm_FormClosing(object sender, FormClosingEventArgs e) { if (Controller.Busy) { e.Cancel = true; return; } if (Controller != null) { Controller.Dispose(); Controller = null; } }
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; }
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; }