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


C# PopupDialog.Show方法代码示例

本文整理汇总了C#中PopupDialog.Show方法的典型用法代码示例。如果您正苦于以下问题:C# PopupDialog.Show方法的具体用法?C# PopupDialog.Show怎么用?C# PopupDialog.Show使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PopupDialog的用法示例。


在下文中一共展示了PopupDialog.Show方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: AddCalibrationComponentType

        private void AddCalibrationComponentType(NodeView nodeView)
        {
            CmsWebServiceClient cmsWebServiceClient = new CmsWebServiceClient(Utils.WcfBinding, Utils.WcfEndPoint);
            AddEditCalibrationComponentTypeDialog dialog = new AddEditCalibrationComponentTypeDialog();
            dialog.Show();

            dialog.Closed += (s1, e1) =>
                                 {
                                     if (dialog.DialogResult.HasValue && dialog.DialogResult.Value)
                                     {
                                         EventHandler<AddCalibrationComponentTypeCompletedEventArgs> addCompleted = null;
                                         addCompleted = (s2, e2) =>
                                                            {

                                                                if (e2.Result.HasErrors)
                                                                {
                                                                    var errorDialog = new PopupDialog(PopupDialogType.Error, Utils.DisplayErrorMessages(e2.Result.ServerErrorMessages));
                                                                    errorDialog.Show();
                                                                }
                                                                else
                                                                {
                                                                    CalibrationComponentType calibrationComponentType = e2.Result.EntityResult;

                                                                    if (calibrationComponentType != null)
                                                                    {
                                                                        NodeView child = new NodeView(nodeView)
                                                                        {
                                                                            Id = calibrationComponentType.Id,
                                                                            Name = dialog.ComponentType.Name,
                                                                            Description = dialog.ComponentType.Description,
                                                                            Icon = "/CmsEquipmentDatabase;component/Images/Configuration.png",
                                                                            Type = NodeType.CalibrationComponentType,
                                                                            HasChildren = true,
                                                                            SortField = dialog.ComponentType.Ordinal.ToString()
                                                                        };
                                                                        if (nodeView.ChildrenLoaded)
                                                                        {
                                                                            nodeView.Children.Add(child);
                                                                            nodeView.Sort();
                                                                        }
                                                                    }
                                                                    cmsWebServiceClient.AddCalibrationComponentTypeCompleted -= addCompleted;
                                                                }
                                                            };

                                         cmsWebServiceClient.AddCalibrationComponentTypeCompleted += addCompleted;
                                         cmsWebServiceClient.AddCalibrationComponentTypeAsync(dialog.ComponentType);
                                     }
                                 };
        }
开发者ID:barrett2474,项目名称:CMS2,代码行数:50,代码来源:InstrumentConfigControl.xaml.cs

示例2: RemoveIssue

        private void RemoveIssue(QuickIssue quickIssue)
        {
            if (!CMS.EffectivePrivileges.IssueTab.CanDelete || !CMS.EffectivePrivileges.AdminTab.CanModify || !quickIssue.IsActive)
            {
                return;
            }

            string message = String.Format("Delete Issue {0} - '{1}'  Issue?", quickIssue.Id, quickIssue.Name);
            var popupDialog = new PopupDialog(PopupDialogType.ConfirmDelete, message);

            popupDialog.Show();
            popupDialog.Closed +=
                (s2, e2) =>
                {
                    if (popupDialog.PopupDialogResult == PopupDialogResult.Yes)
                    {
                        //DELETE
                        var cmsWebServiceClient = new CmsWebServiceClient(Utils.WcfBinding, Utils.WcfEndPoint);

                        cmsWebServiceClient.DeleteIssueCompleted +=
                            (s1, e1) =>
                            {
                                EventAggregator.GetEvent<PrismEvents.CloseTabPrismEvent>().Publish(quickIssue);
                            };

                        cmsWebServiceClient.DeleteIssueAsync(quickIssue.Id, CMS.User.Id);
                    }
                };
        }
开发者ID:barrett2474,项目名称:CMS2,代码行数:29,代码来源:MainPage.xaml.cs

