Skip to content

Commit 6ba5c48

Browse files
author
César Cardoso
committed
feature/add-form-e-chamadas-para-tela-de-notes
1 parent 7d4b7cb commit 6ba5c48

14 files changed

Lines changed: 248 additions & 29 deletions

Package/C4DWizard.dpk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ contains
128128
C4D.Wizard.IDE.PopupMenuDesigner.ComponentSel in '..\Src\IDE\PopupMenuDesigner\C4D.Wizard.IDE.PopupMenuDesigner.ComponentSel.pas',
129129
C4D.Wizard.IDE.ShortCut.KeyboardBinding in '..\Src\IDE\ShortCut\C4D.Wizard.IDE.ShortCut.KeyboardBinding.pas',
130130
C4D.Wizard.UsesOrganization.ListOfUses in '..\Src\UsesOrganization\C4D.Wizard.UsesOrganization.ListOfUses.pas',
131-
C4D.Wizard.FormatSource.View in '..\Src\FormatSource\C4D.Wizard.FormatSource.View.pas' {C4DWizardFormatSourceView};
131+
C4D.Wizard.FormatSource.View in '..\Src\FormatSource\C4D.Wizard.FormatSource.View.pas' {C4DWizardFormatSourceView},
132+
C4D.Wizard.Notes.View in '..\Src\Notes\C4D.Wizard.Notes.View.pas' {C4DWizardNotesView};
132133

133134
end.

Package/C4DWizard.dproj

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,10 @@
285285
<Form>C4DWizardFormatSourceView</Form>
286286
<FormType>dfm</FormType>
287287
</DCCReference>
288+
<DCCReference Include="..\Src\Notes\C4D.Wizard.Notes.View.pas">
289+
<Form>C4DWizardNotesView</Form>
290+
<FormType>dfm</FormType>
291+
</DCCReference>
288292
<RcItem Include="Img\C4D_Logo.bmp">
289293
<ResourceType>BITMAP</ResourceType>
290294
<ResourceId>C4D_Logo</ResourceId>
@@ -409,6 +413,10 @@
409413
<ResourceType>BITMAP</ResourceType>
410414
<ResourceId>c4d_verify_document</ResourceId>
411415
</RcItem>
416+
<RcItem Include="Img\c4d_notes.bmp">
417+
<ResourceType>BITMAP</ResourceType>
418+
<ResourceId>c4d_notes</ResourceId>
419+
</RcItem>
412420
<BuildConfiguration Include="Release">
413421
<Key>Cfg_2</Key>
414422
<CfgParent>Base</CfgParent>

Package/Img/c4d_notes.bmp

860 Bytes
Binary file not shown.

Src/C4D.Wizard.Register.pas

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ interface
1818
C4D.Wizard.Messages.Custom.Groups.OTA,
1919
C4D.Wizard.IDE.EditServicesNotifier,
2020
C4D.Wizard.IDE.CompileNotifier,
21-
C4D.Wizard.IDE.ShortCut.KeyboardBinding;
21+
C4D.Wizard.IDE.ShortCut.KeyboardBinding,
22+
C4D.Wizard.Notes.View;
2223

