Beispiel #1
0
		public static void GetSplash()
		{
			SplashTimer = new Timer { Interval = 2500 };
			SplashTimer.Start();
			SplashTimer.Elapsed += SplashElapsed;
			SplashWin = new ModernDialog
			{
				WindowStartupLocation = WindowStartupLocation.CenterScreen,
				SizeToContent = SizeToContent.WidthAndHeight,
				Buttons = null,
				Title = "Идет загрузка",
				Content = new SplashScreen()
			};
			SplashWin.ShowDialog();
		}
 private static void GetAbout(object obj)
 {
     AboutWin = new AboutWindow();
     SpeechConverter.GetJobVoice("О программе.");
     AboutWin.ShowDialog();
 }
Beispiel #3
0
        /// <summary>
        /// Displays a messagebox.
        /// </summary>
        /// <param name="text">The text.</param>
        /// <param name="title">The title.</param>
        /// <param name="button">The button.</param>
        /// <param name="owner">The window owning the messagebox. The messagebox will be located at the center of the owner.</param>
        /// <returns></returns>
        public static MessageBoxResult ShowMessage(string text, string title, MessageBoxButton button, Window owner = null)
        {
            var dlg = new ModernDialog {
                Title = title,
                Content = new BbCodeBlock { BbCode = text, Margin = new Thickness(0, 0, 0, 8) },
                MinHeight = 0,
                MinWidth = 0,
                MaxHeight = 480,
                MaxWidth = 640,
            };
            if (owner != null) {
                dlg.Owner = owner;
            }

            dlg.Buttons = GetButtons(dlg, button);
            dlg.ShowDialog();
            return dlg._messageBoxResult;
        }