Exemplo n.º 1
0
        internal void OnEnd()
        {
            EndEventArgs e = new EndEventArgs
            {
                UserData = UserData,
            };

            End?.Invoke(this, e);
            UserData = e.UserData;
        }
Exemplo n.º 2
0
 private static void Runtime_End(object sender, EndEventArgs e)
 {
     AutoTesterWindow.UpdateDataGrid(new TestAusgabe(
                                         AutoTesterWindow.DataGridId++,
                                         $"{SilkStopwatch.ElapsedMilliseconds}ms",
                                         AutoTester.TestErgebnis.TestEnde,
                                         " ", // DigInput
                                         " ", // DigOutput Soll
                                         " ", // DigOutput Ist
                                         " "));
 }
Exemplo n.º 3
0
        internal void Start()
        {
            voteResult.Clear();

            TwitchIntegration.client.OnMessageReceived += Client_OnMessageReceived;

            timer.Elapsed += (_, __) =>
            {
                Debug.Log("timer has elapsed");

                TwitchIntegration.client.OnMessageReceived -= Client_OnMessageReceived;

                timer.Stop();

                var voteCounter = new Dictionary <string, int>();
                foreach (var item in voteResult)
                {
                    voteCounter.TryGetValue(item.Value, out var count);
                    voteCounter[item.Value] = count + 1;
                }

                Debug.Log("ready to send onend event");

                voteStrategy.voteResults = voteResult;
                voteStrategy.voteCounter = voteCounter;

                EndEventArgs args = new EndEventArgs
                {
                    VoteResult  = voteResult,
                    VoteCounter = voteCounter,
                    VotedIndex  = voteStrategy.Apply(options)
                };

                OnEnd(args);
            };

            timer.Start();
            hasStarted = true;
            OnStart();
        }
Exemplo n.º 4
0
 public void OnEnding(object source, EndEventArgs args)
 {
     Console.WriteLine(Winner(args.Hero, args.Hero.Name));
 }
Exemplo n.º 5
0
 private void Runtime_End(object sender, EndEventArgs e)
 {
 }
Exemplo n.º 6
0
 public void OnEnding(object source, EndEventArgs args)
 {
     this.textBox1.Text += (Winner(args.Hero, args.Hero.Name));
 }
Exemplo n.º 7
0
 private void Runtime_End(object?sender, EndEventArgs e)
 {
     Platform.End();
 }
Exemplo n.º 8
0
 protected virtual void OnEnd(EndEventArgs e)
 {
     EndEventHandler?.Invoke(this, e);
 }
Exemplo n.º 9
0
        public void PlayerEndGame(String res)
        {
            EndEventArgs args = new EndEventArgs(res);

            PlayerEndEvent(this, args);
        }
Exemplo n.º 10
0
 protected virtual void OnEndRecognition(EndEventArgs e)
 {
     EndRecognition?.Invoke(this, e);
 }