Skip to content

Commit

Permalink
10 seattle 対応
Browse files Browse the repository at this point in the history
  • Loading branch information
freeonterminate committed Sep 1, 2015
1 parent 27d2b1f commit dc249c7
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 22 deletions.
Expand Up @@ -3,7 +3,8 @@
*
* Copyright (c) 2015 HOSOKAWA Jun.
*
* Last Update 2015/04/09
* First Release 2015/04/09 XE8 対応
* Last Update 2015/09/01 10 seattle 対応
*
* Contact:
* Twitter @pik or freeonterminate@gmail.com
Expand Down Expand Up @@ -49,7 +50,7 @@
*
* 3. This notice may not be removed or altered from any source distribution.
*)
program XE8IDESettingChanger;
program IDESettingChanger;

uses
Winapi.Windows,
Expand Down
12 changes: 6 additions & 6 deletions XE8IDESettingChanger/Readme.md
@@ -1,4 +1,4 @@
#XE8IDESettingChanger
#IDESettingChanger

##CAUTION
THIS TEXT IS TRANSLATION BY A MACHINE.
Expand All @@ -8,21 +8,21 @@ MY TWITTER ACCOUNT: @pik
(I AM DELPHI'S MVP OF EMBARCADERO TECHNOLOGIES.)

##Introduction
This application changes the setting of XE8 IDE (FontName, FontSize, MainToolBarColor).
This application changes the setting of XE8/10 IDE (FontName, FontSize, MainToolBarColor).

##Environment Platform
Delphi / RAD Studio version XE8.
Appmethod 1.16
Delphi / RAD Studio version XE8, 10 seattle.
Appmethod 1.16, 1.17

##File
Please download following files.

XE8IDESettingChanger.dpr Project file.
IDESettingChanger.dpr Project file.
uMain.pas Main Form
uMain.fmx Main Form

##How to use
Open XE8IDESettingChanger.dpr.
Open IDESettingChanger.dpr.
Build & Run.
You change FontName, FontSize, MainToolBarColor appropriately.

Expand Down
41 changes: 31 additions & 10 deletions XE8IDESettingChanger/uMain.fmx
@@ -1,8 +1,9 @@
object Form1: TForm1
Left = 0
Top = 0
BorderIcons = [biSystemMenu, biMinimize]
BorderStyle = Single
Caption = 'XE8 IDE Settings Changer'
Caption = 'IDE Settings Changer'
ClientHeight = 232
ClientWidth = 488
FormFactor.Width = 320
Expand All @@ -20,15 +21,15 @@ object Form1: TForm1
Size.PlatformDefault = False
TextSettings.Font.Size = 20.000000000000000000
TextSettings.Font.Style = [fsBold]
Text = 'XE8 IDE Setting changer'
Text = 'IDE Setting changer'
end
object pnlPreviewBase: TPanel
Position.X = 8.000000000000000000
Position.Y = 40.000000000000000000
Size.Width = 193.000000000000000000
Size.Height = 81.000000000000000000
Size.PlatformDefault = False
TabOrder = 0
TabOrder = 8
TabStop = False
object rectPreviewColor: TRectangle
Align = Contents
Expand Down Expand Up @@ -177,7 +178,7 @@ object Form1: TForm1
Size.Width = 81.000000000000000000
Size.Height = 22.000000000000000000
Size.PlatformDefault = False
TabOrder = 3
TabOrder = 4
OnChange = colorBaseColorChange
end
object btnSave: TButton
Expand All @@ -187,7 +188,7 @@ object Form1: TForm1
Size.Width = 192.000000000000000000
Size.Height = 81.000000000000000000
Size.PlatformDefault = False
TabOrder = 5
TabOrder = 6
Text = 'Save'
TextSettings.Font.Size = 20.000000000000000000
TextSettings.Font.Style = [fsBold]
Expand All @@ -199,7 +200,7 @@ object Form1: TForm1
Size.Width = 193.000000000000000000
Size.Height = 22.000000000000000000
Size.PlatformDefault = False
TabOrder = 1
TabOrder = 2
OnChange = cmbbxFontNameChange
end
object lblFontNameTitle: TLabel
Expand Down Expand Up @@ -235,7 +236,7 @@ object Form1: TForm1
end
object spinFontSize: TSpinBox
Touch.InteractiveGestures = [LongTap, DoubleTap]
TabOrder = 2
TabOrder = 3
Cursor = crIBeam
Position.X = 288.000000000000000000
Position.Y = 72.000000000000000000
Expand All @@ -250,7 +251,7 @@ object Form1: TForm1
Size.Width = 56.000000000000000000
Size.Height = 22.000000000000000000
Size.PlatformDefault = False
TabOrder = 7
TabOrder = 1
Text = 'Reset'
OnClick = btnResetClick
end
Expand All @@ -265,7 +266,7 @@ object Form1: TForm1
Size.Width = 273.000000000000000000
Size.Height = 81.000000000000000000
Size.PlatformDefault = False
TabOrder = 6
TabOrder = 7
Viewport.Width = 269.000000000000000000
Viewport.Height = 77.000000000000000000
end
Expand All @@ -275,8 +276,28 @@ object Form1: TForm1
Size.Width = 104.000000000000000000
Size.Height = 22.000000000000000000
Size.PlatformDefault = False
TabOrder = 4
TabOrder = 5
Text = 'Set XE7 Color'
OnClick = btnXE7ColorClick
end
object cmbbxTarget: TComboBox
Items.Strings = (
'XE8'
'10 seattle')
ItemIndex = 1
Position.X = 288.000000000000000000
Position.Y = 8.000000000000000000
Size.Width = 124.000000000000000000
Size.Height = 22.000000000000000000
Size.PlatformDefault = False
TabOrder = 0
end
object lblTarget: TLabel
Position.X = 224.000000000000000000
Position.Y = 8.000000000000000000
Size.Width = 65.000000000000000000
Size.Height = 17.000000000000000000
Size.PlatformDefault = False
Text = 'Target IDE'
end
end
37 changes: 33 additions & 4 deletions XE8IDESettingChanger/uMain.pas
@@ -1,9 +1,10 @@
(*
* XE8 IDE setting changer
* IDE setting changer
*
* Copyright (c) 2015 HOSOKAWA Jun.
*
* Last Update 2015/04/09
* First Release 2015/04/09 XE8 対応
* Last Update 2015/09/01 10 seattle 対応
*
* Contact:
* Twitter @pik or freeonterminate@gmail.com
Expand Down Expand Up @@ -77,6 +78,8 @@ TForm1 = class(TForm)
btnReset: TButton;
memoLog: TMemo;
btnXE7Color: TButton;
cmbbxTarget: TComboBox;
lblTarget: TLabel;
procedure cmbbxFontNameChange(Sender: TObject);
procedure colorBaseColorChange(Sender: TObject);
procedure spinFontSizeChange(Sender: TObject);
Expand All @@ -97,7 +100,10 @@ implementation
Winapi.Windows;

const
REG_KEY = 'Software\Embarcadero\BDS\16.0\ModernTheme';
REG_KEY = 'Software\Embarcadero\BDS\%s\ModernTheme';

VER_XE8 = '16.0';
VER_SEATTLE = '17.0';

REG_KEY_FONT_NAME = 'FontName';
REG_KEY_FONT_SIZE = 'FontSize';
Expand Down Expand Up @@ -138,7 +144,30 @@ procedure TForm1.btnSaveClick(Sender: TObject);
hReg: HKEY;
Disposition: DWORD;
Res: DWORD;
Ver: String;
RegKey: String;
begin
case cmbbxTarget.ItemIndex of
0:
Ver := VER_XE8;

1:
begin
Ver := VER_SEATTLE;
end;

else
Ver := '';
end;

if (Ver.IsEmpty) then
begin
Log('ERROR, Target IDE unknown');
Exit;
end;

RegKey := Format(REG_KEY, [Ver]);

if (iType = REG_SZ) then
Log(Format('%s: String = %s', [iKey, String(PChar(iValue))]))
else
Expand All @@ -149,7 +178,7 @@ procedure TForm1.btnSaveClick(Sender: TObject);
Res :=
RegCreateKeyEx(
HKEY_CURRENT_USER,
PChar(REG_KEY),
PChar(RegKey),
0,
nil,
REG_OPTION_NON_VOLATILE,
Expand Down

0 comments on commit dc249c7

Please sign in to comment.