private void _listBox_MouseLeave(object sender, EventArgs e)
 {
     EventsHelper.Fire(this.ResetDropDownFocusRequested, this, EventArgs.Empty);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Raises the <see cref="ActiveChanged"/> event.
 /// </summary>
 protected virtual void OnActiveChanged(EventArgs args)
 {
     EventsHelper.Fire(_activeChanged, this, args);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Raises the <see cref="InternalActiveChanged"/> event.
 /// </summary>
 private void OnInternalActiveChanged(EventArgs args)
 {
     EventsHelper.Fire(_internalActiveChanged, this, args);
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Raises the <see cref="Opened"/> event.
 /// </summary>
 protected virtual void OnOpened(EventArgs args)
 {
     EventsHelper.Fire(_opened, this, args);
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Raises the <see cref="Closed"/> event.
 /// </summary>
 protected virtual void OnClosed(EventArgs args)
 {
     EventsHelper.Fire(_closed, this, args);
 }
Ejemplo n.º 6
0
 void WorkerProgressUpdated(object sender, BackgroundTaskProgressEventArgs e)
 {
     ScanResultSet.Progress = e.Progress;
     EventsHelper.Fire(ProgressUpdated, this, null);
 }
 private void EditFolder()
 {
     EventsHelper.Fire(_onEditFolder, this, EventArgs.Empty);
 }
 private void NotifyPropertyChanged(string propertyName)
 {
     EventsHelper.Fire(_propertyChanged, this, new PropertyChangedEventArgs(propertyName));
 }
Ejemplo n.º 9
0
 private void OnDrawing()
 {
     EventsHelper.Fire(_drawing, this, EventArgs.Empty);
 }
Ejemplo n.º 10
0
 private void ColumnFilterMenuStrip_Closed(object sender, ToolStripDropDownClosedEventArgs e)
 {
     EventsHelper.Fire(_columnFilterMenuStripClosed, this, EventArgs.Empty);
 }
Ejemplo n.º 11
0
 protected virtual void OnSelectionChanged()
 {
     UpdateDeleteActionEnablement();
     EventsHelper.Fire(_selectedItemsChanged, this, EventArgs.Empty);
 }
Ejemplo n.º 12
0
 private void OnMagnificationSettingChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
 {
     EventsHelper.Fire(CheckedChanged, this, EventArgs.Empty);
 }
Ejemplo n.º 13
0
        /// <summary>
        /// Called when received response message.
        /// </summary>
        /// <param name="client">The client.</param>
        /// <param name="association">The association.</param>
        /// <param name="presentationID">The presentation ID.</param>
        /// <param name="message">The message.</param>
        public override void OnReceiveResponseMessage(DicomClient client, ClientAssociationParameters association, byte presentationID, DicomMessage message)
        {
            try
            {
                this.ResultStatus = message.Status.Status;
                switch (this.ResultStatus)
                {
                case DicomState.Cancel:
                case DicomState.Pending:
                case DicomState.Failure:
                    Platform.Log(LogLevel.Error, string.Format("{0} status received in Print Scu response message", message.Status.Status));

                    this.FailureDescription = SR.MessagePrinterError;
                    this.ReleaseConnection(client);
                    return;

                case DicomState.Warning:
                    Platform.Log(LogLevel.Warn, string.Format("{0} status received in Print Scu response message", message.Status.Status));
                    break;

                case DicomState.Success:
                    break;
                }

                EventsHelper.Fire(this.ProgressUpdated, this, new ProgressUpdateEventArgs(_numberOfImageBoxesSent));

                if (Canceled)
                {
                    Platform.Log(LogLevel.Info, "Cancel requested by user.  Closing association.");
                    client.SendAssociateAbort(DicomAbortSource.ServiceUser, DicomAbortReason.NotSpecified);
                    return;
                }

                Platform.Log(LogLevel.Info, "Success status received in Print Scu");

                var affectedUid = new DicomUid(message.AffectedSopInstanceUid, "Instance UID", UidType.SOPInstance);

                switch (message.CommandField)
                {
                case DicomCommandField.NCreateResponse:
                    switch (_eventObject)
                    {
                    case EventObject.FilmSession:
                        _filmSession.OnCreated(affectedUid);
                        break;

                    case EventObject.FilmBox:
                    {
                        var responseFilmBoxModule = new BasicFilmBoxModuleIod(message.DataSet);
                        _filmSession.OnFilmBoxCreated(affectedUid,
                                                      CollectionUtils.Map <ReferencedInstanceSequenceIod, DicomUid>(
                                                          responseFilmBoxModule.ReferencedImageBoxSequenceList,
                                                          imageBoxModule => new DicomUid(imageBoxModule.ReferencedSopInstanceUid, "Instance UID", UidType.SOPInstance)
                                                          ));
                    }
                    break;
                    }

                    break;

                case DicomCommandField.NDeleteResponse:
                    switch (_eventObject)
                    {
                    case EventObject.FilmSession:
                        _filmSession.OnDeleted();
                        this.ReleaseConnection(client);
                        break;

                    case EventObject.FilmBox:
                        _filmSession.OnFilmBoxDeleted();
                        break;
                    }

                    break;

                case DicomCommandField.NSetResponse:
                    _numberOfImageBoxesSent++;
                    _filmSession.OnImageBoxSet(affectedUid);
                    break;

                case DicomCommandField.NActionResponse:
                    _filmSession.OnFilmBoxPrinted(affectedUid);

                    break;

                default:
                    break;
                }
            }
            catch (Exception ex)
            {
                this.FailureDescription = ex.Message;
                Platform.Log(LogLevel.Error, ex.ToString());
                ReleaseConnection(client);
                throw;
            }
        }
 private void CloseDropDown()
 {
     EventsHelper.Fire(this.CloseDropDownRequested, this, EventArgs.Empty);
 }
Ejemplo n.º 15
0
        private ProcedurePlanSummaryTable(int cellRowCount)
            : base(cellRowCount)
        {
            this.Columns.Add(new TableColumn <Checkable <ProcedurePlanSummaryTableItem>, bool>(
                                 "X",
                                 delegate(Checkable <ProcedurePlanSummaryTableItem> checkable) { return(checkable.IsChecked); },
                                 delegate(Checkable <ProcedurePlanSummaryTableItem> checkable, bool isChecked)
            {
                checkable.IsChecked = isChecked;
                EventsHelper.Fire(_checkedRowsChanged, this, EventArgs.Empty);
            },
                                 0.1f));

            this.Columns.Add(new TableColumn <Checkable <ProcedurePlanSummaryTableItem>, string>(
                                 SR.ColumnStatus,
                                 delegate(Checkable <ProcedurePlanSummaryTableItem> checkable)
            {
                return(FormatStatus(checkable.Item));
            },
                                 0.5f));

            this.Columns.Add(new TableColumn <Checkable <ProcedurePlanSummaryTableItem>, string>(
                                 SR.ColumnModality,
                                 delegate(Checkable <ProcedurePlanSummaryTableItem> checkable) { return(checkable.Item.ModalityProcedureStep.Modality.Name); },
                                 0.5f));

            DateTimeTableColumn <Checkable <ProcedurePlanSummaryTableItem> > scheduledStartTimeColumn =
                new DateTimeTableColumn <Checkable <ProcedurePlanSummaryTableItem> >(
                    SR.ColumnScheduledTime,
                    delegate(Checkable <ProcedurePlanSummaryTableItem> checkable) { return(checkable.Item.ModalityProcedureStep.ScheduledStartTime); },
                    0.5f);

            this.Columns.Add(scheduledStartTimeColumn);

            this.Columns.Add(new DateTimeTableColumn <Checkable <ProcedurePlanSummaryTableItem> >(
                                 SR.ColumnCheckInTime,
                                 delegate(Checkable <ProcedurePlanSummaryTableItem> checkable) { return(checkable.Item.Procedure.CheckInTime); },
                                 0.5f));

            this.Columns.Add(new DateTimeTableColumn <Checkable <ProcedurePlanSummaryTableItem> >(
                                 SR.ColumnStartTime,
                                 delegate(Checkable <ProcedurePlanSummaryTableItem> checkable) { return(checkable.Item.ModalityProcedureStep.StartTime); },
                                 0.5f));


            this.Columns.Add(new TableColumn <Checkable <ProcedurePlanSummaryTableItem>, string>(SR.ColumnProcedureDescription,
                                                                                                 delegate(Checkable <ProcedurePlanSummaryTableItem> checkable)
            {
                // if MPS description is identical to procedure type name, don't put redundant text
                if (checkable.Item.ModalityProcedureStep.Description == checkable.Item.Procedure.Type.Name)
                {
                    return(ProcedureFormat.Format(checkable.Item.Procedure));
                }
                else
                {
                    // MPS desc is different, so append it
                    return(string.Format("{0} - {1}",
                                         ProcedureFormat.Format(checkable.Item.Procedure),
                                         checkable.Item.ModalityProcedureStep.Description));
                }
            },
                                                                                                 0.5f,
                                                                                                 ProcedureDescriptionRow));

            this.Sort(new TableSortParams(scheduledStartTimeColumn, true));
        }
Ejemplo n.º 16
0
 /// <summary>
 /// Raises the <see cref="CloseRequested"/> event.
 /// </summary>
 protected virtual void OnCloseRequested(EventArgs e)
 {
     EventsHelper.Fire(_closeRequested, this, e);
 }
Ejemplo n.º 17
0
 void WorkerTerminated(object sender, BackgroundTaskTerminatedEventArgs e)
 {
     EventsHelper.Fire(Terminated, this, null);
 }
Ejemplo n.º 18
0
 /// <summary>
 /// Called by <see cref="ControlGraphic"/> in response a mouse button release via <see cref="ControlGraphic.Stop"/>.
 /// </summary>
 /// <param name="mouseInformation">The mouse input information.</param>
 /// <returns>True if the framework should <b>not</b> release capture; False otherwise.</returns>
 protected override bool Stop(IMouseInformation mouseInformation)
 {
     EventsHelper.Fire(this.UndoableOperationStop, this, EventArgs.Empty);
     return(base.Stop(mouseInformation));
 }
Ejemplo n.º 19
0
 protected virtual void OnEnabledChanged()
 {
     EventsHelper.Fire(_enabledChanged, this, EventArgs.Empty);
 }
Ejemplo n.º 20
0
 /// <summary>
 /// Called by <see cref="ControlGraphic"/> in response to an attempt to cancel the current operation via <see cref="ControlGraphic.Cancel"/>.
 /// </summary>
 protected override void Cancel()
 {
     EventsHelper.Fire(this.UndoableOperationCancel, this, EventArgs.Empty);
     base.Cancel();
 }
Ejemplo n.º 21
0
 protected virtual void OnSlicerParamsChanged()
 {
     this.Reslice();
     base.Description = this.SlicerParams.Description;
     EventsHelper.Fire(_slicerParamsChanged, this, EventArgs.Empty);
 }
Ejemplo n.º 22
0
        protected override void OnSelectedNodeChanged()
        {
            base.OnSelectedNodeChanged();

            EventsHelper.Fire(this.SelectedNodeChanged, this, EventArgs.Empty);
        }
Ejemplo n.º 23
0
 /// <summary>
 /// Raises the <see cref="Closing"/> event.
 /// </summary>
 protected virtual void OnClosing(ClosingEventArgs args)
 {
     EventsHelper.Fire(_closing, this, args);
 }
 private void OnShowAimAnnotationClicked(object sender, ShowAimAnnotationEventArg e)
 {
     EventsHelper.Fire(_showImageClicked, this, new ShowAimAnnotationEventArg(e.AimUid));
 }
Ejemplo n.º 25
0
 /// <summary>
 /// Raises the <see cref="VisibleChanged"/> event.
 /// </summary>
 protected virtual void OnVisibleChanged(EventArgs args)
 {
     EventsHelper.Fire(_visibleChanged, this, args);
 }
Ejemplo n.º 26
0
 /// <summary>
 /// Raises the <see cref="Drawing"/> event.
 /// </summary>
 protected virtual void OnDrawing()
 {
     EventsHelper.Fire(_drawing, this, EventArgs.Empty);
 }
Ejemplo n.º 27
0
 /// <summary>
 /// Raises the <see cref="TitleChanged"/> event.
 /// </summary>
 protected virtual void OnTitleChanged(EventArgs args)
 {
     EventsHelper.Fire(_titleChanged, this, args);
 }
Ejemplo n.º 28
0
 private void CachedVolumeOnProgressChanged(object sender, EventArgs eventArgs)
 {
     EventsHelper.Fire(ProgressChanged, this, eventArgs);
 }
Ejemplo n.º 29
0
 protected virtual void OnSliceSopsChanged()
 {
     EventsHelper.Fire(_sliceSopsChanged, this, EventArgs.Empty);
 }
Ejemplo n.º 30
0
 private void _treeCtrl_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
 {
     EventsHelper.Fire(_nodeMouseDoubleClicked, this, e);
 }