public ClientViewModel() { var channelFactory = new DuplexChannelFactory<IChattingService>(new ClientService(), "ChattingServiceEndPoint"); _server = channelFactory.CreateChannel(); This = this; CreateCommands(); }
public RegisterViewModel() { var channelFactory = new DuplexChannelFactory<IChattingService>(new ClientService(), "ChattingServiceEndPoint"); _server = channelFactory.CreateChannel(); Register = new RelayCommand(OnRegister, () => !(string.IsNullOrEmpty(UserName) || string.IsNullOrEmpty(Password))); ClearCommand = new RelayCommand(OnClear); }
public MainWindow() { InitializeComponent(); _channelFactory = new DuplexChannelFactory <IChattingService>(new ClientCallback(), "ChattingServiceEndpoint"); Server = _channelFactory.CreateChannel(); }
public GroupChatController(IChattingService chattingService, IRelatedDataService dataService, IGroupService groupService) { _chattingService = chattingService; _dataService = dataService; _groupService = groupService; }
public MainWindow() { InitializeComponent(); _channelFactory = new DuplexChannelFactory <IChattingService>(new ClientCallback(), "ChattingServicesEndPoint"); Server = _channelFactory.CreateChannel(); //I have slpit the classes into sections so it is easier to read and understand. }
public MainWindow() { InitializeComponent(); var clientCallback = new ClientCallback(); clientCallback.ClientLoginLogoff += ClientCallback_ClientLoginLogoff; _channelFactory = new DuplexChannelFactory <IChattingService>(clientCallback, "ChattingServiceEndPoint"); _server = _channelFactory.CreateChannel(); }
//public Window1() //{ // InitializeComponent(); // _channelFactory = new DuplexChannelFactory<IChattingService>(new ClientCallback(), "ChattingServiceEndPoint"); // Server = _channelFactory.CreateChannel(); //} public Window1(List <string> usersChatting) { InitializeComponent(); _channelFactory = new DuplexChannelFactory <IChattingService>(new ClientCallback(), "ChattingServiceEndPoint"); Server = _channelFactory.CreateChannel(); this.usersChatting = usersChatting; //Server.GetCurrentUsers(); WelcomeLabel.Content = "Private chat with " + usersChatting[1] + " !"; }
public MainWindow() { InitializeComponent(); try { _channelFactory = new DuplexChannelFactory <IChattingService>(new ClientCallback(), "ChattingServiceEndPoint"); Server = _channelFactory.CreateChannel(); } catch (Exception e) { MessageBox.Show(e.Message); } }
// this is run when the messenger window is opened public MainWindow() { InitializeComponent(); // channel is setup to allow communication to the server _channelFactory = new DuplexChannelFactory <IChattingService>(new ClientCallback(), "ChattingServiceEndPoint"); Server = _channelFactory.CreateChannel(); // When the window is initialised all of the textbox/buttons that cannot be used yet are unenabled TextDisplayTextBox.IsEnabled = false; MessageTextBox.IsEnabled = false; SendButton.IsEnabled = false; checkBox.IsEnabled = false; UsersListBox.IsEnabled = false; }
public MainWindow() { InitializeComponent(); _channelfactory = new DuplexChannelFactory <IChattingService>(new ClientCallback(), "ChattingServiceEndPoint"); Server = _channelfactory.CreateChannel(); btn_Send.Click += btn_Send_Click; btn_Login.Click += btn_Login_Click; btn_Logout.Click += btn_Logout_Click; btn_Update.Click += btn_Update_Click; this.Closed += MainWindow_Closed; this.DataContext = this; }
public ChatWPFClient() { InitializeComponent(); _channelFactory = new DuplexChannelFactory <IChattingService>(new ClientCallback(), "ChattingServiceEndPoint"); Server = _channelFactory.CreateChannel(); int returnValue = Server.Login(loggedInUser.username); if (returnValue == 1) { MessageBox.Show("You are already logged in, check to see who is logged into system"); } else if (returnValue == 0) { MessageBox.Show("You are now logged in! Welcome!"); welcomeLabel.Text = "Welcome, " + loggedInUser.username; } }
public ChatWPFClient() { InitializeComponent(); _channelFactory = new DuplexChannelFactory<IChattingService>(new ClientCallback(), "ChattingServiceEndPoint"); Server = _channelFactory.CreateChannel(); int returnValue = Server.Login(loggedInUser.username); if (returnValue == 1) { MessageBox.Show("You are already logged in, check to see who is logged into system"); } else if (returnValue == 0) { MessageBox.Show("You are now logged in! Welcome!"); welcomeLabel.Text = "Welcome, " + loggedInUser.username; } }