diff --git a/.vs/DeskHubSharp/v15/.suo b/.vs/DeskHubSharp/v15/.suo
index 3ad4f0b..52eda4b 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 179480d..c07338d 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 f5ffd75..f062606 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 5f3fb6a..75240c2 100644
--- a/DeskHubSharp/AboutWindow.xaml
+++ b/DeskHubSharp/AboutWindow.xaml
@@ -10,6 +10,12 @@
-
+
+
+
+
+ Want to help with development?
+
+
diff --git a/DeskHubSharp/AboutWindow.xaml.cs b/DeskHubSharp/AboutWindow.xaml.cs
index e7ebe64..46b6ff9 100644
--- a/DeskHubSharp/AboutWindow.xaml.cs
+++ b/DeskHubSharp/AboutWindow.xaml.cs
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
+using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@@ -10,6 +11,7 @@ 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;
namespace DeskHubSharp
@@ -28,5 +30,11 @@ namespace DeskHubSharp
{
this.Close();
}
+
+ private void Hyperlink_RequestNavigate(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 d0a3abd..a6fe40b 100644
--- a/DeskHubSharp/BusinessLayer/Request.cs
+++ b/DeskHubSharp/BusinessLayer/Request.cs
@@ -60,7 +60,7 @@ namespace DeskHubSharp
///
- /// Deprecated: Calls API for user data
+ /// Calls API for detailed user data
///
public void UserRequest()
{
@@ -69,8 +69,10 @@ namespace DeskHubSharp
RestRequest requestUser = new RestRequest($"users/{_query}", Method.GET);
var response = client.Execute(requestUser);
- string x = response.ToString();
- var deserialized = JsonConvert.DeserializeObject(x);
+ string x = response.Content;
+ var deserailized = JsonConvert.DeserializeObject(x);
+
+ RepoList.userDetail = deserailized;
}
}
diff --git a/DeskHubSharp/DetailWindow.xaml.cs b/DeskHubSharp/DetailWindow.xaml.cs
index 416b951..6c8e563 100644
--- a/DeskHubSharp/DetailWindow.xaml.cs
+++ b/DeskHubSharp/DetailWindow.xaml.cs
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
+using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@@ -19,9 +20,14 @@ namespace DeskHubSharp
///
public partial class DetailWindow : Window
{
- public DetailWindow()
+ private RepoDetail _repoDetail;
+
+ public DetailWindow(RepoDetail repoDetail)
{
InitializeComponent();
+ _repoDetail = repoDetail;
+ lbl_reponame.Content = _repoDetail.full_name;
+
}
private void btn_close_Click(object sender, RoutedEventArgs e)
diff --git a/DeskHubSharp/MainWindow.xaml b/DeskHubSharp/MainWindow.xaml
index 37b38f5..9671b50 100644
--- a/DeskHubSharp/MainWindow.xaml
+++ b/DeskHubSharp/MainWindow.xaml
@@ -5,17 +5,24 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:DeskHubSharp"
mc:Ignorable="d"
- Title="DeskHubSharp" Height="450" Width="800">
+ Title="DeskHubSharp" Height="450" Width="805.114">
-
-
+
+
+
+
+
+
+
+
diff --git a/DeskHubSharp/MainWindow.xaml.cs b/DeskHubSharp/MainWindow.xaml.cs
index 527285e..55d6fbe 100644
--- a/DeskHubSharp/MainWindow.xaml.cs
+++ b/DeskHubSharp/MainWindow.xaml.cs
@@ -21,6 +21,8 @@ namespace DeskHubSharp
///
public partial class MainWindow : Window
{
+ private ObservableCollection _repoDetail;
+
public MainWindow()
{
InitializeComponent();
@@ -29,7 +31,8 @@ namespace DeskHubSharp
private void btn_detail_Click(object sender, RoutedEventArgs e)
{
- DetailWindow detail = new DetailWindow();
+ RepoDetail repo = _repoDetail[DataGrid.SelectedIndex];
+ DetailWindow detail = new DetailWindow(repo);
detail.ShowDialog();
}
@@ -59,11 +62,22 @@ namespace DeskHubSharp
private void btn_search_Click(object sender, RoutedEventArgs e)
{
SearchWindow search = new SearchWindow();
- RepoInfo info = new RepoInfo();
+ RepoDetail detail = new RepoDetail();
+ //RepoInfo info = new RepoInfo();
+ Owner owner = new Owner();
+ User user = new User();
search.ShowDialog();
//var stuff = info.GetRepoInfoDataGrid();
- ObservableCollection test = RepoList.repoDetail;
- DataGrid.ItemsSource = test;
+ _repoDetail = RepoList.repoDetail;
+ DataGrid.ItemsSource = _repoDetail;
+
+ txtblk_username.Text = RepoList.repoDetail[0].owner.login;
+ txtblk_url.Text = RepoList.repoDetail[0].owner.html_url;
+ txtblk_bio.Text = RepoList.userDetail.bio;
+ txtblk_email.Text = RepoList.userDetail.blog;
+ txtblk_realname.Text = RepoList.userDetail.name;
+ search.Close();
+ //img_avatar.Source = RepoList.repoDetail[0].owner.avatar_url;
}
private void DataGrid_SelectionChanged(object sender, SelectionChangedEventArgs e)
diff --git a/DeskHubSharp/Models/RepoInfo.cs b/DeskHubSharp/Models/RepoInfo.cs
index 46a9d88..ca2db03 100644
--- a/DeskHubSharp/Models/RepoInfo.cs
+++ b/DeskHubSharp/Models/RepoInfo.cs
@@ -14,11 +14,11 @@ namespace DeskHubSharp
}
- public ObservableCollection GetRepoInfoDataGrid()
+ public ObservableCollection GetRepoInfoDataGrid()
{
- ObservableCollection repoStuff = new ObservableCollection();
+ ObservableCollection repoStuff = new ObservableCollection();
RepoDetail repo = new RepoDetail();
- //repoStuff.Add(RepoList.repoDetail[3]);
+ repoStuff.Add(Convert.ToString(RepoList.repoDetail.Select(x => x.name)));
//repoStuff.Add(repo.url);
return repoStuff;
diff --git a/DeskHubSharp/Models/RepoList.cs b/DeskHubSharp/Models/RepoList.cs
index 93df707..47b841b 100644
--- a/DeskHubSharp/Models/RepoList.cs
+++ b/DeskHubSharp/Models/RepoList.cs
@@ -9,7 +9,9 @@ namespace DeskHubSharp
{
class RepoList
{
- public static ObservableCollection _repoDetail;
+ private static ObservableCollection _repoDetail;
+
+ public static User userDetail { get; set; }
public static ObservableCollection repoDetail
{
diff --git a/DeskHubSharp/SearchWindow.xaml.cs b/DeskHubSharp/SearchWindow.xaml.cs
index d28a490..66b69fc 100644
--- a/DeskHubSharp/SearchWindow.xaml.cs
+++ b/DeskHubSharp/SearchWindow.xaml.cs
@@ -33,6 +33,7 @@ namespace DeskHubSharp
{
Request request = new Request(txtbox_query.Text);
request.SearchRequest();
+ request.UserRequest();
//MainWindow main = new MainWindow();
//main.ShowDialog();
}
diff --git a/DeskHubSharp/obj/Debug/MainWindow.g.cs b/DeskHubSharp/obj/Debug/MainWindow.g.cs
index bb7c7f3..788411f 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}" "27CBA43F396CB857DB0A7BC37CC204BAD58C13B8"
+#pragma checksum "..\..\MainWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "7101FB12DCACC1F4D7F4356DF3A4B58361A07B85"
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
@@ -96,6 +96,54 @@ namespace DeskHubSharp {
#line default
#line hidden
+
+ #line 19 "..\..\MainWindow.xaml"
+ [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+ internal System.Windows.Controls.TextBlock txtblk_username;
+
+ #line default
+ #line hidden
+
+
+ #line 20 "..\..\MainWindow.xaml"
+ [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+ internal System.Windows.Controls.TextBlock txtblk_url;
+
+ #line default
+ #line hidden
+
+
+ #line 21 "..\..\MainWindow.xaml"
+ [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+ internal System.Windows.Controls.Image img_avatar;
+
+ #line default
+ #line hidden
+
+
+ #line 22 "..\..\MainWindow.xaml"
+ [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+ internal System.Windows.Controls.TextBlock txtblk_bio;
+
+ #line default
+ #line hidden
+
+
+ #line 23 "..\..\MainWindow.xaml"
+ [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+ internal System.Windows.Controls.TextBlock txtblk_email;
+
+ #line default
+ #line hidden
+
+
+ #line 24 "..\..\MainWindow.xaml"
+ [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+ internal System.Windows.Controls.TextBlock txtblk_realname;
+
+ #line default
+ #line hidden
+
private bool _contentLoaded;
///
@@ -189,6 +237,24 @@ namespace DeskHubSharp {
#line default
#line hidden
return;
+ case 8:
+ 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));
+ return;
+ case 11:
+ this.txtblk_bio = ((System.Windows.Controls.TextBlock)(target));
+ return;
+ case 12:
+ this.txtblk_email = ((System.Windows.Controls.TextBlock)(target));
+ return;
+ case 13:
+ this.txtblk_realname = ((System.Windows.Controls.TextBlock)(target));
+ return;
}
this._contentLoaded = true;
}
diff --git a/DeskHubSharp/obj/Debug/MainWindow.g.i.cs b/DeskHubSharp/obj/Debug/MainWindow.g.i.cs
index bb7c7f3..788411f 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}" "27CBA43F396CB857DB0A7BC37CC204BAD58C13B8"
+#pragma checksum "..\..\MainWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "7101FB12DCACC1F4D7F4356DF3A4B58361A07B85"
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
@@ -96,6 +96,54 @@ namespace DeskHubSharp {
#line default
#line hidden
+
+ #line 19 "..\..\MainWindow.xaml"
+ [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+ internal System.Windows.Controls.TextBlock txtblk_username;
+
+ #line default
+ #line hidden
+
+
+ #line 20 "..\..\MainWindow.xaml"
+ [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+ internal System.Windows.Controls.TextBlock txtblk_url;
+
+ #line default
+ #line hidden
+
+
+ #line 21 "..\..\MainWindow.xaml"
+ [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+ internal System.Windows.Controls.Image img_avatar;
+
+ #line default
+ #line hidden
+
+
+ #line 22 "..\..\MainWindow.xaml"
+ [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+ internal System.Windows.Controls.TextBlock txtblk_bio;
+
+ #line default
+ #line hidden
+
+
+ #line 23 "..\..\MainWindow.xaml"
+ [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+ internal System.Windows.Controls.TextBlock txtblk_email;
+
+ #line default
+ #line hidden
+
+
+ #line 24 "..\..\MainWindow.xaml"
+ [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+ internal System.Windows.Controls.TextBlock txtblk_realname;
+
+ #line default
+ #line hidden
+
private bool _contentLoaded;
///
@@ -189,6 +237,24 @@ namespace DeskHubSharp {
#line default
#line hidden
return;
+ case 8:
+ 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));
+ return;
+ case 11:
+ this.txtblk_bio = ((System.Windows.Controls.TextBlock)(target));
+ return;
+ case 12:
+ this.txtblk_email = ((System.Windows.Controls.TextBlock)(target));
+ return;
+ case 13:
+ this.txtblk_realname = ((System.Windows.Controls.TextBlock)(target));
+ return;
}
this._contentLoaded = true;
}