Пример #1
0
 private void sendButtonContextual_Click(object sender, RoutedEventArgs e)
 {
     for (int i = 0; i < clientsListView.SelectedItems.Count; i++)
     {
         SendingWindow sendingFileWindow = new SendingWindow(this.server, (MyEndpoint)clientsListView.SelectedItems[i], filePath);
     }
     this.Close();
 }
Пример #2
0
        private void sendButton_Click(object sender, RoutedEventArgs e)
        {
            FolderBrowser fb = new FolderBrowser();

            fb.Description  = "Please select a file or a folder below:";
            fb.IncludeFiles = true;
            fb.NewStyle     = false;
            //fb.InitialDirectory = @"C:\";
            if (fb.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                string filePath = fb.SelectedPath;
                for (int i = 0; i < clientsListView.SelectedItems.Count; i++)
                {
                    SendingWindow sendingFileWindow = new SendingWindow(this.server, (MyEndpoint)clientsListView.SelectedItems[i], filePath);
                }
                this.Close();
            }
        }