本文整理汇总了C#中DialogMessage类的典型用法代码示例。如果您正苦于以下问题:C# DialogMessage类的具体用法?C# DialogMessage怎么用?C# DialogMessage使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DialogMessage类属于命名空间,在下文中一共展示了DialogMessage类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ReceiveDialogMessage
public override bool ReceiveDialogMessage(DialogMessage message)
{
base.EnableFinish = true;
base.IsLastPanel = true;
base.EnablePrevious = true;
if (customizer == null) {
customizer = (Properties)base.CustomizationObject;
}
if (message == DialogMessage.Activated) {
this.layoutControl.ReportLayout = (GlobalEnums.ReportLayout)customizer.Get("ReportLayout");
reportStructure = (ReportStructure)customizer.Get("Generator");
layoutControl.AvailableFieldsCollection = reportStructure.AvailableFieldsCollection;
}
else if (message == DialogMessage.Finish)
{
customizer.Set ("ReportLayout",this.layoutControl.ReportLayout);
var reportStructure = (ReportStructure)customizer.Get("Generator");
reportStructure.Grouping = layoutControl.GroupName;
}
return true;
}
示例2: ReceiveDialogMessage
public override bool ReceiveDialogMessage(DialogMessage message)
{
if (message == DialogMessage.OK) {
}
return true;
}
示例3: Show
public static void Show(string msg, string caption, MessageBoxButton button, MessageImage msgImage, Action<MessageBoxResult> callback)
{
DialogMessage result = new DialogMessage(null, msg, callback);
result.Caption = caption + ";" + ((int)msgImage).ToString();
result.Button = button;
AppMessages.SendMessage.Send(result);
}
示例4: UserSettingView
public UserSettingView(DialogMessage dialog)
{
InitializeComponent();
try
{
if (!ViewModelBase.IsInDesignModeStatic)
{
_viewModelExport = App.Container.GetExport<ViewModelBase>(
ViewModelTypes.UserSettingViewModel);
if (_viewModelExport != null)
{
DataContext = _viewModelExport.Value;
if (_viewModelExport.Value is IViewModel)
{
(_viewModelExport.Value as IViewModel).DialogSended = dialog;
(_viewModelExport.Value as IViewModel).CloseWindow += new EventHandler(View_CloseWindow);
(_viewModelExport.Value as IViewModel).SetFocus += new EventHandler(View_SetFocus);
(_viewModelExport.Value as IViewModel).LoadPermission();
}
this.KeyUp += new System.Windows.Input.KeyEventHandler(View_KeyUp);
}
this.Closed += new EventHandler<Telerik.Windows.Controls.WindowClosedEventArgs>(View_Closed);
}
}
catch (Exception ex)
{
MessageCustomize.Show(ex.Message);
}
}
示例5: GuardUnsavedChanges
public void GuardUnsavedChanges(Action action, Action cancel)
{
if (action == null)
{
throw new ArgumentNullException("action");
}
if (cancel == null)
{
throw new ArgumentNullException("cancel");
}
if (!isDirty)
{
action();
return;
}
var message =
new DialogMessage(this, "Save tracks?", m => OnResult(m, action, cancel))
{
Button = MessageBoxButton.YesNoCancel,
Icon = MessageBoxImage.Warning,
Caption = "MixPlanner"
};
messenger.SendToUI(message);
}
示例6: RequestNavigateTo
private void RequestNavigateTo(string view, bool checkDirty = true)
{
if (checkDirty && _isDirty)
{
var navigationConfirmationDialog = new DialogMessage(
"The current page has unsaved changes, if you continue\nthese changes will be lost. Do you want to continue?",
result =>
{
if (result == MessageBoxResult.Yes)
{
RequestNavigateTo(view, false);
}
}
)
{
Button = MessageBoxButton.YesNo,
Caption = "Are you sure?"
};
MessengerInstance.Send<DialogMessage>(navigationConfirmationDialog);
}
else
{
MessengerInstance.Send<Messages.NavigateTo>(new Messages.NavigateTo(view));
_isDirty = false;
MessengerInstance.Send<Messages.Navigating>(new Messages.Navigating(), CurrentView);
_currentView = view;
RaisePropertyChanged("CurrentView");
}
}
示例7: ReceiveDialogMessage
public override bool ReceiveDialogMessage(DialogMessage message)
{
if (customizer == null) {
customizer = (Properties)base.CustomizationObject;
reportStructure = (ReportStructure)customizer.Get("Generator");
base.NextWizardPanelID = "Layout";
}
else if (message == DialogMessage.Activated) {
WriteResult();
base.EnableNext = true;
}
else if (message == DialogMessage.Next)
{
WriteResult();
base.EnableNext = true;
}
else if (message == DialogMessage.Finish) {
WriteResult();
base.EnableNext = true;
base.EnableFinish = true;
}
return true;
}
示例8: HandleDialogMessage
private void HandleDialogMessage(DialogMessage message)
{
if (message == null)
{
return;
}
if (message.Sender.GetType() == typeof(MainViewModel)
&& message.Target == typeof(MainWindow))
{
var result = MessageBox.Show(
this,
message.Content,
message.Caption,
message.Button,
message.Icon,
message.DefaultResult,
message.Options);
if (message.Callback != null)
{
message.Callback(result);
}
}
}
示例9: ReceiveDialogMessage
public override bool ReceiveDialogMessage(DialogMessage message)
{
if (message == DialogMessage.OK) {
if (SelectedCulture != null) {
PropertyService.Set(uiLanguageProperty, SelectedCulture);
}
}
return true;
}
示例10: CreateErrorDialogBoxMessage
public static DialogMessage CreateErrorDialogBoxMessage(string content, Action<MessageBoxResult> callback)
{
var message = new DialogMessage(content, callback);
message.Button = MessageBoxButton.OK;
message.Icon = MessageBoxImage.Error;
message.DefaultResult = MessageBoxResult.OK;
message.Options = MessageBoxOptions.None;
return message;
}
示例11: CreateConfirmDialogBoxMessage
public static DialogMessage CreateConfirmDialogBoxMessage(string content, Action<MessageBoxResult> callback)
{
var message = new DialogMessage(content, callback);
message.Button = MessageBoxButton.YesNo;
message.Icon = MessageBoxImage.Question;
message.DefaultResult = MessageBoxResult.No;
message.Options = MessageBoxOptions.None;
return message;
}
示例12: OnSendMessage
private static void OnSendMessage(DialogMessage dialogMessage)
{
if (dialogMessage != null)
{
MessageView msg = new MessageView();
msg.Diaglog = dialogMessage;
msg.ShowDialog();
}
}
示例13: DialogViewModel
public DialogViewModel(DialogMessage model, Action<DialogViewModel> callback)
{
_model = model;
_callback = callback;
MessageBoxText = model.Content;
Caption = model.Caption;
Button = model.Button;
CommitCommand = new RelayCommand(Executed_CommitCommand);
}
示例14: ShowDialog
public void ShowDialog(DialogMessage msg)
{
var result = System.Windows.Forms.MessageBox.Show(msg.Caption);
if (result == System.Windows.Forms.DialogResult.OK)
{
// msg.Callback(dialog.SelectedPath);
}
}
示例15: OnStatusUpdateMessage
private static void OnStatusUpdateMessage(DialogMessage dialogMessage)
{
if (dialogMessage != null)
{
MessageBoxResult result = MessageBox.Show(dialogMessage.Content,
dialogMessage.Caption, dialogMessage.Button);
dialogMessage.ProcessCallback(result);
}
}