[Cose-svnmail] SF.net SVN: cose:[1850] trunk/editor
Status: Planning
Brought to you by:
nfz_
|
From: <nf...@us...> - 2010-11-11 00:34:27
|
Revision: 1850
http://cose.svn.sourceforge.net/cose/?rev=1850&view=rev
Author: nfz_
Date: 2010-11-11 00:34:21 +0000 (Thu, 11 Nov 2010)
Log Message:
-----------
NNProcSettings:
task processor settings form is now owned by the main program and is auto created on program startup.
Modified Paths:
--------------
trunk/editor/NNProcSettings.lfm
trunk/editor/NNProcSettings.pas
Modified: trunk/editor/NNProcSettings.lfm
===================================================================
--- trunk/editor/NNProcSettings.lfm 2010-11-11 00:32:42 UTC (rev 1849)
+++ trunk/editor/NNProcSettings.lfm 2010-11-11 00:34:21 UTC (rev 1850)
@@ -1,135 +1,130 @@
object NNProcSettingsFrm: TNNProcSettingsFrm
- Left = 782
- Height = 169
- Top = 204
- Width = 400
+ Left = 765
+ Height = 192
+ Top = 214
+ Width = 430
ActiveControl = ProcTime
BorderIcons = [biSystemMenu, biMinimize]
BorderStyle = bsSingle
Caption = 'Nueral Net Process Settings'
- ClientHeight = 169
- ClientWidth = 382
- Constraints.MaxHeight = 169
- Constraints.MaxWidth = 400
- Constraints.MinHeight = 169
- Constraints.MinWidth = 400
+ ClientHeight = 192
+ ClientWidth = 430
Font.Height = -11
Font.Name = 'MS Sans Serif'
- FormStyle = fsStayOnTop
OnClose = FormClose
- LCLVersion = '0.9.25'
- Visible = True
+ Position = poDefault
+ LCLVersion = '0.9.29'
object Bevel1: TBevel
Left = 8
- Height = 153
+ Height = 177
Top = 8
Width = 169
Shape = bsFrame
end
object Label1: TLabel
Left = 16
- Height = 41
+ Height = 18
Top = 16
- Width = 76
+ Width = 138
Caption = 'Process Time (msec)'
ParentColor = False
WordWrap = True
end
object Label2: TLabel
Left = 16
- Height = 19
+ Height = 18
Top = 51
- Width = 96
+ Width = 103
Caption = 'Timer Partitions'
ParentColor = False
end
object Label3: TLabel
Left = 16
- Height = 63
+ Height = 18
Top = 72
- Width = 71
+ Width = 180
Caption = 'Total Active Process Count:'
ParentColor = False
WordWrap = True
end
object Label4: TLabel
Left = 16
- Height = 19
+ Height = 18
Top = 112
- Width = 98
+ Width = 108
Caption = 'Total Leg Count:'
ParentColor = False
end
object Label5: TLabel
Left = 16
- Height = 19
+ Height = 18
Top = 136
- Width = 88
+ Width = 96
Caption = 'Neuron Count:'
ParentColor = False
end
object GroupBox1: TGroupBox
Left = 184
- Height = 153
- Top = 8
- Width = 191
+ Height = 169
+ Top = 7
+ Width = 239
Anchors = [akTop, akLeft, akRight]
Caption = 'Process Bands'
- ClientHeight = 136
- ClientWidth = 187
+ ClientHeight = 150
+ ClientWidth = 235
TabOrder = 0
object Label6: TLabel
Left = 8
- Height = 19
+ Height = 18
Top = 2
- Width = 31
+ Width = 34
Caption = 'Band'
ParentColor = False
end
object Label7: TLabel
Left = 48
- Height = 19
+ Height = 18
Top = 2
- Width = 43
+ Width = 46
Caption = 'Entries'
ParentColor = False
end
object Label8: TLabel
Left = 102
- Height = 63
+ Height = 18
Top = 2
- Width = 23
+ Width = 55
Caption = 'Leg Size'
ParentColor = False
WordWrap = True
end
object Label9: TLabel
Left = 16
- Height = 19
+ Height = 18
Top = 36
- Width = 8
+ Width = 9
Caption = '1'
ParentColor = False
end
object Label10: TLabel
Left = 16
- Height = 19
+ Height = 18
Top = 60
- Width = 8
+ Width = 9
Caption = '2'
ParentColor = False
end
object Label11: TLabel
Left = 16
- Height = 19
+ Height = 18
Top = 84
- Width = 8
+ Width = 9
Caption = '3'
ParentColor = False
end
object Label12: TLabel
Left = 16
- Height = 19
+ Height = 18
Top = 108
Width = 9
Caption = '4'
@@ -137,179 +132,187 @@
end
object Label13: TLabel
Left = 142
- Height = 19
+ Height = 18
Top = 2
- Width = 61
+ Width = 67
Caption = 'Time (ms)'
ParentColor = False
end
object B1Entries: TStaticText
Left = 48
- Height = 34
+ Height = 22
Top = 36
- Width = 15
- AutoSize = True
+ Width = 46
Caption = '0.0'
Font.Height = -12
+ ParentFont = False
TabOrder = 0
end
object B2Entries: TStaticText
Left = 48
- Height = 34
+ Height = 40
Top = 60
- Width = 15
+ Width = 18
AutoSize = True
Caption = '0.0'
Font.Height = -12
+ ParentFont = False
TabOrder = 1
end
object B3Entries: TStaticText
Left = 48
- Height = 34
+ Height = 40
Top = 84
- Width = 15
+ Width = 18
AutoSize = True
Caption = '0.0'
Font.Height = -12
+ ParentFont = False
TabOrder = 2
end
object B4Entries: TStaticText
Left = 48
- Height = 34
+ Height = 40
Top = 108
- Width = 15
+ Width = 18
AutoSize = True
Caption = '0.0'
Font.Height = -12
+ ParentFont = False
TabOrder = 3
end
object B1LegSize: TStaticText
Left = 102
- Height = 34
+ Height = 40
Top = 36
- Width = 15
+ Width = 18
AutoSize = True
Caption = '0.0'
Font.Height = -12
+ ParentFont = False
TabOrder = 4
end
object B2LegSize: TStaticText
Left = 102
- Height = 34
+ Height = 40
Top = 60
- Width = 15
+ Width = 18
AutoSize = True
Caption = '0.0'
Font.Height = -12
+ ParentFont = False
TabOrder = 5
end
object B3LegSize: TStaticText
Left = 102
- Height = 34
+ Height = 40
Top = 84
- Width = 15
+ Width = 18
AutoSize = True
Caption = '0.0'
Font.Height = -12
+ ParentFont = False
TabOrder = 6
end
object B4LegSize: TStaticText
Left = 102
- Height = 34
+ Height = 40
Top = 108
- Width = 15
+ Width = 18
AutoSize = True
Caption = '0.0'
Font.Height = -12
+ ParentFont = False
TabOrder = 7
end
object B1Time: TStaticText
Left = 156
- Height = 34
+ Height = 21
Top = 36
- Width = 15
+ Width = 40
AutoSize = True
- Caption = '0.0'
- Font.Height = -12
+ Caption = '100.0'
TabOrder = 8
end
object B2Time: TStaticText
Left = 156
- Height = 34
+ Height = 21
Top = 60
- Width = 15
+ Width = 40
AutoSize = True
- Caption = '0.0'
- Font.Height = -12
+ Caption = '100.0'
TabOrder = 9
end
object B3Time: TStaticText
Left = 156
- Height = 34
+ Height = 21
Top = 84
- Width = 15
+ Width = 40
AutoSize = True
- Caption = '0.0'
- Font.Height = -12
+ Caption = '100.0'
TabOrder = 10
end
object B4Time: TStaticText
Left = 156
- Height = 34
+ Height = 21
Top = 108
- Width = 15
+ Width = 40
AutoSize = True
- Caption = '0.0'
- Font.Height = -12
+ Caption = '100.0'
TabOrder = 11
end
end
object ProcTime: TFloatSpinEdit
Left = 120
- Height = 25
+ Height = 27
Top = 16
Width = 50
- AutoSize = True
Increment = 1
- MaxValue = 100
+ MaxValue = 1000
+ MinValue = 0
+ OnChange = ProcTimeChange
TabOrder = 1
+ Value = 0
end
object TimerPartitions: TSpinEdit
Left = 120
- Height = 25
+ Height = 27
Top = 42
Width = 50
- AutoSize = True
+ OnChange = TimerPartitionsChange
TabOrder = 2
end
object TotalProcNumberEdit: TStaticText
Left = 120
- Height = 34
+ Height = 40
Top = 84
- Width = 15
+ Width = 18
AutoSize = True
Caption = '0.0'
Font.Height = -12
+ ParentFont = False
TabOrder = 3
end
object LegCountNumberEdit: TStaticText
Left = 120
- Height = 34
+ Height = 40
Top = 110
- Width = 15
+ Width = 18
AutoSize = True
Caption = '0.0'
Font.Height = -12
+ ParentFont = False
TabOrder = 4
end
object NeuronCountNumberEdit: TStaticText
Left = 120
- Height = 34
+ Height = 40
Top = 136
- Width = 15
+ Width = 18
AutoSize = True
Caption = '0.0'
Font.Height = -12
+ ParentFont = False
TabOrder = 5
end
object UpdateTimer: TTimer
Modified: trunk/editor/NNProcSettings.pas
===================================================================
--- trunk/editor/NNProcSettings.pas 2010-11-11 00:32:42 UTC (rev 1849)
+++ trunk/editor/NNProcSettings.pas 2010-11-11 00:34:21 UTC (rev 1850)
@@ -85,26 +85,40 @@
NeuralPage: TNeuralPages;
public
{ Public declarations }
- constructor Create(AOwner: TComponent); override;
+ //constructor Create(AOwner: TComponent); override;
+ procedure SetNeuralPage(aNeuralPage: TNeuralPages);
end;
+var
+ NNProcSettingsFrm: TNNProcSettingsFrm;
+
implementation
-constructor TNNProcSettingsFrm.Create(AOwner: TComponent);
+
+procedure TNNProcSettingsFrm.SetNeuralPage(aNeuralPage: TNeuralPages);
begin
- inherited;
- NeuralPage := TNeuralPages(AOwner);
- NeuralNet := GetNeuronNetwork(NeuralPage);
- ProcessTimer := GetProcessTimer(NeuralPage);
- ProcTime.Value := ProcessTimer.ProcessTimeMS;
- TimerPartitions.Value := ProcessTimer.TimerPartitions;
- UpdateTimer.Enabled := True;
+ if Assigned(aNeuralPage) then
+ begin
+ NeuralPage := aNeuralPage;
+ NeuralNet := GetNeuronNetwork(NeuralPage);
+ ProcessTimer := GetProcessTimer(NeuralPage);
+ ProcTime.Value := ProcessTimer.ProcessTimeMS;
+ TimerPartitions.Value := ProcessTimer.TimerPartitions;
+ UpdateTimer.Enabled := True;
+ //Visible := True;
+ end
+ else
+ begin
+ Visible := False;
+ NeuralPage := Nil;
+ ProcessTimer := Nil;
+ end;
end;
procedure TNNProcSettingsFrm.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
- Action := caFree;
+ Action := caHide;
end;
procedure TNNProcSettingsFrm.ProcTimeChange(Sender: TObject);
@@ -119,24 +133,27 @@
procedure TNNProcSettingsFrm.UpdateTimerTimer(Sender: TObject);
begin
- LegCountNumberEdit.Caption := FloatToStr(ProcessTimer.TotalProcLegCount);
- TotalProcNumberEdit.Caption := FloatToStr(ProcessTimer.TotalProcCount);
- NeuronCountNumberEdit.Caption := FloatToStr(NeuralNet.NeuronCount);
- B1Entries.Caption := FloatToStr(ProcessTimer.BandCount(1));
- B2Entries.Caption := FloatToStr(ProcessTimer.BandCount(2));
- B3Entries.Caption := FloatToStr(ProcessTimer.BandCount(3));
- B4Entries.Caption := FloatToStr(ProcessTimer.BandCount(4));
+ if Assigned(ProcessTimer) then
+ begin;
+ LegCountNumberEdit.Caption := FloatToStr(ProcessTimer.TotalProcLegCount);
+ TotalProcNumberEdit.Caption := FloatToStr(ProcessTimer.TotalProcCount);
+ NeuronCountNumberEdit.Caption := FloatToStr(NeuralNet.NeuronCount);
+ B1Entries.Caption := FloatToStr(ProcessTimer.BandCount(1));
+ B2Entries.Caption := FloatToStr(ProcessTimer.BandCount(2));
+ B3Entries.Caption := FloatToStr(ProcessTimer.BandCount(3));
+ B4Entries.Caption := FloatToStr(ProcessTimer.BandCount(4));
- B1LegSize.Caption := FloatToStr(ProcessTimer.BandLegCount(1));
- B2LegSize.Caption := FloatToStr(ProcessTimer.BandLegCount(2));
- B3LegSize.Caption := FloatToStr(ProcessTimer.BandLegCount(3));
- B4LegSize.Caption := FloatToStr(ProcessTimer.BandLegCount(4));
+ B1LegSize.Caption := FloatToStr(ProcessTimer.BandLegCount(1));
+ B2LegSize.Caption := FloatToStr(ProcessTimer.BandLegCount(2));
+ B3LegSize.Caption := FloatToStr(ProcessTimer.BandLegCount(3));
+ B4LegSize.Caption := FloatToStr(ProcessTimer.BandLegCount(4));
- B1Time.Caption := FloatToStr(ProcessTimer.BandTimeMS(1));
- B2Time.Caption := FloatToStr(ProcessTimer.BandTimeMS(2));
- B3Time.Caption := FloatToStr(ProcessTimer.BandTimeMS(3));
- B4Time.Caption := FloatToStr(ProcessTimer.BandTimeMS(4));
+ B1Time.Caption := FloatToStr(ProcessTimer.BandTimeMS(1));
+ B2Time.Caption := FloatToStr(ProcessTimer.BandTimeMS(2));
+ B3Time.Caption := FloatToStr(ProcessTimer.BandTimeMS(3));
+ B4Time.Caption := FloatToStr(ProcessTimer.BandTimeMS(4));
+ end;
end;
initialization
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|