Created
December 20, 2009 14:54
-
-
Save srohde/260516 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<s:Window width="240" height="210" | |
xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" | |
xmlns:mx="library://ns.adobe.com/flex/halo" title="Update" alwaysInFront="true" resizable="false" showStatusBar="false"> | |
<s:layout> | |
<s:BasicLayout /> | |
</s:layout> | |
<fx:Script> | |
<![CDATA[ | |
import flash.events.MouseEvent; | |
import com.soenkerohde.desktop.ISwizUpdateBean; | |
import com.soenkerohde.desktop.info.IUpdateInfo; | |
[Bindable] | |
[Autowire(bean="swizUpdateBean", property="updateInfo")] | |
public var updateInfo:IUpdateInfo; | |
[Bindable] | |
[Autowire] | |
public var swizUpdateBean:ISwizUpdateBean; | |
protected function clickHandler( event : MouseEvent ) : void { | |
swizUpdateBean.executeUpdate( false ) | |
} | |
]]> | |
</fx:Script> | |
<s:VGroup horizontalCenter="0"> | |
<mx:Form verticalGap="0"> | |
<mx:FormItem label="Your Version:"> | |
<s:Label text="{updateInfo.localVersion}" /> | |
</mx:FormItem> | |
<mx:FormItem label="New Version:"> | |
<s:Label text="{updateInfo.remoteVersion}" /> | |
</mx:FormItem> | |
</mx:Form> | |
<s:Label text="Progress: {updateInfo.bytesLoaded}/{updateInfo.bytesTotal} Bytes" /> | |
<mx:ProgressBar indeterminate="false" label="Remaining: {updateInfo.timeRemaining} sec with {updateInfo.kiloBytePerSecond} KB/s" mode="polled" | |
source="{updateInfo}" /> | |
</s:VGroup> | |
<s:Button bottom="10" | |
horizontalCenter="0" label="Update and Restart" enabled="{updateInfo.complete}" click="clickHandler(event)" /> | |
</s:Window> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment