예제 #1
0
파일: Talk.cs 프로젝트: Laxyus/Netsoul
        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;
        }
예제 #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();
            }
        }