Esempio n. 1
0
        private int timeZone(Command cmd)
        {
            //CommandQueue.getQueue.Add(cmd);
            ClockSingleton actual   = ClockSingleton.getClock;
            int            timeZone = 0;

            foreach (var item in cmd.parameter)
            {
                if (item.Key == "-z")
                {
                    timeZone = Convert.ToInt32(item.Value);
                }
            }
            return(timeZone);
        }
Esempio n. 2
0
        public void doCommand(Command cmd)
        {
            //CommandQueue.getQueue.Add(cmd);
            ClockSingleton actual = ClockSingleton.getClock;

            foreach (var item in cmd.parameter)
            {
                if (item.Key == "-t" && item.Value == "1")
                {
                    ClockOne obj = new ClockOne(timeZone(cmd), posX(cmd), posY(cmd));
                    actual.loginObserver(obj.observerInstance());
                    //  obj.DesktopLocation = new Point(posX(cmd), posY(cmd));
                    obj.Show();
                }

                if (item.Key == "-t" && item.Value == "2")
                {
                    ClockTwo obj = new ClockTwo(timeZone(cmd), posX(cmd), posY(cmd));
                    actual.loginObserver(obj.observerInstance());
                    obj.Show();
                }
            }
        }
Esempio n. 3
0
 public SetCommand()
 {
     actual = ClockSingleton.getClock;
 }
Esempio n. 4
0
 public ClockObserver()
 {
     actual = ClockSingleton.getClock;
 }