Exemplo n.º 1
0
        public ActionResult getangle()
        {
            clock newclock = new clock();

            newclock.setMinute(Request.Form["minute"]);
            newclock.setMinute(Request.Form["hour"]);
            newclock.angle();
            return(View("Index", newclock));
        }
        static void Main(string[] args)
        {
            clock myClock = new clock();

            myClock.onTik += new TikHandler(showTik);
            myClock.onTok += new TokHandler(showTok);
            myClock.tik();
            myClock.tok();
        }
Exemplo n.º 3
0
        static void Main(string[] args)
        {
            clock     clock = new clock();
            showEvent sub   = new showEvent();


            sub.HandleTick(clock);
            while (clock.now < clock.obj)
            {
                System.Threading.Thread.Sleep(1000);
                clock.showSecondChange();
            }
            sub.HandleAlarm(clock);
            clock.wyCloudTime();
        }
Exemplo n.º 4
0
    // hourAngle = 0
    // minuteAngle = 0

    static void Main()
    {
        Console.WriteLine("To find the angle of the clock, enter a number between 1 and 12");
        double hourInput   = Convert.ToDouble(Console.ReadLine());
        double minuteInput = Convert.ToDouble(Console.ReadLine());

        clock  co = new clock();
        double angle;

        angle = co.GetAngle(hourInput, minuteInput);

        Console.WriteLine("the angle is :" + angle);
        //GetAngle(hourInput,minuteInput);
        //  Console.WriteLine(GetAngle(""));
        //Console.ReadLine();
    }
Exemplo n.º 5
0
    // hourAngle = 0
    // minuteAngle = 0

    static void Main()
    {
        Console.WriteLine("To find the angle of the clock, enter a number between 1 and 12 for hours hand");
        double hourInput = Convert.ToDouble(Console.ReadLine());

        Console.WriteLine("Enter a number between 1-59 for the minutes hand");
        double minuteInput = Convert.ToDouble(Console.ReadLine());

        clock  co = new clock();
        double angle;

        angle = co.GetAngle(hourInput, minuteInput);

        Console.WriteLine("The angle is " + angle + " degrees!");
        //GetAngle(hourInput,minuteInput);
        //  Console.WriteLine(GetAngle(""));
        //Console.ReadLine();
    }
Exemplo n.º 6
0
 private void OnEnable()
 {
     pd  = GetComponent <Hv_AccoPlayer_AudioLib>();
     clk = GetComponent <clock>();
 }
Exemplo n.º 7
0
 public void HandleAlarm(clock clock)
 {
     clock.Alarm += new clock.ClockEventHandle(timeOut);
 }
Exemplo n.º 8
0
 public void HandleTick(clock clock)
 {
     clock.Tick += new clock.ClockEventHandle(oneTick);
 }