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


C# Dialog.SetupUi方法代码示例

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


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

示例1: MainForm

	public MainForm (string[] args) : base ()
	{
		main = new Dialog ();
		main.SetupUi (this);

		// create the checkbox mapping
		backend_checkboxes = new Dictionary<string, QCheckBox> (20);
		backend_checkboxes ["Files"] = main.filesBackend;
		backend_checkboxes ["Locate"] = main.locateBackend;
		backend_checkboxes ["KMail"] = main.kmailBackend;
		backend_checkboxes ["EvolutionMail"] = main.evoBackend;
		backend_checkboxes ["Thunderbird"] = main.tbirdBackend;
		backend_checkboxes ["Kopete"] = main.kopeteBackend;
		backend_checkboxes ["Konversation"] = main.konvBackend;
		backend_checkboxes ["Pidgin"] = main.pidginBackend;
		backend_checkboxes ["Empathy"] = main.empathyBackend;
		backend_checkboxes ["KonquerorHistory"] = main.konqBackend;
		backend_checkboxes ["KonqBookmark"] = main.kBookmarkBackend;
		backend_checkboxes ["Opera"] = main.operaBackend;
		backend_checkboxes ["IndexingService"] = main.ffBackend;
		backend_checkboxes ["KOrganizer"] = main.korgBackend;
		backend_checkboxes ["KNotes"] = main.knotesBackend;
		backend_checkboxes ["KAddressBook"] = main.kaddrbookBackend;
		backend_checkboxes ["Tomboy"] = main.tomboyBackend;
		backend_checkboxes ["Labyrinth"] = main.labyrinthBackend;
		backend_checkboxes ["EvolutionDataServer"] = main.edsBackend;
		backend_checkboxes ["Akregator"] = main.akregatorBackend;
		backend_checkboxes ["Blam"] = main.blamBackend;
		backend_checkboxes ["Liferea"] = main.lifereaBackend;
		backend_checkboxes ["documentation"] = main.docBackend;
		backend_checkboxes ["applications"] = main.appBackend;
		backend_checkboxes ["manpages"] = main.manpagesBackend;
		backend_checkboxes ["monodoc"] = main.monodocBackend;
		backend_checkboxes ["GMailSearch"] = main.gmailLiveBackend;

		Connect (main.CancelButton, SIGNAL ("clicked()"), qApp, SLOT ("quit()"));
		Connect (main.OkButton, SIGNAL ("clicked()"), this, SLOT ("saveSettings()"));
		Connect (main.RootAddButton, SIGNAL ("clicked()"), this, SLOT ("showDirChooser()"));
		Connect (main.RootRemoveButton, SIGNAL ("clicked()"), this, SLOT ("removeChosenDir()"));
		Connect (main.ExcludeDirAddButton, SIGNAL ("clicked()"), this, SLOT ("addExcludeDir()"));
		Connect (main.ExcludeDirRemoveButton, SIGNAL ("clicked()"), this, SLOT ("removeExcludeDir()"));
		Connect (main.PatternAdd, SIGNAL ("clicked()"), this, SLOT ("addNamePattern()"));
		Connect (main.PatternRemove, SIGNAL ("clicked()"), this, SLOT ("removeNamePattern()"));
		Connect (main.MailFolderAdd, SIGNAL ("clicked()"), this, SLOT ("addFolderPattern()"));
		Connect (main.MailFolderRemove, SIGNAL ("clicked()"), this, SLOT ("removeFolderPattern()"));
		Connect (main.IsGoogleAppsAccount, SIGNAL ("stateChanged(int)"), this, SLOT ("isGoogleAppsToggled(int)"));

		LoadSettings ();

		if (args.Length == 0)
			return;

		if (Array.IndexOf (args, "--indexing") != -1)
			main.TabWidget.SetCurrentWidget (main.IndexingTab);
		else if (Array.IndexOf (args, "--backends") != -1)
			main.TabWidget.SetCurrentWidget (main.BackendsTab);
		else if (Array.IndexOf (args, "--networking") != -1)
			main.TabWidget.SetCurrentWidget (main.NetworkingTab);
		else if (Array.IndexOf (args, "--google") != -1)
			main.TabWidget.SetCurrentWidget (main.GoogleTab);
		else
			main.TabWidget.SetCurrentWidget (main.GeneralTab);
	}
开发者ID:ArsenShnurkov,项目名称:beagle-1,代码行数:63,代码来源:SettingsQt.cs


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