コード例 #1
0
        public void CreateAddElementeDialog()
        {
            AddXmlNodeDialog dialog                 = (AddXmlNodeDialog)treeViewContainer.CallCreateAddElementDialog(new string[0]);
            Panel            bottomPanel            = (Panel)dialog.Controls["bottomPanel"];
            Label            customNameTextBoxLabel = (Label)bottomPanel.Controls["customNameTextBoxLabel"];

            Assert.AreEqual(StringParser.Parse("${res:ICSharpCode.XmlEditor.AddElementDialog.Title}"), dialog.Text);
            Assert.AreEqual(StringParser.Parse("${res:ICSharpCode.XmlEditor.AddElementDialog.CustomElementLabel}"), customNameTextBoxLabel.Text);
        }
コード例 #2
0
 public void RightToLeftConversion()
 {
     try {
         PropertyService.Set("CoreProperties.UILanguage", RightToLeftConverter.RightToLeftLanguages[0]);
         using (AddXmlNodeDialog dialog = new AddXmlNodeDialog()) {
             Assert.AreEqual(RightToLeft.Yes, dialog.RightToLeft);
         }
     } finally {
         PropertyService.Set("CoreProperties.UILanguage", Thread.CurrentThread.CurrentUICulture.Name);
     }
 }
コード例 #3
0
 public void RightToLeftConversion()
 {
     try {
         RightToLeftConverter.IsRightToLeft = true;
         using (AddXmlNodeDialog dialog = new AddXmlNodeDialog()) {
             Assert.AreEqual(RightToLeft.Yes, dialog.RightToLeft);
         }
     } finally {
         RightToLeftConverter.IsRightToLeft = false;
     }
 }
コード例 #4
0
        public void NoListBoxShownWhenNoNames()
        {
            using (AddXmlNodeDialog dialog = new AddXmlNodeDialog(new string[0])) {
                Size expectedClientSize = this.bottomPanel.Size;
                Size expectedMinSize    = dialog.Size;

                Panel bottomPanel = (Panel)dialog.Controls["bottomPanel"];

                Assert.IsFalse(dialog.Controls.ContainsKey("namesListBox"));
                Assert.AreEqual(DockStyle.Fill, bottomPanel.Dock);
                Assert.AreEqual(expectedClientSize, dialog.ClientSize);
                Assert.AreEqual(expectedMinSize, dialog.MinimumSize);
            }
        }