public void CancelCall(object sender) { StartFrame = null; EndFrame = null; CloseHandler?.Invoke(this, null); Close(); }
//Returns value when closed dialog. private void ReceiveResult(string result) { if (result == resultValue) { if (OnClose != null) { OnClose.Invoke(resultValue); } } }
/// <summary> /// Closes this popup menu, and child menu. /// </summary> internal void ClosePopUp() { Close.Invoke(this); if (this.selectedMenuItem != null) { this.selectedMenuItem.ClosePopUp(); } this.isPopUpShown = false; }
// Checks if doorState is open, so it can be closed public void Close() { Console.WriteLine("Door Closing"); if (_state == DoorState.Open) { _state = DoorState.Closed; CloseHandler?.Invoke(this, EventArgs.Empty); Console.WriteLine("Door Is now Closed"); } else { Console.WriteLine("Could not Close door: ", _state); } }
//The callback value (resultValue) always returns. private void ReceiveResult(string result) { bool check = result.EndsWith(", CHECKED_TRUE"); if (saveChecked) { defaultChecked = check; SavePrefs(); } if (result.StartsWith(resultValue)) { if (OnClose != null) { OnClose.Invoke(resultValue, check); } } }
public void ConfirmCall(object sender) { CloseHandler?.Invoke(this, null); Close(); }