• R/O
  • SSH
  • HTTPS

mantisbtmonitor: Commit


Commit MetaInfo

Revision34 (tree)
Time2017-10-04 04:00:51
Authorderekwildstar

Log Message

- Inicio da tela para escrever anotações

Change Summary

Incremental Difference

--- trunk/client/prj/MantisNotification.bdsproj (revision 33)
+++ trunk/client/prj/MantisNotification.bdsproj (revision 34)
@@ -150,7 +150,7 @@
150150 <VersionInfo Name="MajorVer">1</VersionInfo>
151151 <VersionInfo Name="MinorVer">2</VersionInfo>
152152 <VersionInfo Name="Release">3</VersionInfo>
153- <VersionInfo Name="Build">833</VersionInfo>
153+ <VersionInfo Name="Build">845</VersionInfo>
154154 <VersionInfo Name="Debug">False</VersionInfo>
155155 <VersionInfo Name="PreRelease">False</VersionInfo>
156156 <VersionInfo Name="Special">False</VersionInfo>
@@ -162,7 +162,7 @@
162162 <VersionInfoKeys>
163163 <VersionInfoKeys Name="CompanyName"></VersionInfoKeys>
164164 <VersionInfoKeys Name="FileDescription"></VersionInfoKeys>
165- <VersionInfoKeys Name="FileVersion">1.2.3.833</VersionInfoKeys>
165+ <VersionInfoKeys Name="FileVersion">1.2.3.845</VersionInfoKeys>
166166 <VersionInfoKeys Name="InternalName"></VersionInfoKeys>
167167 <VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys>
168168 <VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys>
--- trunk/client/prj/MantisNotification.dpr (revision 33)
+++ trunk/client/prj/MantisNotification.dpr (revision 34)
@@ -14,7 +14,8 @@
1414 UMNWSWrapperFunctions in '..\src\lib\UMNWSWrapperFunctions.pas',
1515 UFunctions in '..\src\lib\UFunctions.pas',
1616 mnws in '..\src\lib\mnws.pas',
17- UFormViewNote in '..\src\UFormViewNote.pas' {FormViewNote};
17+ UFormViewNote in '..\src\UFormViewNote.pas' {FormViewNote},
18+ UFormManageNote in '..\src\UFormManageNote.pas' {FormManageNote};
1819
1920 {$R *.res}
2021
--- trunk/client/src/UFormBasicDialog.pas (revision 33)
+++ trunk/client/src/UFormBasicDialog.pas (revision 34)
@@ -25,12 +25,14 @@
2525 procedure FormShow(Sender: TObject);
2626 private
2727 { Private declarations }
28+ FAutoCaption: Boolean;
2829 protected
2930 procedure ValidateSave; virtual;
3031 procedure ValidateOk; virtual;
3132 public
3233 { Public declarations }
33- class function ShowMeModal: TModalResult; virtual;
34+ class function ShowMeModal(AAutoCaption: Boolean = True): TModalResult; virtual;
35+ property AutoCaption: Boolean write FAutoCaption;
3436 end;
3537
3638 implementation
@@ -46,8 +48,11 @@
4648
4749 procedure TFormBasicDialog.FormShow(Sender: TObject);
4850 begin
49- LABECaption.Caption := Caption;
50- Caption := LABECaption.Caption + ' - ' + Application.Title;
51+ if FAutoCaption then
52+ begin
53+ LABECaption.Caption := Caption;
54+ Caption := LABECaption.Caption + ' - ' + Application.Title;
55+ end;
5156 end;
5257
5358 procedure TFormBasicDialog.PNBBOKClick(Sender: TObject);
@@ -60,9 +65,13 @@
6065 ValidateSave;
6166 end;
6267
63-class function TFormBasicDialog.ShowMeModal: TModalResult;
68+class function TFormBasicDialog.ShowMeModal(AAutoCaption: Boolean = True): TModalResult;
6469 begin
65- Result := Self.Create(Application).ShowModal;
70+ with Self.Create(Application) do
71+ begin
72+ FAutoCaption := AAutoCaption;
73+ Result := ShowModal;
74+ end;
6675 end;
6776
6877 procedure TFormBasicDialog.ValidateOk;
--- trunk/client/src/UFormIssue.pas (revision 33)
+++ trunk/client/src/UFormIssue.pas (revision 34)
@@ -97,12 +97,12 @@
9797 LABENoteCount: TLabel;
9898 PNSBNoteLast: TPngSpeedButton;
9999 PNSBNoteFirst: TPngSpeedButton;
100+ procedure ACTNNoteNewExecute(Sender: TObject);
100101 procedure PNSBNoteFirstClick(Sender: TObject);
101102 procedure PNSBNoteLastClick(Sender: TObject);
102103 procedure CLDSCommentsAfterScroll(DataSet: TDataSet);
103104 procedure PNSBNotePreviousClick(Sender: TObject);
104105 procedure PNSBNoteNextClick(Sender: TObject);
105- procedure FormShow(Sender: TObject);
106106 procedure ACTNNoteFullScreenExecute(Sender: TObject);
107107 procedure ACTNNoteReplyExecute(Sender: TObject);
108108 procedure TASHStepsToReproduceShow(Sender: TObject);
@@ -143,7 +143,7 @@
143143 implementation
144144
145145 uses
146- UConfigurations, UFormViewNote;
146+ UConfigurations, UFormViewNote, UFormManageNote;
147147
148148 {$R *.dfm}
149149
@@ -156,17 +156,16 @@
156156 // Params.WndParent := 0;
157157 end;
158158
159-procedure TFormIssue.FormShow(Sender: TObject);
159+procedure TFormIssue.ACTNNoteFullScreenExecute(Sender: TObject);
160160 begin
161161 inherited;
162- Application.ProcessMessages;
162+ TFormViewNote.ShowMeModal(Self,FIssueInfo.Id,TAction(Sender).ActionComponent.Tag);
163163 end;
164164
165-
166-procedure TFormIssue.ACTNNoteFullScreenExecute(Sender: TObject);
165+procedure TFormIssue.ACTNNoteNewExecute(Sender: TObject);
167166 begin
168167 inherited;
169- TFormViewNote.ShowMeModal(Self,FIssueInfo.Id,TAction(Sender).ActionComponent.Tag);
168+ TFormManageNote.ShowMeModal(Self,FIssueInfo.Id,0);
170169 end;
171170
172171 procedure TFormIssue.ACTNNoteReplyExecute(Sender: TObject);
@@ -358,6 +357,7 @@
358357
359358 with Self.Create(Application) do
360359 begin
360+ AutoCaption := True;
361361 FIssueInfo := DecodeIssueInfo(GetIssueInfo(AIssueNumber));
362362
363363 LoadIssueHeader;
--- trunk/client/src/UFormManageNote.pas (nonexistent)
+++ trunk/client/src/UFormManageNote.pas (revision 34)
@@ -0,0 +1,48 @@
1+unit UFormManageNote;
2+
3+interface
4+
5+uses
6+ Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
7+ Dialogs, UFormBasicDialog, StdCtrls, Buttons, UPngBitBtn, ExtCtrls, PngImage;
8+
9+type
10+ TFormManageNote = class(TFormBasicDialog)
11+ private
12+ { Private declarations }
13+ FIssueNumber: Cardinal;
14+ FUpdating: Boolean;
15+ FNoteId: Cardinal;
16+ public
17+ { Public declarations }
18+ class function ShowMeModal(AOwner: TComponent; AIssueNumber, ANoteId: Cardinal): TModalResult; reintroduce;
19+ end;
20+
21+implementation
22+
23+{$R *.dfm}
24+
25+{ TFormManageNote }
26+
27+class function TFormManageNote.ShowMeModal(AOwner: TComponent; AIssueNumber, ANoteId: Cardinal): TModalResult;
28+begin
29+ with Self.Create(AOwner) do
30+ begin
31+ FIssueNumber := AIssueNumber;
32+ FNoteId := ANoteId;
33+ FUpdating := ANoteId > 0;
34+
35+ AutoCaption := False;
36+
37+ Caption := 'Gerenciador de anotações - ' + Application.Title;
38+
39+ if FUpdating then
40+ LABECaption.Caption := 'Editando a anotação #' + IntToStr(FNoteId)
41+ else
42+ LABECaption.Caption := 'Redigindo uma nova anotação para o caso #' + IntToStr(FIssueNumber);
43+
44+ Result := ShowModal;
45+ end;
46+end;
47+
48+end.
Show on old repository browser