Reputation: 417
I had created 2 WPF window.
For Window 1:
//Get IC Detail First
COAKeyInAccountICCanvas COAKeyInAccountCanvas = new COAKeyInAccountICCanvas(this, _PrinterIsOn);
COAKeyInAccountCanvas.Topmost = true;
COAKeyInAccountCanvas.Show();
if(CheckCOAKeyInICStatus.checkCOAKeyInAccountICStatus == true)
{
//Check User Ownership
checkCOAOwner.Visibility = Visibility.Visible; // let user to choose whether is owner or representer
}
else
{
accountNumber = "";
checkCOAOwner.Visibility = Visibility.Hidden;
GetAccountCanvas.Visibility = Visibility.Visible;
}
Initially, the COAKeyinAccountCanvas
window will do a checking and update the CheckCOAKeyInICStatus.checkCOAKeyInAccountICStatus
to be either "false" or "true".
How can i unhold the if-else statement function to be executed before the COAKeyInAccountCanvas
window had finished all the function?
Upvotes: 0
Views: 1434
Reputation: 1162
use:
COAKeyInAccountCanvas.ShowDialog();
instead:
COAKeyInAccountCanvas.Show();
Upvotes: 4