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


C# IWin32Window类代码示例

本文整理汇总了C#中IWin32Window的典型用法代码示例。如果您正苦于以下问题:C# IWin32Window类的具体用法?C# IWin32Window怎么用?C# IWin32Window使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: Show

 /// <summary>
 /// Shows the dialog with the specified image.
 /// </summary>
 /// <param name="owner">The owner.</param>
 /// <param name="title">The title.</param>
 /// <param name="image">The image.</param>
 public void Show(IWin32Window owner, string title, Image image)
 {
     this.ClientSize = image.Size;
     this.Text = title;
     this.pictureBox.Image = image;
     base.ShowDialog();
 }
开发者ID:alexbikfalvi,项目名称:InetAnalytics,代码行数:13,代码来源:FormImage.cs

示例2: ShowDialogInternal

 public DialogResult ShowDialogInternal(string Text, IWin32Window owner)
 {
     m_Result = false;
     txtInput.Text = Text;
     this.ShowDialog(owner);
     return (m_Result) ? DialogResult.OK : DialogResult.Cancel;
 }
开发者ID:CharlesZHENG,项目名称:csexwb2,代码行数:7,代码来源:frmInput.cs

示例3: Install

        public SetupStatus Install(IWin32Window owner)
        {
            if (_status == SetupStatus.Installed)
                return _status;

            try
            {
                // get Everyone token for the current locale
                string everyone = new System.Security.Principal.SecurityIdentifier(
                    "S-1-1-0").Translate(typeof(System.Security.Principal.NTAccount)).ToString();
                string port = ConfigurationManager.AppSettings["Port"];
                string arguments = string.Format("http add urlacl url=http://+:{0}/ user=\"\\{1}\"", port, everyone);
                Log.Info("Adding ACL rule...");
                ProcessHelper.RunNetShell(arguments, "Failed to add URL ACL");
                _status = SetupStatus.Installed;
            }
            catch (Exception ex)
            {
                Log.Error(ex);
                _status = SetupStatus.Failed;
                Settings.Instance.UrlReservationSetupHadErrors = true;
                Settings.Instance.Save();
                throw;
            }
            return _status;
        }
开发者ID:LibertyLocked,项目名称:ets2-telemetry-server,代码行数:26,代码来源:UrlReservationSetup.cs

示例4: SearchForUpdatesAndShow

 public void SearchForUpdatesAndShow(IWin32Window aOwnerWindow, bool alwaysShow)
 {
     OwnerWindow = aOwnerWindow;
     new Thread(SearchForUpdates).Start();
     if (alwaysShow)
         ShowDialog(aOwnerWindow);
 }
开发者ID:noamkfir,项目名称:gitextensions,代码行数:7,代码来源:FormUpdates.cs

示例5: SaveRadTree

 public static void SaveRadTree(RadTreeView view, IWin32Window frm = null, string filename = "")
 {
     var saveFileDialogCsv = new SaveFileDialog();
     saveFileDialogCsv.Title = "Save data to Comma Separated File";
     saveFileDialogCsv.Filter = "CSV or Excel|*.csv";
     saveFileDialogCsv.CheckPathExists = true;
     saveFileDialogCsv.DefaultExt = "csv";
     saveFileDialogCsv.AddExtension = true;
     saveFileDialogCsv.OverwritePrompt = true;
     saveFileDialogCsv.InitialDirectory = Repository.DataFolder;
     saveFileDialogCsv.FileName = filename;
     if (saveFileDialogCsv.ShowDialog(frm) == System.Windows.Forms.DialogResult.OK)
     {
         try
         {
             sb = new StringBuilder();
             foreach (var node in view.Nodes)
             {
                 sb.AppendLine(node.Text.Replace("<=", ","));
                 ListNodes(node);
             }
             System.IO.File.WriteAllText(saveFileDialogCsv.FileName, sb.ToString(),Encoding.UTF8);
         }
         catch (Exception exc)
         {
             MessageBox.Show(exc.Message, "Unexpected Error");
         }
     }
 }
开发者ID:kenlassesen,项目名称:dnafamilytree,代码行数:29,代码来源:SaveUtility.cs

示例6: Show

 public new void Show(IWin32Window owner)
 {
     if (!Visible)
         base.Show(owner);
     else
         Activate();
 }
开发者ID:arsaccol,项目名称:SLED,代码行数:7,代码来源:SledProjectModifiedForm.cs

示例7: DoCompressionDlg

		/// <summary>
		/// Show a configuration dialog (modal) for JMDWriter
		/// </summary>
		/// <param name="threads">number of threads</param>
		/// <param name="complevel">compression level</param>
		/// <param name="tmin">minimum possible number of threads</param>
		/// <param name="tmax">maximum possible number of threads</param>
		/// <param name="cmin">minimum compression level, assumed to be "no compression"</param>
		/// <param name="cmax">maximum compression level</param>
		/// <param name="hwnd">hwnd of parent</param>
		/// <returns>false if user canceled; true if user consented</returns>
		public static bool DoCompressionDlg(ref int threads, ref int complevel, int tmin, int tmax, int cmin, int cmax, IWin32Window hwnd)
		{
			JMDForm j = new JMDForm();
			j.threadsBar.Minimum = tmin;
			j.threadsBar.Maximum = tmax;
			j.compressionBar.Minimum = cmin;
			j.compressionBar.Maximum = cmax;
			j.threadsBar.Value = threads;
			j.compressionBar.Value = complevel;
			j.threadsBar_Scroll(null, null);
			j.compressionBar_Scroll(null, null);
			j.threadLeft.Text = String.Format("{0}", tmin);
			j.threadRight.Text = String.Format("{0}", tmax);
			j.compressionLeft.Text = String.Format("{0}", cmin);
			j.compressionRight.Text = String.Format("{0}", cmax);

			DialogResult d = j.ShowDialog(hwnd);

			threads = j.threadsBar.Value;
			complevel = j.compressionBar.Value;

			j.Dispose();
			if (d == DialogResult.OK)
				return true;
			else
				return false;
		}
