diff --git a/.vs/DeskHubSharp/v15/.suo b/.vs/DeskHubSharp/v15/.suo
index 34eed78..a688f67 100644
Binary files a/.vs/DeskHubSharp/v15/.suo and b/.vs/DeskHubSharp/v15/.suo differ
diff --git a/.vs/DeskHubSharp/v15/Server/sqlite3/storage.ide b/.vs/DeskHubSharp/v15/Server/sqlite3/storage.ide
index c07338d..d1ea0d1 100644
Binary files a/.vs/DeskHubSharp/v15/Server/sqlite3/storage.ide and b/.vs/DeskHubSharp/v15/Server/sqlite3/storage.ide differ
diff --git a/.vs/DeskHubSharp/v15/Server/sqlite3/storage.ide-wal b/.vs/DeskHubSharp/v15/Server/sqlite3/storage.ide-wal
index f062606..63a2449 100644
Binary files a/.vs/DeskHubSharp/v15/Server/sqlite3/storage.ide-wal and b/.vs/DeskHubSharp/v15/Server/sqlite3/storage.ide-wal differ
diff --git a/DeskHubSharp/AboutWindow.xaml b/DeskHubSharp/AboutWindow.xaml
index 75240c2..74fc316 100644
--- a/DeskHubSharp/AboutWindow.xaml
+++ b/DeskHubSharp/AboutWindow.xaml
@@ -13,9 +13,27 @@
-
+
Want to help with development?
+
+ This project cannot be done without the help of
+
+ johnvelis
+
+ ,
+
+ NoahFlowa
+
+ ,
+
+ ericgi231
+
+ , and
+
+ tarkowr.
+
+
diff --git a/DeskHubSharp/AboutWindow.xaml.cs b/DeskHubSharp/AboutWindow.xaml.cs
index 46b6ff9..4d1633d 100644
--- a/DeskHubSharp/AboutWindow.xaml.cs
+++ b/DeskHubSharp/AboutWindow.xaml.cs
@@ -36,5 +36,29 @@ namespace DeskHubSharp
Process.Start(new ProcessStartInfo(e.Uri.AbsoluteUri));
e.Handled = true;
}
+
+ private void Hyperlink_RequestNavigate_1(object sender, RequestNavigateEventArgs e)
+ {
+ Process.Start(new ProcessStartInfo(e.Uri.AbsoluteUri));
+ e.Handled = true;
+ }
+
+ private void Hyperlink_RequestNavigate_2(object sender, RequestNavigateEventArgs e)
+ {
+ Process.Start(new ProcessStartInfo(e.Uri.AbsoluteUri));
+ e.Handled = true;
+ }
+
+ private void Hyperlink_RequestNavigate_3(object sender, RequestNavigateEventArgs e)
+ {
+ Process.Start(new ProcessStartInfo(e.Uri.AbsoluteUri));
+ e.Handled = true;
+ }
+
+ private void Hyperlink_RequestNavigate_4(object sender, RequestNavigateEventArgs e)
+ {
+ Process.Start(new ProcessStartInfo(e.Uri.AbsoluteUri));
+ e.Handled = true;
+ }
}
}
diff --git a/DeskHubSharp/BusinessLayer/Request.cs b/DeskHubSharp/BusinessLayer/Request.cs
index a6fe40b..3a39068 100644
--- a/DeskHubSharp/BusinessLayer/Request.cs
+++ b/DeskHubSharp/BusinessLayer/Request.cs
@@ -39,23 +39,38 @@ namespace DeskHubSharp
///
public void SearchRequest()
{
- var client = new RestClient(_apiEndpoint);
- RestRequest requestRepo = new RestRequest($"users/{_query}/repos", Method.GET);
+ try
+ {
+ var client = new RestClient(_apiEndpoint);
+ RestRequest requestRepo = new RestRequest($"users/{_query}/repos", Method.GET);
- var response = client.Execute(requestRepo);
- var x = response.Content;
- var deserialized = JsonConvert.DeserializeObject>(x);
+ var response = client.Execute(requestRepo);
+ var x = response.Content;
+ var deserialized = JsonConvert.DeserializeObject>(x);
- //ObservableCollection test = new ObservableCollection()
- //{
- // new RepoDetail()
- // {
- // Login = "John",
- // Password = "pw"
- // }
- //};
+ //ObservableCollection test = new ObservableCollection()
+ //{
+ // new RepoDetail()
+ // {
+ // Login = "John",
+ // Password = "pw"
+ // }
+ //};
- RepoList.repoDetail = deserialized;
+ if (deserialized.Count() == 0)
+ {
+ throw new Exception();
+ }
+ else
+ {
+ RepoList.repoDetail = deserialized;
+ }
+ }
+ catch (Exception)
+ {
+ ErrorWindow err = new ErrorWindow();
+ err.txtblk_error.Text = "We can't gather repository data. Please try again";
+ }
}
@@ -64,15 +79,32 @@ namespace DeskHubSharp
///
public void UserRequest()
{
- var client = new RestClient(_apiEndpoint);
+ try
+ {
+ var client = new RestClient(_apiEndpoint);
- RestRequest requestUser = new RestRequest($"users/{_query}", Method.GET);
+ RestRequest requestUser = new RestRequest($"users/{_query}", Method.GET);
- var response = client.Execute(requestUser);
- string x = response.Content;
- var deserailized = JsonConvert.DeserializeObject(x);
+ var response = client.Execute(requestUser);
+ string x = response.Content;
+ var deserailized = JsonConvert.DeserializeObject(x);
+
+ if (deserailized == null)
+ {
+ throw new Exception();
+ }
+ else
+ {
+ RepoList.userDetail = deserailized;
+ }
+
+ }
+ catch (Exception)
+ {
+ ErrorWindow err = new ErrorWindow();
+ err.txtblk_error.Text = "We can't gather user data. Please try again.";
+ }
- RepoList.userDetail = deserailized;
}
}
diff --git a/DeskHubSharp/DetailWindow.xaml b/DeskHubSharp/DetailWindow.xaml
index fde7ff1..c62ff20 100644
--- a/DeskHubSharp/DetailWindow.xaml
+++ b/DeskHubSharp/DetailWindow.xaml
@@ -10,6 +10,7 @@
+
diff --git a/DeskHubSharp/MainWindow.xaml b/DeskHubSharp/MainWindow.xaml
index 9671b50..3abc0e9 100644
--- a/DeskHubSharp/MainWindow.xaml
+++ b/DeskHubSharp/MainWindow.xaml
@@ -1,11 +1,11 @@
-
+ Title="DeskHubSharp" Height="450" Width="805" ResizeMode="NoResize">
@@ -13,16 +13,19 @@
-
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
diff --git a/DeskHubSharp/MainWindow.xaml.cs b/DeskHubSharp/MainWindow.xaml.cs
index ad57126..5d97880 100644
--- a/DeskHubSharp/MainWindow.xaml.cs
+++ b/DeskHubSharp/MainWindow.xaml.cs
@@ -70,8 +70,7 @@ namespace DeskHubSharp
//var stuff = info.GetRepoInfoDataGrid();
_repoDetail = RepoList.repoDetail;
DataGrid.ItemsSource = _repoDetail;
-
- txtblk_username.Text = RepoList.repoDetail[0].owner.login;
+ txtblk_username.Text = RepoList.userDetail.login;
txtblk_url.Text = RepoList.repoDetail[0].owner.html_url;
txtblk_bio.Text = RepoList.userDetail.bio;
txtblk_email.Text = RepoList.userDetail.blog;
diff --git a/DeskHubSharp/obj/Debug/MainWindow.g.cs b/DeskHubSharp/obj/Debug/MainWindow.g.cs
index 788411f..4cc2b08 100644
--- a/DeskHubSharp/obj/Debug/MainWindow.g.cs
+++ b/DeskHubSharp/obj/Debug/MainWindow.g.cs
@@ -1,4 +1,4 @@
-#pragma checksum "..\..\MainWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "7101FB12DCACC1F4D7F4356DF3A4B58361A07B85"
+#pragma checksum "..\..\MainWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "BCEA848E7842A8F82D9E02FD9B4523C32346663C"
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
@@ -41,6 +41,14 @@ namespace DeskHubSharp {
public partial class MainWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector {
+ #line 1 "..\..\MainWindow.xaml"
+ [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+ internal DeskHubSharp.MainWindow window_main;
+
+ #line default
+ #line hidden
+
+
#line 10 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Button btn_search;
@@ -115,7 +123,7 @@ namespace DeskHubSharp {
#line 21 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
- internal System.Windows.Controls.Image img_avatar;
+ internal System.Windows.Controls.TextBlock txtblk_bio;
#line default
#line hidden
@@ -123,7 +131,7 @@ namespace DeskHubSharp {
#line 22 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
- internal System.Windows.Controls.TextBlock txtblk_bio;
+ internal System.Windows.Controls.TextBlock txtblk_email;
#line default
#line hidden
@@ -131,7 +139,7 @@ namespace DeskHubSharp {
#line 23 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
- internal System.Windows.Controls.TextBlock txtblk_email;
+ internal System.Windows.Controls.TextBlock txtblk_realname;
#line default
#line hidden
@@ -139,7 +147,39 @@ namespace DeskHubSharp {
#line 24 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
- internal System.Windows.Controls.TextBlock txtblk_realname;
+ internal System.Windows.Controls.Label lbl_realname;
+
+ #line default
+ #line hidden
+
+
+ #line 25 "..\..\MainWindow.xaml"
+ [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+ internal System.Windows.Controls.Label lbl_username;
+
+ #line default
+ #line hidden
+
+
+ #line 26 "..\..\MainWindow.xaml"
+ [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+ internal System.Windows.Controls.Label lbl_url;
+
+ #line default
+ #line hidden
+
+
+ #line 27 "..\..\MainWindow.xaml"
+ [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+ internal System.Windows.Controls.Label lbl_email;
+
+ #line default
+ #line hidden
+
+
+ #line 28 "..\..\MainWindow.xaml"
+ [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+ internal System.Windows.Controls.Label lbl_bio;
#line default
#line hidden
@@ -175,6 +215,9 @@ namespace DeskHubSharp {
switch (connectionId)
{
case 1:
+ this.window_main = ((DeskHubSharp.MainWindow)(target));
+ return;
+ case 2:
this.btn_search = ((System.Windows.Controls.Button)(target));
#line 10 "..\..\MainWindow.xaml"
@@ -183,7 +226,7 @@ namespace DeskHubSharp {
#line default
#line hidden
return;
- case 2:
+ case 3:
this.btn_detail = ((System.Windows.Controls.Button)(target));
#line 11 "..\..\MainWindow.xaml"
@@ -192,7 +235,7 @@ namespace DeskHubSharp {
#line default
#line hidden
return;
- case 3:
+ case 4:
this.btn_feedback = ((System.Windows.Controls.Button)(target));
#line 12 "..\..\MainWindow.xaml"
@@ -201,7 +244,7 @@ namespace DeskHubSharp {
#line default
#line hidden
return;
- case 4:
+ case 5:
this.btn_help = ((System.Windows.Controls.Button)(target));
#line 13 "..\..\MainWindow.xaml"
@@ -210,7 +253,7 @@ namespace DeskHubSharp {
#line default
#line hidden
return;
- case 5:
+ case 6:
this.btn_about = ((System.Windows.Controls.Button)(target));
#line 14 "..\..\MainWindow.xaml"
@@ -219,7 +262,7 @@ namespace DeskHubSharp {
#line default
#line hidden
return;
- case 6:
+ case 7:
this.DataGrid = ((System.Windows.Controls.DataGrid)(target));
#line 16 "..\..\MainWindow.xaml"
@@ -228,7 +271,7 @@ namespace DeskHubSharp {
#line default
#line hidden
return;
- case 7:
+ case 8:
this.btn_exit = ((System.Windows.Controls.Button)(target));
#line 18 "..\..\MainWindow.xaml"
@@ -237,14 +280,11 @@ namespace DeskHubSharp {
#line default
#line hidden
return;
- case 8:
+ case 9:
this.txtblk_username = ((System.Windows.Controls.TextBlock)(target));
return;
- case 9:
- this.txtblk_url = ((System.Windows.Controls.TextBlock)(target));
- return;
case 10:
- this.img_avatar = ((System.Windows.Controls.Image)(target));
+ this.txtblk_url = ((System.Windows.Controls.TextBlock)(target));
return;
case 11:
this.txtblk_bio = ((System.Windows.Controls.TextBlock)(target));
@@ -255,6 +295,21 @@ namespace DeskHubSharp {
case 13:
this.txtblk_realname = ((System.Windows.Controls.TextBlock)(target));
return;
+ case 14:
+ this.lbl_realname = ((System.Windows.Controls.Label)(target));
+ return;
+ case 15:
+ this.lbl_username = ((System.Windows.Controls.Label)(target));
+ return;
+ case 16:
+ this.lbl_url = ((System.Windows.Controls.Label)(target));
+ return;
+ case 17:
+ this.lbl_email = ((System.Windows.Controls.Label)(target));
+ return;
+ case 18:
+ this.lbl_bio = ((System.Windows.Controls.Label)(target));
+ return;
}
this._contentLoaded = true;
}
diff --git a/DeskHubSharp/obj/Debug/MainWindow.g.i.cs b/DeskHubSharp/obj/Debug/MainWindow.g.i.cs
index 788411f..4cc2b08 100644
--- a/DeskHubSharp/obj/Debug/MainWindow.g.i.cs
+++ b/DeskHubSharp/obj/Debug/MainWindow.g.i.cs
@@ -1,4 +1,4 @@
-#pragma checksum "..\..\MainWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "7101FB12DCACC1F4D7F4356DF3A4B58361A07B85"
+#pragma checksum "..\..\MainWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "BCEA848E7842A8F82D9E02FD9B4523C32346663C"
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
@@ -41,6 +41,14 @@ namespace DeskHubSharp {
public partial class MainWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector {
+ #line 1 "..\..\MainWindow.xaml"
+ [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+ internal DeskHubSharp.MainWindow window_main;
+
+ #line default
+ #line hidden
+
+
#line 10 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Button btn_search;
@@ -115,7 +123,7 @@ namespace DeskHubSharp {
#line 21 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
- internal System.Windows.Controls.Image img_avatar;
+ internal System.Windows.Controls.TextBlock txtblk_bio;
#line default
#line hidden
@@ -123,7 +131,7 @@ namespace DeskHubSharp {
#line 22 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
- internal System.Windows.Controls.TextBlock txtblk_bio;
+ internal System.Windows.Controls.TextBlock txtblk_email;
#line default
#line hidden
@@ -131,7 +139,7 @@ namespace DeskHubSharp {
#line 23 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
- internal System.Windows.Controls.TextBlock txtblk_email;
+ internal System.Windows.Controls.TextBlock txtblk_realname;
#line default
#line hidden
@@ -139,7 +147,39 @@ namespace DeskHubSharp {
#line 24 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
- internal System.Windows.Controls.TextBlock txtblk_realname;
+ internal System.Windows.Controls.Label lbl_realname;
+
+ #line default
+ #line hidden
+
+
+ #line 25 "..\..\MainWindow.xaml"
+ [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+ internal System.Windows.Controls.Label lbl_username;
+
+ #line default
+ #line hidden
+
+
+ #line 26 "..\..\MainWindow.xaml"
+ [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+ internal System.Windows.Controls.Label lbl_url;
+
+ #line default
+ #line hidden
+
+
+ #line 27 "..\..\MainWindow.xaml"
+ [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+ internal System.Windows.Controls.Label lbl_email;
+
+ #line default
+ #line hidden
+
+
+ #line 28 "..\..\MainWindow.xaml"
+ [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+ internal System.Windows.Controls.Label lbl_bio;
#line default
#line hidden
@@ -175,6 +215,9 @@ namespace DeskHubSharp {
switch (connectionId)
{
case 1:
+ this.window_main = ((DeskHubSharp.MainWindow)(target));
+ return;
+ case 2:
this.btn_search = ((System.Windows.Controls.Button)(target));
#line 10 "..\..\MainWindow.xaml"
@@ -183,7 +226,7 @@ namespace DeskHubSharp {
#line default
#line hidden
return;
- case 2:
+ case 3:
this.btn_detail = ((System.Windows.Controls.Button)(target));
#line 11 "..\..\MainWindow.xaml"
@@ -192,7 +235,7 @@ namespace DeskHubSharp {
#line default
#line hidden
return;
- case 3:
+ case 4:
this.btn_feedback = ((System.Windows.Controls.Button)(target));
#line 12 "..\..\MainWindow.xaml"
@@ -201,7 +244,7 @@ namespace DeskHubSharp {
#line default
#line hidden
return;
- case 4:
+ case 5:
this.btn_help = ((System.Windows.Controls.Button)(target));
#line 13 "..\..\MainWindow.xaml"
@@ -210,7 +253,7 @@ namespace DeskHubSharp {
#line default
#line hidden
return;
- case 5:
+ case 6:
this.btn_about = ((System.Windows.Controls.Button)(target));
#line 14 "..\..\MainWindow.xaml"
@@ -219,7 +262,7 @@ namespace DeskHubSharp {
#line default
#line hidden
return;
- case 6:
+ case 7:
this.DataGrid = ((System.Windows.Controls.DataGrid)(target));
#line 16 "..\..\MainWindow.xaml"
@@ -228,7 +271,7 @@ namespace DeskHubSharp {
#line default
#line hidden
return;
- case 7:
+ case 8:
this.btn_exit = ((System.Windows.Controls.Button)(target));
#line 18 "..\..\MainWindow.xaml"
@@ -237,14 +280,11 @@ namespace DeskHubSharp {
#line default
#line hidden
return;
- case 8:
+ case 9:
this.txtblk_username = ((System.Windows.Controls.TextBlock)(target));
return;
- case 9:
- this.txtblk_url = ((System.Windows.Controls.TextBlock)(target));
- return;
case 10:
- this.img_avatar = ((System.Windows.Controls.Image)(target));
+ this.txtblk_url = ((System.Windows.Controls.TextBlock)(target));
return;
case 11:
this.txtblk_bio = ((System.Windows.Controls.TextBlock)(target));
@@ -255,6 +295,21 @@ namespace DeskHubSharp {
case 13:
this.txtblk_realname = ((System.Windows.Controls.TextBlock)(target));
return;
+ case 14:
+ this.lbl_realname = ((System.Windows.Controls.Label)(target));
+ return;
+ case 15:
+ this.lbl_username = ((System.Windows.Controls.Label)(target));
+ return;
+ case 16:
+ this.lbl_url = ((System.Windows.Controls.Label)(target));
+ return;
+ case 17:
+ this.lbl_email = ((System.Windows.Controls.Label)(target));
+ return;
+ case 18:
+ this.lbl_bio = ((System.Windows.Controls.Label)(target));
+ return;
}
this._contentLoaded = true;
}