コード例 #1
0
        /// <summary>
        /// Creates a new AddAttributeDialog.
        /// </summary>
        /// <param name="attributeNames">The attribute names to be listed in the
        /// dialog.</param>
        protected virtual IAddXmlNodeDialog CreateAddAttributeDialog(string[] attributeNames)
        {
            AddXmlNodeDialog dialog = new AddXmlNodeDialog(attributeNames);

            dialog.Text = StringParser.Parse("${res:ICSharpCode.XmlEditor.AddAttributeDialog.Title}");
            dialog.CustomNameLabelText = StringParser.Parse("${res:ICSharpCode.XmlEditor.AddAttributeDialog.CustomAttributeLabel}");
            return(dialog);
        }
コード例 #2
0
        /// <summary>
        /// Creates a new AddElementDialog.
        /// </summary>
        /// <param name="elementNames">The element names to be listed in the
        /// dialog.</param>
        protected virtual IAddXmlNodeDialog CreateAddElementDialog(string[] elementNames)
        {
            AddXmlNodeDialog dialog = new AddXmlNodeDialog(elementNames);

            dialog.Text = StringParser.Parse("${res:ICSharpCode.XmlEditor.AddElementDialog.Title}");
            dialog.CustomNameLabelText = StringParser.Parse("${res:ICSharpCode.XmlEditor.AddElementDialog.CustomElementLabel}");
            return(dialog);
        }
コード例 #3
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);
			}
		}
コード例 #4
0
		public void RightToLeftConversion()
		{
			try {
				RightToLeftConverter.IsRightToLeft = true;
				using (AddXmlNodeDialog dialog = new AddXmlNodeDialog()) {
					Assert.AreEqual(RightToLeft.Yes, dialog.RightToLeft);
				}
			} finally {
				RightToLeftConverter.IsRightToLeft = false;
			}
		}
コード例 #5
0
		/// <summary>
		/// Creates a new AddAttributeDialog.
		/// </summary>
		/// <param name="attributeNames">The attribute names to be listed in the
		/// dialog.</param>
		protected virtual IAddXmlNodeDialog CreateAddAttributeDialog(string[] attributeNames)
		{
			AddXmlNodeDialog dialog = new AddXmlNodeDialog(attributeNames);
			dialog.Text = StringParser.Parse("${res:ICSharpCode.XmlEditor.AddAttributeDialog.Title}");
			dialog.CustomNameLabelText = StringParser.Parse("${res:ICSharpCode.XmlEditor.AddAttributeDialog.CustomAttributeLabel}");
			return dialog;
		}
コード例 #6
0
		/// <summary>
		/// Creates a new AddElementDialog.
		/// </summary>
		/// <param name="elementNames">The element names to be listed in the
		/// dialog.</param>
		protected virtual IAddXmlNodeDialog CreateAddElementDialog(string[] elementNames)
		{
			AddXmlNodeDialog dialog = new AddXmlNodeDialog(elementNames);
			dialog.Text = StringParser.Parse("${res:ICSharpCode.XmlEditor.AddElementDialog.Title}");
			dialog.CustomNameLabelText = StringParser.Parse("${res:ICSharpCode.XmlEditor.AddElementDialog.CustomElementLabel}");
			return dialog;
		}
コード例 #7
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);
			}
		}