示例3: DeleteButtonHandler

        private void DeleteButtonHandler(object parameter)
        {
            if (SelectedComponent != null)
            {
                string message = string.Format("Remove selected Calibration? ({0})", SelectedComponent.Name);
                PopupDialog popupDialog = new PopupDialog(PopupDialogType.ConfirmDelete, message);
                popupDialog.Show();
                popupDialog.Closed +=
                    (s2, e2) =>
                    {
                        if (popupDialog.PopupDialogResult == PopupDialogResult.Yes)
                        {
                            mInstrument.CalibrationComponents.Remove(SelectedComponent);

                            View.ComponentPropertiesControl.Content = null;
                            RaisePropertyChanged("Components");
                            RaisePropertyChanged("SelectedComponent");

                            mSelectedComponent = null;
                            RaiseChangeEvent();

                            OnCollectionChanged();
                        }
                    };

            }
        }
开发者ID:barrett2474,项目名称:CMS2,代码行数:27,代码来源:InstrumentCalibrationComponentsViewModel.cs

示例4: OkButtonHandler

        private void OkButtonHandler(object parameter)
        {
            if (CanExecuteAddButtonHandler(parameter))
            {
                if (AreAllValid() && PurchaseOrders.All(x => !x.HasErrors) && OtherAccruals.All(x => !x.HasErrors))
                {
                    var undeliveredPortionHigherThanAccrue = PurchaseOrders.Where(x => x.UndeliveredPortion.HasValue && x.AmountAccruedDecimal > x.UndeliveredPortion.Value).ToList();

                    if (undeliveredPortionHigherThanAccrue.Any())
                    {
                        StringBuilder errorMessage = new StringBuilder();
                        foreach (var purchaseOrderAccureModel in undeliveredPortionHigherThanAccrue)
                        {
                            errorMessage.Append(String.Format("Accrue {0:c} is more than Undelivered Proportion {1:c}.{2}", purchaseOrderAccureModel.AmountAccruedDecimal,
                                purchaseOrderAccureModel.UndeliveredPortion.Value, Environment.NewLine));
                        }

                        errorMessage.Append(Environment.NewLine);

                        errorMessage.Append("Click OK to accept or Cancel to modify.");

                        PopupDialog popupDialog = new PopupDialog(PopupDialogType.SaveComfirm, errorMessage.ToString(), "Warning", 700, 250);
                        popupDialog.Show();
                        popupDialog.Closed += (sender, args) =>
                        {
                            if (popupDialog.PopupDialogResult == PopupDialogResult.Ok)
                            {
                                Save();
                            }
                            else
                            {
                                foreach (var purchaseOrderAccureModel in undeliveredPortionHigherThanAccrue)
                                {
                                    purchaseOrderAccureModel.AddValidationError("Accrue", "Accrue is more than the Undelivered amount");
                                }
                            }
                        };

                    }
                    else
                    {
                        Save();
                    }
                }
                else
                {
                    var validationErrors = GetErrors();
                    if (validationErrors.Any())
                    {
                        View.ValidationPopup.Show(validationErrors);
                    }
                }
            }
        }
开发者ID:barrett2474,项目名称:CMS2,代码行数:54,代码来源:PurchaseOrderViewModel.cs

示例5: UnMarkIssueAsRestrictedContent

        private void UnMarkIssueAsRestrictedContent(QuickIssue quickIssue)
        {
            var cmsWebServiceClient = new CmsWebServiceClient(Utils.WcfBinding, Utils.WcfEndPoint);

            cmsWebServiceClient.UnMarkIssueAsRestrictedCompleted += (s, e) =>
            {
                if (e.Result)
                {
                    quickIssue.RestrictedContent = false;

                }
                else
                {
                    var dialog = new PopupDialog(PopupDialogType.Error,
                        "Access is restricted due to issue content – please contact the System Administrator.",
                        "Restricted Content Issue");
                    dialog.Show();
                }
            };
            cmsWebServiceClient.UnMarkIssueAsRestrictedAsync(quickIssue.Id, CMS.User.Id);
        }
开发者ID:barrett2474,项目名称:CMS2,代码行数:21,代码来源:IssuesNavigationControl.xaml.cs

