void OnLoaded(object sender, RoutedEventArgs e) { //OpenFileDialog dlg = new OpenFileDialog(); //dlg.Multiselect = true; //if (dlg.ShowDialog() == true) //{ // if (MessageBox.Show("Are you sure you want to upload the selected files?", "Confirm Upload", MessageBoxButton.OK) == MessageBoxResult.OK) // { string cmd = "test"; string msg = "test"; VESHTER.HttpHelper helper = new VESHTER.HttpHelper(new Uri("https://secure.veshter.com/static/bulkupload/test/dummyack.php"), "POST", new KeyValuePair<string, string>("authKey", "key"), new KeyValuePair<string, string>("cmd", cmd.ToString()), new KeyValuePair<string, string>("msg", msg)); helper.ResponseComplete += new VESHTER.HttpResponseCompleteEventHandler(this.CommandComplete); helper.Execute(); //foreach (System.IO.FileInfo info in dlg.Files) //{ // post.Post(); //} // } //} }
private void OnClick(object sender, RoutedEventArgs e) { OpenFileDialog dlg = new OpenFileDialog(); dlg.Multiselect = true; if (dlg.ShowDialog() == true) { if (MessageBox.Show("Are you sure you want to upload the selected files?", "Confirm Upload", MessageBoxButton.OK) == MessageBoxResult.OK) { //string cmd = "test"; //string msg = "test"; //string url = "https://secure.veshter.com/static/bulkupload/test/dummyack.php"; string url = "http://localhost:7777/BulkUploaderTestPage.html"; VESHTER.HttpHelper helper = new VESHTER.HttpHelper(url);//, "POST", //new KeyValuePair<string, string>("authKey", "key"), //new KeyValuePair<string, string>("cmd", cmd.ToString()), //new KeyValuePair<string, string>("msg", msg)); //helper.ResponseComplete += new VESHTER.HttpResponseCompleteEventHandler(this.CommandComplete); //helper.Execute(); //foreach (System.IO.FileInfo info in dlg.Files) //{ // post.Post(); //} } } }