2009-08-10

Dicom Xplorer Plugin Interface

Die Schnittstelle für die Plugin-Entwicklung von Dicom Xplorer wurde aktualisiert.


IPlugin.cs:
using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using System.Windows.Forms;
using CustomControls.PropertyTree;

namespace PluginManager
{
    interface IPlugin
    {
        /// 
        /// Returns the options pane containing a user interface to get/set
        /// optional plugin settings.
        /// 
        PropertyPane OptionsPane { get;}
        /// 
        /// Performs the actual plugin operation. This action is added to the Undo stack which means it can be undone at any time.
        /// 
        /// 

The frame buffer any plugin action takes place on./// True, if plugin reports successful operation. False, if an error occured.
        bool PerformHistoryAction(ushort[][,] buffer);
        /// 
        /// An event listening to any changes made to the frame buffer. Usually fired within PerformHistoryAction.
        /// 
        event UpdateFrameBufferEventHandler UpdateFrameBuffer;
    }
}
UpdateFrameBufferEventArgs.cs:
using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using System.Windows.Forms;

namespace PluginManager
{
 public delegate void UpdateFrameBufferEventHandler(object sender, UpdateFrameBufferEventArgs e);
    public class UpdateFrameBufferEventArgs : EventArgs
    {
        private ushort[][,] buffer;
        public ushort[][,] Buffer
        {
            get { return buffer; }
            internal set { buffer = value; }
        }

        public UpdateFrameBufferEventArgs(ushort[][,] Buffer)
            : base()
        {
            this.buffer = Buffer;
        }
    }
}

0 Besucherkommentare:

Kommentar veröffentlichen