added find statements for errorwindow
This commit is contained in:
parent
d2f735b2ef
commit
a3be695c76
@ -1,6 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using Avalonia.Controls;
|
||||||
using DeskHubSharpRevised.Models;
|
using DeskHubSharpRevised.Models;
|
||||||
|
|
||||||
namespace DeskHubSharpRevised.BLL;
|
namespace DeskHubSharpRevised.BLL;
|
||||||
@ -13,22 +14,25 @@ class RepoInfo
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return a list for the list box
|
/// Returns a list for the list box
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns>A list of strings</returns>
|
||||||
public List<string> GetRepoInfoList()
|
public List<string> GetRepoInfoList()
|
||||||
{
|
{
|
||||||
List<string> stuff = new List<string>();
|
List<string> stuff = new List<string>();
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
stuff = RequestList.repoDetail.Select(x => x.full_name).ToList();
|
stuff = RequestList.repoDetail.Select(r => r.full_name).ToList();
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
ErrorWindow err = new ErrorWindow();
|
ErrorWindow err = new ErrorWindow();
|
||||||
err.txtblk_error.Text = "We couldn't gather any data. Does the user exist?";
|
err.txtblk_error = err.Find<TextBlock>("txtblk_error");
|
||||||
err.btn_error_close.Content = "FUCK!";
|
err.txtblk_error.Text = "Did you search a user? Try that first.";
|
||||||
|
err.btn_error_close = err.Find<Button>("btn_error");
|
||||||
|
err.btn_error_close.Content = "Close";
|
||||||
|
err.lbl_title = err.Find<Label>("lbl_title");
|
||||||
err.lbl_title.Content = "Oops!";
|
err.lbl_title.Content = "Oops!";
|
||||||
err.Show();
|
err.Show();
|
||||||
}
|
}
|
||||||
@ -37,12 +41,12 @@ class RepoInfo
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return a list for the combo box
|
/// Returns a list for the combo box
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns>A list of strings</returns>
|
||||||
public List<string> GetBranchNameComboBox()
|
public List<string> GetBranchNameComboBox()
|
||||||
{
|
{
|
||||||
List<string> stuff = RequestList.branchDetail.Select(x => x.name).ToList();
|
List<string> stuff = RequestList.branchDetail.Select(b => b.name).ToList();
|
||||||
return stuff;
|
return stuff;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,6 +0,0 @@
|
|||||||
namespace DeskHubSharpRevised;
|
|
||||||
|
|
||||||
public class SearchWindowViewModel
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user