public ChampionPanel(TextBox champTextBox, ComboBox parentComboBox, Button parentStart, Button parentReset, ProgBarWithText parentProgBar)
 {
     this.champTextBoxCopy = champTextBox;
     champTextBox.KeyDown += OnKeyDownHandler;
     this.championName = champTextBox.Text;
     this.utilityBox = parentComboBox;
     this.utilityBox.SelectedIndex = 0;
     this.start = parentStart;
     this.reset = parentReset;
     this.timer = new TimerWithSpeech(this, parentProgBar);
     start.Click += StartClick;
     reset.Click += ResetClick;
     this.reset.IsEnabled = false;
     parentComboBox.SelectionChanged += ComboBox_SelectionChanged;
 }
Example #2
0
        public TimerWithSpeech(ChampionPanel parent, ProgBarWithText progBar)
        {
            this.championPanelCopy = parent;
            //initialize time = goal time and decrement.
            this.time = goalTime;

            this.Interval = new TimeSpan(0, 0, 1); //every 1 second, a Tick Happens.
            this.Tick    += tickAction;            //action to take for every Tick


            this.parentProgBar = progBar;
            parentProgBar.SetProgMax(goalTime);


            //initialize Synth
            this.synth = new SpeechSynthesizer();
            InitializeSynthesizer();
        }
        public TimerWithSpeech(ChampionPanel parent, ProgBarWithText progBar)
        {
            this.championPanelCopy = parent;
            //initialize time = goal time and decrement.
            this.time = goalTime;

            this.Interval = new TimeSpan(0, 0, 1); //every 1 second, a Tick Happens.
            this.Tick += tickAction;//action to take for every Tick


            this.parentProgBar = progBar;
            parentProgBar.SetProgMax(goalTime);


            //initialize Synth
            this.synth = new SpeechSynthesizer();
            InitializeSynthesizer();
        }
Example #4
0
 public ChampionPanel(TextBox champTextBox, ComboBox parentComboBox, Button parentStart, Button parentReset, ProgBarWithText parentProgBar)
 {
     this.champTextBoxCopy         = champTextBox;
     champTextBox.KeyDown         += OnKeyDownHandler;
     this.championName             = champTextBox.Text;
     this.utilityBox               = parentComboBox;
     this.utilityBox.SelectedIndex = 0;
     this.start                       = parentStart;
     this.reset                       = parentReset;
     this.timer                       = new TimerWithSpeech(this, parentProgBar);
     start.Click                     += StartClick;
     reset.Click                     += ResetClick;
     this.reset.IsEnabled             = false;
     parentComboBox.SelectionChanged += ComboBox_SelectionChanged;
 }