avalonia porting process

visual items tweaked, fixed some crashing when you forget to search
This commit is contained in:
2022-06-30 17:50:23 -04:00
parent a3be695c76
commit 65e1214242
7 changed files with 60 additions and 42 deletions

View File

@@ -10,12 +10,14 @@ namespace DeskHubSharpRevised;
public partial class SearchWindow : Window
{
public string userResponse { get; set; }
private Request _request;
private ObservableCollection<RepoDetail> _repoDetail;
public SearchWindow()
{
InitializeComponent();
DataContext = this;
#if DEBUG
this.AttachDevTools();
#endif
@@ -33,7 +35,7 @@ public partial class SearchWindow : Window
private void btn_search_Click(object sender, RoutedEventArgs e)
{
if (string.IsNullOrEmpty(txtbox_query.Text))
if (string.IsNullOrEmpty(userResponse))
{
var parentWindow = this;
ErrorWindow err = new ErrorWindow();
@@ -42,7 +44,7 @@ public partial class SearchWindow : Window
}
else
{
_request = new Request(txtbox_query.Text);
_request = new Request(userResponse);
_request.PerformSearchRequest();
_request.PerformUserRequest();
this.Close();