コード例 #1
0
ファイル: ErrorForm.cs プロジェクト: swatt6400/NetOffice
 /// <summary>
 /// Creates an instance of ErrorForm and show
 /// </summary>
 /// <param name="exception">exception as any</param>
 /// <param name="category">error category</param>
 /// <param name="currentLanguageID">current user language</param>
 public static void ShowError(Exception exception, ErrorCategory category, int currentLanguageID)
 {
     ErrorForm form = new ErrorForm(exception, category, currentLanguageID);
     if (null != MainForm.Singleton && MainForm.Singleton.Visible)
         form.ShowDialog(MainForm.Singleton);
     else
     {
         form.StartPosition = FormStartPosition.CenterScreen;
         form.ShowDialog();
     }
 }
コード例 #2
0
        /// <summary>
        /// Creates an instance of ErrorForm and show
        /// </summary>
        /// <param name="parent">modal parent</param>
        /// <param name="exception">exception as any</param>
        /// <param name="category">error category</param>
        public static void ShowError(IWin32Window parent, Exception exception, ErrorCategory category)
        {
            ErrorForm form = new ErrorForm(exception, category, Forms.MainForm.Singleton.CurrentLanguageID);

            form.ShowDialog(parent);
        }
コード例 #3
0
        /// <summary>
        /// Creates an instance of ErrorForm and show
        /// </summary>
        /// <param name="parent">modal parent</param>
        /// <param name="exception">exception as any</param>
        /// <param name="category">error category</param>
        /// <param name="currentLanguageID">current user language</param>
        public static void ShowError(IWin32Window parent, Exception exception, ErrorCategory category, int currentLanguageID)
        {
            ErrorForm form = new ErrorForm(exception, category, currentLanguageID);

            form.ShowDialog(parent);
        }
コード例 #4
0
ファイル: ErrorForm.cs プロジェクト: swatt6400/NetOffice
 /// <summary>
 /// Creates an instance of ErrorForm and show
 /// </summary>
 /// <param name="parent">modal parent</param>
 /// <param name="exception">exception as any</param>
 /// <param name="category">error category</param>
 public static void ShowError(IWin32Window parent, Exception exception, ErrorCategory category)
 {
     ErrorForm form = new ErrorForm(exception, category, Forms.MainForm.Singleton.CurrentLanguageID );
     form.ShowDialog(parent);
 }
コード例 #5
0
ファイル: ErrorForm.cs プロジェクト: swatt6400/NetOffice
 /// <summary>
 /// Creates an instance of ErrorForm and show
 /// </summary>
 /// <param name="parent">modal parent</param>
 /// <param name="exception">exception as any</param>
 /// <param name="category">error category</param>
 /// <param name="currentLanguageID">current user language</param>
 public static void ShowError(IWin32Window parent, Exception exception, ErrorCategory category, int currentLanguageID)
 {
     ErrorForm form = new ErrorForm(exception, category, currentLanguageID);
     form.ShowDialog(parent);
 }
コード例 #6
0
        /// <summary>
        /// Creates an instance of ErrorForm and show
        /// </summary>
        /// <param name="parent">modal parent</param>
        /// <param name="exception">exception as any</param>
        public static void ShowError(IWin32Window parent, Exception exception)
        {
            ErrorForm form = new ErrorForm(exception, ErrorCategory.NonCritical);

            form.ShowDialog(parent);
        }
コード例 #7
0
        /// <summary>
        /// Creates an instance of ErrorForm and show
        /// </summary>
        /// <param name="parent">modal parent</param>
        /// <param name="exception">exception as any</param>
        /// <param name="category">error category</param>
        /// <param name="message">friendly header message for the user</param>
        public static void ShowError(IWin32Window parent, Exception exception, ErrorCategory category, string message)
        {
            ErrorForm form = new ErrorForm(exception, message, category);

            form.ShowDialog(parent);
        }