|
|
|
@ -24,7 +24,7 @@ public partial class MessageBox : Window |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private int _showType = -1; |
|
|
|
|
private bool _result = false; |
|
|
|
|
private MessageBoxResult _result = MessageBoxResult.None; |
|
|
|
|
public void Show(String message, String btnStr = "") |
|
|
|
|
{ |
|
|
|
|
BorderInput.Visibility = Visibility.Hidden; |
|
|
|
@ -65,8 +65,8 @@ public partial class MessageBox : Window |
|
|
|
|
CancelButtonText.Text = MultilingualHelper.getString("DialogCancelDefaultTitle"); |
|
|
|
|
} |
|
|
|
|
this.ShowDialog(); |
|
|
|
|
|
|
|
|
|
return _result==true ? MessageBoxResult.OK : MessageBoxResult.Cancel; |
|
|
|
|
|
|
|
|
|
return _result; |
|
|
|
|
} |
|
|
|
|
// |
|
|
|
|
public MessageBoxResult ShowInput(String message, out String inputStr , String confirmButtonTitle = "", String cancelButtonTitle ="") |
|
|
|
@ -87,12 +87,12 @@ public partial class MessageBox : Window |
|
|
|
|
this.ShowDialog(); |
|
|
|
|
|
|
|
|
|
inputStr = TextBoxInput.Text; |
|
|
|
|
return _result==true ? MessageBoxResult.OK : MessageBoxResult.Cancel; |
|
|
|
|
return _result; |
|
|
|
|
} |
|
|
|
|
private void CloseButton_OnClick(object sender, RoutedEventArgs e) |
|
|
|
|
{ |
|
|
|
|
_result = MessageBoxResult.None; |
|
|
|
|
this.Close(); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void ConfirmButton_OnClick(object sender, RoutedEventArgs e) |
|
|
|
@ -102,7 +102,7 @@ public partial class MessageBox : Window |
|
|
|
|
this.Close(); |
|
|
|
|
}else if (_showType == 1) |
|
|
|
|
{ |
|
|
|
|
_result = true; |
|
|
|
|
_result = MessageBoxResult.OK; |
|
|
|
|
this.Close(); |
|
|
|
|
}else if (_showType == 2) |
|
|
|
|
{ |
|
|
|
@ -113,7 +113,7 @@ public partial class MessageBox : Window |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
_result = true; |
|
|
|
|
_result = MessageBoxResult.OK; |
|
|
|
|
this.Close(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -121,6 +121,7 @@ public partial class MessageBox : Window |
|
|
|
|
|
|
|
|
|
private void CancelButton_OnClick(object sender, RoutedEventArgs e) |
|
|
|
|
{ |
|
|
|
|
_result = MessageBoxResult.Cancel; |
|
|
|
|
this.Close(); |
|
|
|
|
} |
|
|
|
|
} |