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); }
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(); } } }
public SetCommand() { actual = ClockSingleton.getClock; }
public ClockObserver() { actual = ClockSingleton.getClock; }