2324
{$IFDEF C4D_WIZARD_DLL}
2425
function RegisterDLL(const BorlandIDEServices: IBorlandIDEServices;
@@ -40,6 +41,7 @@ procedure RegistrarAll;
4041
C4D.Wizard.Messages.Custom.Groups.OTA.RegisterSelf;
4142
C4D.Wizard.IDE.EditServicesNotifier.RegisterSelf;
4243
C4D.Wizard.IDE.CompileNotifier.RegisterSelf;
44+
C4D.Wizard.Notes.View.RegisterSelf;
4345
end;
4446

4547
{$IFDEF C4D_WIZARD_DLL}

Src/Consts/C4D.Wizard.Consts.pas

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ TC4DConsts = class
9494
C_MENU_IDE_ABOUT_CAPTION = 'About Code4Delphi Wizard';
9595
C_MENU_IDE_FormatSource_NAME = 'C4DFormatSource1';
9696
C_MENU_IDE_FormatSource_CAPTION = 'Format Source';
97+
C_MENU_IDE_NOTES_NAME = 'C4DWizarNotes1';
98+
C_MENU_IDE_NOTES_CAPTION = 'Notes';
9799

98100
//FILE .INI REOPEN
99101
C_REOPEN_INI_Favorite = 'Favorite';

Src/IDE/ImageListMain/C4D.Wizard.IDE.ImageListMain.pas

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ TC4DWizardIDEImageListMain = class
3434
FImgIndexLockOFF: Integer;
3535
FImgIndexEmpty: Integer;
3636
FImgIndexBuildGroup: Integer;
37-
FImgVerifyDocument: Integer;
37+
FImgIndexVerifyDocument: Integer;
38+
FImgIndexNotes: Integer;
3839
constructor Create;
3940
public
4041
property ImgIndexC4D_Logo: Integer read FImgIndexC4D_Logo;
@@ -62,7 +63,8 @@ TC4DWizardIDEImageListMain = class
6263
property ImgIndexLockOFF: Integer read FImgIndexLockOFF;
6364
property ImgIndexEmpty: Integer read FImgIndexEmpty;
6465
property ImgIndexBuildGroup: Integer read FImgIndexBuildGroup;
65-
property ImgVerifyDocument: Integer read FImgVerifyDocument;
66+
property ImgIndexVerifyDocument: Integer read FImgIndexVerifyDocument;
67+
property ImgIndexNotes: Integer read FImgIndexNotes;
6668
class function GetInstance: TC4DWizardIDEImageListMain;
6769
end;
6870

@@ -108,7 +110,8 @@ constructor TC4DWizardIDEImageListMain.Create;
108110
FImgIndexLockOFF := TC4DWizardUtilsOTA.AddImgIDEResourceName('c4d_lock_off');
109111
FImgIndexEmpty := TC4DWizardUtilsOTA.AddImgIDEResourceName('c4d_empty');
110112
FImgIndexBuildGroup := TC4DWizardUtilsOTA.AddImgIDEResourceName('c4d_build_group');
111-
FImgVerifyDocument := TC4DWizardUtilsOTA.AddImgIDEResourceName('c4d_verify_document');
113+
FImgIndexVerifyDocument := TC4DWizardUtilsOTA.AddImgIDEResourceName('c4d_verify_document');
114+
FImgIndexNotes := TC4DWizardUtilsOTA.AddImgIDEResourceName('c4d_notes');
112115
end;
113116

114117
initialization

Src/IDE/MainMenu/C4D.Wizard.IDE.MainMenu.Clicks.pas

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ TC4DWizardIDEMainMenuClicks = class
2020
class procedure FormatSourceClick(Sender: TObject);
2121
class procedure FindClick(Sender: TObject);
2222
class procedure ReplaceClick(Sender: TObject);
23+
class procedure NotesClick(Sender: TObject);
2324
class procedure DefaultFilesInOpeningProjectClick(Sender: TObject);
2425
class procedure BackupExportClick(Sender: TObject);
2526
class procedure BackupImportClick(Sender: TObject);
@@ -36,10 +37,10 @@ TC4DWizardIDEMainMenuClicks = class
3637
implementation
3738

3839
uses
40+
C4D.Wizard.Reopen.Controller,
3941
C4D.Wizard.Reopen.View,
4042
C4D.Wizard.Settings.View,
4143
C4D.Wizard.UsesOrganization.View,
42-
C4D.Wizard.Reopen.Controller,
4344
C4D.Wizard.Utils,
4445
C4D.Wizard.Utils.OTA,
4546
C4D.Wizard.Translate.View,
@@ -50,7 +51,8 @@ implementation
5051
C4D.Wizard.Backup.Import.View,
5152
C4D.Wizard.View.About,
5253
C4D.Wizard.DefaultFilesInOpeningProject,
53-
C4D.Wizard.FormatSource.View;
54+
C4D.Wizard.FormatSource.View,
55+
C4D.Wizard.Notes.View;
5456

5557
class procedure TC4DWizardIDEMainMenuClicks.UsesOrganizationClick(Sender: TObject);
5658
var
@@ -125,6 +127,11 @@ class procedure TC4DWizardIDEMainMenuClicks.ReplaceClick(Sender: TObject);
125127
end;
126128
end;
127129

130+
class procedure TC4DWizardIDEMainMenuClicks.NotesClick(Sender: TObject);
131+
begin
132+
C4D.Wizard.Notes.View.C4DWizardNotesViewShowDockableForm;
133+
end;
134+
128135
class procedure TC4DWizardIDEMainMenuClicks.DefaultFilesInOpeningProjectClick(Sender: TObject);
129136
begin
130137
TC4DWizardDefaultFilesInOpeningProject

Src/IDE/MainMenu/C4D.Wizard.IDE.MainMenu.pas

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,12 @@ TC4DWizardIDEMainMenu = class(TInterfacedObject, IC4DWizardIDEMainMenu)
1818
procedure CreateMenuCode4DelphiInIDEMenu;
1919
function CreateSubMenu(AName: string; ACaption: string; AOnClick: TNotifyEvent; AImgIndex: Integer = -1; AShortCutStr: string = ''): TMenuItem;
2020
function GetShortcutUsesOrganization: string;
21-
function GetShortcutReopenFileHistoryUse: string;
21+
function GetShortcutReopenFileHistory: string;
2222
function GetShortcutOpenInGitHubDesktop: string;
2323
function GetShortcutTranslateText: string;
2424
function GetShortcutIndent: string;
2525
function GetShortcutReplace: string;
26+
function GetShortcutNotes: string;
2627
function GetShortcutFind: string;
2728
function GetShortcutDefaultFilesInOpeningProject: string;
2829
protected
@@ -82,7 +83,7 @@ procedure TC4DWizardIDEMainMenu.CreateMenus;
8283
TC4DConsts.C_MENU_IDE_REOPEN_CAPTION,
8384
TC4DWizardIDEMainMenuClicks.ReopenClick,
8485
TC4DWizardIDEImageListMain.GetInstance.ImgIndexFolderOpen,
85-
Self.GetShortcutReopenFileHistoryUse);
86+
Self.GetShortcutReopenFileHistory);
8687

