当前位置: 首页>>代码示例>>C#>>正文


C# WixDocument.CreateWixDialog方法代码示例

本文整理汇总了C#中ICSharpCode.WixBinding.WixDocument.CreateWixDialog方法的典型用法代码示例。如果您正苦于以下问题:C# WixDocument.CreateWixDialog方法的具体用法?C# WixDocument.CreateWixDialog怎么用?C# WixDocument.CreateWixDialog使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ICSharpCode.WixBinding.WixDocument的用法示例。


在下文中一共展示了WixDocument.CreateWixDialog方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SetUpFixture

		public void SetUpFixture()
		{
			WixDocument doc = new WixDocument();
			doc.LoadXml(GetWixXml());
			controlsAddedCount = 0;
			CreatedComponents.Clear();
			WixDialog wixDialog = doc.CreateWixDialog("AcceptLicenseDialog", new MockTextFileReader());
			using (Form dialog = wixDialog.CreateDialog(this)) {
				foreach (Control control in dialog.Controls) {
					++controlsAddedCount;
				}
				RadioButtonGroupBox radioButtonGroup = (RadioButtonGroupBox)dialog.Controls[0];
				radioButtonGroupName = radioButtonGroup.Name;
				radioButtonGroupPropertyName = radioButtonGroup.PropertyName;
				radioButtonGroupLocation = radioButtonGroup.Location;
				radioButtonGroupSize = radioButtonGroup.Size;
				
				RadioButton acceptRadioButton = (RadioButton)radioButtonGroup.Controls[0];
				acceptRadioButtonName = acceptRadioButton.Name;
				acceptRadioButtonLocation = acceptRadioButton.Location;
				acceptRadioButtonSize = acceptRadioButton.Size;
				
				RadioButton declineRadioButton = (RadioButton)radioButtonGroup.Controls[1];
				declineRadioButtonName = declineRadioButton.Name;
				declineRadioButtonLocation = declineRadioButton.Location;
				declineRadioButtonSize = declineRadioButton.Size;
			}
		}
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:28,代码来源:RadioButtonTestFixture.cs

示例2: SetUpFixture

		public void SetUpFixture()
		{
			SD.InitializeForUnitTests();
			BitmapFileNamesRequested.Clear();
			CreatedComponents.Clear();
			
			WixProject p = WixBindingTestsHelper.CreateEmptyWixProject();
			projectDirectory = p.Directory;
			p.Name = "MySetup";
			
			FileProjectItem item = new FileProjectItem(p, ItemType.Compile);
			item.Include = "Setup.wxs";
			string docFileName = item.FileName;
			ProjectService.AddProjectItem(p, item);
			
			item = new FileProjectItem(p, ItemType.Compile);
			item.Include = "Fragment.wxs";
			ProjectService.AddProjectItem(p, item);

			WixDocument doc = new WixDocument(p, this);
			doc.FileName = docFileName;
			doc.LoadXml(GetMainWixXml());
			
			WixDialog wixDialog = doc.CreateWixDialog("WelcomeDialog", this);
			using (Form dialog = wixDialog.CreateDialog(this)) {
				PictureBox pictureBox = (PictureBox)dialog.Controls[0];
				hasImage = (pictureBox.Image != null);
			}
		}
开发者ID:Paccc,项目名称:SharpDevelop,代码行数:29,代码来源:BitmapFromProjectTestFixture.cs

示例3: SetUpFixture

		public void SetUpFixture()
		{
			WixDocument doc = new WixDocument();
			doc.LoadXml(GetWixXml());
			CreatedComponents.Clear();
			WixDialog wixDialog = doc.CreateWixDialog("AcceptLicenseDialog", new MockTextFileReader());
			using (Form dialog = wixDialog.CreateDialog(this)) {

				RadioButtonGroupBox radioButtonGroup = (RadioButtonGroupBox)dialog.Controls[0];
				Label label1 = new Label();
				label1.Left = 100;
				label1.Top = 30;
				radioButtonGroup.Controls.Add(label1);
				radioButtonGroup.Controls.SetChildIndex(label1, 0);
			
				Label label2 = new Label();
				label2.Left = 100;
				label2.Top = 30;
				radioButtonGroup.Controls.Add(label2);
				
				// Add a panel to the dialog controls.
				Panel panel = new Panel();
				panel.Left = 100;
				panel.Top = 30;
				dialog.Controls.Add(panel);
								
				XmlElement dialogElement = wixDialog.UpdateDialogElement(dialog);
				XmlElement radioButtonGroupElement = (XmlElement)dialogElement.SelectSingleNode("w:Control[@Id='Buttons']", new WixNamespaceManager(dialogElement.OwnerDocument.NameTable));
				acceptRadioButtonElement = (XmlElement)radioButtonGroupElement.SelectSingleNode("//w:RadioButtonGroup/w:RadioButton", new WixNamespaceManager(dialogElement.OwnerDocument.NameTable));
				
				controlElementCount = dialogElement.SelectNodes("w:Control", new WixNamespaceManager(dialogElement.OwnerDocument.NameTable)).Count;
				radioButtonElementCount = radioButtonGroupElement.SelectNodes("//w:RadioButtonGroup//w:RadioButton", new WixNamespaceManager(dialogElement.OwnerDocument.NameTable)).Count;				
			}
		}
