Ejemplo n.º 1
0
		public static string CreateTitleBarText(DialogLevel dialogLevel, BrandType brandType, string sDialogNameWithinTitleBarText)
		{
			string sTitleBarText;

			switch (dialogLevel)
			{
			case DialogLevel.Primary:
				if (!string.IsNullOrEmpty(sDialogNameWithinTitleBarText))
				{
					sDialogNameWithinTitleBarText = string.Concat(" - ", sDialogNameWithinTitleBarText);
				}

				sTitleBarText = string.Format("{0}{1}", GetBrandTypeAsString(brandType), sDialogNameWithinTitleBarText);
				break;

			case DialogLevel.Secondary:
				sTitleBarText = GetBrandTypeAsString(brandType);
				break;

			case DialogLevel.Tertiary:
				sTitleBarText = sDialogNameWithinTitleBarText;
				break;

			default:
				sTitleBarText = string.Empty;
				break;
			}

			return sTitleBarText;
		}
Ejemplo n.º 2
0
        public void ShowDialog(DialogLevel level, string message, Form sender)
        {
            switch (level)
            {
            case DialogLevel.Exception:

                //Bloq user control
                this.sender         = sender ?? new Form();
                this.sender.Enabled = false;

                Dialog dialogException = new Dialog(message);
                dialogException.FormClosed += ReleaseSenderBlock;



                dialogException.TopLevel = true;
                dialogException.TopMost  = true;
                dialogException.ShowDialog();

                break;

            case DialogLevel.Information:
                Dialog dialogInfo = new Dialog(message);
                dialogInfo.TopLevel = true;
                dialogInfo.TopMost  = true;
                dialogInfo.ShowDialog();
                break;
            }
        }