初始化
This commit is contained in:
22
src/core/window/WindowForm.ts
Normal file
22
src/core/window/WindowForm.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { v4 as uuidV4 } from 'uuid';
|
||||
import type AppProcess from '../process/AppProcess.ts'
|
||||
import XSystem from '../XSystem.ts'
|
||||
import type { AppProcessInfo } from '../process/AppProcessInfo.ts'
|
||||
|
||||
export default class WindowForm {
|
||||
private readonly _id: string = uuidV4();
|
||||
private readonly _procId: string;
|
||||
|
||||
public get id() {
|
||||
return this._id;
|
||||
}
|
||||
public get proc() {
|
||||
return XSystem.instance.processManages.findProcessById(this._procId)
|
||||
}
|
||||
|
||||
constructor(proc: AppProcess, startName: string) {
|
||||
this._procId = proc.id;
|
||||
console.log('WindowForm')
|
||||
}
|
||||
|
||||
}
|
||||
60
src/core/window/types/WindowFormConfig.ts
Normal file
60
src/core/window/types/WindowFormConfig.ts
Normal file
@@ -0,0 +1,60 @@
|
||||
/**
|
||||
* 窗体配置
|
||||
*/
|
||||
export interface WindowFormConfig {
|
||||
/**
|
||||
* 窗体名称
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* 窗体标题
|
||||
*/
|
||||
title?: string;
|
||||
/**
|
||||
* 窗体图标
|
||||
*/
|
||||
icon?: string;
|
||||
top?: number;
|
||||
left?: number;
|
||||
/**
|
||||
* 窗体宽度
|
||||
*/
|
||||
width?: number;
|
||||
widthAuto?: boolean;
|
||||
/**
|
||||
* 窗体高度
|
||||
*/
|
||||
height?: number;
|
||||
heightAuto?: boolean;
|
||||
/**
|
||||
* 窗体最小宽度
|
||||
*/
|
||||
minWidth?: number;
|
||||
/**
|
||||
* 窗体最小高度
|
||||
*/
|
||||
minHeight?: number;
|
||||
/**
|
||||
* 窗体最大宽度
|
||||
*/
|
||||
maxWidth?: number;
|
||||
/**
|
||||
* 窗体最大高度
|
||||
*/
|
||||
maxHeight?: number;
|
||||
/**
|
||||
* 窗体透明度
|
||||
*/
|
||||
opacity?: number;
|
||||
windowStyle?: string;
|
||||
windowState?: number;
|
||||
resizeMode?: number;
|
||||
topMost?: boolean;
|
||||
/**
|
||||
* 是否显示在任务栏
|
||||
*/
|
||||
showInTaskbar?: boolean;
|
||||
showTitleBarIcon?: boolean;
|
||||
showTitleBarText?: boolean;
|
||||
hideTitleBar?: boolean;
|
||||
}
|
||||
Reference in New Issue
Block a user