Пример #1
0
        internal void OnEnd()
        {
            EndEventArgs e = new EndEventArgs
            {
                UserData = UserData,
            };

            End?.Invoke(this, e);
            UserData = e.UserData;
        }
Пример #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
                                         " "));
 }
Пример #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();
        }
Пример #4
0
 public void OnEnding(object source, EndEventArgs args)
 {
     Console.WriteLine(Winner(args.Hero, args.Hero.Name));
 }
Пример #5
0
 private void Runtime_End(object sender, EndEventArgs e)
 {
 }
Пример #6
0
 public void OnEnding(object source, EndEventArgs args)
 {
     this.textBox1.Text += (Winner(args.Hero, args.Hero.Name));
 }
Пример #7
0
 private void Runtime_End(object?sender, EndEventArgs e)
 {
     Platform.End();
 }
Пример #8
0
 protected virtual void OnEnd(EndEventArgs e)
 {
     EndEventHandler?.Invoke(this, e);
 }
Пример #9
0
        public void PlayerEndGame(String res)
        {
            EndEventArgs args = new EndEventArgs(res);

            PlayerEndEvent(this, args);
        }
Пример #10
0
 protected virtual void OnEndRecognition(EndEventArgs e)
 {
     EndRecognition?.Invoke(this, e);
 }