Exemplo n.º 1
0
 /// <summary>
 /// Creates an instance of SelectLanguageForm and show
 /// </summary>
 /// <param name="owner">modal owner</param>
 /// <param name="header">header text to display</param>
 /// <returns>selected language from dialog instance</returns>
 public static Translation.ToolLanguage ShowForm(IWin32Window owner, string header = null)
 {
     SelectLanguageForm dlg = new SelectLanguageForm(header);
     DialogResult dr = dlg.ShowDialog(owner);
     if (dr == DialogResult.OK)
         return dlg.Selected;
     else
         return null;
 }
Exemplo n.º 2
0
        /// <summary>
        /// Creates an instance of SelectLanguageForm and show
        /// </summary>
        /// <param name="owner">modal owner</param>
        /// <param name="header">header text to display</param>
        /// <returns>selected language from dialog instance</returns>
        public static Translation.ToolLanguage ShowForm(IWin32Window owner, string header = null)
        {
            SelectLanguageForm dlg = new SelectLanguageForm(header);
            DialogResult       dr  = dlg.ShowDialog(owner);

            if (dr == DialogResult.OK)
            {
                return(dlg.Selected);
            }
            else
            {
                return(null);
            }
        }