コード例 #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
ファイル: RunProgram.cs プロジェクト: battyone/Silk
 private void Runtime_End(object sender, EndEventArgs e)
 {
 }
コード例 #6
0
ファイル: Form1.cs プロジェクト: SofieVV/Deathmatch
 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);
 }