Interaction logic for Search.xaml
Пример #1
0
 private async void SearchButton(object sender, RoutedEventArgs e)
 {
     modelHelpers.HideFlyout(this);
     var searchFlyout = new Search(modelHelpers, openFromAdd: true);
     await modelHelpers.OpenFlyout(searchFlyout);
     if (searchFlyout.SelectedJira != null)
     {
         DataModel.SetJiraReference(searchFlyout.SelectedJira.Reference);
     }
     modelHelpers.OpenFlyout(this);
 }
Пример #2
0
 private void SearchButton(object sender, RoutedEventArgs e)
 {
     var searchFlyout = new Search(viewModel, true);
     
     searchFlyout.IsOpenChanged += (o, args) =>
     {
         if (!searchFlyout.IsOpen)
         {
             if (searchFlyout.SelectedJira != null)
             {
                 DataModel.SetJiraReference(searchFlyout.SelectedJira.Reference);
             }
         }
     };
     
     viewModel.MainWindow.OpenFlyout(searchFlyout);
     
 }