├── 7za.exe ├── Config.inc ├── Main.fmx ├── Main.pas ├── MainIcon.ico ├── MakeRelease.bat ├── PowerOff.dpr ├── PowerOff.dproj ├── PowerOff.res ├── PowerOff_Icon.ico ├── README.md ├── Release.zip ├── Release └── PowerOff.exe ├── Style.style ├── Tooltip.fmx ├── Tooltip.pas ├── Update.ini ├── Utils.pas ├── cfx ├── back_image.png └── screenshot.png └── style.png /7za.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/PowerOff/93a42b15ed684c0ca2fac1cf372e3f0787ab30a8/7za.exe -------------------------------------------------------------------------------- /Config.inc: -------------------------------------------------------------------------------- 1 | // this option depends on ErrorSoft TurboUpdate 2 | {.$define AutoUpdate} 3 | -------------------------------------------------------------------------------- /Main.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/PowerOff/93a42b15ed684c0ca2fac1cf372e3f0787ab30a8/Main.pas -------------------------------------------------------------------------------- /MainIcon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/PowerOff/93a42b15ed684c0ca2fac1cf372e3f0787ab30a8/MainIcon.ico -------------------------------------------------------------------------------- /MakeRelease.bat: -------------------------------------------------------------------------------- 1 | rem Delete old release 2 | del "Release.zip" /q 3 | 4 | rem Open folder with application 5 | cd "Release\" 6 | 7 | rem Delete old PowerOff.exe.old 8 | del "PowerOff.exe.old" /q 9 | 10 | rem Create Release archive 11 | set Zip=..\7za.exe 12 | "%Zip%" a "..\Release.zip" -ssw 13 | 14 | exit -------------------------------------------------------------------------------- /PowerOff.dpr: -------------------------------------------------------------------------------- 1 | program PowerOff; 2 | 3 | uses 4 | System.StartUpCopy, 5 | FMX.Forms, 6 | Main in 'Main.pas' {MainForm}, 7 | Tooltip in 'Tooltip.pas' {TooltipForm}, 8 | Utils in 'Utils.pas'; 9 | 10 | {$R *.res} 11 | 12 | begin 13 | Application.Initialize; 14 | Application.CreateForm(TMainForm, MainForm); 15 | Application.Run; 16 | end. 17 | -------------------------------------------------------------------------------- /PowerOff.dproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | {11CC4360-8614-43CB-A234-BF4B13117D25} 4 | 18.2 5 | FMX 6 | PowerOff.dpr 7 | True 8 | Release 9 | Win32 10 | 1 11 | Application 12 | 13 | 14 | true 15 | 16 | 17 | true 18 | Base 19 | true 20 | 21 | 22 | true 23 | Base 24 | true 25 | 26 | 27 | true 28 | Cfg_1 29 | true 30 | true 31 | 32 | 33 | true 34 | Base 35 | true 36 | 37 | 38 | true 39 | Cfg_2 40 | true 41 | true 42 | 43 | 44 | $(BDS)\bin\delphi_PROJECTICNS.icns 45 | true 46 | true 47 | true 48 | true 49 | true 50 | PowerOff 51 | $(BDS)\bin\delphi_PROJECTICON.ico 52 | true 53 | true 54 | true 55 | System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace) 56 | true 57 | true 58 | .\$(Platform)\$(Config) 59 | .\$(Platform)\$(Config) 60 | false 61 | false 62 | false 63 | false 64 | false 65 | 66 | 67 | true 68 | true 69 | 2 70 | $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png 71 | $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png 72 | MainIcon.ico 73 | .\Release\ 74 | $(BDS)\bin\default_app.manifest 75 | DBXSqliteDriver;RESTComponents;DataSnapServerMidas;DBXDb2Driver;DBXInterBaseDriver;vclactnband;frxe23;vclFireDAC;emsclientfiredac;DataSnapFireDAC;svnui;tethering;JvGlobus;FireDACADSDriver;JvPluginSystem;DBXMSSQLDriver;JvMM;DatasnapConnectorsFreePascal;FireDACMSSQLDriver;vcltouch;JvBands;vcldb;bindcompfmx;svn;JvJans;DBXOracleDriver;JvNet;Intraweb;inetdb;JvAppFrm;VirtualTreesDR;RaizeComponentsVcl_Seattle;FmxTeeUI;JvDotNetCtrls;FireDACIBDriver;fmx;fmxdae;EasyListviewD;vclib;VirtualShellToolsD;JvWizards;FireDACDBXDriver;dbexpress;IndyCore;vclx;JvPageComps;dsnap;DataSnapCommon;emsclient;EsVclCore;FireDACCommon;Package1;JvDB;RESTBackendComponents;DataSnapConnectors;VCLRESTComponents;soapserver;frxTee23;JclDeveloperTools;FreeEsVclComponents;vclie;bindengine;DBXMySQLDriver;FireDACOracleDriver;CloudService;FireDACMySQLDriver;DBXFirebirdDriver;JvCmp;JvHMI;FixInsight_10;acntDelphiXE7_R;EsGroupBar;FireDACCommonDriver;DataSnapClient;inet;UIRibbonPackageDR;bindcompdbx;IndyIPCommon;JvCustom;vcl;DBXSybaseASEDriver;IndyIPServer;JvXPCtrls;PngComponents;IndySystem;FireDACDb2Driver;dsnapcon;FireDACMSAccDriver;fmxFireDAC;FireDACInfxDriver;vclimg;TeeDB;FireDAC;Jcl;JvCore;JvCrypt;FireDACSqliteDriver;FireDACPgDriver;ibmonitor;FireDACASADriver;ChromeTabs_R;DBXOdbcDriver;FireDACTDataDriver;FMXTee;soaprtl;DbxCommonDriver;JvDlgs;JvRuntimeDesign;ibxpress;Tee;JvManagedThreads;DataSnapServer;xmlrtl;soapmidas;DataSnapNativeClient;fmxobj;vclwinx;ibxbindings;rtl;FireDACDSDriver;DbxClientDriver;JvTimeFramework;DBXSybaseASADriver;CustomIPTransport;vcldsnap;JvSystem;JvStdCtrls;bindcomp;appanalytics;fgx;DBXInformixDriver;officeXPrt;IndyIPClient;bindcompvcl;frxDB23;TeeUI;vclribbon;dbxcds;VclSmp;JvDocking;adortl;FireDACODBCDriver;JvPascalInterpreter;KernowSoftwareFMX;JclVcl;DataSnapIndy10ServerTransport;dsnapxml;DataSnapProviderClient;dbrtl;inetdbxpress;FireDACMongoDBDriver;IndyProtocols;frx23;JvControls;JvPrintPreview;JclContainers;FmxEsChatList;fmxase;$(DCC_UsePackage) 76 | CompanyName=ErrorSoft(c);FileDescription=PowerOff;FileVersion=2.0.0.0;InternalName=PowerOff;LegalCopyright=ErrorSoft(c);LegalTrademarks=;OriginalFilename=;ProductName=PowerOff;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(ModuleName) 77 | Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) 78 | 1049 79 | 80 | 81 | DEBUG;$(DCC_Define) 82 | true 83 | false 84 | true 85 | true 86 | true 87 | 88 | 89 | true 90 | 2 91 | true 92 | PowerOff_Icon.ico 93 | 1033 94 | true 95 | true 96 | false 97 | 98 | 99 | 1049 100 | CompanyName=ErrorSoft(c);FileDescription=PowerOff;FileVersion=2.0.0.0;InternalName=PowerOff;LegalCopyright=ErrorSoft(c);LegalTrademarks=;OriginalFilename=;ProductName=PowerOff;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(ModuleName) 101 | false 102 | RELEASE;$(DCC_Define) 103 | 0 104 | 0 105 | 106 | 107 | true 108 | 3 109 | CompanyName=ErrorSoft(c);FileDescription=PowerOff;FileVersion=2.3.0.19;InternalName=PowerOff;LegalCopyright=ErrorSoft(c);LegalTrademarks=;OriginalFilename=;ProductName=PowerOff;ProductVersion=2.0;Comments=;ProgramID=com.embarcadero.$(ModuleName) 110 | 19 111 | true 112 | 2 113 | MainIcon.ico 114 | true 115 | true 116 | 117 | 118 | 119 | MainSource 120 | 121 | 122 |
MainForm
123 | fmx 124 |
125 | 126 |
TooltipForm
127 | fmx 128 |
129 | 130 | 131 | Cfg_2 132 | Base 133 | 134 | 135 | Base 136 | 137 | 138 | Cfg_1 139 | Base 140 | 141 |
142 | 143 | Delphi.Personality.12 144 | Application 145 | 146 | 147 | 148 | PowerOff.dpr 149 | 150 | 151 | (untitled) 152 | 153 | 154 | 155 | 156 | 157 | PowerOff.exe 158 | true 159 | 160 | 161 | 162 | 163 | true 164 | 165 | 166 | 167 | 168 | true 169 | 170 | 171 | 172 | 173 | true 174 | 175 | 176 | 177 | 178 | PowerOff.exe 179 | true 180 | 181 | 182 | 183 | 184 | 1 185 | 186 | 187 | 1 188 | 189 | 190 | 191 | 192 | Contents\Resources 193 | 1 194 | 195 | 196 | 197 | 198 | classes 199 | 1 200 | 201 | 202 | 203 | 204 | Contents\MacOS 205 | 0 206 | 207 | 208 | 1 209 | 210 | 211 | Contents\MacOS 212 | 1 213 | 214 | 215 | 216 | 217 | 1 218 | 219 | 220 | 1 221 | 222 | 223 | 1 224 | 225 | 226 | 227 | 228 | res\drawable-xxhdpi 229 | 1 230 | 231 | 232 | 233 | 234 | library\lib\mips 235 | 1 236 | 237 | 238 | 239 | 240 | 0 241 | 242 | 243 | 1 244 | 245 | 246 | Contents\MacOS 247 | 1 248 | 249 | 250 | 1 251 | 252 | 253 | library\lib\armeabi-v7a 254 | 1 255 | 256 | 257 | 1 258 | 259 | 260 | 261 | 262 | 0 263 | 264 | 265 | Contents\MacOS 266 | 1 267 | .framework 268 | 269 | 270 | 271 | 272 | 1 273 | 274 | 275 | 1 276 | 277 | 278 | 1 279 | 280 | 281 | 282 | 283 | 1 284 | 285 | 286 | 1 287 | 288 | 289 | 1 290 | 291 | 292 | 293 | 294 | ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF 295 | 1 296 | 297 | 298 | ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF 299 | 1 300 | 301 | 302 | 303 | 304 | library\lib\x86 305 | 1 306 | 307 | 308 | 309 | 310 | 1 311 | 312 | 313 | 1 314 | 315 | 316 | 1 317 | 318 | 319 | 320 | 321 | 1 322 | 323 | 324 | 1 325 | 326 | 327 | 1 328 | 329 | 330 | 331 | 332 | library\lib\armeabi 333 | 1 334 | 335 | 336 | 337 | 338 | 0 339 | 340 | 341 | 1 342 | 343 | 344 | Contents\MacOS 345 | 1 346 | 347 | 348 | 349 | 350 | 1 351 | 352 | 353 | 1 354 | 355 | 356 | 1 357 | 358 | 359 | 360 | 361 | res\drawable-normal 362 | 1 363 | 364 | 365 | 366 | 367 | res\drawable-xhdpi 368 | 1 369 | 370 | 371 | 372 | 373 | res\drawable-large 374 | 1 375 | 376 | 377 | 378 | 379 | 1 380 | 381 | 382 | 1 383 | 384 | 385 | 1 386 | 387 | 388 | 389 | 390 | ../ 391 | 1 392 | 393 | 394 | ../ 395 | 1 396 | 397 | 398 | 399 | 400 | res\drawable-hdpi 401 | 1 402 | 403 | 404 | 405 | 406 | library\lib\armeabi-v7a 407 | 1 408 | 409 | 410 | 411 | 412 | Contents 413 | 1 414 | 415 | 416 | 417 | 418 | ../ 419 | 1 420 | 421 | 422 | 423 | 424 | 1 425 | 426 | 427 | 1 428 | 429 | 430 | 1 431 | 432 | 433 | 434 | 435 | res\values 436 | 1 437 | 438 | 439 | 440 | 441 | res\drawable-small 442 | 1 443 | 444 | 445 | 446 | 447 | res\drawable 448 | 1 449 | 450 | 451 | 452 | 453 | 1 454 | 455 | 456 | 1 457 | 458 | 459 | 1 460 | 461 | 462 | 463 | 464 | 1 465 | 466 | 467 | 468 | 469 | res\drawable 470 | 1 471 | 472 | 473 | 474 | 475 | 0 476 | 477 | 478 | 0 479 | 480 | 481 | Contents\Resources\StartUp\ 482 | 0 483 | 484 | 485 | 0 486 | 487 | 488 | 0 489 | 490 | 491 | 0 492 | 493 | 494 | 495 | 496 | library\lib\armeabi-v7a 497 | 1 498 | 499 | 500 | 501 | 502 | 0 503 | .bpl 504 | 505 | 506 | 1 507 | .dylib 508 | 509 | 510 | Contents\MacOS 511 | 1 512 | .dylib 513 | 514 | 515 | 1 516 | .dylib 517 | 518 | 519 | 1 520 | .dylib 521 | 522 | 523 | 524 | 525 | res\drawable-mdpi 526 | 1 527 | 528 | 529 | 530 | 531 | res\drawable-xlarge 532 | 1 533 | 534 | 535 | 536 | 537 | res\drawable-ldpi 538 | 1 539 | 540 | 541 | 542 | 543 | 0 544 | .dll;.bpl 545 | 546 | 547 | 1 548 | .dylib 549 | 550 | 551 | Contents\MacOS 552 | 1 553 | .dylib 554 | 555 | 556 | 1 557 | .dylib 558 | 559 | 560 | 1 561 | .dylib 562 | 563 | 564 | 565 | 566 | 567 | 568 | 569 | 570 | 571 | 572 | 573 | True 574 | 575 | 576 | 12 577 | 578 | 579 | 580 | 581 |
582 | -------------------------------------------------------------------------------- /PowerOff.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/PowerOff/93a42b15ed684c0ca2fac1cf372e3f0787ab30a8/PowerOff.res -------------------------------------------------------------------------------- /PowerOff_Icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/PowerOff/93a42b15ed684c0ca2fac1cf372e3f0787ab30a8/PowerOff_Icon.ico -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # PowerOff 2 | ![Logo](cfx/screenshot.png) 3 | 4 | **ENG** 5 | PowerOff - Very simple application for auto shutdown the computer. 6 | 7 | It is useful app, if you before sleep like watch videos on YouTube/music/TV shows/movies, but they continue playing all night, causing a headache in the morning ... 8 | 9 | Utility was written, to check the suitability of the FireMonkey technology to develop - in general - yes, at the moment, under Windows (and to simulate the interface UWP), it is a workable technology. 10 | 11 | Project has MIT license. 12 | 13 | # Download PowerOff app: 14 | https://raw.githubusercontent.com/errorcalc/PowerOff/master/Release/PowerOff.exe 15 | 16 | **RUS** 17 | PowerOff - максимально упрощенное приложение для автоотключения компьютера. 18 | 19 | Полезно если вы перед сном любите включать ролики на YouTube/музыку/сериалы/фильмы, но засыпаете и они продолжают играть всю ночь, вызывая на утро головную боль... 20 | 21 | По большому счету утилита была написана и с целью проверить пригодность технологии FireMonkey для разработки - в целом - да, на данный момент, под Windows (и для имитирования UWP интерфейса), это вполне работоспособная технология. 22 | 23 | Хотя и есть нюансы - если вам необходимы FMX компоненты или дизайн интерфейса, учитывающие эти нюансы - вы можете заказать разработку. 24 | 25 | Проект имеет MIT лицензию. 26 | 27 | # Скачать приложение PowerOff: 28 | https://raw.githubusercontent.com/errorcalc/PowerOff/master/Release/PowerOff.exe 29 | -------------------------------------------------------------------------------- /Release.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/PowerOff/93a42b15ed684c0ca2fac1cf372e3f0787ab30a8/Release.zip -------------------------------------------------------------------------------- /Release/PowerOff.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/PowerOff/93a42b15ed684c0ca2fac1cf372e3f0787ab30a8/Release/PowerOff.exe -------------------------------------------------------------------------------- /Tooltip.fmx: -------------------------------------------------------------------------------- 1 | object TooltipForm: TTooltipForm 2 | Left = 0 3 | Top = 0 4 | ClientHeight = 119 5 | ClientWidth = 862 6 | Transparency = True 7 | FormStyle = StayOnTop 8 | FormFactor.Width = 320 9 | FormFactor.Height = 480 10 | FormFactor.Devices = [Desktop] 11 | OnClose = FormClose 12 | OnShow = FormShow 13 | DesignerMasterStyle = 0 14 | object TimerFree: TTimer 15 | Enabled = False 16 | Interval = 10000 17 | OnTimer = TimerFreeTimer 18 | Left = 144 19 | Top = 16 20 | end 21 | object Layout: TLayout 22 | Align = Client 23 | Size.Width = 862.000000000000000000 24 | Size.Height = 119.000000000000000000 25 | Size.PlatformDefault = False 26 | TabOrder = 1 27 | object Rectangle: TRectangle 28 | Align = Client 29 | Fill.Color = claBlack 30 | Margins.Left = 30.000000000000000000 31 | Margins.Top = 30.000000000000000000 32 | Margins.Right = 30.000000000000000000 33 | Margins.Bottom = 30.000000000000000000 34 | Size.Width = 802.000000000000000000 35 | Size.Height = 59.000000000000000000 36 | Size.PlatformDefault = False 37 | Stroke.Kind = None 38 | XRadius = 6.000000000000000000 39 | YRadius = 6.000000000000000000 40 | OnClick = RectangleClick 41 | object ShadowEffect: TShadowEffect 42 | Distance = 3.000000000000000000 43 | Direction = 45.000000000000000000 44 | Softness = 0.300000011920929000 45 | Opacity = 0.699999988079071000 46 | ShadowColor = claBlack 47 | end 48 | object Message: TLabel 49 | Align = Client 50 | StyledSettings = [Family, Style] 51 | Size.Width = 802.000000000000000000 52 | Size.Height = 59.000000000000000000 53 | Size.PlatformDefault = False 54 | TextSettings.Font.Size = 30.000000000000000000 55 | TextSettings.FontColor = claWhite 56 | TextSettings.HorzAlign = Center 57 | TextSettings.WordWrap = False 58 | TextSettings.Trimming = None 59 | Text = '-' 60 | end 61 | end 62 | object AnimationHide: TFloatAnimation 63 | Delay = 4.500000000000000000 64 | Duration = 0.500000000000000000 65 | Interpolation = Quadratic 66 | PropertyName = 'Opacity' 67 | StartValue = 1.000000000000000000 68 | StopValue = 0.000000000000000000 69 | end 70 | object AnimationShow: TFloatAnimation 71 | Enabled = True 72 | Duration = 0.500000000000000000 73 | Interpolation = Quadratic 74 | PropertyName = 'Opacity' 75 | StartValue = 0.000000000000000000 76 | StopValue = 1.000000000000000000 77 | end 78 | end 79 | end 80 | -------------------------------------------------------------------------------- /Tooltip.pas: -------------------------------------------------------------------------------- 1 | {****************************************************************************************} 2 | { PowerOff } 3 | { ErrorSoft(c) 2016 } 4 | { } 5 | { Utility was written, to check the suitability of the FireMonkey technology to develop- } 6 | { in general - yes, at the moment, under Windows (and to simulate the interface UWP), } 7 | { it is a workable technology. } 8 | { } 9 | { This can be useful utilite or some of the sources, such as FontSizeForBox function. } 10 | { } 11 | { PowerOff - Very simple application for auto shutdown the computer. } 12 | { It is useful app, if you before sleep like watch videos on } 13 | { YouTube/music/TV shows/movies, but they continue playing all night, causing a headache } 14 | { in the morning ... } 15 | { } 16 | { This project uses MIT license: } 17 | { -------------------------------------------------------------------------------------- } 18 | { Copyright (c) 2016 errorsoft } 19 | { Permission is hereby granted, free of charge, to any person obtaining a copy of this } 20 | { software and associated documentation files (the "Software"), to deal in the Software } 21 | { without restriction, including without limitation the rights to use, copy, modify, } 22 | { merge, publish, distribute, sublicense, and/or sell copies of the Software, and to } 23 | { permit persons to whom the Software is furnished to do so, subject to the following } 24 | { conditions: } 25 | { The above copyright notice and this permission notice shall be included in all copies } 26 | { or substantial portions of the Software. } 27 | { THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, } 28 | { INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR } 29 | { A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT } 30 | { HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF } 31 | { CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE } 32 | { OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. } 33 | {****************************************************************************************} 34 | unit Tooltip; 35 | 36 | interface 37 | 38 | uses 39 | System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, 40 | FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.Controls.Presentation, 41 | FMX.StdCtrls, FMX.Effects, FMX.Objects, FMX.Ani, FMX.Layouts; 42 | 43 | type 44 | TTooltipForm = class(TForm) 45 | Rectangle: TRectangle; 46 | ShadowEffect: TShadowEffect; 47 | Message: TLabel; 48 | TimerFree: TTimer; 49 | AnimationShow: TFloatAnimation; 50 | AnimationHide: TFloatAnimation; 51 | Layout: TLayout; 52 | procedure TimerFreeTimer(Sender: TObject); 53 | procedure FormClose(Sender: TObject; var Action: TCloseAction); 54 | procedure FormShow(Sender: TObject); 55 | procedure RectangleClick(Sender: TObject); 56 | private 57 | FTextMessage: string; 58 | public 59 | property TextMessage: string read FTextMessage write FTextMessage; 60 | end; 61 | 62 | procedure ShowTooltip(Message: string); 63 | 64 | implementation 65 | 66 | {$R *.fmx} 67 | 68 | uses 69 | Utils, System.Math; 70 | 71 | procedure ShowTooltip(Message: string); 72 | var 73 | Form: TTooltipForm; 74 | begin 75 | Form := TTooltipForm.Create(nil); 76 | Form.TextMessage := Message; 77 | Form.Show; 78 | end; 79 | 80 | procedure TTooltipForm.FormClose(Sender: TObject; var Action: TCloseAction); 81 | begin 82 | Action := TCloseAction.caFree; 83 | end; 84 | 85 | procedure TTooltipForm.FormShow(Sender: TObject); 86 | var 87 | Size: TSize; 88 | begin 89 | ShadowEffect.Distance := 0;// TShadowEffect.Distance bug fix 90 | AnimationHide.Delay := (TimerFree.Interval / 1000) - AnimationHide.Duration; 91 | AnimationHide.Start; 92 | 93 | TimerFree.Enabled := True; 94 | 95 | Message.Text := TextMessage; 96 | 97 | Size := TSize.Create( 98 | Ceil(CalcTextSize(TextMessage, Message.Font).Width + Rectangle.Margins.Left + Rectangle.Margins.Right + 20), 99 | Ceil(CalcTextSize('W|', Message.Font).Height + Rectangle.Margins.Top + Rectangle.Margins.Bottom + 20)); 100 | 101 | SetBounds(Screen.Width div 2 - Size.Width div 2, Screen.Height div 2 - Size.Height div 2, 102 | Size.Width, Size.Height); 103 | end; 104 | 105 | procedure TTooltipForm.RectangleClick(Sender: TObject); 106 | begin 107 | Close; 108 | end; 109 | 110 | procedure TTooltipForm.TimerFreeTimer(Sender: TObject); 111 | begin 112 | Close; 113 | end; 114 | 115 | end. 116 | -------------------------------------------------------------------------------- /Update.ini: -------------------------------------------------------------------------------- 1 | [ErrorSoft.PowerOff] 2 | Download=https://raw.githubusercontent.com/errorcalc/PowerOff/master/Release.zip 3 | Version=2.4.0.19 4 | -------------------------------------------------------------------------------- /Utils.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/PowerOff/93a42b15ed684c0ca2fac1cf372e3f0787ab30a8/Utils.pas -------------------------------------------------------------------------------- /cfx/back_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/PowerOff/93a42b15ed684c0ca2fac1cf372e3f0787ab30a8/cfx/back_image.png -------------------------------------------------------------------------------- /cfx/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/PowerOff/93a42b15ed684c0ca2fac1cf372e3f0787ab30a8/cfx/screenshot.png -------------------------------------------------------------------------------- /style.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/errorcalc/PowerOff/93a42b15ed684c0ca2fac1cf372e3f0787ab30a8/style.png --------------------------------------------------------------------------------