开发者ID:2594636985,项目名称:SharpDevelop,代码行数:34,代码来源:NonRadioButtonAddedToGroupTestFixture.cs

示例4: SetUpFixture

		public void SetUpFixture()
		{
			WixDocument doc = new WixDocument();
			doc.LoadXml(GetWixXml());
			CreatedComponents.Clear();
			WixDialog wixDialog = doc.CreateWixDialog("AcceptLicenseDialog", new MockTextFileReader());
			using (Form dialog = wixDialog.CreateDialog(this)) {

				Panel radioButtonGroup = (Panel)dialog.Controls[0];
				radioButtonGroup.Left = 30;
				radioButtonGroup.Top = 100;
				
				RadioButton acceptRadioButton = (RadioButton)radioButtonGroup.Controls[0];
				acceptRadioButton.Left = 0;
				acceptRadioButton.Top = 5;
				acceptRadioButton.Width = 100;
				acceptRadioButton.Height = 50;
				acceptRadioButton.Text = "Accept";

				RadioButton declineRadioButton = (RadioButton)radioButtonGroup.Controls[1];
				declineRadioButton.Left = 10;
				declineRadioButton.Top = 20;
				declineRadioButton.Width = 200;
				declineRadioButton.Height = 30;
				declineRadioButton.Text = String.Empty;
				
				XmlElement dialogElement = wixDialog.UpdateDialogElement(dialog);
				radioButtonGroupElement = (XmlElement)dialogElement.SelectSingleNode("w:Control[@Id='Buttons']", new WixNamespaceManager(dialogElement.OwnerDocument.NameTable));
				
				XmlNodeList radioButtonElements = radioButtonGroupElement.SelectNodes("//w:RadioButtonGroup/w:RadioButton", new WixNamespaceManager(dialogElement.OwnerDocument.NameTable));
				acceptRadioButtonElement = (XmlElement)radioButtonElements[0];
				declineRadioButtonElement = (XmlElement)radioButtonElements[1];
			}
		}
开发者ID:2594636985,项目名称:SharpDevelop,代码行数:34,代码来源:RadioButtonGroupChangedTestFixture.cs

示例5: SetUpFixture

		public void SetUpFixture()
		{
			WixDocument doc = new WixDocument();
			doc.LoadXml(GetWixXml());
			CreatedComponents.Clear();
			WixDialog wixDialog = doc.CreateWixDialog("WelcomeDialog", new MockTextFileReader());
			using (Form dialog = wixDialog.CreateDialog(this)) {

				ListBox listBox = new ListBox();
				listBox.Name = "NewListBox";
				listBox.Items.Add("New item1");
				listBox.Items.Add("New item2");
				dialog.Controls.Add(listBox);
				
				XmlElement dialogElement = wixDialog.UpdateDialogElement(dialog);
				XmlElement controlElement = (XmlElement)dialogElement.ChildNodes[0];
				controlName = controlElement.GetAttribute("Id");
				controlType = controlElement.GetAttribute("Type");
				
				XmlElement listBoxElement = (XmlElement)controlElement.ChildNodes[0];
				
				listBoxItemCount = listBoxElement.ChildNodes.Count;
				XmlElement listBoxItem1Element = (XmlElement)listBoxElement.ChildNodes[0];
				listBoxItem1Text = listBoxItem1Element.GetAttribute("Text");
				XmlElement listBoxItem2Element = (XmlElement)listBoxElement.ChildNodes[1];
				listBoxItem2Text = listBoxItem2Element.GetAttribute("Text");
			}
		}
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:28,代码来源:ListBoxAddedTestFixture.cs

示例6: SetUpFixture

		public void SetUpFixture()
		{
			WixDocument doc = new WixDocument();
			doc.LoadXml(GetWixXml());
			controlsAddedCount = 0;
			CreatedComponents.Clear();
			WixDialog wixDialog = doc.CreateWixDialog("WelcomeDialog", new MockTextFileReader());
			using (Form dialog = wixDialog.CreateDialog(this)) {
				foreach (Control control in dialog.Controls) {
					++controlsAddedCount;
				}
				Button nextButton = (Button)dialog.Controls[0];
				nextButtonName = nextButton.Name;
				nextButtonLocation = nextButton.Location;
				nextButtonSize = nextButton.Size;
				nextButtonText = nextButton.Text;
				
				dialogAcceptButtonName = ((Button)dialog.AcceptButton).Name;
				
				Button cancelButton = (Button)dialog.Controls[1];
				cancelButtonName = cancelButton.Name;
				
				dialogCancelButtonName = ((Button)dialog.CancelButton).Name;
			}
		}
开发者ID:2594636985,项目名称:SharpDevelop,代码行数:25,代码来源:ButtonsTestFixture.cs

