Search Results for

    Show / Hide Table of Contents

    Class GenericExteralPreviewApplication

    This is a simple generic external preview application that launches the associated or specified application for the preview file. Then when this object is disposed or the launched process exits the temp file is deleted.

    Inheritance
    System.Object
    AbstractFileTypeDefinitionComponent
    GenericExteralPreviewApplication
    MsOfficeExternalPreviewApplication
    Implements
    IFileTypeDefinitionAware
    ISingleFilePreviewApplication
    IAbstractPreviewApplication
    IAbstractPreviewController
    ISingleFilePreviewController
    System.IDisposable
    Inherited Members
    AbstractFileTypeDefinitionComponent.FileTypeDefinition
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Sdl.FileTypeSupport.Framework.PreviewControls
    Assembly: Sdl.FileTypeSupport.Framework.PreviewControls.dll
    Syntax
    public class GenericExteralPreviewApplication : AbstractFileTypeDefinitionComponent, IFileTypeDefinitionAware, ISingleFilePreviewApplication, IAbstractPreviewApplication, IAbstractPreviewController, ISingleFilePreviewController, IDisposable

    Constructors

    GenericExteralPreviewApplication()

    Constructor.

    Declaration
    public GenericExteralPreviewApplication()

    Properties

    ApplicationPath

    The path of the external app to preview the generated file (or null for default associated app)

    Declaration
    public string ApplicationPath { get; set; }
    Property Value
    Type Description
    System.String

    MonitorApplicationExit

    Indicates if the application should be monitored when exiting. This will perform some tidy up if set to true

    Declaration
    public bool MonitorApplicationExit { get; set; }
    Property Value
    Type Description
    System.Boolean

    PreviewFile

    Default implementation is accessor for member field.

    Declaration
    public virtual TempFileManager PreviewFile { get; set; }
    Property Value
    Type Description
    TempFileManager

    Methods

    Dispose()

    Calls Dispose(Boolean).

    Declaration
    public void Dispose()

    Dispose(Boolean)

    Dispose of resources used by this object. Implementation attempts to close the preview application and delete the temp file.

    Declaration
    protected virtual void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing

    Finalize()

    Calls Dispose(Boolean).

    Declaration
    protected void Finalize()

    Launch()

    Display the file in the external application.

    Declaration
    public virtual void Launch()

    LaunchApplicationForFile(TempFileManager)

    Launch a process to view the file. If an application path has been set it is used to launch the application with the preview file as a parameter. If not the file is launched using the default application associated with it (if any).

    Declaration
    protected virtual Process LaunchApplicationForFile(TempFileManager managedTempFile)
    Parameters
    Type Name Description
    TempFileManager managedTempFile
    Returns
    Type Description
    System.Diagnostics.Process

    NotifyCanClose()

    Default implementation sends a close message to the process main window, if it is open.

    Declaration
    public virtual void NotifyCanClose()

    OnPreviewClosed(Object, PreviewClosedEventArgs)

    Raise the PreviewClosed event.

    Declaration
    public virtual void OnPreviewClosed(object sender, PreviewClosedEventArgs args)
    Parameters
    Type Name Description
    System.Object sender
    PreviewClosedEventArgs args

    Events

    PreviewClosed

    Raised when the launched application terminates.

    Declaration
    public event EventHandler<PreviewClosedEventArgs> PreviewClosed
    Event Type
    Type Description
    System.EventHandler<PreviewClosedEventArgs>

    Implements

    IFileTypeDefinitionAware
    ISingleFilePreviewApplication
    IAbstractPreviewApplication
    IAbstractPreviewController
    ISingleFilePreviewController
    System.IDisposable

    On this page

    • Constructors
      • GenericExteralPreviewApplication()
    • Properties
      • ApplicationPath
      • MonitorApplicationExit
      • PreviewFile
    • Methods
      • Dispose()
      • Dispose(Boolean)
      • Finalize()
      • Launch()
      • LaunchApplicationForFile(TempFileManager)
      • NotifyCanClose()
      • OnPreviewClosed(Object, PreviewClosedEventArgs)
    • Events
      • PreviewClosed
    • Implements
    Back to top Generated by DocFX