public MyOpenBook(string n)
 {
     Name = n;
     Users++;
     myOpenBook = new SpaceBook(Name);
     Community  = SpaceBook.community;
 }
        public ChatWindowView(SpaceBook myCoolBook)
        {
            ViewModel   = new ChatWindowViewModel(myCoolBook);
            DataContext = ViewModel;

            InitializeComponent();
        }
Beispiel #3
0
        public ChatWindowViewModel(SpaceBook spaceBook)
        {
            this.SpaceBook = spaceBook;

            GiftTypes = new ObservableCollection <GiftType>(Enum.GetValues(typeof(GiftType)).Cast <GiftType>());
            PokeTypes = new ObservableCollection <PokeType>(Enum.GetValues(typeof(PokeType)).Cast <PokeType>());
        }
        public MyOpenBook(string userName)
        {
            _userName = userName;

            users++;

            _mySpaceBook = new SpaceBook(string.Format("{0}-{1}", _userName, users));
        }
 void Register()
 {
     Console.WriteLine("Let's register you for SpaceBook");
     do
     {
         Console.WriteLine("All SpaceBook names must be unique");
         Console.Write("Type in a user name: ");
         Name = Console.ReadLine();
     } while (SpaceBook.IsUnique(Name));
     Console.Write("Type in a password: "******"Thanks for registering with SpaceBook");
 }
 bool Authenticate()
 {
     Console.Write("Welcome " + name + ". Please type in your password: "******"Logged into SpaceBook");
         if (mySpaceBook == null)
             mySpaceBook = new SpaceBook(name);
         return true;
     }
     Console.WriteLine("Incorrect password");
     return false;
 }
Beispiel #7
0
            private void Authenticate()
            {
                Console.WriteLine("Welcome " + _name + ". Please type in your password: "******"Logged into SpaceBook");
                    if (_mySpaceBook == null)
                    {
                        _mySpaceBook = new SpaceBook(_name);
                    }
                    return;
                }

                Console.WriteLine("Incorrect password");
            }
            bool Authenticate()
            {
                Console.Write("Welcome " + Name + ". Please type in your password: "******"Logged into SpaceBook");
                    if (mySpaceBook == null)
                    {
                        mySpaceBook = new SpaceBook(Name);
                    }
                    return(true);
                }
                Console.WriteLine("Incorrect password");
                return(false);
            }
 public MyOpenBook(string n)
 {
     Name = n;
     Users++;
     myOpenBook = new SpaceBook(Name + "-" + Users);
 }
 public MyOpenBook(string n)
 {
     Name = n;
     Users++;
     myOpenBook = new SpaceBook(Name + "-" + Users);
 }
 public MyOpenBook(string n)
 {
     name = n;
     users++;
     spaceBook = new SpaceBook(name + "-" + users);
 }
Beispiel #12
0
 public void SendPoke()
 {
     SpaceBook.SendPoke(SelectedPokeType, SelectedPokeTo.Name);
 }
Beispiel #13
0
 public void SendGift()
 {
     SpaceBook.SendGift(SelectedGiftType, SelectedGiftTo.Name);
 }
Beispiel #14
0
 public MyOpenBook(string n)
 {
     name = n;
     users++;
     myOpenBook = new SpaceBook(name + "-" + users);
 }
 public MyOpenBook(string n)
 {
     Name = n;
     Users++;
     //Creating an object of the real subject class within another class is part of the Proxy pattern.
     myOpenBook = new SpaceBook(Name + "-" + Users);
 }
Beispiel #16
0
 public MyOpenBook(string name)
 {
     _name = name;
     _users++;
     _myOpenBook = new SpaceBook(name + "-" + _users);
 }