示例6: AddExistingControlSystemComponentTypeAlarmProperty

        private void AddExistingControlSystemComponentTypeAlarmProperty(NodeView nodeView)
        {
            var controlSystemEquipmentComponentTypeId = nodeView.Parent.Id;
            var cmsWebServiceClient = new CmsWebServiceClient(Utils.WcfBinding, Utils.WcfEndPoint);

            cmsWebServiceClient.GetControlSystemComponentTypeCompleted +=
                (s, e) =>
                {
                    var dialog = new AddEditExistingControlSystemComponentAlarmPropertyDialog(e.Result);
                    dialog.Show();

                    dialog.Closed += (s1, e1) =>
                    {
                        if (dialog.DialogResult.HasValue && dialog.DialogResult.Value)
                        {
                            EventHandler<SaveControlSystemComponentTypeAlarmPropertyCompletedEventArgs> addCompleted = null;
                            addCompleted = (s2, eventArgs) =>
                            {
                                var entityResult = eventArgs.Result.EntityResult;

                                if (eventArgs.Result.HasErrors)
                                {
                                    var popup = new PopupDialog(PopupDialogType.Error, Utils.DisplayErrorMessages(eventArgs.Result.ServerErrorMessages));
                                    popup.Show();
                                    return;
                                }

                                if (entityResult != null)
                                {
                                    var child = new NodeView(nodeView)
                                    {
                                        Id = entityResult.Id,
                                        Name = dialog.ControlSystemComponentTypeAlarmProperty.ControlSystemAlarmProperty.Name,
                                        Description = dialog.ControlSystemComponentTypeAlarmProperty.ControlSystemAlarmProperty.Description,
                                        Icon = "/CmsEquipmentDatabase;component/Images/Configuration.png",
                                        Type = NodeType.ControlSystemComponentTypeAlarmProperty,
                                        HasChildren = false,
                                        SortField = entityResult.Ordinal.ToString()
                                    };
                                    if (nodeView.ChildrenLoaded)
                                    {
                                        nodeView.Children.Add(child);
                                        nodeView.Sort();
                                    }
                                }

                                cmsWebServiceClient.SaveControlSystemComponentTypeAlarmPropertyCompleted -= addCompleted;
                            };
                            cmsWebServiceClient.SaveControlSystemComponentTypeAlarmPropertyCompleted += addCompleted;

                            var systemComponentTypeTuningProperty = new ControlSystemComponentTypeAlarmProperty
                            {
                                ComponentTypeId = controlSystemEquipmentComponentTypeId,
                                AlarmPropertyId = dialog.ControlSystemComponentTypeAlarmProperty.AlarmPropertyId,
                                Ordinal = dialog.ControlSystemComponentTypeAlarmProperty.Ordinal
                            };

                            cmsWebServiceClient.SaveControlSystemComponentTypeAlarmPropertyAsync(systemComponentTypeTuningProperty);
                        }
                    };
                };
            cmsWebServiceClient.GetControlSystemComponentTypeAsync(controlSystemEquipmentComponentTypeId);
        }
开发者ID:barrett2474,项目名称:CMS2,代码行数:63,代码来源:ControlSystemConfigControl.xaml.cs

