public ConferenceWindow(string username, string conferenceName, string password, RemoteSpace conferenceRequests, RemoteSpace LoginSpace) //For host { DataContext = this; this.Password = password; this.username = username; this.ConferenceName = conferenceName; this.LoginSpace = LoginSpace; dlg.FileName = "Presentation"; // Default file name dlg.DefaultExt = ".pdf"; // Default file extension dlg.Filter = "PDF documents (.pdf)|*.pdf"; // Filter files by extension InitializeComponent(); SpaceRepository spaceRepository = new SpaceRepository(); this.TxtToSend = new TextRange(SendField.Document.ContentStart, SendField.Document.ContentEnd); this.MsgList = new ObservableCollection <string>(); this.conference = new ConferenceInitializer(username, conferenceName, MsgList, spaceRepository, this); this.ConferenceRequests = conferenceRequests; this.Loaded += MainWindow_Loaded; Closed += OnClose_Host; SendField.KeyUp += SendField_KeyUp; this.SizeChanged += Resize; SendButton.Click += SendButton_Click; GoBackwards.Click += GoBackwards_Click; GoForward.Click += GoForwad_Click; OpenPresentaion.MouseDown += OpenPresentaion_Click; }
public ConferenceWindow(string username, string conferenceName, string ip, string Password, RemoteSpace LoginSpace) //For client { DataContext = this; this.Password = Password; this.username = username; this.ConferenceName = conferenceName; this.LoginSpace = LoginSpace; InitializeComponent(); OpenPresentaion.Visibility = Visibility.Hidden; this.SizeChanged += Resize; SendButton.Click += SendButton_Click; this.TxtToSend = new TextRange(SendField.Document.ContentStart, SendField.Document.ContentEnd); SendField.KeyUp += SendField_KeyUp; this.MsgList = new ObservableCollection <string>(); this.Loaded += MainWindow_Loaded; this.conference = new ConferenceInitializer(username, conferenceName, ip, MsgList, this); MsgList.CollectionChanged += NewMessageReceived; Closed += OnClose_Client; }