/// <summary> /// Show the dialog /// </summary> /// <param name="title">Dialogs title</param> /// <param name="info">Info-text</param> /// <param name="action">Working action</param> /// <param name="bundle">Skin-Bundle</param> /// <returns>TRUE, if the dialog was not canceled and there are no exceptions in action thread</returns> public static bool ShowDialog(String title, String info, WorkingActionHandler action, SkinBundle bundle) { WorkingDialogEx dlg = new WorkingDialogEx(); dlg.Title = title; dlg.lblInfo.Content = info; dlg.action = action; if (bundle != null) { dlg.Resources.Source = bundle.XAMLSkinPath; dlg.Style = (Style)dlg.Resources[bundle.WindowTemplateKey]; } return(dlg.ShowDialog().GetValueOrDefault(false)); }
internal WorkingActionEventArgs(WorkingDialogEx win) { this.win = win; this.firstTick = Environment.TickCount; }
/// <summary> /// Show the dialog /// </summary> /// <param name="title">Dialogs title</param> /// <param name="info">Info-text</param> /// <param name="action">Working action</param> /// <param name="bundle">Skin-Bundle</param> /// <returns>TRUE, if the dialog was not canceled and there are no exceptions in action thread</returns> public static bool ShowDialog(String title, String info, WorkingActionHandler action, SkinBundle bundle) { WorkingDialogEx dlg = new WorkingDialogEx(); dlg.Title = title; dlg.lblInfo.Content = info; dlg.action = action; if (bundle != null) { dlg.Resources.Source = bundle.XAMLSkinPath; dlg.Style = (Style)dlg.Resources[bundle.WindowTemplateKey]; } return dlg.ShowDialog().GetValueOrDefault(false); }