- Timestamp:
- Apr 7, 2026, 10:43:55 AM (3 weeks ago)
- Location:
- trunk
- Files:
-
- 6 edited
-
Ean.pas (modified) (2 diffs)
-
FormMain.lfm (modified) (8 diffs)
-
FormMain.lrj (modified) (1 diff)
-
FormMain.pas (modified) (9 diffs)
-
Languages/EdcStats.cs.po (modified) (2 diffs)
-
Languages/EdcStats.pot (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ean.pas
r1 r3 44 44 TEans = class(TObjectList<TEan>) 45 45 function SearchByNumber(Number: string): TEan; 46 procedure LoadToStrings(Strings: TStrings );46 procedure LoadToStrings(Strings: TStrings; AllowNone: Boolean = False); 47 47 end; 48 48 … … 142 142 end; 143 143 144 procedure TEans.LoadToStrings(Strings: TStrings );144 procedure TEans.LoadToStrings(Strings: TStrings; AllowNone: Boolean = False); 145 145 var 146 146 I: Integer; 147 Shift: Integer; 147 148 begin 149 if AllowNone then Shift := 1 else Shift := 0; 148 150 Strings.BeginUpdate; 149 151 try 150 while Strings.Count > Count do Strings.Delete(Strings.Count - 1);151 while Strings.Count < Count do Strings.Add('');152 while Strings.Count > Count + Shift do Strings.Delete(Strings.Count - 1); 153 while Strings.Count < Count + Shift do Strings.Add(''); 152 154 for I := 0 to Count - 1 do begin 153 Strings[I ] := Items[I].Number + ' (' + Items[I].Owner + ')';154 Strings.Objects[I ] := Items[I];155 Strings[I + Shift] := Items[I].Number + ' (' + Items[I].Owner + ')'; 156 Strings.Objects[I + Shift] := Items[I]; 155 157 end; 156 158 finally -
trunk/FormMain.lfm
r2 r3 27 27 Top = 64 28 28 Width = 1176 29 ActivePage = TabSheet Overview29 ActivePage = TabSheetChart 30 30 Anchors = [akTop, akLeft, akRight, akBottom] 31 TabIndex = 031 TabIndex = 2 32 32 TabOrder = 1 33 33 object TabSheetOverview: TTabSheet … … 95 95 OnShow = TabSheetChartShow 96 96 object ComboBoxEan: TComboBox 97 Left = 12097 Left = 88 98 98 Height = 42 99 99 Top = 24 … … 108 108 Height = 26 109 109 Top = 32 110 Width = 41111 Caption = 'EAN :'110 Width = 56 111 Caption = 'EAN 1:' 112 112 end 113 113 object Chart1: TChart … … 135 135 object Chart1LineSeries1: TLineSeries 136 136 LinePen.Color = clYellow 137 LinePen.Width = 2137 LinePen.Width = 3 138 138 end 139 139 object Chart1LineSeries2: TLineSeries 140 140 LinePen.Color = clFuchsia 141 LinePen.Width = 2141 LinePen.Width = 3 142 142 end 143 object Chart1LineSeries3: TLineSeries 144 LinePen.Color = clAqua 145 LinePen.Width = 3 146 end 143 147 end 144 148 object Label3: TLabel 145 Left = 600149 Left = 544 146 150 Height = 26 147 151 Top = 32 … … 150 154 end 151 155 object ComboBoxEan2: TComboBox 152 Left = 6 80156 Left = 608 153 157 Height = 42 154 158 Top = 24 … … 157 161 Style = csDropDownList 158 162 TabOrder = 2 163 OnSelect = ComboBoxEanSelect 164 end 165 object Label6: TLabel 166 Left = 1048 167 Height = 26 168 Top = 32 169 Width = 56 170 Caption = 'EAN 3:' 171 end 172 object ComboBoxEan3: TComboBox 173 Left = 1112 174 Height = 42 175 Top = 24 176 Width = 432 177 ItemHeight = 0 178 Style = csDropDownList 179 TabOrder = 3 159 180 OnSelect = ComboBoxEanSelect 160 181 end … … 303 324 POFilesFolder = 'Languages' 304 325 OnTranslate = Translator1Translate 305 Left = 901306 Top = 130326 Left = 776 327 Top = 408 307 328 end 308 329 object ApplicationInfo1: TApplicationInfo … … 318 339 RegistryRoot = rrKeyCurrentUser 319 340 License = 'CC0' 320 Left = 1037321 Top = 125341 Left = 936 342 Top = 408 322 343 end 323 344 object PersistentForm1: TPersistentForm 324 345 MinVisiblePart = 50 325 346 EntireVisible = False 326 Left = 776327 Top = 136347 Left = 584 348 Top = 416 328 349 end 329 350 object ThemeManager1: TThemeManager 330 Left = 657331 Top = 140351 Left = 408 352 Top = 416 332 353 end 333 354 end -
trunk/FormMain.lrj
r2 r3 11 11 {"hash":21335,"name":"tformmain.tabsheetlog.caption","sourcebytes":[76,111,103],"value":"Log"}, 12 12 {"hash":4843668,"name":"tformmain.tabsheetchart.caption","sourcebytes":[67,104,97,114,116],"value":"Chart"}, 13 {"hash": 300570,"name":"tformmain.label1.caption","sourcebytes":[69,65,78,58],"value":"EAN:"},13 {"hash":76940106,"name":"tformmain.label1.caption","sourcebytes":[69,65,78,32,49,58],"value":"EAN 1:"}, 14 14 {"hash":76940122,"name":"tformmain.label3.caption","sourcebytes":[69,65,78,32,50,58],"value":"EAN 2:"}, 15 {"hash":76940138,"name":"tformmain.label6.caption","sourcebytes":[69,65,78,32,51,58],"value":"EAN 3:"}, 15 16 {"hash":305313,"name":"tformmain.tabsheetdata.caption","sourcebytes":[68,97,116,97],"value":"Data"}, 16 17 {"hash":372789,"name":"tformmain.listview2.columns[0].caption","sourcebytes":[84,105,109,101],"value":"Time"}, -
trunk/FormMain.pas
r2 r3 24 24 Chart1LineSeries1: TLineSeries; 25 25 Chart1LineSeries2: TLineSeries; 26 Chart1LineSeries3: TLineSeries; 26 27 ComboBoxEan: TComboBox; 28 ComboBoxEan3: TComboBox; 27 29 ComboBoxEanData: TComboBox; 28 30 ComboBoxEan2: TComboBox; … … 35 37 Label4: TLabel; 36 38 Label5: TLabel; 39 Label6: TLabel; 37 40 ListView1: TListView; 38 41 ListView2: TListView; … … 138 141 CreateEan('', STotalConsumtion, ekConsumption); 139 142 140 IntervalTo := Eans[0].Values.Last.Time ;143 IntervalTo := Eans[0].Values.Last.Time + 15 * OneMinute; 141 144 UpdateInterval; 142 145 ShowActiveTab; … … 181 184 procedure TFormMain.FormCreate(Sender: TObject); 182 185 begin 186 PageControl1.TabIndex := 0; 183 187 Eans := TEans.Create; 184 188 LoadConfig; … … 193 197 procedure TFormMain.FormShow(Sender: TObject); 194 198 begin 195 PageControl1.TabIndex := 0;196 199 ButtonLoadClick(nil); 197 200 end; … … 204 207 procedure TFormMain.TabSheetChartShow(Sender: TObject); 205 208 begin 206 Eans.LoadToStrings(ComboBoxEan.Items); 207 if (ComboBoxEan.Items.Count > 0) and (ComboBoxEan.ItemIndex = -1) then ComboBoxEan.ItemIndex := 0; 208 Eans.LoadToStrings(ComboBoxEan2.Items); 209 Eans.LoadToStrings(ComboBoxEan.Items, True); 210 if (ComboBoxEan.Items.Count > 1) and (ComboBoxEan.ItemIndex = -1) then ComboBoxEan.ItemIndex := 1; 211 Eans.LoadToStrings(ComboBoxEan2.Items, True); 212 Eans.LoadToStrings(ComboBoxEan3.Items, True); 209 213 ReloadChart; 210 214 end; … … 463 467 end; 464 468 end; 469 470 Chart1LineSeries3.Clear; 471 if ComboBoxEan3.ItemIndex <> -1 then begin 472 Ean := TEan(ComboBoxEan3.Items.Objects[ComboBoxEan3.ItemIndex]); 473 if not Assigned(Ean) then Exit; 474 with Ean do begin 475 for I := 0 to Values.Count - 1 do 476 if (Values[I].Time >= IntervalFrom) and (Values[I].Time < IntervalTo) then 477 Chart1LineSeries3.AddXY(Values[I].Time, MeasureToFloat(Values[I].ValueIn, 1 / 4)); 478 end; 479 end; 465 480 end; 466 481 … … 522 537 ReportsDir := ReadStringWithDefault('ReportsDir', ReportsDir); 523 538 OwnersFileName := ReadStringWithDefault('OwnersFileName', OwnersFileName); 539 PageControl1.TabIndex := ReadIntegerWithDefault('ActiveTab', PageControl1.TabIndex); 524 540 finally 525 541 Free; … … 542 558 WriteString('ReportsDir', ReportsDir); 543 559 WriteString('OwnersFileName', OwnersFileName); 560 WriteInteger('ActiveTab', PageControl1.TabIndex); 544 561 finally 545 562 Free; -
trunk/Languages/EdcStats.cs.po
r2 r3 74 74 #: tformmain.label1.caption 75 75 msgctxt "tformmain.label1.caption" 76 msgid "EAN :"77 msgstr "EAN :"76 msgid "EAN 1:" 77 msgstr "EAN 1:" 78 78 79 79 #: tformmain.label2.caption … … 93 93 msgid "Unit:" 94 94 msgstr "Jednotky:" 95 96 #: tformmain.label6.caption 97 msgid "EAN 3:" 98 msgstr "EAN 3:" 95 99 96 100 #: tformmain.listview1.columns[0].caption -
trunk/Languages/EdcStats.pot
r2 r3 64 64 #: tformmain.label1.caption 65 65 msgctxt "tformmain.label1.caption" 66 msgid "EAN :"66 msgid "EAN 1:" 67 67 msgstr "" 68 68 … … 82 82 #: tformmain.label5.caption 83 83 msgid "Unit:" 84 msgstr "" 85 86 #: tformmain.label6.caption 87 msgid "EAN 3:" 84 88 msgstr "" 85 89
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/edc-stats/chrome/site/your_project_logo.png)