コード例 #1
0
ファイル: Program.cs プロジェクト: KaloyanBobev/OOP
        static void Main(string[] args)
        {
            StartTimer t = new StartTimer();
            Run l = new Run();
            l.Subscribe(t);
            t.Start();

            Console.WriteLine("If the counting is below this message that means counting does not break the process...");
        }
コード例 #2
0
ファイル: TimerWithEvent.cs プロジェクト: KaloyanBobev/OOP
 private void Print(StartTimer st, Timer e)
 {
     Console.WriteLine("{0}",e.Time.Second);
 }
コード例 #3
0
ファイル: TimerWithEvent.cs プロジェクト: KaloyanBobev/OOP
 public void Subscribe(StartTimer st)
 {
     st.Tick += new StartTimer.TimerDelegate(Print);
 }