Beispiel #1
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="id">Reference identifier</param>
 /// <param name="extension">File extension</param>
 /// <param name="description">Describe what is this file.</param>
 /// <param name="CanXSL">Can you transform to this by XSL from XML? If yes, then true.</param>
 /// <param name="handler">Save action handler object</param>
 public FileTypes(int id, string extension, string description, bool CanXSL, IFileTypeHandler handler)
 {
     this.id          = id;
     this.extension   = extension;
     this.description = description;
     this.XSLEnabled  = CanXSL;
     this.handler     = handler;
 }
 public FileTypeHandlerToolStripMenuItem(FileSystemInfoListViewItem item, IFileTypeHandler handler) :
     base( )
 {
     this.Item    = item;
     this.Handler = handler;
     this.Text    = string.Format(CultureInfo.InvariantCulture, "Open with {0}", handler.Text);
     this.Image   = handler.Image;
     this.Click  += new EventHandler(FileTypeHandlerToolStripMenuItem_Click);
 }
 public FileTypeHandlerToolStripMenuItem( FileSystemInfoListViewItem item, IFileTypeHandler handler )
     : base()
 {
     this.Item = item;
     this.Handler = handler;
     this.Text = string.Format ( CultureInfo.InvariantCulture, "Open with {0}", handler.Text );
     this.Image = handler.Image;
     this.Click += new EventHandler ( FileTypeHandlerToolStripMenuItem_Click );
 }
 public void UnregisterFileTypeHandler( string ext, IFileTypeHandler handler )
 {
     // does nothing
 }
 public void UnregisterFileTypeHandler(string ext, IFileTypeHandler handler)
 {
     // does nothing
 }
Beispiel #6
0
 public void UnregisterFileTypeHandler( string ext, IFileTypeHandler handler )
 {
     this.FileTypeActionHandlers.Remove ( ext );
 }
Beispiel #7
0
 public void RegisterFileTypeHandler( string ext, IFileTypeHandler handler )
 {
     if ( !this.FileTypeActionHandlers.ContainsKey ( ext ) ) {
         this.FileTypeActionHandlers.Add ( ext, handler );
     } else {
         this.LogWarn ( "Extension already contains a file type handler" );
     }
 }