private async void LoadStudy_Click(object sender, RoutedEventArgs e) { this.LoadSettings.Hide(); var loader = new DicomNetworking(); loader.ReadyToLoad += (s, num) => { this.LoadBarPanel.Show(); this.LoadingBar.Maximum = num; }; loader.LoadedImage += (s, a) => { this.LoadingBar.Value++; }; var client = new StreamSocket(); await client.ConnectAsync(new HostName(this.ServerAddress), "8080"); this.ImageCollection = await loader.LoadStudyAsync(client.InputStream); await this.OnStudyLoaded(); }
private async Task InitializeServer() { this.server = new StreamSocketListener(); this.server.ConnectionReceived += this.Server_ConnectionReceived; this.dicomSender = new DicomNetworking(); this.dicomSender.SentImage += this.Sender_SentImage; await this.server.BindServiceNameAsync("8080"); }