public string TestTextManipulationWithMnemonic(string text, int width) { gb = new DecentGroupBox { Width = width, UseMnemonic = true, Text = text }; Assert.IsTrue(gb.AutoEllipsis, "auto ellipse setting"); Assert.IsTrue(gb.UseMnemonic, "use mnemonic setting"); Assert.AreEqual(gb.Text, text, $"Raw text TestCase: {text}"); return(gb.EscapedText); }
public void TextBoxWidthNearFudgeFactor([Values(10, 14, 15, 16, 18)] int width) { const string text = "SomeTextOrOther"; gb = new DecentGroupBox { Width = width, Text = text }; Assert.IsTrue(gb.AutoEllipsis, "auto ellipse setting"); Assert.IsFalse(gb.UseMnemonic, "use mnemonic setting"); Assert.AreEqual(gb.Text, text, $"Raw text TestCase width: {width}"); Assert.AreEqual(gb.EscapedText, string.Empty, $"Escaped text TestCase width: {width}"); }
public AlertGroup(AlertCheckBox theCheckBox, DecentGroupBox theGroupBox, AlertNumericUpDown triggerLevelUpDown, AlertNumericUpDown triggerThresholdUpDown, AlertNumericUpDown alertIntervalUpDown, IEnumerable <Label> theLabels) { Debug.Assert(theCheckBox != null && theGroupBox != null && triggerLevelUpDown != null && triggerThresholdUpDown != null && alertIntervalUpDown != null && theLabels != null); m_checkBox = theCheckBox; m_groupBox = theGroupBox; m_upDownTriggerLevel = triggerLevelUpDown; m_upDownTriggerPeriod = triggerThresholdUpDown; m_upDownAlertInterval = alertIntervalUpDown; m_labels = theLabels; m_checkBox.CheckedChanged += m_theCheckBox_CheckedChanged; StoreOriginalSetting(); }
public void TestSetUp() { gb = null; }