小妞会装机 -- 一个装机软件的开发笔记( 三)

本文配套程序下载地址为: http://pan.baidu.com/share/link?shareid=358034&uk=3995556177 

界面基本山确定下来,感觉操作起来的确很简单,觉得会有很多人用这个东西,有开发价值。于是开始做详细的技术可行分析。

其实问题就一个,怎么将镜像安装到C盘了。如果这个问题能解决,那么这个软件才可能开发下去。否则就是白搭精力。在解决这个问题的过程中遇到了好多的具体问题,而且平时还要加班,也没有什么时间,所以断断续续花了2个月才解决。估计大家对这个少有感兴趣的,我就略过了。

现在进入了具体实现阶段。

首先需要解决的是界面开发。现在大家对软件的界面要求越来越高。我用mfc还行,但mfc要做出好的界面效果需要太多的工作。wtl也存在这个问题。正好参加一个新的项目,新的项目用direct UI,同事给我展示了一下那个配套的界面设计工具。当时觉得,哇,用direct UI开发界面,界面效果太棒了,而且那个界面设计工具的确很好,拖拖拽拽就可以很快设计一个很炫的界面。可惜他们的那套库是他们自己搞的,虽然免费用,但是不开源,如果出问题那就傻眼了。所以就在网上找找有没有开源的direct UI库。还真找到一个,就是duilib。这个项目现在还在维护,但更新比较少。界面设计工具也不好用,和同事他们搞的那个工具比就差远了。但是还是要感谢duilib开发组。如果没有你们的无私奉献,我或许要花更多的时间写界面代码了。感谢你们。

用dui开发界面对我来说是一个全新的东西,研究了它的几个例子,就拿GameDemo例子开始开发界面了。捣鼓了一下,配置了一个界面xml。先把界面的xml贴出来:

