Пример #1
0
 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);
 }
Пример #2
0
        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}");
        }
Пример #3
0
        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();
        }
Пример #4
0
 public void TestSetUp()
 {
     gb = null;
 }