Пример #1
0
		/// <summary>
		///     Show a Metro Message Box
		/// </summary>
		/// <param name="title">The title of the Message Box</param>
		/// <param name="message">The message to be displayed in the Message Box</param>
		/// <param name="buttons">The buttons to show in the Message Box</param>
		/// <returns>The button the user clicked</returns>
		public static MessageBoxResult Show(string title, string message, MessageBoxButtons buttons)
		{
			App.AssemblyStorage.AssemblySettings.HomeWindow.ShowMask();
			var msgBox = new MessageBoxOptions(title, message, buttons)
			{
				Owner = App.AssemblyStorage.AssemblySettings.HomeWindow,
				WindowStartupLocation = WindowStartupLocation.CenterOwner
			};
			msgBox.ShowDialog();
			App.AssemblyStorage.AssemblySettings.HomeWindow.HideMask();

			return TempStorage.MessageBoxButtonStorage;
		}
Пример #2
0
        /// <summary>
        ///     Show a Metro Message Box
        /// </summary>
        /// <param name="title">The title of the Message Box</param>
        /// <param name="message">The message to be displayed in the Message Box</param>
        /// <param name="buttons">The buttons to show in the Message Box</param>
        /// <returns>The button the user clicked</returns>
        public static MessageBoxResult Show(string title, string message, MessageBoxButtons buttons)
        {
            App.AssemblyStorage.AssemblySettings.HomeWindow.ShowMask();
            var msgBox = new MessageBoxOptions(title, message, buttons)
            {
                Owner = App.AssemblyStorage.AssemblySettings.HomeWindow,
                WindowStartupLocation = WindowStartupLocation.CenterOwner
            };

            msgBox.ShowDialog();
            App.AssemblyStorage.AssemblySettings.HomeWindow.HideMask();

            return(TempStorage.MessageBoxButtonStorage);
        }