/// <summary> /// Starts the server /// </summary> /// <param name="uiEventArgs"></param> public void StartServer(ProxyUiEventArgs uiEventArgs) { bufferSize = ValidateBufferSize(uiEventArgs.Buffer); port = ValidatePort(uiEventArgs.Port); server = new Server(port, bufferSize, uiEventArgs); server.MessagesCollection.CollectionChanged += OnAddedToList; server.Start(); }
private void StartProxy(object sender, RoutedEventArgs e) { var args = new ProxyUiEventArgs() { Buffer = BufferSizeTxtB.Text, Port = PortTxtB.Text, AdvertisementFilterEnabled = AdvertiseFilterCb.IsChecked != null && AdvertiseFilterCb.IsChecked.Value, PrivacyFilterEnabled = PrivacyFilterCb.IsChecked != null && PrivacyFilterCb.IsChecked.Value, CacheEnabled = CacheCb.IsChecked != null && CacheCb.IsChecked.Value }; _viewModel.StartServer(args); Switch(); }