当前位置: 首页>>代码示例>>C#>>正文


C# DialogMessage类代码示例

本文整理汇总了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;
		}
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:25,代码来源:LayoutPanel.cs

示例2: ReceiveDialogMessage

		public override bool ReceiveDialogMessage(DialogMessage message)
		{
			if (message == DialogMessage.OK) {
				
			}
			return true;
		}
开发者ID:kingjiang,项目名称:SharpDevelopLite,代码行数:7,代码来源:PropertyGridPanel.cs

示例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);
 }
开发者ID:hieu292,项目名称:hrm-k14vlu,代码行数:7,代码来源:MessageCustomize.cs

示例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);
     }
 }
开发者ID:hieu292,项目名称:hrm-k14vlu,代码行数:29,代码来源:UserSettingView.xaml.cs

示例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);
        }
开发者ID:rdingwall,项目名称:mixplanner,代码行数:28,代码来源:GuardUnsavedChangesService.cs

示例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");
            }

        }
开发者ID:LukeForder,项目名称:TestIt,代码行数:33,代码来源:ShellViewModel.cs

示例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;
		}
开发者ID:nylen,项目名称:SharpDevelop,代码行数:25,代码来源:PushModelPanel.cs

示例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);
                }
            }
        }
开发者ID:name2name2,项目名称:mvvmlight,代码行数:25,代码来源:MainWindow.xaml.cs

示例9: ReceiveDialogMessage

		public override bool ReceiveDialogMessage(DialogMessage message)
		{
			if (message == DialogMessage.OK) {
				if (SelectedCulture != null) {
					PropertyService.Set(uiLanguageProperty, SelectedCulture);
				}
			}
			return true;
		}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:9,代码来源:SelectCulturePanel.cs

示例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;
 }
开发者ID:willcraftia,项目名称:WindowsGame,代码行数:9,代码来源:DialogMessageHelper.cs

示例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;
 }
开发者ID:willcraftia,项目名称:WindowsGame,代码行数:9,代码来源:DialogMessageHelper.cs

示例12: OnSendMessage

 private static void OnSendMessage(DialogMessage dialogMessage)
 {
     if (dialogMessage != null)
     {
         MessageView msg = new MessageView();
         msg.Diaglog = dialogMessage;
         msg.ShowDialog();
     }
 }
开发者ID:hieu292,项目名称:hrm-k14vlu,代码行数:9,代码来源:MainPage.xaml.cs

示例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);
 }
开发者ID:namoshika,项目名称:Metrooz,代码行数:9,代码来源:DialogViewModel.cs

示例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);
            }
        }
开发者ID:modulexcite,项目名称:ngrok.editor,代码行数:9,代码来源:SitesPage.xaml.cs

示例15: OnStatusUpdateMessage

        private static void OnStatusUpdateMessage(DialogMessage dialogMessage)
        {
            if (dialogMessage != null)
            {
                MessageBoxResult result = MessageBox.Show(dialogMessage.Content,
                    dialogMessage.Caption, dialogMessage.Button);

                dialogMessage.ProcessCallback(result);
            }
        }
开发者ID:carriercomm,项目名称:InventoryManagement,代码行数:10,代码来源:MainPage.xaml.cs


注:本文中的DialogMessage类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。