The user interface that is displayed to the user while an update is being applied can be customized to match the visual appearance of your application. For customers that would like to add more in-depth visual customizations than are possible through the Project Properties options (adorn a logo image and modify the window title), the standard user interface can be completely replaced with your own customized UI by implementing the Kjs.AppLife.Update.Engine.Core.IUpdateUI interface.
(Left Image – Default User Interface, Right Image – Example Customized User Interface)
To replace the Update Engine UI, you will create a new .Net assembly (.dll or .exe), reference the AppLife Update Core assembly and include one class that implements the IUpdateUI interface. This class will be called by the Update Engine, and should display and update the user interface as the interface methods are called by the AppLife Update engine.
The assembly can then be imported into your AppLife Update project, after which all future update packages built by the project will include the new customized user interface.
IUpdateUI Operations
1. As
the update engine starts, the IUpdateUI.Open() method is called. In
this method you should create and show your customized user interface. Your user
interface should remain visible until the IUpdateUI.Finish method
is called.
2. As
the update progresses, the IUpdateUI.Update() method is repeatedly
called. This method has parameters that provide information about the
current state and progress of the executing update. This information can
be used to provide visual feedback within your customized user
interface.
3. When
the update is finished, the IUpdateUI.Finish() method is called.
This method has parameters that indicate the condition of the update. If
an error occurs during the update, error information is provided through the
error parameter. The customized user interface can be safely closed
anytime after this method is called, but should not be closed before this method
call.
4. If
the ApplyUpdateOptions.AutoClose option is set by the host application
code that initiated the update process, the IUpdateUI.Close() method is
called immediately following the Finish method. If this method is called,
it is expected that your custom user interface be immediately closed.
Note: If you utilize a System.Windows.Forms.Form class and implement
the IUpdateUI interface, this method is already present.
5. Some
update actions request a Yes/No response from the user. To support this,
your customized user interface must implement the
IUpdateUI.ShowYesNoPrompt() method.
6. As
your customized user interface is closed, the update engine is notified by your
class raising the IUpdateUI.Closed event. Note: If you utilize a
System.Windows.Forms.Form class and implement the IUpdateUI
interface, this event is already present and is raised when the form is
closed.
7. Your custom user interface can optionally support canceling an update, as well as pause and resume features by raising the IUpdateUI.RequestCancel, IUpdateUI.RequestPause, or IUpdateUI.RequestResume events.
A sample implementation of a custom update engine user interface is available within the Custom Forms Quick Start example.
For more information on the Kjs.AppLife.Update.Engine.Core.IUpdateUI interface, reference the