Exemple #1
0
        private void TVcommand(object obj)
        {
            IProducts t = new TV();
            string    flag;

            if (obj is string)
            {
                flag = obj as string;
            }
            else
            {
                flag = string.Empty;
            }

            CommandList.Add(flag);

            switch (flag)
            {
            case "on":
                t.on();
                Recent = "TV on";
                break;

            case "off":
                t.off();
                Recent = "TV off";
                break;
            }
        }
Exemple #2
0
 public void watchMovie()
 {
     l.on();
     t.on();
 }