Start() public method

public Start ( ) : void
return void
Exemplo n.º 1
0
        public static void EventTest()
        {
            Metronome m = new Metronome();
            Listener  l = new Listener();

            l.Subscribe(m);
            m.Start();
        }
Exemplo n.º 2
0
    static void Main()
    {
        Metronome m = new Metronome();
        Listener  l = new Listener();

        l.Subscribe(m);
        m.Start();
    }
Exemplo n.º 3
0
    static void Main(string[] args)
    {
        Metronome m = new Metronome();
        Listener  l = new Listener();

        l.Subscribe(m);
        m.Start();
        //Console.ReadKey();
    }
        public static void EH_Main_2()
        {
            /*  https://www.codeproject.com/Articles/11541/The-Simplest-C-Events-Example-Imaginable */
            Metronome m = new Metronome();
            Listener  l = new Listener();

            l.Subscribe(m);
            m.Start();
        }
Exemplo n.º 5
0
                static void Main()
                {
                    //为了容易设置,以防在当前时间之前
                    Console.WriteLine("当前时间为:");
                    Console.WriteLine(DateTime.Now);
                    //注册事件
                    Metronome m = new Metronome();
                    m.Start();
                    Console.ReadLine();

                }
Exemplo n.º 6
0
        public void Start()
        {
            state = state.Transition(
                pomStateInactive => pomStateInactive.Start(),
                pomStateActive => pomStateActive,
                pomStateBreak => pomStateBreak
                );
            CurrentDuration = GetCurrentDuration();
            PomodoroCounter = 1;
            SecondsElapsed  = 0;
            Timer           = new Timer(TaskDuration.TotalMilliseconds);
            Timer.Elapsed  += TimerElapsed;

            Timer.Start();
            Metronome.Start();
            OnStateChanged();
        }
Exemplo n.º 7
0
 static void Main()
 {
     Metronome m = new Metronome();
     Clock c = new Clock();
     Listener l1 = new Listener();
     Listener l2 = new Listener();
     l1.Subscribe(m, "sup");
     l2.Subscribe(m, "homi");
     m.Start(); // unfortunately these are synchronous
     //c.Start();
 }