Cleaned references and imports
This commit is contained in:
@@ -1,19 +1,9 @@
|
||||
using System;
|
||||
using Microsoft.Win32;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using System.IO;
|
||||
using Microsoft.Win32;
|
||||
|
||||
/**
|
||||
* TODO:
|
||||
@@ -49,7 +39,7 @@ namespace PWAPPv2
|
||||
{
|
||||
args = App.Args;
|
||||
}
|
||||
catch(Exception)
|
||||
catch (Exception)
|
||||
{ }
|
||||
|
||||
images = new List<Source.DataObjects.PWImage>();
|
||||
@@ -122,15 +112,15 @@ namespace PWAPPv2
|
||||
{
|
||||
TypeBox.GetSelectedID();
|
||||
}
|
||||
catch(Source.DataObjects.ReferralTypeDefaultException)
|
||||
catch (Source.DataObjects.ReferralTypeDefaultException)
|
||||
{
|
||||
|
||||
}
|
||||
catch(Source.DataObjects.InvalidReferralTypeException)
|
||||
catch (Source.DataObjects.InvalidReferralTypeException)
|
||||
{
|
||||
|
||||
}
|
||||
catch(NullReferenceException)
|
||||
catch (NullReferenceException)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -141,12 +131,12 @@ namespace PWAPPv2
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
|
||||
|
||||
//OK Button
|
||||
private void Button_Click_1(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Source.DataObjects.Referral referral;
|
||||
if(images.Count == 0)
|
||||
if (images.Count == 0)
|
||||
{
|
||||
referral = new Source.DataObjects.Referral(apiCreds, patient,
|
||||
(Source.DataObjects.ReferralTypeBox)TypeBox,
|
||||
@@ -167,9 +157,9 @@ namespace PWAPPv2
|
||||
{
|
||||
string referralString = referral.ToJsonString();
|
||||
string result = apiConnection.SendPostRequestAsync("api/PWMakeReferral", referralString);
|
||||
if(images.Count > 0)
|
||||
if (images.Count > 0)
|
||||
{
|
||||
foreach(Source.DataObjects.PWImage im in images)
|
||||
foreach (Source.DataObjects.PWImage im in images)
|
||||
{
|
||||
Source.DataObjects.Attachment att = new Source.DataObjects.Attachment(apiCreds, im, result);
|
||||
string json = att.ToJsonString();
|
||||
@@ -183,7 +173,7 @@ namespace PWAPPv2
|
||||
}
|
||||
this.Close();
|
||||
}
|
||||
catch(Source.DataObjects.Referral.InvalidReferalDataException)
|
||||
catch (Source.DataObjects.Referral.InvalidReferalDataException)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -197,7 +187,7 @@ namespace PWAPPv2
|
||||
openFileDialog.Filter = "Image files (*.jpg,*.jpeg)|*.jpg;*.jpeg";
|
||||
openFileDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyPictures);
|
||||
|
||||
if(openFileDialog.ShowDialog() == true)
|
||||
if (openFileDialog.ShowDialog() == true)
|
||||
{
|
||||
foreach (string filename in openFileDialog.FileNames)
|
||||
{
|
||||
@@ -205,7 +195,7 @@ namespace PWAPPv2
|
||||
{
|
||||
images.Add(new Source.DataObjects.PWImage(filename));
|
||||
}
|
||||
catch(NullReferenceException)
|
||||
catch (NullReferenceException)
|
||||
{
|
||||
images = new List<Source.DataObjects.PWImage>();
|
||||
images.Add(new Source.DataObjects.PWImage(filename));
|
||||
@@ -222,7 +212,7 @@ namespace PWAPPv2
|
||||
ImageList.Items.Add(CreateImageGridItem(image));
|
||||
}
|
||||
}
|
||||
catch(NullReferenceException)
|
||||
catch (NullReferenceException)
|
||||
{ }
|
||||
|
||||
}
|
||||
@@ -230,7 +220,7 @@ namespace PWAPPv2
|
||||
private void Button_Click_3(object sender, RoutedEventArgs e)
|
||||
{
|
||||
int index = ImageList.SelectedIndex;
|
||||
if(index == -1)
|
||||
if (index == -1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user