/// <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(); }
/// <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); }
/// <summary> /// 起動した電話の登録 /// </summary> /// <param name="telephone"></param> public void LogIn(TelephoneMain telephone) { Console.WriteLine("Switcher.LoginReceived();"); tels.Add(telephone.MyNumber, telephone); }