Files
vue-desktop/src/core/process/impl/ProcessInfoImpl.ts

101 lines
2.2 KiB
TypeScript
Raw Normal View History

2025-08-26 10:33:41 +08:00
import type { IVersion } from '../../common/types/IVersion.ts'
import type { IAppProcessInfoParams } from '../types/IAppProcessInfoParams.ts'
import type { IWindowFormConfig } from '../../window/types/IWindowFormConfig.ts'
import type { IProcessInfo } from '@/core/process/IProcessInfo.ts'
2025-08-19 14:56:38 +08:00
2025-08-26 10:33:41 +08:00
export class ProcessInfoImpl implements IProcessInfo {
2025-08-19 14:56:38 +08:00
/**
*
* @private
*/
private readonly _name: string;
/**
*
* @private
*/
private readonly _title: string;
/**
*
* @private
*/
private readonly _description: string;
/**
*
* @private
*/
private readonly _icon: string;
/**
*
* windowFrom参数name
* @private
*/
private readonly _startName: string;
/**
*
* @private
*/
2025-08-26 10:33:41 +08:00
private readonly _version: IVersion;
2025-08-19 14:56:38 +08:00
/**
*
* @private
*/
private readonly _singleton: boolean;
/**
*
* @private
*/
private readonly _isJustProcess: boolean;
/**
*
* @private
*/
2025-08-26 10:33:41 +08:00
private readonly _windowFormConfigs: Array<IWindowFormConfig>;
2025-08-19 14:56:38 +08:00
2025-08-19 16:59:58 +08:00
constructor(info: IAppProcessInfoParams) {
2025-08-19 14:56:38 +08:00
this._name = info.name;
this._title = info.title || '';
this._description = info.description || '';
this._icon = <string> info.icon;
this._startName = info.startName || '';
this._version = info.version || { company: 'XZG', major: 1, minor: 0, build: 0, private: 0 };
this._singleton = info.singleton;
this._isJustProcess = info.isJustProcess;
this._windowFormConfigs = info.windowFormConfigs || [];
}
public get name() {
return this._name;
}
public get title() {
return this._title;
}
public get description() {
return this._description;
}
public get icon() {
return this._icon;
}
public get startName() {
return this._startName;
}
public get version() {
return this._version;
}
public get singleton() {
return this._singleton;
}
public get isJustProcess() {
return this._isJustProcess;
}
public get windowFormConfigs() {
return this._windowFormConfigs;
}
}