예제 #1
0
        /// <summary>
        /// コンストラクタ
        /// </summary>
        /// <param name="args"></param>
        public Application(string[] args)
        {
            cargs = new CommandArgs(args);

            switcher       = new SwitcherMain();
            myphone        = new TelephoneMain("090-0000-0000", switcher);
            myphone.MyName = "Mine";

            tels = CreateTels();
        }
예제 #2
0
        /// <summary>
        /// 自分以外の電話の生成
        /// </summary>
        /// <returns></returns>
        private IList <TelephoneMain> CreateTels()
        {
            var _tels = new List <TelephoneMain>();

            var tel = new TelephoneMain("090-1111-1111", switcher)
            {
                MyName = "Mob1"
            };

            _tels.Add(tel);

            tel = new TelephoneMain("090-2222-2222", switcher)
            {
                MyName = "Mob2"
            };
            _tels.Add(tel);

            return(_tels);
        }
예제 #3
0
 /// <summary>
 /// 起動した電話の登録
 /// </summary>
 /// <param name="telephone"></param>
 public void LogIn(TelephoneMain telephone)
 {
     Console.WriteLine("Switcher.LoginReceived();");
     tels.Add(telephone.MyNumber, telephone);
 }