示例7: CreateDialog

		public void CreateDialog()
		{
			WixDocument doc = new WixDocument();
			doc.LoadXml(GetWixXml());
			WixDialog wixDialog = doc.CreateWixDialog("WelcomeDialog", new MockTextFileReader());
			using (Form dialog = wixDialog.CreateDialog(this)) {
			}
		}
开发者ID:2594636985,项目名称:SharpDevelop,代码行数:8,代码来源:TextStyleNameWithSpecialXmlCharsTestFixture.cs

示例8: SetUpFixture

		public void SetUpFixture()
		{
			WixDocument doc = new WixDocument();
			doc.LoadXml(GetWixXml());
			WixDialog wixDialog = doc.CreateWixDialog("WelcomeDialog", new MockTextFileReader());
			using (Form dialog = wixDialog.CreateDialog()) {
				dialogTitle = dialog.Text;
			}
		}
开发者ID:hefnerliu,项目名称:SharpDevelop,代码行数:9,代码来源:DialogTitleTestFixture.cs

示例9: SetUpFixture

		public void SetUpFixture()
		{
			WixDocument doc = new WixDocument();
			doc.LoadXml(GetWixXml());
			WixDialog wixDialog = doc.CreateWixDialog("WelcomeDialog", new MockTextFileReader());
			using (Form simpleDialog = wixDialog.CreateDialog()) {
				minimizeBox = simpleDialog.MinimizeBox;
			}
		}
开发者ID:2594636985,项目名称:SharpDevelop,代码行数:9,代码来源:DialogMinimizeBoxTestFixture.cs

示例10: SetUpFixture

		public void SetUpFixture()
		{
			WixDocument doc = new WixDocument();
			doc.LoadXml(GetWixXml());
			WixDialog wixDialog = doc.CreateWixDialog("WelcomeDialog", new MockTextFileReader());
			using (Form dialog = wixDialog.CreateDialog(this)) {
				Button backButton = (Button)dialog.Controls[0];
				disabled = !backButton.Enabled;
			}
		}
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:10,代码来源:DisabledButtonTestFixture.cs

示例11: UpdateDialogElement

		public void UpdateDialogElement()
		{
			WixDocument doc = new WixDocument();
			doc.LoadXml(GetWixXml());
			CreatedComponents.Clear();
			WixDialog wixDialog = doc.CreateWixDialog("WelcomeDialog", new MockTextFileReader());
			using (Form dialog = wixDialog.CreateDialog(this)) {
				XmlElement dialogElement = wixDialog.UpdateDialogElement(dialog);
			}
		}
开发者ID:2594636985,项目名称:SharpDevelop,代码行数:10,代码来源:ComboBoxPropertyWithSpecialXmlCharsTestFixture.cs

示例12: SetUpFixture

		public void SetUpFixture()
		{
			WixDocument doc = new WixDocument();
			doc.LoadXml(GetWixXml());
			CreatedComponents.Clear();
			WixDialog wixDialog = doc.CreateWixDialog("WelcomeDialog", new MockTextFileReader());
			using (Form dialog = wixDialog.CreateDialog(this)) {
				formComponent = CreatedComponents[0];
				formName = dialog.Name;
			}
		}
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:11,代码来源:SimpleDialogUsingObjectCreatorTestFixture.cs

示例13: SetUpFixture

		public void SetUpFixture()
		{
			WixDocument doc = new WixDocument();
			doc.LoadXml(GetWixXml());
			WixDialog wixDialog = doc.CreateWixDialog("WelcomeDialog", new MockTextFileReader());
			using (Form dialog = wixDialog.CreateDialog(this)) {
				Button button = (Button)dialog.Controls[0];
				fontName = button.Font.Name;
				fontSize = button.Font.Size;
			}
		}
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:11,代码来源:ButtonFontTestFixture.cs

示例14: SetUpFixture

		public void SetUpFixture()
		{
			WixDocument doc = new WixDocument();
			doc.LoadXml(GetWixXml());

			WixDialog wixDialog = doc.CreateWixDialog("WelcomeDialog", new MockTextFileReader());
			using (Form dialog = wixDialog.CreateDialog()) {
				dialog.MinimizeBox = true;
				dialogElement = wixDialog.UpdateDialogElement(dialog);
			}
		}
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:11,代码来源:MinimizeBoxChangedTestFixture.cs

示例15: SetUpFixture

		public void SetUpFixture()
		{
			WixDocument doc = new WixDocument();
			doc.LoadXml(GetWixXml());
			WixDialog wixDialog = doc.CreateWixDialog("WelcomeDialog", new MockTextFileReader());
			using (Form dialog = wixDialog.CreateDialog(this)) {
				Button nextButton = (Button)dialog.Controls[0];
				nextButtonText = nextButton.Text;			
				Button cancelButton = (Button)dialog.Controls[1];
				cancelButtonText = cancelButton.Text;
			}
		}
开发者ID:ichengzi,项目名称:SharpDevelop,代码行数:12,代码来源:ButtonTextTestFixture.cs


注:本文中的ICSharpCode.WixBinding.WixDocument.CreateWixDialog方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。