aktueller Stand
This commit is contained in:
@@ -13,9 +13,9 @@ using static C4IT.Logging.cLogManager;
|
||||
|
||||
namespace FasdDesktopUi.Pages.TicketCompletion
|
||||
{
|
||||
public partial class TicketCompletion : Window, IBlurInvoker, INotifyPropertyChanged
|
||||
{
|
||||
private bool isCanceled = false;
|
||||
public partial class TicketCompletion : Window, IBlurInvoker, INotifyPropertyChanged
|
||||
{
|
||||
private bool isCanceled = false;
|
||||
|
||||
private bool _WaitForClosing = false;
|
||||
public bool WaitForClosing
|
||||
@@ -101,20 +101,32 @@ namespace FasdDesktopUi.Pages.TicketCompletion
|
||||
return null;
|
||||
}
|
||||
|
||||
#region Close_Click
|
||||
#region Close_Click
|
||||
|
||||
private void Close_Click()
|
||||
{
|
||||
isCanceled = true;
|
||||
TrySetDialogResult(null);
|
||||
Close();
|
||||
}
|
||||
|
||||
private void Close_Click()
|
||||
{
|
||||
DialogResult = null;
|
||||
isCanceled = true;
|
||||
Close();
|
||||
}
|
||||
|
||||
private void CloseButton_Click(object sender, InputEventArgs e) => Close_Click();
|
||||
|
||||
#endregion
|
||||
|
||||
#region Internal Focus Events
|
||||
private void CloseButton_Click(object sender, InputEventArgs e) => Close_Click();
|
||||
|
||||
#endregion
|
||||
|
||||
private void TrySetDialogResult(bool? result)
|
||||
{
|
||||
try
|
||||
{
|
||||
DialogResult = result;
|
||||
}
|
||||
catch (InvalidOperationException)
|
||||
{
|
||||
// Window was not shown as dialog; ignore.
|
||||
}
|
||||
}
|
||||
|
||||
#region Internal Focus Events
|
||||
|
||||
private void ElementGotFocus(object sender, EventArgs e)
|
||||
{
|
||||
@@ -200,15 +212,15 @@ namespace FasdDesktopUi.Pages.TicketCompletion
|
||||
|
||||
bool closedSuccessfull = await CloseCaseDialogUc.CloseCaseAsync(_dataProvider.Identities.FirstOrDefault(identity => identity.Class == enumFasdInformationClass.User).Id);
|
||||
|
||||
if (closedSuccessfull)
|
||||
{
|
||||
SuccessPage.SuccessPage successPage = new SuccessPage.SuccessPage();
|
||||
successPage.Show();
|
||||
await _dataProvider?.CloseCaseAsync();
|
||||
DialogResult = true;
|
||||
Close();
|
||||
}
|
||||
}
|
||||
if (closedSuccessfull)
|
||||
{
|
||||
SuccessPage.SuccessPage successPage = new SuccessPage.SuccessPage();
|
||||
successPage.Show();
|
||||
await _dataProvider?.CloseCaseAsync();
|
||||
TrySetDialogResult(true);
|
||||
Close();
|
||||
}
|
||||
}
|
||||
catch (Exception E)
|
||||
{
|
||||
LogException(E);
|
||||
|
||||
Reference in New Issue
Block a user