Skip to content

Commit

Permalink
4.0.0-bate.1
Browse files Browse the repository at this point in the history
  • Loading branch information
hbl917070 committed Nov 17, 2021
1 parent 48786b7 commit 502f8d2
Show file tree
Hide file tree
Showing 68 changed files with 1,632 additions and 6,577 deletions.
328 changes: 328 additions & 0 deletions other/logo.ai

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tiefsee/tiefsee/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("tiefsee")]
[assembly: AssemblyCopyright("Copyright © 2021")]
[assembly: AssemblyCopyright("Copyright © 2021 hbl917070")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand Down
19 changes: 17 additions & 2 deletions tiefsee/tiefsee/VW/WV_File.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,18 +94,33 @@ public String GetFIleType(string fileName) {
if (Directory.Exists(fileName)) { return ""; }
if (File.Exists(fileName) == false) { return ""; }

string fileType = string.Empty;

try {

using (FileStream fs = new FileStream(fileName, FileMode.Open, FileAccess.Read)) {
using (System.IO.BinaryReader br = new System.IO.BinaryReader(fs)) {

string fileType = string.Empty;
/*var ar = br.ReadSingle(300);
for (int i = 0; i < ar.Length; i++) {
fileType += ar[i];
}*/


for (int i = 0; i < 2; i++) {
fileType += br.ReadByte();
}

byte data = br.ReadByte();
/*byte data = br.ReadByte();
fileType += data.ToString();
data = br.ReadByte();
fileType += data.ToString();
for (int i = 0; i < 30; i++) {
data = br.ReadByte();
fileType += data.ToString();
}*/

if (fs != null) {
fs.Close();
br.Close();
Expand Down
18 changes: 18 additions & 0 deletions tiefsee/tiefsee/VW/WV_Image.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,5 +86,23 @@ public string BitmapToBase64(Bitmap bmp) {
return base64String;
}



public bool IsAn(string path) {
/*
82737070 19016340087696680868056881000020
82737070 96112120876966808680568810000180
82737070 601811030876966808680568810000180
82737070 64531087696680868056325253101612
0 8769668086805688 10 = WEBPVP8X
WEBPVP8
apng acTL 97998476
*/
return true;

}
}
}
12 changes: 11 additions & 1 deletion tiefsee/tiefsee/VW/WV_Window.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
Expand All @@ -25,7 +26,6 @@ public class WV_Window {

public WV_Window(WebWindow m) {
this.M = m;

}


Expand All @@ -39,6 +39,16 @@ public WV_Window(WebWindow m) {
return w;
}*/

/// <summary>
/// 設定視窗的 icon
/// </summary>
/// <param name="path"></param>
public void SetIcon(string path) {
if (File.Exists(path)) {
M.Icon = new System.Drawing.Icon(path);
}
}

/// <summary>
/// 取得執行檔目錄
/// </summary>
Expand Down
5 changes: 3 additions & 2 deletions tiefsee/tiefsee/WebWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ public WebWindow(String _url,string[] _args) {
wv2.CoreWebView2.AddHostObjectToScript("WV_System", new WV_System(this));
wv2.CoreWebView2.AddHostObjectToScript("WV_RunApp", new WV_RunApp(this));
wv2.CoreWebView2.AddHostObjectToScript("WV_Image", new WV_Image(this));


// webView21.CoreWebView2.AddScriptToExecuteOnDocumentCreatedAsync("var webBrowserObj= window.chrome.webview.hostObjects.webBrowserObj;");

Expand All @@ -110,7 +109,9 @@ public WebWindow(String _url,string[] _args) {

this.Opacity = 0;
this.Show();

this.Width = 550;
this.Height = 400;

//

parentForm = new FormNone();
Expand Down
4,587 changes: 0 additions & 4,587 deletions tiefsee/tiefsee/bin/output/Microsoft.Web.WebView2.Core.xml

This file was deleted.

383 changes: 0 additions & 383 deletions tiefsee/tiefsee/bin/output/Microsoft.Web.WebView2.WinForms.xml

This file was deleted.

807 changes: 0 additions & 807 deletions tiefsee/tiefsee/bin/output/Microsoft.Web.WebView2.Wpf.xml

This file was deleted.

Binary file modified tiefsee/tiefsee/bin/output/tiefsee.exe
Binary file not shown.
6 changes: 0 additions & 6 deletions tiefsee/tiefsee/bin/output/tiefsee.exe.config

This file was deleted.

21 changes: 11 additions & 10 deletions tiefsee/tiefsee/bin/output/www/MainWindow.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
<title>Tiefsee 4</title>

<!--google字體-->
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@400;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+TC" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+SC" rel="stylesheet">

<link rel="stylesheet" href="css/BaseWindow.css">
<link rel="stylesheet" href="/css/BaseWindow.css">
<script src="/js/BaseWindow.js"></script>
<script src="/js/Lib.js"></script>

Expand All @@ -21,17 +21,18 @@
<script src="/js/library/jquery-3.6.0.min.js"></script>
<script src="/js/library/jquery.easing.js"></script>

<script src="/js/tiefseeview.js"></script>
<link rel="stylesheet" href="css/tiefseeview.css">
<link rel="stylesheet" href="css/MainWindow.css">
<link rel="stylesheet" href="css/menu.css">
<script src="/js/Tiefseeview.js"></script>
<link rel="stylesheet" href="/css/tiefseeview.css">
<link rel="stylesheet" href="/css/MainWindow.css">
<link rel="stylesheet" href="/css/menu.css">

<script src="/js/MainWindow/Config.js"></script>
<script src="/js/MainWindow/MainTools.js"></script>
<script src="/js/MainWindow/FileLoad.js"></script>
<script src="/js/MainWindow/FileShow.js"></script>
<script src="/js/MainWindow/Menu.js"></script>
<script src="/js/MainWindow/InitMenu.js"></script>
<script src="/js/MainWindow/Script.js"></script>
<script src="/js/MainWindow/MainWindow.js"></script>

<script>
Expand Down Expand Up @@ -201,11 +202,13 @@
<!-- 標題列 -->
<div class="window-titlebar">

<div class="titlebar-txt"> <span>tiefsee 4</span></div>
<div class="titlebar-txt">
<span>tiefsee 4</span>
</div>

<div class="titlebar-tools">

<div class="titlebar-tools-btn titlebar-tools-menu">
<div class="titlebar-tools-btn titlebar-tools-menu" style="display:none;">
<import type="svg" src="/img/default/window-menu.svg"> </import>
</div>
<div class="titlebar-tools-btn titlebar-tools-topmost">
Expand Down Expand Up @@ -251,9 +254,7 @@
<div>
<img class="welcomeview-logo" src="/img/logo.svg">
<div class="welcomeview-txt">Tiefsee beta 001</div>

</div>

</div>
<textarea id="main-txtview" class="main-txtview"></textarea>
<div id="main-tiefseeview" class="main-tiefseeview"></div>
Expand Down
6 changes: 4 additions & 2 deletions tiefsee/tiefsee/bin/output/www/css/MainWindow.css
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,13 @@
}

.main-tools-group {
display: flex;
display: none;
margin-left: 3px;
margin-bottom: 3px;
}

.main-tools-group[active="true"] {
display: flex ;
}
/*垂直線*/
.main-tools-hr {
width: 1px;
Expand Down
2 changes: 1 addition & 1 deletion tiefsee/tiefsee/bin/output/www/demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<script src="js/library/jquery-3.6.0.min.js"></script>
<script src="js/library/jquery.easing.js"></script>

<script src="js/tiefseeview.js"></script>
<script src="js/Tiefseeview.js"></script>
<link rel="stylesheet" href="css/tiefseeview.css">

</head>
Expand Down
2 changes: 1 addition & 1 deletion tiefsee/tiefsee/bin/output/www/demo2.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<script src="js/library/jquery-3.6.0.min.js"></script>
<script src="js/library/jquery.easing.js"></script>

<script src="js/tiefseeview.js"></script>
<script src="js/Tiefseeview.js"></script>
<link rel="stylesheet" href="css/tiefseeview.css">

</head>
Expand Down
2 changes: 1 addition & 1 deletion tiefsee/tiefsee/bin/output/www/demoWindow.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<script src="js/library/jquery-3.6.0.min.js"></script>
<script src="js/library/jquery.easing.js"></script>

<script src="js/tiefseeview.js"></script>
<script src="js/Tiefseeview.js"></script>
<link rel="stylesheet" href="css/tiefseeview.css">
<link rel="stylesheet" href="css/MainWindow.css">
<link rel="stylesheet" href="css/menu.css">
Expand Down
1 change: 0 additions & 1 deletion tiefsee/tiefsee/bin/output/www/img/++loading.svg

This file was deleted.

40 changes: 0 additions & 40 deletions tiefsee/tiefsee/bin/output/www/img/+loading.svg

This file was deleted.

Binary file added tiefsee/tiefsee/bin/output/www/img/logo.ico
Binary file not shown.
12 changes: 7 additions & 5 deletions tiefsee/tiefsee/bin/output/www/img/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 1 addition & 3 deletions tiefsee/tiefsee/bin/output/www/js/BaseWindow.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ class BaseWindow {
}
}
SizeChanged(left, top, width, height, windowState) {
console.log("SizeChanged " + windowState);
this.left = left;
this.top = top;
this.width = width;
Expand All @@ -98,13 +97,12 @@ class BaseWindow {
this.initWindowState();
}
Move(left, top, width, height, windowState) {
console.log("move " + windowState);
this.left = left;
this.top = top;
this.width = width;
this.height = height;
this.windowState = windowState;
this.initWindowState();
//this.initWindowState();
}
VisibleChanged() {
console.log("VisibleChanged");
Expand Down
4 changes: 1 addition & 3 deletions tiefsee/tiefsee/bin/output/www/js/BaseWindow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ class BaseWindow {


SizeChanged(left: number, top: number, width: number, height: number, windowState: ("Maximized" | "Minimized" | "Normal")) {
console.log("SizeChanged " + windowState)
this.left = left;
this.top = top;
this.width = width;
Expand All @@ -46,14 +45,13 @@ class BaseWindow {
}

public Move(left: number, top: number, width: number, height: number, windowState: ("Maximized" | "Minimized" | "Normal")) {
console.log("move " + windowState)
this.left = left;
this.top = top;
this.width = width;
this.height = height;
this.windowState = windowState;

this.initWindowState();
//this.initWindowState();
}

public VisibleChanged() {
Expand Down
9 changes: 8 additions & 1 deletion tiefsee/tiefsee/bin/output/www/js/MainWindow/Config.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,12 @@ class Config {
/**
* 取得檔案類型
* @param path
* @returns
* @returns 小寫附檔名,例如「jpg」
*/
getFileType(path) {
return __awaiter(this, void 0, void 0, function* () {
let fileType = yield WV_File.GetFIleType(path); //取得檔案類型
//console.log("fileType " + fileType)
let fileExt = Lib.GetExtension(path); //取得附檔名
fileExt = fileExt.replace(".", "").toLocaleLowerCase();
if (fileType == "255216") {
Expand Down Expand Up @@ -152,6 +153,12 @@ class Config {
if (fileExt == "pptx") {
return "pptx";
}
if (fileExt == "xlsx") {
return "xlsx";
}
if (fileExt == "xlsm") {
return "xlsm";
}
if (fileExt == "apk") {
return "apk";
}
Expand Down
6 changes: 4 additions & 2 deletions tiefsee/tiefsee/bin/output/www/js/MainWindow/Config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,12 @@ class Config {
/**
* 取得檔案類型
* @param path
* @returns
* @returns 小寫附檔名,例如「jpg」
*/
public async getFileType(path: string) {

let fileType = await WV_File.GetFIleType(path);//取得檔案類型

//console.log("fileType " + fileType)
let fileExt = Lib.GetExtension(path);//取得附檔名
fileExt = fileExt.replace(".", "").toLocaleLowerCase();

Expand All @@ -130,6 +130,8 @@ class Config {
if (fileType == "8075") {
if (fileExt == "docx") { return "docx"; }
if (fileExt == "pptx") { return "pptx"; }
if (fileExt == "xlsx") { return "xlsx"; }
if (fileExt == "xlsm") { return "xlsm"; }
if (fileExt == "apk") { return "apk"; }
if (fileExt == "xd") { return "xd"; }
return "zip";
Expand Down
Loading

0 comments on commit 502f8d2

Please sign in to comment.