Cleaned references and imports
This commit is contained in:
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml;
|
||||
|
||||
namespace PWAPPv2.Source
|
||||
@@ -21,12 +17,12 @@ namespace PWAPPv2.Source
|
||||
{
|
||||
cfgDoc.Load(path);
|
||||
}
|
||||
catch(XmlException)
|
||||
catch (XmlException)
|
||||
{
|
||||
Console.WriteLine("An error has occured parsing the config file.");
|
||||
return;
|
||||
}
|
||||
catch(System.IO.FileNotFoundException)
|
||||
catch (System.IO.FileNotFoundException)
|
||||
{
|
||||
Console.WriteLine("Config file could not be found!");
|
||||
return;
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Net.Http.Headers;
|
||||
using System.IO;
|
||||
using Newtonsoft.Json;
|
||||
using System.Text;
|
||||
|
||||
namespace PWAPPv2.Source.API
|
||||
{
|
||||
@@ -82,7 +78,7 @@ namespace PWAPPv2.Source.API
|
||||
text = sr.ReadToEnd();
|
||||
}
|
||||
}
|
||||
catch(WebException wex)
|
||||
catch (WebException wex)
|
||||
{
|
||||
text = new StreamReader(wex.Response.GetResponseStream()).ReadToEnd();
|
||||
}
|
||||
@@ -100,7 +96,7 @@ namespace PWAPPv2.Source.API
|
||||
|
||||
var response = client.PostAsync(apiUri, contetnt).Result;
|
||||
|
||||
if(response.IsSuccessStatusCode)
|
||||
if (response.IsSuccessStatusCode)
|
||||
{
|
||||
return response.Content.ReadAsStringAsync().Result;
|
||||
}
|
||||
|
||||
@@ -1,11 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml;
|
||||
using System.Xml.Serialization;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
|
||||
namespace PWAPPv2.Source.API
|
||||
{
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PWAPPv2.Source.DataObjects
|
||||
namespace PWAPPv2.Source.DataObjects
|
||||
{
|
||||
class APICredentials
|
||||
{
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PWAPPv2.Source.DataObjects
|
||||
namespace PWAPPv2.Source.DataObjects
|
||||
{
|
||||
class Attachment
|
||||
{
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
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.Controls;
|
||||
|
||||
namespace PWAPPv2.Source.DataObjects
|
||||
{
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PWAPPv2.Source.DataObjects
|
||||
{
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PWAPPv2.Source.DataObjects
|
||||
{
|
||||
@@ -18,11 +15,11 @@ namespace PWAPPv2.Source.DataObjects
|
||||
public NumValList(string Content, char Delim)
|
||||
{
|
||||
string[] split = Content.Split(Delim);
|
||||
if((split.Length % 2) != 0)
|
||||
if ((split.Length % 2) != 0)
|
||||
{
|
||||
throw new UnevenValuesException();
|
||||
}
|
||||
for(int i = 0; i < split.Length; i++)
|
||||
for (int i = 0; i < split.Length; i++)
|
||||
{
|
||||
this.Add(int.Parse(split[i]), split[i + 1]);
|
||||
i++;
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PWAPPv2.Source.DataObjects
|
||||
namespace PWAPPv2.Source.DataObjects
|
||||
{
|
||||
class NumValPair
|
||||
{
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Media;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Windows.Media.Imaging;
|
||||
|
||||
namespace PWAPPv2.Source.DataObjects
|
||||
{
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace PWAPPv2.Source.DataObjects
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace PWAPPv2.Source.DataObjects
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
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.Documents;
|
||||
using System.Windows;
|
||||
|
||||
namespace PWAPPv2.Source.DataObjects
|
||||
{
|
||||
@@ -40,7 +36,7 @@ namespace PWAPPv2.Source.DataObjects
|
||||
string RemarksText = new TextRange(RemarksBox.Document.ContentStart, RemarksBox.Document.ContentEnd).Text;
|
||||
|
||||
int contact = 0;
|
||||
if(ContactBox.IsChecked == true)
|
||||
if (ContactBox.IsChecked == true)
|
||||
{
|
||||
contact = 1;
|
||||
}
|
||||
@@ -76,11 +72,11 @@ namespace PWAPPv2.Source.DataObjects
|
||||
{
|
||||
MessageBox.Show("Please select a referral type");
|
||||
}
|
||||
catch(Source.DataObjects.ReferToDefaultException)
|
||||
catch (Source.DataObjects.ReferToDefaultException)
|
||||
{
|
||||
MessageBox.Show("Please select a refer to");
|
||||
}
|
||||
catch(Source.DataObjects.ReferFromDefaultException)
|
||||
catch (Source.DataObjects.ReferFromDefaultException)
|
||||
{
|
||||
MessageBox.Show("Please select a refer from");
|
||||
}
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace PWAPPv2.Source.DataObjects
|
||||
@@ -28,7 +24,7 @@ namespace PWAPPv2.Source.DataObjects
|
||||
TypeID.Add(id);
|
||||
|
||||
}
|
||||
catch(Exception)
|
||||
catch (Exception)
|
||||
{
|
||||
throw new DataInvalidException();
|
||||
}
|
||||
@@ -36,7 +32,7 @@ namespace PWAPPv2.Source.DataObjects
|
||||
|
||||
}
|
||||
|
||||
foreach(string name in TypeName)
|
||||
foreach (string name in TypeName)
|
||||
{
|
||||
Add(name);
|
||||
}
|
||||
@@ -52,9 +48,9 @@ namespace PWAPPv2.Source.DataObjects
|
||||
{
|
||||
throw new ReferralTypeDefaultException();
|
||||
}
|
||||
for(int i = 0; i < TypeName.Count; i++)
|
||||
for (int i = 0; i < TypeName.Count; i++)
|
||||
{
|
||||
if(TypeName[i] == Selected)
|
||||
if (TypeName[i] == Selected)
|
||||
{
|
||||
return TypeID[i];
|
||||
}
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml;
|
||||
|
||||
namespace PWAPPv2.Source.Database
|
||||
@@ -22,12 +18,12 @@ namespace PWAPPv2.Source.Database
|
||||
{
|
||||
cfg.Load(path);
|
||||
}
|
||||
catch(XmlException)
|
||||
catch (XmlException)
|
||||
{
|
||||
Console.WriteLine("An error has occured parsing the config file.");
|
||||
return;
|
||||
}
|
||||
catch(System.IO.FileNotFoundException)
|
||||
catch (System.IO.FileNotFoundException)
|
||||
{
|
||||
Console.WriteLine("Config file could not be found!");
|
||||
}
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
using System;
|
||||
using MySqlConnector;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Data.SqlClient;
|
||||
using MySqlConnector;
|
||||
|
||||
namespace PWAPPv2.Source.Database
|
||||
{
|
||||
@@ -28,7 +24,7 @@ namespace PWAPPv2.Source.Database
|
||||
{
|
||||
Connection.Open();
|
||||
}
|
||||
catch(Exception)
|
||||
catch (Exception)
|
||||
{
|
||||
throw new DatabaseConnectionException();
|
||||
}
|
||||
@@ -99,7 +95,7 @@ namespace PWAPPv2.Source.Database
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
class DatabaseConnectionException : Exception
|
||||
{ }
|
||||
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace PWAPPv2.Source
|
||||
{
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PWAPPv2.Source
|
||||
namespace PWAPPv2.Source
|
||||
{
|
||||
class PatientGUIAdapter
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user