8788
Self.CreateSubMenu(TC4DConsts.C_MENU_IDE_TRANSLATE_NAME,
8889
TC4DConsts.C_MENU_IDE_TRANSLATE_CAPTION,
@@ -113,6 +114,12 @@ procedure TC4DWizardIDEMainMenu.CreateMenus;
113114
TC4DWizardIDEImageListMain.GetInstance.ImgIndexReplace,
114115
Self.GetShortcutReplace);
115116

117+
Self.CreateSubMenu(TC4DConsts.C_MENU_IDE_NOTES_NAME,
118+
TC4DConsts.C_MENU_IDE_NOTES_CAPTION,
119+
TC4DWizardIDEMainMenuClicks.NotesClick,
120+
TC4DWizardIDEImageListMain.GetInstance.ImgIndexNotes,
121+
Self.GetShortcutNotes);
122+
116123
Self.CreateSubMenu('C4DSeparator50', '-', nil);
117124
Self.CreateSubMenu(TC4DConsts.C_ITEM_MENU_DefaultFilesInOpeningProject_NAME,
118125
TC4DConsts.C_ITEM_MENU_DefaultFilesInOpeningProject_CAPTION,
@@ -219,7 +226,7 @@ function TC4DWizardIDEMainMenu.GetShortcutUsesOrganization: string;
219226
Result := C4DWizardSettingsModel.ShortcutUsesOrganization.Trim;
220227
end;
221228

222-
function TC4DWizardIDEMainMenu.GetShortcutReopenFileHistoryUse: string;
229+
function TC4DWizardIDEMainMenu.GetShortcutReopenFileHistory: string;
223230
begin
224231
Result := '';
225232
if(C4DWizardSettingsModel.ShortcutReopenFileHistoryUse)and(not C4DWizardSettingsModel.ShortcutReopenFileHistory.Trim.IsEmpty)then
@@ -261,6 +268,13 @@ function TC4DWizardIDEMainMenu.GetShortcutReplace: string;
261268
Result := C4DWizardSettingsModel.ShortcutReplaceFiles.Trim;
262269
end;
263270

271+
function TC4DWizardIDEMainMenu.GetShortcutNotes: string;
272+
begin
273+
Result := '';
274+
if(C4DWizardSettingsModel.ShortcutNotesUse)and(not C4DWizardSettingsModel.ShortcutNotes.Trim.IsEmpty)then
275+
Result := C4DWizardSettingsModel.ShortcutNotes.Trim;
276+
end;
277+
264278
function TC4DWizardIDEMainMenu.GetShortcutDefaultFilesInOpeningProject: string;
265279
begin
266280
Result := '';

Src/Interfaces/C4D.Wizard.Interfaces.pas

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,11 @@ interface
138138
function ShortcutReplaceFiles: string; overload;
139139
function ShortcutReplaceFiles(Value: string): IC4DWizardSettingsModel; overload;
140140

141+
function ShortcutNotesUse: Boolean; overload;
142+
function ShortcutNotesUse(Value: Boolean): IC4DWizardSettingsModel; overload;
143+
function ShortcutNotes: string; overload;
144+
function ShortcutNotes(Value: string): IC4DWizardSettingsModel; overload;
145+
141146
function ShortcutGitHubDesktopUse: Boolean; overload;
142147
function ShortcutGitHubDesktopUse(Value: Boolean): IC4DWizardSettingsModel; overload;
143148
function ShortcutGitHubDesktop: string; overload;
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
object C4DWizardNotesView: TC4DWizardNotesView
2+
Left = 0
3+
Top = 0
4+
BorderIcons = [biSystemMenu, biMaximize]
5+
Caption = 'Code4D - Notes'
6+
ClientHeight = 521
7+
ClientWidth = 803
8+
Color = clBtnFace
9+
Font.Charset = DEFAULT_CHARSET
10+
Font.Color = clWindowText
11+
Font.Height = -11
12+
Font.Name = 'Tahoma'
13+
Font.Style = []
14+
KeyPreview = True
15+
OldCreateOrder = False
16+
Position = poScreenCenter
17+
OnShow = FormShow
18+
PixelsPerInch = 96
19+
TextHeight = 13
20+
end

0 commit comments

Comments
 (0)