Exemplo n.º 1
0
        public Talk(string login, Contact contact, INetsoul netsoul)
        {
            this.disp    = App.Current.MainWindow.Dispatcher;
            this.SendCMD = new RelayCommand(this.Send);

            this.netsoul = netsoul;

            this.Messages    = new ObservableCollection <string>();
            this.contact     = contact;
            this.Login       = login;
            this.LoginSender = contact.Login;

            netsoul.OnMessage += netsoul_OnMessage;
        }
Exemplo n.º 2
0
        private async void OnLoaded()
        {
            bool designTime = System.ComponentModel.DesignerProperties.GetIsInDesignMode(new DependencyObject());

            if (designTime == false)
            {
                this.netsoul = new NetsoulDesktop();
                this.netsoul.OnContactUpdate += netsoul_OnContactUpdate;

                await this.Connect();

                await this.LoadFriendList();
            }
        }