Skip to content

Instantly share code, notes, and snippets.

@srohde
Created July 17, 2009 17:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save srohde/149190 to your computer and use it in GitHub Desktop.
Save srohde/149190 to your computer and use it in GitHub Desktop.
UpdateWindow
<?xml version="1.0" encoding="utf-8"?>
<mx:Window xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" width="250" height="210"
title="Update" alwaysInFront="true" resizable="false"
showStatusBar="false" showGripper="false"
paddingLeft="10" paddingTop="10">
<mx:Script>
<![CDATA[
import org.swizframework.desktop.ISwizUpdateBean;
[Bindable][Autowire]
public var swizUpdateBean:ISwizUpdateBean;
]]>
</mx:Script>
<mx:Form verticalGap="0">
<mx:FormItem label="Your Version">
<mx:Text text="{swizUpdateBean.updateInfo.localVersion}" />
</mx:FormItem>
<mx:FormItem label="New Version">
<mx:Text text="{swizUpdateBean.updateInfo.remoteVersion}" />
</mx:FormItem>
</mx:Form>
<mx:Spacer height="10" />
<mx:Label text="Progress {swizUpdateBean.updateInfo.bytesLoaded}/{swizUpdateBean.updateInfo.bytesTotal}" />
<mx:ProgressBar indeterminate="false"
label="Remaining {swizUpdateBean.updateInfo.timeRemaining}s ({swizUpdateBean.updateInfo.kiloBytePerSecond} KBit/s)"
mode="polled"
source="{swizUpdateBean.updateInfo}" />
<mx:Spacer height="10" />
<mx:HBox width="100%" horizontalAlign="center">
<mx:Button label="Update and Restart"
enabled="{swizUpdateBean.updateInfo.complete}"
click="swizUpdateBean.executeUpdate(false)" />
</mx:HBox>
</mx:Window>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment