mini update

This commit is contained in:
Waldi
2016-11-30 13:58:43 +01:00
parent 31cb1e38c0
commit dec6411b59

View File

@@ -631,7 +631,7 @@ namespace BeWo.View
view = (CollectionView)CollectionViewSource.GetDefaultView(Clientlist.ItemsSource);
view.SortDescriptions.Add(new SortDescription("Receivems", ListSortDirection.Descending));
view.SortDescriptions.Add(new SortDescription("StatusType", ListSortDirection.Descending));
// view.SortDescriptions.Add(new SortDescription("StatusType", ListSortDirection.Descending));
view.Filter = UserFilter;
if (sortLabelSwitch == true)
@@ -865,22 +865,33 @@ namespace BeWo.View
string imgFileString = files;
byte[] data;
using (WebClient client = new WebClient())
try
{
data = client.DownloadData(imgFileString);
byte[] data;
using (WebClient client = new WebClient())
{
data = client.DownloadData(imgFileString);
}
string filename = Path.GetFileName(imgFileString);
string isloaded = LoadDokumentFromInet(data, filename);
if (!isloaded.IsNullOrEmpty() && isAnImage(isloaded))
{
ZeigeProgressWärendUpload(1, isloaded);
}
else
{
ZeigeProgressWärendUpload(2, isloaded);
}
System.Windows.Forms.Clipboard.Clear();
}
string filename = Path.GetFileName(imgFileString);
string isloaded = LoadDokumentFromInet(data, filename);
if(!isloaded.IsNullOrEmpty()){
ZeigeProgressWärendUpload(1, isloaded);
catch (Exception s)
{
MessageBox.Show("Der Chat kann den Zwischen-Speicher nicht verarbeiten.", "Fehler", MessageBoxButton.OK);
}
System.Windows.Forms.Clipboard.Clear();
}
else
{
@@ -896,10 +907,14 @@ namespace BeWo.View
string isloaded = LoadDokumentFromInet(data, bildname);
if (!isloaded.IsNullOrEmpty())
if (!isloaded.IsNullOrEmpty() && isAnImage(isloaded))
{
ZeigeProgressWärendUpload(1, isloaded);
}
else
{
ZeigeProgressWärendUpload(2, isloaded);
}
System.Windows.Forms.Clipboard.Clear();
}
@@ -2191,6 +2206,10 @@ namespace BeWo.View
() => this.Dispatch(
delegate
{
if (form1 != null)
{
form1.Close();
}
progressView.Close();
upload.Dispose();
}));