Skip to content

Commit

Permalink
Some adjustments of UI Eliments
Browse files Browse the repository at this point in the history
  • Loading branch information
Huichan KIM authored May 26, 2024
1 parent a933a95 commit 54b4a13
Show file tree
Hide file tree
Showing 19 changed files with 8,470 additions and 8,831 deletions.
42 changes: 36 additions & 6 deletions Ollma_Client.dpr
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ program Ollma_Client;

uses
FastMM4,
System.SysUtils,
WinApi.Windows,
Vcl.Forms,
Vcl.Themes,
Vcl.Styles,
Expand All @@ -10,6 +12,7 @@ uses
Unit_MRUManager in 'Unit_MRUManager.pas',
Unit_ImageDropDown in 'Unit_ImageDropDown.pas',
SpeechLib_TLB in 'SpeechLib_TLB.pas',
Unit_Welcome in 'Unit_Welcome.pas' {Frame_Welcome: TFrame},
Unit_Main in 'Unit_Main.pas' {Form_RestOllama},
Unit_AliveOllama in 'Unit_AliveOllama.pas' {Form_AliveOllama},
Unit_Translator in 'Unit_Translator.pas' {Form_Translator},
Expand All @@ -18,11 +21,38 @@ uses

{$R *.res}

const
_AppTitle: string = 'Ollama Client GUI';
_AppWarning: string = 'Ollama Client GUI is already running...';

var
_mxHandle: THandle = 0;
begin
Application.Initialize;
TStyleManager.TrySetStyle('Windows10 SlateGray');
Application.Title := 'Ollama GUI';
Application.CreateForm(TForm_RestOllama, Form_RestOllama);
Application.CreateForm(TForm_RequestDialog, Form_RequestDialog);
Application.Run;
var _RunTime := Application.MainForm = nil;
if _RunTime then
begin
_mxHandle := CreateMutex(nil, False, PChar(_AppTitle));
if GetLastError = ERROR_ALREADY_EXISTS then
begin
var _dummy := MessageBox(0, PChar(_AppWarning), PChar(_AppTitle), MB_OK or MB_ICONINFORMATION);
Halt(0);
end;
end
else
begin
var _dummy := MessageBox(0, PChar(_AppWarning), PChar(_AppTitle), MB_OK or MB_ICONINFORMATION);
Halt(0);
end;

if _mxHandle <> 0 then
try
Application.Initialize;
TStyleManager.TrySetStyle('Windows10 SlateGray');
Application.Title := 'Ollama Client GUI';
Application.CreateForm(TForm_RestOllama, Form_RestOllama);
Application.CreateForm(TForm_RequestDialog, Form_RequestDialog);
Application.Run;
finally
CloseHandle(_mxHandle);
end;
end.
7 changes: 6 additions & 1 deletion Ollma_Client.dproj
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,10 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_1_Win64)'!=''">
<AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
<VerInfo_Keys>CompanyName=JNJ Labs. Seoul, Korea;FileDescription=$(MSBuildProjectName);FileVersion=0.9.0.0;InternalName=;LegalCopyright=JNJ Labs. Huichan KIM;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
<VerInfo_Keys>CompanyName=JNJ Labs. Seoul, Korea;FileDescription=$(MSBuildProjectName);FileVersion=0.9.3.0;InternalName=;LegalCopyright=JNJ Labs. Huichan KIM;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
<VerInfo_MajorVer>0</VerInfo_MajorVer>
<VerInfo_MinorVer>9</VerInfo_MinorVer>
<VerInfo_Release>3</VerInfo_Release>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_2)'!=''">
<Version>7.0</Version>
Expand Down Expand Up @@ -1104,6 +1105,10 @@
<DCCReference Include="Unit_MRUManager.pas"/>
<DCCReference Include="Unit_ImageDropDown.pas"/>
<DCCReference Include="SpeechLib_TLB.pas"/>
<DCCReference Include="Unit_Welcome.pas">
<Form>Frame_Welcome</Form>
<DesignClass>TFrame</DesignClass>
</DCCReference>
<DCCReference Include="Unit_Main.pas">
<Form>Form_RestOllama</Form>
</DCCReference>
Expand Down
Binary file modified Ollma_Client.res
Binary file not shown.
Loading

0 comments on commit 54b4a13

Please sign in to comment.