开发者ID:ddugovic,项目名称:RASuite,代码行数:38,代码来源:JMDForm.cs

示例8: Show

		public static DialogResult Show (IWin32Window owner, string text, string caption,
						 MessageBoxButtons buttons)
		{
			MessageBoxForm form = new MessageBoxForm (owner, text, caption, buttons, MessageBoxIcon.None);
				
			return form.RunDialog ();
		}
开发者ID:Clancey,项目名称:MonoMac.Windows.Form,代码行数:7,代码来源:MessageBox.cs

示例9: AskForKey

        /// <summary>Shows the "SSH error" dialog modally, and returns the path to the key, if one was loaded.</summary>
        public static string AskForKey(IWin32Window parent)
        {
            var form = new FormPuttyError();
            form.ShowDialog(parent);

            return form.KeyPath;
        }
开发者ID:rschoening,项目名称:gitextensions,代码行数:8,代码来源:FormPuttyError.cs

示例10: showMessage

		public DialogResult showMessage(IWin32Window owner, string message, string title, MessageBoxIcon icon, MessageBoxButtons buttons) {

			//Wenn kein Owner mitgegeben wurde, dann Versuchen das Hauptfenster anzuzeigen
			if (owner == null || owner.Handle == IntPtr.Zero)
				owner = new dummyWindow(Process.GetCurrentProcess().MainWindowHandle);

			const string appTitle = "updateSystem.NET Administration";

			//Nachricht loggen
			logLevel lLevel;
			switch (icon) {
				case MessageBoxIcon.Error:
					lLevel = logLevel.Error;
					break;
				case MessageBoxIcon.Exclamation:
					lLevel = logLevel.Warning;
					break;
				default:
					lLevel = logLevel.Info;
					break;
			}
			Log.writeState(lLevel,
			                        string.Format("{0}{1}", string.IsNullOrEmpty(title) ? "" : string.Format("{0} -> ", title),
			                                      message));

			var dlgResponse = Environment.OSVersion.Version.Major >= 6
			       	? showTaskDialog(owner, appTitle, title, message, buttons, icon)
			       	: showMessageBox(owner, appTitle, title, message, icon, buttons);

			Log.writeKeyValue(lLevel, "Messagedialogresult", dlgResponse.ToString());

			return dlgResponse;
		}
开发者ID:hbaes,项目名称:updateSystem.NET,代码行数:33,代码来源:applicationSession.Messages.cs

示例11: ShowDialog

		public new DialogResult ShowDialog(IWin32Window owner)
		{
			// Set validate names to false otherwise windows will not let you select "Folder Selection."
			dialog.ValidateNames = false;
			dialog.CheckFileExists = false;
			dialog.CheckPathExists = true;
			
			try
			{
				// Set initial directory (used when dialog.FileName is set from outside)
				if (dialog.FileName != null && dialog.FileName != "")
				{
					if (Directory.Exists(dialog.FileName))
						dialog.InitialDirectory = dialog.FileName;
					else
						dialog.InitialDirectory = Path.GetDirectoryName(dialog.FileName);
				}
			}
			catch (Exception ex)
			{
				// Do nothing
			}

			// Always default to Folder Selection.
			dialog.FileName = "Folder Selection.";

			if (owner == null)
				return dialog.ShowDialog();
			else
				return dialog.ShowDialog(owner);
		}
开发者ID:DrakoGlyph,项目名称:tModLoader,代码行数:31,代码来源:FileFolderDialog.cs

示例12: ShowLoading

 public static void ShowLoading(IWin32Window owner, string text, Image loadingImage)
 {
     CloseLoading();
     LoadingBoxArgs args = new LoadingBoxArgs(owner, text, loadingImage);
     form = new MessageIconForm();
     form.ShowLoading(args);
 }
开发者ID:panshuiqing,项目名称:winform-ui,代码行数:7,代码来源:LoadingBox.cs

示例13: EditComponent

		public virtual bool EditComponent (ITypeDescriptorContext context, object component, IWin32Window owner)
		{
			ComponentEditorForm f = new ComponentEditorForm (component, GetComponentEditorPages ());
			if (f.ShowForm (owner, GetInitialComponentEditorPageIndex ()) == DialogResult.OK)
				return true;
			return false;
		}
开发者ID:nlhepler,项目名称:mono,代码行数:7,代码来源:WindowsFormsComponentEditor.cs

示例14: ShowDialog

		public DialogResult ShowDialog(IWin32Window Owner, string Path) {
			lblInfo.Text = string.Format(
				Language.GetString("fileAccessDialog_lblInfo_text")
				, Path);

			return base.ShowDialog(Owner);
		}
开发者ID:hbaes,项目名称:updateSystem.NET,代码行数:7,代码来源:fileAccessDialog.cs

示例15: SetDialog

 // ***** Dialog display *****
 public void SetDialog(IWin32Window owner, ClassHvcw refHvcw, string ssid, string token)
 {
     clsHvcw = refHvcw;
     textSSID.Text = ssid;
     txtToken = token;
     this.ShowDialog(owner);
 }
开发者ID:Qrain,项目名称:photo-tool,代码行数:8,代码来源:Sound.cs


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