public void ButtonCountTest() { MessageDialog target = new MessageDialog(); // TODO: Initialize to an appropriate value int expected = 0; // TODO: Initialize to an appropriate value int actual; target.ButtonCount = expected; actual = target.ButtonCount; Assert.AreEqual(expected, actual); Assert.Inconclusive("Verify the correctness of this test method."); }
public void TitleBarTextTest1() { MessageDialog target = new MessageDialog(); // TODO: Initialize to an appropriate value string expected = string.Empty; // TODO: Initialize to an appropriate value string actual; target.TitleBarText = expected; actual = target.TitleBarText; Assert.AreEqual(expected, actual); Assert.Inconclusive("Verify the correctness of this test method."); }
public void MessageDialogConstructorTest9() { string prompt = string.Empty; // TODO: Initialize to an appropriate value string buttonOneText = string.Empty; // TODO: Initialize to an appropriate value string buttonTwoText = string.Empty; // TODO: Initialize to an appropriate value MessageDialog target = new MessageDialog(prompt, buttonOneText, buttonTwoText); Assert.Inconclusive("TODO: Implement code to verify target"); }
public void MessageDialogConstructorTest8() { MessageDialog target = new MessageDialog(); Assert.Inconclusive("TODO: Implement code to verify target"); }
/// <summary> /// Displays a popup with an OK button /// </summary> /// /// <param name="title">Title Text</param> /// <param name="text">Message text</param> /// <param name="okClickHandler">OK button click handler</param> private void ShowOKPopup(string title, string text, EventHandler okClickHandler) { MessageDialog popup = new MessageDialog(text, "OK", okClickHandler); popup.TitleBarText = title; m_openPopups.Add(popup); popup.Show(); }
/// <summary> /// User pressed the SetSimulationSpeed button /// </summary> /// <param name="sender">Sender of the event</param> /// <param name="e">Event arguments</param> private void OnSetSimulationSpeedClicked(object sender, EventArgs e) { double speed; bool valid = false; if (Double.TryParse(txtSpeed.Text, out speed)) { if (m_simulator.SetSimulationSpeed(speed)) //Set the simulation speed { valid = true; } } if (!valid) { //Show invalid popup m_okPopup = new MessageDialog("Time is invalid", "OK", OnPopupAcknowledged); m_okPopup.TitleBarText = "Error"; m_okPopup.Show(); } }
/// <summary> /// OK popup was acknowledged /// </summary> /// <param name="sender">Sender of the event</param> /// <param name="e">Event arguments</param> private void OnPopupAcknowledged(object sender, EventArgs e) { if (m_okPopup != null) { m_okPopup.Close(); m_okPopup = null; } }