Skip to content

Commit

Permalink
(*) 优化PriSafebox工程
Browse files Browse the repository at this point in the history
  • Loading branch information
iaiting committed Apr 11, 2018
1 parent 4abad6e commit 1cb5ef1
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 41 deletions.
6 changes: 3 additions & 3 deletions PriSafebox/default.aproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<project ver="16" name="PriSafebox" libEmbed="true" icon="..." CompanyName="单位名称" FileDescription="PriSafebox" LegalCopyright="Copyright (C) 作者 2018" ProductName="PriSafebox" InternalName="PriSafebox" FileVersion="0.0.0.1" ProductVersion="0.0.0.1" publishDir="/Publish/" ui="win" output="PriSafebox.exe" dstrip="false">
<?xml version="1.0" encoding="utf-8"?>
<project ver="10" name="PriSafebox" libEmbed="true" icon="..." CompanyName="单位名称" FileDescription="PriSafebox" LegalCopyright="Copyright (C) 作者 2018" ProductName="PriSafebox" InternalName="PriSafebox" FileVersion="0.0.0.1" ProductVersion="0.0.0.1" publishDir="/Publish/" ui="win" output="PriSafebox.exe" dstrip="false">
<file name="main.aardio" path="main.aardio" comment="启动程序代码"/>
<folder name="资源文件" path="res" embed="true"/>
<folder name="HTML" path="html" comment="" embed="true">
<file name="main.aardio" path="html\main.aardio" comment="html\main.aardio"/>
<file name="main.html" path="html\main.html.aardio" comment="html\main.aardio"/>
<folder name="js" path="html\js" comment="html\js"/>
</folder>
</project>
77 changes: 41 additions & 36 deletions PriSafebox/html/main.aardio → PriSafebox/html/main.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<!doctype html>
<html>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style>
html,body{
margin:0;
margin:0;
background:#fff;
height:100%;
height:100%;
}

*:not(input,textarea) {
-webkit-user-select: none;
*:not(input,textarea) {
-webkit-user-select: none;
}

/*标题栏*/
Expand All @@ -27,11 +27,11 @@
#container{
box-sizing:border-box;/*使高度包含padding*/
height:100%;
width:100%;
width:100%;
padding-top:28px;
padding-bottom:35px;
margin:0 auto;
overflow:auto;
margin:0 auto;
overflow:auto;
}

/*底栏*/
Expand All @@ -42,7 +42,7 @@
bottom:0;
left:0;
z-index:100;
background:rgb(239,237,238);
background:rgb(239,237,238);
text-align:right;
padding:3px 5px;
box-sizing:border-box;
Expand All @@ -51,56 +51,56 @@
/*中间内容栏 左侧列*/
#container .lside{
height:100%;
width:150px;
float:left;
width:150px;
float:left;
background:rgb(110,179,210);
}

/*中间内容栏 右侧列*/
#container .rside{
height:100%;
margin-left:150px;
margin-left:150px;
background:#FFF;
padding:20px;
box-sizing:border-box;
}

#footer button{
padding:4px 13px;
font-size:12px;
font-size:12px;
background:rgb(27,174,93);
color:white;
color:white;
border:0;
}

#footer button:hover {
#footer button:hover {
background:rgb(33,127,188);
box-shadow: 0 0 5px rgba(81, 203, 238, 1);
cursor:pointer;
}
}

#footer button:active {
#footer button:active {
background:rgb(20,110,170);
cursor:pointer;
}
}

#header .title-bar{
margin-right:75px;
padding-left:10px;
height:28px;
line-height: 28px;
font-size:9pt;
color:#eee;
}
color:#eee;
}

#header .ctrls{
#header .ctrls{
width:75px;
height:28px;
height:28px;
float:right;
}

#header .ctrls a{
display:block;
#header .ctrls a{
display:block;
float:left;
height:14px;
font-family:"Marlett";
Expand All @@ -110,30 +110,35 @@
cursor:default;
}

#header .ctrls a[id]:hover{
background:#6ebccf;
#header .ctrls a[id]:hover{
background:#6ebccf;
}

#header .ctrls a[id]:active{
background:#FF0000;
}
#header .ctrls a[id]:active{
background:#FF0000;
}

</style>
<body>
<div id="header">
<div class="ctrls">
<div class="ctrls">
<a id="window-min" onclick="windowCommand('min')">0</a>
<a id="window-max" onclick="this.innerText = windowCommand('max')?'2':'1';">1</a>
<a id="window-close" onclick="windowCommand('close')">r</a>
</div>
<div class="title-bar" onmousedown="windowCommand('drag')"> <span class=title> 我 的 软 件 </span></div>
</div>
<div id="container">
<div class="lside"> </div>
<div class="rside"> 当前时间:<?= time() ?> </div>
</div>

<div id="container">
<div class="lside"> </div>
<div class="rside"> aaaaaaaaaaaaaa当前时间:<?= time() ?> </div>
</div>



<div id="footer">
<button onclick="javascript:external.aardioCall('hello')">点击这里调用external.aardioCall('hello') </button>
</div>

<div id="footer">
<button onclick="javascript:external.aardioCall('hello')">点击这里调用external.aardioCall('hello') </button>
</div>
Expand Down
4 changes: 2 additions & 2 deletions PriSafebox/main.aardio
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ mb.onNavigation = function(url,navigationType){
}

import wsock.tcp.simpleHttpServer;
mb.go( wsock.tcp.simpleHttpServer.startUrl("/html/main.aardio") );
mb.go( wsock.tcp.simpleHttpServer.startUrl("/html/main.html") );
mb.wait(); //等待页面完全打开

//可以使用CSS选择器获取HTML节点对象
mb.querySelector("#header .title-bar .title").innerText = "我 的 软 件";
mb.querySelector("#header .title-bar .title").innerText = "私 密 箱";

//添加可拖动边框
import win.ui.resizeBorder;
Expand Down

0 comments on commit 1cb5ef1

Please sign in to comment.