public RemoveClientFromUserListTask(Dispatcher disp, TaskHandler handler, ClientConnectionList list, ClientConnection client, ObservableCollection<UserLocation> locs) : base(disp, handler) { ClientConnectionList = list; ClientConnection = client; UserLocations = locs; }
public RespondToInitRequestMessage(Dispatcher disp, TaskHandler handler, ClientConnectionList list, ClientConnection client, InitRequestMessage msg) : base(disp, handler) { ClientConnectionList = list; ClientConnection = client; InitRequestMessage = msg; }
public RespondToGeoPointMessageTask(Dispatcher disp, TaskHandler handler, ClientConnectionList list, ClientConnection client, ObservableCollection<UserLocation> locs, GeoPointMessage msg) : base(disp, handler) { ClientConnectionList = list; ClientConnection = client; GeoPointMessage = msg; UserLocations = locs; }
public AddClientToUserListTask(Dispatcher disp, TaskHandler handler, ClientConnectionList list, ClientConnection client) : base(disp, handler) { ClientConnectionList = list; ClientConnection = client; }
public UpdaterTask(Dispatcher disp, TaskHandler handler, ClientConnectionList list, ObservableCollection<UserLocation> userLocations) : base(disp, handler) { ClientConnectionList = list; UserLocations = userLocations; }
private void Application_Startup(object sender, StartupEventArgs e) { // create model UserLocations = new ObservableCollection<UserLocation>(); UserList = new ClientConnectionList(); Actions = new ObservableCollection<ActionMessage>(); Listener = new ClientConnectionListener(50000, new XmlMessageParser()); // add parser Listener.InitialConnectionSuccess += OnInitialConnectionSuccess; Listener.InitialConnectionFailed += OnInitialConnectionFailed; Listener.ConnectionFailed += OnConnectionFailed; Listener.MessageReceived += OnMessageReceived; Listener.MessageFailed += OnMessageFailed; // create view model MainWindowViewModel = new MainWindowViewModel(); MainWindowViewModel.UserList = UserList; MainWindowViewModel.Actions = Actions; MainWindowViewModel.UserLocations = UserLocations; // create view MainWindow = new MainWindow(); MainWindow.DataContext = MainWindowViewModel; MainWindow.Show(); // start listening Listener.StartAccepting(); UpdaterTask task = new UpdaterTask( Dispatcher, TaskHandler.Background, UserList, UserLocations); task.ProgressChanged += TaskProgressReport; task.BeginExecute(); }