<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<Window size="1024,576" caption="0,0,0,60">
    <Font name="微软雅黑" size="19" bold="false" italic="false" />
    <Font name="微软雅黑" size="16" bold="false" italic="false" />
    <Font name="微软雅黑" size="14" bold="false" italic="false" />
    <VerticalLayout name="VerticalLayoutUI1" width="427" height="153" bkimage="vistabg.png">
        <Container name="ContainerUITitle" width="1022" height="114">
            <Label name="LabelUIDescription" text="您想安装哪个系统 ?" float="true" pos="141,48,0,0" width="618" height="66" textcolor="#FF000000" disabledtextcolor="#FFA7A6AA" font="0" />
            <Button name="BtnClose" tooltip="退出程序" float="true" pos="976,4,0,0" width="42" height="18" textcolor="#FF000000" disabledtextcolor="#FFA7A6AA" align="center" normalimage="frame_btn_close_down.bmp" hotimage="frame_btn_close_hot.bmp" />
            <Label name="LabelUI6" text="小妞会装机" float="true" pos="63,18,0,0" width="279" height="23" textcolor="#FF000000" disabledtextcolor="#FFA7A6AA" font="1" />
            <Label name="LabelUI4" float="true" pos="10,7,0,0" width="48" height="48" bkimage="xiaoniu48.png" textcolor="#FF000000" disabledtextcolor="#FFA7A6AA" />
        </Container>
        <Container name="ContainerUIStep2" width="1023" height="291">
            <Label name="LabelUIOS" float="true" pos="416,50,0,0" width="182" height="137" bkimage="file=&apos;win7.jpg&apos; hole=&apos;true&apos;" textcolor="#FF000000" disabledtextcolor="#FFA7A6AA" />
            <Progress name="ProgressDownload" float="true" pos="195,220,0,0" width="603" height="33" bordercolor="#00008000" focusbordercolor="#000000FF" textcolor="#FF000000" disabledtextcolor="#FFA7A6AA" align="center" foreimage="progress.png" min="0" max="100" value="20" hor="true" />
            <Label name="LabelWaiting" text="已经下载20%, 请耐心等待..." float="true" pos="416,221,0,0" width="373" height="30" textcolor="#FF000000" disabledtextcolor="#FFA7A6AA" />
            <Button name="BtnDownloadTooSlow" text="{u}{l}下载太慢?让下载飞起来!{/l}{/u}" float="true" pos="195,262,0,0" width="398" height="22" textcolor="#FF000000" disabledtextcolor="#FFA7A6AA" showhtml="true" align="left"/>
        </Container>
        <Container name="ContainerUIStep1" width="1023" height="291">
            <Button name="BtnWin7" tooltip="点击安装win 7" float="true" pos="587,68,0,0" width="182" height="137" textcolor="#FF000000" disabledtextcolor="#FFA7A6AA" align="center" normalimage="win7.jpg" hotimage="win7-hot.jpg" pushedimage="win7-push.jpg" />
            <Button name="BtnXP" tooltip="点击安装xp" float="true" pos="260,68,0,0" width="182" height="137" textcolor="#FF000000" disabledtextcolor="#FFA7A6AA" align="center" normalimage="xp.jpg" hotimage="xp-hot.jpg" pushedimage="xp-push.jpg" />
            <Label name="LabelUI5" text="将鼠标移动到您想安装的系统桌面图像上并点击。" float="true" pos="139,241,0,0" width="662" height="24" textcolor="#FF000000" disabledtextcolor="#FFA7A6AA" font="2" />
            <Label name="LabelUI2" text="XP: 流行了10年的经典系统" float="true" pos="262,30,0,0" width="181" height="27" textcolor="#FF000000" disabledtextcolor="#FFA7A6AA" font="2" />
            <Label name="LabelUI3" text="Win 7: 更炫的新系统" float="true" pos="589,30,0,0" width="269" height="30" textcolor="#FF000000" disabledtextcolor="#FFA7A6AA" font="2" />
        </Container>
        <Container name="ContainerUIStep3" width="1023" height="291">
            <Label name="LabelUI12" float="true" pos="366,2,0,0" width="256" height="256" bkimage="Vista.png" textcolor="#FF000000" disabledtextcolor="#FFA7A6AA" />
            <Label name="LabelUI11" text="下载已经完成。按开始安装按钮开始安装。安装过程中会自动重启动计算机。" float="true" pos="139,245,0,0" width="662" height="24" textcolor="#FF000000" disabledtextcolor="#FFA7A6AA" font="2" />
        </Container>
        <Container name="ContainerUIBottom" width="1023" height="169">
            <Button name="ButtonUIReboot" visible="false" text="开始安装" float="true" pos="310,44,0,0" width="387" height="53" textcolor="#00FFFBF0" disabledtextcolor="#FFA7A6AA" font="0" align="center" normalimage="reboot.png" hotimage="reboot-hot.png" pushedimage="reboot.png" focusedimage="reboot.png" />
            <Button name="adv1" visible="false" float="true" pos="19,15,0,0" width="181" height="143" bordercolor="#0000FF00" textcolor="#FF000000" disabledtextcolor="#FFA7A6AA" align="center" />
               <Button name="adv2" visible="false" float="true" pos="219,15,0,0" width="181" height="143" bordercolor="#0000FF00" textcolor="#FF000000" disabledtextcolor="#FFA7A6AA" align="center" />
               <Button name="adv3" visible="false" float="true" pos="419,15,0,0" width="181" height="143" bordercolor="#0000FF00" textcolor="#FF000000" disabledtextcolor="#FFA7A6AA" align="center" />
               <Button name="adv4" visible="false" float="true" pos="619,15,0,0" width="181" height="143" bordercolor="#0000FF00" textcolor="#FF000000" disabledtextcolor="#FFA7A6AA" align="center" />
               <Button name="adv5" visible="false" float="true" pos="819,15,0,0" width="181" height="143" bordercolor="#0000FF00" textcolor="#FF000000" disabledtextcolor="#FFA7A6AA" align="center" />
          </Container>
    </VerticalLayout>
</Window>

简单吧,下一篇继续讲界面开发。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值