📄 updatescreen.mxml
字号:
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:text="flash.text.*"
styleName="updateScreenStyle"
horizontalScrollPolicy="off"
verticalScrollPolicy="off"
creationComplete="handleCreationComplete()"
>
<mx:Style source="com/teknision/flex/air/autoupdate/screens/assets/update_screen_style.css"/>
<mx:Script>
<![CDATA[
import com.teknision.flex.air.window.*;
import com.teknision.flex.air.window.events.*;
import com.teknision.flex.air.autoupdate.window.*;
import com.teknision.flex.air.autoupdate.update.*;
[Bindable]
public var latestversion:String;
private var _percentLoaded:Number = 0;
public function set updatepercent(i_perc:Number):void{
_percentLoaded = i_perc;
progressBar.mode = "manual";
progressBar.setProgress(_percentLoaded,100);
}
public function get updatepercent():Number{
return _percentLoaded;
}
private function handleLaterClick():void{
var newEvent:Event = new Event(UpdateWindow.UPDATEBYPASSED,true);
this.dispatchEvent(newEvent);
}
private function handleUpdateClick():void{
this.viewStack.selectedIndex=1;
var newEvent:Event = new Event(UpdateWindow.UPDATEEXECUTE,true);
this.dispatchEvent(newEvent);
}
private function handleCreationComplete():void{
var newSubWindowEvent:SubordinateWindowEvent = new SubordinateWindowEvent(SubordinateWindow.WINDOWSWFREADY);
this.dispatchEvent(newSubWindowEvent);
}
]]>
</mx:Script>
<mx:HBox styleName="emptyBox" width="100%" height="100%"/>
<mx:ViewStack id="viewStack" width="100%" height="100%">
<mx:VBox id="initialVBox" width="100%" height="100%"
horizontalScrollPolicy="off" verticalScrollPolicy="off"
horizontalAlign="center" verticalAlign="middle">
<mx:Label styleName="labelTextStyle" text="New Version Available"/>
<mx:HBox>
<mx:Button styleName="laterBtnStyle" height="20" click="handleLaterClick()" label="LATER"/>
<mx:Button styleName="updateBtnStyle" height="20" click="handleUpdateClick()" label="UPDATE"/>
</mx:HBox>
</mx:VBox>
<mx:VBox id="downloadingVBox" width="100%" height="100%"
horizontalScrollPolicy="off" verticalScrollPolicy="off"
horizontalAlign="center" verticalAlign="middle">
<mx:Label styleName="downloadingLabelStyle" text="{'Downloading Version: '+latestversion}"/>
<mx:ProgressBar id="progressBar" styleName="progressBarStyle"/>
</mx:VBox>
<mx:VBox id="finishedVBox" width="100%" height="100%"
horizontalScrollPolicy="off" verticalScrollPolicy="off"
horizontalAlign="center" verticalAlign="middle">
<mx:Label styleName="finishedLabelStyle" text="DownloadComplete"/>
<mx:Button id="finishedDownloadingButton" height="20" styleName="downloadFinishedButtonStyle" label="Okay"/>
</mx:VBox>
</mx:ViewStack>
</mx:Canvas>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -