final deliverable

This commit is contained in:
Wyatt Miller 2018-12-09 14:47:23 -05:00
parent 97c5813494
commit df80eb4d75
9 changed files with 156 additions and 18 deletions

Binary file not shown.

BIN
ClassDiagram.pdf Normal file

Binary file not shown.

View File

@ -24,6 +24,10 @@ namespace DeskHubSharp
_emailText = emailText;
}
/// <summary>
/// Checks to see if Email is valid to send
/// </summary>
/// <returns></returns>
private bool IsValidated()
{
if (_name == "")
@ -54,6 +58,9 @@ namespace DeskHubSharp
return true;
}
/// <summary>
/// Creates message for user to send
/// </summary>
public void CreateMessage()
{
if (IsValidated())
@ -75,7 +82,6 @@ namespace DeskHubSharp
using (var client = new SmtpClient())
{
client.Connect("smtp.gmail.com", 465, SecureSocketOptions.SslOnConnect);
// change credentials
client.Authenticate(email.FromEmail, email.Password);
client.Send(message);
client.Disconnect(true);

View File

@ -1,2 +1,148 @@
<?xml version="1.0" encoding="utf-8"?>
<ClassDiagram />
<ClassDiagram MajorVersion="1" MinorVersion="1">
<Class Name="DeskHubSharp.AboutWindow">
<Position X="2.25" Y="0.5" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAABAAAAAQAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>AboutWindow.xaml.cs</FileName>
</TypeIdentifier>
<Lollipop Position="0.2" />
</Class>
<Class Name="DeskHubSharp.DetailWindow">
<Position X="0.5" Y="2.5" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAIhAAAAAQAQAAAQAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>DetailWindow.xaml.cs</FileName>
</TypeIdentifier>
<Lollipop Position="0.2" />
</Class>
<Class Name="DeskHubSharp.ErrorWindow">
<Position X="2.25" Y="3.25" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>ErrorWindow.xaml.cs</FileName>
</TypeIdentifier>
<Lollipop Position="0.2" />
</Class>
<Class Name="DeskHubSharp.FeedbackWindow">
<Position X="0.5" Y="0.5" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAEA=</HashCode>
<FileName>FeedbackWindow.xaml.cs</FileName>
</TypeIdentifier>
<Lollipop Position="0.2" />
</Class>
<Class Name="DeskHubSharp.HelpWindow">
<Position X="2.25" Y="7.5" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>HelpWindow.xaml.cs</FileName>
</TypeIdentifier>
<Lollipop Position="0.2" />
</Class>
<Class Name="DeskHubSharp.MainWindow">
<Position X="0.5" Y="5.5" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAhAAAAAAAAAAAQCAQAAAAAAQAAgAAAIAwBEAAAAA=</HashCode>
<FileName>MainWindow.xaml.cs</FileName>
</TypeIdentifier>
<Lollipop Position="0.2" />
</Class>
<Class Name="DeskHubSharp.SearchWindow">
<Position X="2.25" Y="5" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAQAAAAAQAAAAAAAAAAAAAAAAAAQAAAAAAA=</HashCode>
<FileName>SearchWindow.xaml.cs</FileName>
</TypeIdentifier>
<Lollipop Position="0.2" />
</Class>
<Class Name="DeskHubSharp.ApiDataService">
<Position X="9.25" Y="0.5" Width="1.5" />
<TypeIdentifier>
<HashCode>gAAAAgAAAAAEAAAgAAAAAAAAAAAAAAAAAAAAAEAAAAA=</HashCode>
<FileName>DAL\ApiDataService.cs</FileName>
</TypeIdentifier>
<Lollipop Position="0.1" />
</Class>
<Class Name="DeskHubSharp.Branch">
<Position X="4" Y="0.5" Width="1.5" />
<Compartments>
<Compartment Name="Nested Types" Collapsed="false" />
</Compartments>
<NestedTypes>
<Class Name="DeskHubSharp.Branch.Commit">
<TypeIdentifier>
<NewMemberFileName>Models\Branch.cs</NewMemberFileName>
</TypeIdentifier>
</Class>
</NestedTypes>
<TypeIdentifier>
<HashCode>QAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAA=</HashCode>
<FileName>Models\Branch.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="DeskHubSharp.EmailBLL">
<Position X="5.75" Y="0.5" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAIAAAAAAAAAAAAAIAAIAAAAAAAACAEAAAAAAAAAA=</HashCode>
<FileName>BusinessLayer\EmailBLL.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="DeskHubSharp.License">
<Position X="7.5" Y="2.25" Width="1.5" />
<TypeIdentifier>
<HashCode>ACAAAAAAAAAAAAAAAAAEAAAAAAAcAAAAAAAAAAAAAAA=</HashCode>
<FileName>Models\License.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="DeskHubSharp.Owner">
<Position X="5.75" Y="3" Width="1.5" />
<TypeIdentifier>
<HashCode>BGAAAAAAAAAAoAAQAAAAIAAAgAAJAAIUAgAAAAgAMgA=</HashCode>
<FileName>Models\Owner.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="DeskHubSharp.RepoDetail" Collapsed="true">
<Position X="7.5" Y="6" Width="1.5" />
<TypeIdentifier>
<HashCode>BCIwgQSAIRCAkB8B4OwJIEAEyiANIQFYKRKI4AgFngw=</HashCode>
<FileName>Models\RepoDetail.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="DeskHubSharp.RepoInfo">
<Position X="7.5" Y="4.25" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>BusinessLayer\RepoList.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="DeskHubSharp.Request">
<Position X="4" Y="3.75" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAAgAAAAgAAAgAgAAAAAACADAAAAAAAAAAAAAAAA=</HashCode>
<FileName>BusinessLayer\Request.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="DeskHubSharp.RequestList">
<Position X="9.25" Y="3.5" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAQAAAAAIAAAAA=</HashCode>
<FileName>Models\RequestList.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="DeskHubSharp.Sort">
<Position X="9.25" Y="5.25" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAA=</HashCode>
<FileName>Models\Sort.cs</FileName>
</TypeIdentifier>
</Class>
<Interface Name="DeskHubSharp.IDataService">
<Position X="7.5" Y="0.5" Width="1.5" />
<TypeIdentifier>
<HashCode>gAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAA=</HashCode>
<FileName>DAL\IDataService.cs</FileName>
</TypeIdentifier>
</Interface>
<Font Name="Segoe UI" Size="9" />
</ClassDiagram>

View File

@ -48,15 +48,6 @@ namespace DeskHubSharp
var x = response.Content;
var deserialized = JsonConvert.DeserializeObject<ObservableCollection<RepoDetail>>(x);
//ObservableCollection<RepoDetail> test = new ObservableCollection<RepoDetail>()
//{
// new RepoDetail()
// {
// Login = "John",
// Password = "pw"
// }
//};
if (deserialized.Count == 0)
{
throw new Exception();

View File

@ -24,7 +24,6 @@ namespace DeskHubSharp
private ObservableCollection<RepoDetail> _repoDetail;
private User _userDetail;
private Request _request;
private RepoInfo _repoInfo;
public MainWindow()
{
@ -130,9 +129,9 @@ namespace DeskHubSharp
}
if (sortTerm == "Least to most Stars")
{
// TODO: There's a bug in here
var sortedList = _repoDetail.OrderBy(c => c.stargazers_count).ToList();
ListBox.ItemsSource = sortedList.Select(x => x.full_name);
}
if (sortTerm == "Least to most Forks")
{
@ -149,9 +148,6 @@ namespace DeskHubSharp
{
ShowErrorMessage("A user has not been searched. Please try again.");
}
}
private void btn_searchrepo_Click(object sender, RoutedEventArgs e)

View File

@ -4,7 +4,7 @@ namespace DeskHubSharp
{
private string _toEmail = "wjmiller2016@gmail.com";
private string _fromEmail = "wjmiller2016@gmail.com";
private string _passwordEmail = "IhaveanAMDRX480";
private string _passwordEmail = "IhaveanAMDRX580";
public string Password
{

View File

@ -7,7 +7,6 @@ using System.Threading.Tasks;
namespace DeskHubSharp
{
// TODO: The RequestList class is called from code behind, fix it
public class RequestList
{
/// <summary>