示例7: ProccessTransferFiles

        private void ProccessTransferFiles(int fileNumber, FileInfo dialogFile, List<FileInfo> dialogFiles)
        {
            var cmsWebServiceClient = new CmsWebServiceClient(Utils.WcfBinding, Utils.WcfEndPoint);

            try
            {
                Stream stream = dialogFile.OpenRead();

                View.RadProgressBar1.Maximum = stream.Length;
                View.RadProgressBar1.Minimum = 0;
                View.RadProgressBar1.Visibility = Visibility.Visible;
                View.RadProgressBar1.Value = 0;

                if (stream.Length > int.MaxValue)
                {
                    var errorDialog = new PopupDialog(PopupDialogType.Warning, string.Format("File [{0}] can not be bigger than 2GB.", dialogFile.Name), "Warning: File is to large");
                    errorDialog.Show();
                    return;
                }

                int transferChunkSize = Utils.GetTransferChunkSize(stream);
                var file = new CommonUploadFile {Name = dialogFile.Name, Size = stream.Length, Path = Guid.NewGuid().ToString()};

                var newAttachment = new IssueFile
                {
                    DateUploaded = DateTime.Now,
                    Filename = file.Name,
                    IssueId = mIssue.Id,
                    Issue = mIssue,
                    Path = file.Path,
                    UploadedById = CMS.User.Id,
                    User = CMS.User,
                    AttachmentType = new AttachmentType {Id = (int) CommonUtils.AttachmentType.Unknown},
                    AttachmentTypeId = (int) CommonUtils.AttachmentType.Unknown,
                    AttachmentTypes = mAttachmentTypes,
                    RestrictedContent = false,
                    SelectedAttachmentType = new AttachmentType {Id = (int) CommonUtils.AttachmentType.Unknown}
                };

                file.Attachment = newAttachment;

                if (stream.Position > -1 && stream.Position < stream.Length)
                {
                    int chunkSize = Utils.GetCurrentChunkSize(stream, transferChunkSize);

                    var fileBytes = new byte[chunkSize];
                    stream.Read(fileBytes, 0, chunkSize);

                    EventHandler<UploadAttachmentCompletedEventArgs> uploadFileChunkCompleted = null;
                    uploadFileChunkCompleted = (s1, e1) =>
                    {
                        if (stream.Position > -1 && stream.Position < stream.Length)
                        {
                            chunkSize = Utils.GetCurrentChunkSize(stream, transferChunkSize);
                            double percentage = (stream.Position/file.Size);

                            string fileName = file.Attachment.Filename.Remove(0, file.Attachment.Filename.IndexOf(']') + 1).Trim();
                            file.Attachment.Filename = String.Format("[{0:#.##%}] {1}", percentage, fileName);

                            fileBytes = new byte[chunkSize];
                            stream.Read(fileBytes, 0, chunkSize);

                            View.RadProgressBar1.Value = View.RadProgressBar1.Value + chunkSize;

                            cmsWebServiceClient.UploadAttachmentAsync(file.Name, fileBytes, file.Path, true);
                        }
                        else
                        {
                            file.Attachment.Filename = file.Name;

                            cmsWebServiceClient.UploadAttachmentCompleted -= uploadFileChunkCompleted;

                            Attachments.Add(newAttachment);

                            //Close the stream when all files are uploaded
                            stream.Close();
                            UploadInProgress = false;
                            if (dialogFiles.Count > fileNumber + 1)
                            {
                                fileNumber++;
                                ProccessTransferFiles(fileNumber, dialogFiles[fileNumber], dialogFiles);
                            }

                            mIssue.IssueFiles.Add(newAttachment);
                            RaisePropertyChanged("SelectedAttachmentType");
                            RaisePropertyChanged("Attachments");
                            OnCollectionChanged();

                            //UPLOAD IS COMPLETE - Save Model
                            cmsWebServiceClient.SaveIssueFilesCompleted += ((sender, args) =>
                            {
                                EventAggregator.GetEvent<PrismEvents.RefreshIssueRevisionHistoryPrismEvent>().Publish(null);
                            });
                            cmsWebServiceClient.SaveIssueFilesAsync(new List<IssueFile> {newAttachment});

                            View.RadProgressBar1.Visibility = Visibility.Collapsed;

                            OnUploadComplete();
                        }
                    };
//.........这里部分代码省略.........
开发者ID:barrett2474,项目名称:CMS2,代码行数:101,代码来源:IssueFilesViewModel.cs

示例8: Save

        private void Save(TimesheetDialog view)
        {
            if (!HasErrors())
            {
                mTimesheet.LastModifiedByUserId = CMS.User.Id;
                mTimesheet.LastModifiedDate = DateTime.Now;

                mSavingTimesheet = true;
                OkButtonCommand.RaiseCanExecuteChanged();
                SubmitButtonCommand.RaiseCanExecuteChanged();

                var cee = new CmsWebServiceClient(Utils.WcfBinding, Utils.WcfEndPoint);
                cee.SaveTimesheetCompleted += (s, e) =>
                {
                    if (e.Result.HasErrors)
                    {
                        var errorDialog = new PopupDialog(PopupDialogType.Error, Utils.DisplayErrorMessages(e.Result.ServerErrorMessages));
                        errorDialog.Show();
                        mSavingTimesheet = false;
                        OkButtonCommand.RaiseCanExecuteChanged();
                        SubmitButtonCommand.RaiseCanExecuteChanged();
                    }
                    else
                    {
                        view.Timesheet = mTimesheet;
                        view.DialogResult = true;
                    }
                };
                cee.SaveTimesheetAsync(mTimesheet);
            }
        }
开发者ID:barrett2474,项目名称:CMS2,代码行数:31,代码来源:TimesheetViewModel.cs

示例9: DeleteButtonHandler

        private void DeleteButtonHandler(object parameter)
        {
            var selected = (from x in DocumentLocations where x.Checked select x).ToList();

            if (selected.Count == 0)
            {
                return;
            }

            string message = string.Format("Remove selected Locations? ({0})", selected.Count);
            PopupDialog popupDialog = new PopupDialog(PopupDialogType.ConfirmDelete, message);
            popupDialog.Show();
            popupDialog.Closed +=
                (s2, e2) =>
                {
                    if (popupDialog.PopupDialogResult == PopupDialogResult.Yes)
                    {
                        List<DocumentAssignedLocation> keep = new List<DocumentAssignedLocation>((from x in DocumentLocations where !x.Checked select x).ToList());
                        mDocument.DocumentAssignedLocations = keep;

                        RaisePropertyChanged("DocumentLocations");
                        OnCollectionChanged();
                        Utils.OnCollectionChanged(EventAggregator, mDocument, "DocumentLocationsViewModel", true);
                    }
                };
        }
开发者ID:barrett2474,项目名称:CMS2,代码行数:26,代码来源:DocumentLocationsViewModel.cs

示例10: CheckForTooManyFavourites

 private void CheckForTooManyFavourites()
 {
     //if we try and save too many at once silverlight throws an "too large" exception.  set the max using the const. 150 should be enough.
     if (mFilteredQuickDocuments.Count > MaxFav)
     {
         var errors = new List<string> { string.Format("Added the first {0} items of {1} to Favourites.  This is the maximum that can be saved at once.", MaxFav, mFilteredQuickDocuments.Count) };
         var errorDialog = new PopupDialog(PopupDialogType.Information, Utils.DisplayErrorMessages(errors));
         errorDialog.Show();
     }
 }
开发者ID:barrett2474,项目名称:CMS2,代码行数:10,代码来源:DocumentNavigationControl.xaml.cs

示例11: Reinstate

        private void Reinstate(QuickDocument quickDocument)
        {
            var cmsWebServiceClient = new CmsWebServiceClient(Utils.WcfBinding, Utils.WcfEndPoint);

            cmsWebServiceClient.UnDeleteDocumentCompleted += (s, e) =>
            {
                if (e.Result.HasErrors)
                {
                    var errorDialog = new PopupDialog(PopupDialogType.Error, Utils.DisplayErrorMessages(e.Result.ServerErrorMessages));
                    errorDialog.Show();
                    return;
                }
            };
            cmsWebServiceClient.UnDeleteDocumentAsync(quickDocument.Id);
        }
开发者ID:barrett2474,项目名称:CMS2,代码行数:15,代码来源:DocumentNavigationControl.xaml.cs

示例12: DeleteInstrumentComponentType

        private void DeleteInstrumentComponentType(NodeView nodeView)
        {
            string message = String.Format("Delete Component Type {0} ?", nodeView.Name);
            PopupDialog popupDialog = new PopupDialog(PopupDialogType.ConfirmDelete, message);
            popupDialog.Show();
            popupDialog.Closed +=
                (s, e) =>
                {
                    if (popupDialog.PopupDialogResult == PopupDialogResult.Yes)
                    {
                        CmsWebServiceClient cmsWebServiceClient = new CmsWebServiceClient(Utils.WcfBinding, Utils.WcfEndPoint);
                        EventHandler<DeleteInstrumentComponentTypeCompletedEventArgs> deleteCompleted = null;
                        deleteCompleted = (s2, e2) =>
                                              {
                                                  DbOperationResult ds = e2.Result;

                                                  if (!ds.HasErrors)
                                                  {
                                                      nodeView.Parent.Children.Remove(nodeView);
                                                  }
                                                  else
                                                  {
                                                      var errorDialog = new PopupDialog(PopupDialogType.Error, Utils.DisplayErrorMessages(ds.ServerErrorMessages));
                                                      errorDialog.Show();
                                                  }
                                                  cmsWebServiceClient.DeleteInstrumentComponentTypeCompleted -= deleteCompleted;
                                              };

                        cmsWebServiceClient.DeleteInstrumentComponentTypeCompleted += deleteCompleted;
                        cmsWebServiceClient.DeleteInstrumentComponentTypeAsync(nodeView.Id);
                    }
                };
        }
开发者ID:barrett2474,项目名称:CMS2,代码行数:33,代码来源:InstrumentConfigControl.xaml.cs

示例13: DeleteCalibrationProperty

        private void DeleteCalibrationProperty(NodeView nodeView)
        {
            var confirmDialog = new PopupDialog(PopupDialogType.ConfirmDelete, String.Format("Delete property '{0}'?", nodeView.Name));
            confirmDialog.Show();
            confirmDialog.Closed +=
                (s, e) =>
                {
                    if (confirmDialog.PopupDialogResult == PopupDialogResult.Yes)
                    {
                        CmsWebServiceClient cmsWebServiceClient = new CmsWebServiceClient(Utils.WcfBinding, Utils.WcfEndPoint);
                        EventHandler<DeleteCalibrationPropertyCompletedEventArgs> deleteCompleted = null;
                        deleteCompleted = (s2, eventArgs) =>
                        {
                            DbOperationResult result = eventArgs.Result;

                            if (!result.HasErrors)
                            {
                                nodeView.Parent.Children.Remove(nodeView);
                            }
                            else
                            {
                                var dialog = new PopupDialog(PopupDialogType.Error, result.ServerErrorMessages[0]);
                                dialog.Show();
                            }

                            cmsWebServiceClient.DeleteCalibrationPropertyCompleted -= deleteCompleted;
                        };

                        cmsWebServiceClient.DeleteCalibrationPropertyCompleted += deleteCompleted;
                        cmsWebServiceClient.DeleteCalibrationPropertyAsync(nodeView.Id);
                    }
                };
        }
开发者ID:barrett2474,项目名称:CMS2,代码行数:33,代码来源:InstrumentConfigControl.xaml.cs

示例14: DeleteCalibrationEngineeringUnit

        private void DeleteCalibrationEngineeringUnit(NodeView nodeView)
        {
            string message = String.Format("Delete Engineering Unit {0} ?", nodeView.Name);
            PopupDialog popupDialog = new PopupDialog(PopupDialogType.RemoveLinkConfirm, message);
            popupDialog.Show();
            popupDialog.Closed +=
                (s4, e2) =>
                {
                    if (popupDialog.PopupDialogResult == PopupDialogResult.Yes)
                    {
                        CmsWebServiceClient cmsWebServiceClient = new CmsWebServiceClient(Utils.WcfBinding, Utils.WcfEndPoint);

                        EventHandler<DeleteCalibrationEngineeringUnitCompletedEventArgs> deleteCompleted = null;

                        deleteCompleted = (s3, eventArgs) =>
                        {
                            DbOperationResult result = eventArgs.Result;

                            if (!result.ServerErrorMessages.Any())
                            {
                                nodeView.Parent.Children.Remove(nodeView);
                            }
                            else
                            {
                                var errorDialog = new PopupDialog(PopupDialogType.Error, Utils.DisplayErrorMessages(result.ServerErrorMessages));
                                errorDialog.Show();
                            }

                            cmsWebServiceClient.DeleteCalibrationEngineeringUnitCompleted -= deleteCompleted;
                        };

                        cmsWebServiceClient.DeleteCalibrationEngineeringUnitCompleted += deleteCompleted;
                        cmsWebServiceClient.DeleteCalibrationEngineeringUnitAsync(nodeView.Id);
                    }
                };
        }
开发者ID:barrett2474,项目名称:CMS2,代码行数:36,代码来源:InstrumentConfigControl.xaml.cs

示例15: RemoveControlSystemComponentTypeAlarmProperty

        private void RemoveControlSystemComponentTypeAlarmProperty(NodeView nodeView)
        {
            var confirmDialog = new PopupDialog(PopupDialogType.ConfirmDelete, string.Format("Delete property '{0}'?", nodeView.Name));
            confirmDialog.Show();
            confirmDialog.Closed +=
                (s, e) =>
                {
                    if (confirmDialog.PopupDialogResult == PopupDialogResult.Yes)
                    {
                        var cmsWebServiceClient = new CmsWebServiceClient(Utils.WcfBinding, Utils.WcfEndPoint);
                        EventHandler<DeleteControlSystemComponentTypeAlarmPropertyCompletedEventArgs> deleteCompleted = null;
                        deleteCompleted = (s2, eventArgs) =>
                        {
                            if (!eventArgs.Result.HasErrors)
                            {
                                nodeView.Parent.Children.Remove(nodeView);
                            }
                            else
                            {
                                var errorDialog = new PopupDialog(PopupDialogType.Error, Utils.DisplayErrorMessages(eventArgs.Result.ServerErrorMessages));
                                errorDialog.Show();
                            }

                            cmsWebServiceClient.DeleteControlSystemComponentTypeAlarmPropertyCompleted -= deleteCompleted;
                        };

                        cmsWebServiceClient.DeleteControlSystemComponentTypeAlarmPropertyCompleted += deleteCompleted;
                        cmsWebServiceClient.DeleteControlSystemComponentTypeAlarmPropertyAsync(nodeView.Id);
                    }
                };
        }
开发者ID:barrett2474,项目名称:CMS2,代码行数:31,代码来源:ControlSystemConfigControl.xaml.cs


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