diff --git a/src/sbbs3/useredit/MainFormUnit.cpp b/src/sbbs3/useredit/MainFormUnit.cpp index 29316e89d8232bab533b41f6e7ebc5883f75898e..dbed276f5908ba339cb0776170245e878a2d1a47 100644 --- a/src/sbbs3/useredit/MainFormUnit.cpp +++ b/src/sbbs3/useredit/MainFormUnit.cpp @@ -82,6 +82,12 @@ void __fastcall TMainForm::PutUserDate(TEdit* Edit, enum user_field fnum) Edit->Tag = false; } //--------------------------------------------------------------------------- +void __fastcall TMainForm::PutUserBytes(TEdit* Edit, enum user_field fnum) +{ + AnsiString str = parse_byte_count(Edit->Text.c_str(), 1); + PutUserStr(Edit, fnum, str.c_str()); +} +//--------------------------------------------------------------------------- void __fastcall TMainForm::GetUserDate(TEdit* Edit, time_t t) { char tmp[64]; @@ -238,7 +244,9 @@ void __fastcall TMainForm::GetUserData(int number) GetUserFlags(RestrictionsEdit, user.rest); GetUserText(CreditsEdit, user.cdt); + CreditsStaticText->Caption = byte_estimate_to_str(user.cdt, tmp, sizeof(tmp), 1, 1); GetUserText(FreeCreditsEdit, user.freecdt); + FreeCreditsStaticText->Caption = byte_estimate_to_str(user.freecdt, tmp, sizeof(tmp), 1, 1); GetUserText(MinutesEdit, user.min); // Stats @@ -257,8 +265,10 @@ void __fastcall TMainForm::GetUserData(int number) GetUserText(FeedbackEdit, user.fbacks); GetUserText(UploadedFilesEdit, user.uls); GetUserText(UploadedBytesEdit, user.ulb); + UploadedBytesStaticText->Caption = byte_estimate_to_str(user.ulb, tmp, sizeof(tmp), 1, 1); GetUserText(DownloadedFilesEdit, user.dls); GetUserText(DownloadedBytesEdit, user.dlb); + DownloadedBytesStaticText->Caption = byte_estimate_to_str(user.dlb, tmp, sizeof(tmp), 1, 1); GetUserText(LeechEdit, user.leech); // Extended Comment @@ -392,8 +402,8 @@ void __fastcall TMainForm::PutUserData(int number) PutUserText(RestrictionsEdit, USER_REST); PutUserDate(ExpireEdit, USER_EXPIRE); - PutUserText(CreditsEdit, USER_CDT); - PutUserText(FreeCreditsEdit, USER_FREECDT); + PutUserBytes(CreditsEdit, USER_CDT); + PutUserBytes(FreeCreditsEdit, USER_FREECDT); PutUserText(MinutesEdit, USER_MIN); PutUserDate(FirstOnEdit, USER_FIRSTON); @@ -410,9 +420,9 @@ void __fastcall TMainForm::PutUserData(int number) PutUserText(EmailTodayEdit, USER_ETODAY); PutUserText(FeedbackEdit, USER_FBACKS); PutUserText(UploadedFilesEdit, USER_ULS); - PutUserText(UploadedBytesEdit, USER_ULB); + PutUserBytes(UploadedBytesEdit, USER_ULB); PutUserText(DownloadedFilesEdit, USER_DLS); - PutUserText(DownloadedBytesEdit, USER_DLB); + PutUserBytes(DownloadedBytesEdit, USER_DLB); PutUserText(LeechEdit, USER_LEECH); if(Memo->Tag) { diff --git a/src/sbbs3/useredit/MainFormUnit.dfm b/src/sbbs3/useredit/MainFormUnit.dfm index 9784b37e13fc72e4f93e23c72770b87d2aa7a8de..f146ad31705fe3591b3e981245ed929d41c438ac 100644 --- a/src/sbbs3/useredit/MainFormUnit.dfm +++ b/src/sbbs3/useredit/MainFormUnit.dfm @@ -1,6 +1,6 @@ object MainForm: TMainForm - Left = 1015 - Top = 651 + Left = 1081 + Top = 601 ActiveControl = ScrollBar BorderIcons = [biSystemMenu, biMinimize] BorderStyle = bsSingle @@ -33,9 +33,9 @@ object MainForm: TMainForm Top = 81 Width = 447 Height = 278 - ActivePage = SecurityTabSheet + ActivePage = StatsTabSheet Align = alClient - TabIndex = 1 + TabIndex = 2 TabOrder = 0 object PersonalTabSheet: TTabSheet Caption = 'Personal' @@ -217,7 +217,7 @@ object MainForm: TMainForm TabOrder = 5 OnChange = EditChange end - object GroupBox9: TGroupBox + object AddressGroupBox: TGroupBox Left = 72 Top = 160 Width = 297 @@ -301,7 +301,7 @@ object MainForm: TMainForm end object Label28: TLabel Left = 264 - Top = 56 + Top = 104 Width = 65 Height = 21 AutoSize = False @@ -309,7 +309,7 @@ object MainForm: TMainForm end object Label29: TLabel Left = 264 - Top = 32 + Top = 56 Width = 65 Height = 21 AutoSize = False @@ -362,7 +362,7 @@ object MainForm: TMainForm end object MinutesEdit: TEdit Left = 336 - Top = 56 + Top = 104 Width = 89 Height = 21 CharCase = ecUpperCase @@ -372,7 +372,7 @@ object MainForm: TMainForm end object FreeCreditsEdit: TEdit Left = 336 - Top = 32 + Top = 56 Width = 89 Height = 21 CharCase = ecUpperCase @@ -380,7 +380,7 @@ object MainForm: TMainForm TabOrder = 6 OnChange = EditChange end - object GroupBox8: TGroupBox + object FlagSetGroupBox: TGroupBox Left = 8 Top = 40 Width = 233 @@ -456,17 +456,35 @@ object MainForm: TMainForm OnChange = EditChange end end + object CreditsStaticText: TStaticText + Left = 336 + Top = 32 + Width = 89 + Height = 21 + AutoSize = False + BorderStyle = sbsSunken + TabOrder = 8 + end + object FreeCreditsStaticText: TStaticText + Left = 336 + Top = 80 + Width = 89 + Height = 21 + AutoSize = False + BorderStyle = sbsSunken + TabOrder = 9 + end end object StatsTabSheet: TTabSheet Caption = 'Statistics' ImageIndex = 2 - object GroupBox1: TGroupBox + object TimeOnGroupBox: TGroupBox Left = 152 Top = 120 Width = 137 Height = 121 Caption = 'Time On' - TabOrder = 0 + TabOrder = 4 DesignSize = ( 137 121) @@ -526,7 +544,7 @@ object MainForm: TMainForm Width = 57 Height = 21 Anchors = [akTop, akRight] - TabOrder = 2 + TabOrder = 3 OnChange = EditChange end object LastCallTimeEdit: TEdit @@ -535,11 +553,11 @@ object MainForm: TMainForm Width = 57 Height = 21 Anchors = [akTop, akRight] - TabOrder = 3 + TabOrder = 2 OnChange = EditChange end end - object GroupBox2: TGroupBox + object LogonsGroupBoxx: TGroupBox Left = 8 Top = 88 Width = 137 @@ -579,13 +597,13 @@ object MainForm: TMainForm OnChange = EditChange end end - object GroupBox3: TGroupBox + object DatesGroupBox: TGroupBox Left = 8 Top = 8 Width = 137 Height = 73 Caption = 'Dates' - TabOrder = 2 + TabOrder = 0 object Label17: TLabel Left = 8 Top = 20 @@ -619,13 +637,13 @@ object MainForm: TMainForm OnChange = EditChange end end - object GroupBox4: TGroupBox + object PostsGroupBox: TGroupBox Left = 8 Top = 168 Width = 137 Height = 73 Caption = 'Posts' - TabOrder = 3 + TabOrder = 2 object Label32: TLabel Left = 8 Top = 20 @@ -659,13 +677,13 @@ object MainForm: TMainForm OnChange = EditChange end end - object GroupBox5: TGroupBox + object EmailGroupBox: TGroupBox Left = 296 Top = 144 Width = 137 Height = 97 Caption = 'E-mail' - TabOrder = 4 + TabOrder = 6 object Label34: TLabel Left = 8 Top = 20 @@ -715,13 +733,13 @@ object MainForm: TMainForm OnChange = EditChange end end - object GroupBox6: TGroupBox + object UploadsGroupBox: TGroupBox Left = 152 Top = 8 Width = 137 - Height = 73 + Height = 97 Caption = 'Uploads' - TabOrder = 5 + TabOrder = 3 object Label37: TLabel Left = 8 Top = 20 @@ -754,14 +772,23 @@ object MainForm: TMainForm TabOrder = 1 OnChange = EditChange end + object UploadedBytesStaticText: TStaticText + Left = 72 + Top = 68 + Width = 58 + Height = 21 + AutoSize = False + BorderStyle = sbsSunken + TabOrder = 2 + end end - object GroupBox7: TGroupBox + object DownloadsGroupBox: TGroupBox Left = 296 Top = 8 Width = 137 - Height = 97 + Height = 121 Caption = 'Downloads' - TabOrder = 6 + TabOrder = 5 object Label39: TLabel Left = 8 Top = 20 @@ -780,7 +807,7 @@ object MainForm: TMainForm end object Label42: TLabel Left = 8 - Top = 68 + Top = 92 Width = 57 Height = 21 AutoSize = False @@ -804,18 +831,27 @@ object MainForm: TMainForm end object LeechEdit: TEdit Left = 72 - Top = 68 + Top = 92 Width = 57 Height = 21 TabOrder = 2 OnChange = EditChange end + object DownloadedBytesStaticText: TStaticText + Left = 72 + Top = 68 + Width = 58 + Height = 21 + AutoSize = False + BorderStyle = sbsSunken + TabOrder = 3 + end end end object SettingsTabSheet: TTabSheet Caption = 'Settings' ImageIndex = 3 - object GroupBox10: TGroupBox + object TerminalGroupBox: TGroupBox Left = 8 Top = 8 Width = 209 @@ -863,13 +899,13 @@ object MainForm: TMainForm TabOrder = 1 end end - object GroupBox11: TGroupBox + object LogonGroupBox: TGroupBox Left = 224 Top = 8 Width = 209 Height = 113 Caption = 'Logon' - TabOrder = 1 + TabOrder = 2 DesignSize = ( 209 113) @@ -890,13 +926,13 @@ object MainForm: TMainForm TabOrder = 0 end end - object GroupBox13: TGroupBox + object ChatGroupBox: TGroupBox Left = 224 Top = 128 Width = 209 Height = 113 Caption = 'Chat' - TabOrder = 2 + TabOrder = 3 DesignSize = ( 209 113) @@ -917,13 +953,13 @@ object MainForm: TMainForm TabOrder = 0 end end - object GroupBox15: TGroupBox + object CommandShellGroupBox: TGroupBox Left = 8 Top = 168 Width = 209 Height = 73 Caption = 'Command Shell' - TabOrder = 3 + TabOrder = 1 object ShellEdit: TEdit Left = 8 Top = 24 @@ -947,7 +983,7 @@ object MainForm: TMainForm object MsgFileSettingsTabSheet: TTabSheet Caption = 'Msg/File Settings' ImageIndex = 4 - object GroupBox16: TGroupBox + object MessageGroupBox: TGroupBox Left = 8 Top = 8 Width = 209 @@ -982,20 +1018,20 @@ object MainForm: TMainForm Left = 128 Top = 64 Width = 73 - Height = 24 + Height = 21 Anchors = [akLeft, akTop, akRight] CharCase = ecUpperCase TabOrder = 1 OnChange = EditChange end end - object GroupBox12: TGroupBox + object FileGroupBox: TGroupBox Left = 224 Top = 8 Width = 209 Height = 153 Caption = 'File' - TabOrder = 1 + TabOrder = 2 DesignSize = ( 209 153) @@ -1021,7 +1057,7 @@ object MainForm: TMainForm Left = 168 Top = 120 Width = 33 - Height = 24 + Height = 21 Anchors = [akLeft, akTop, akBottom] CharCase = ecUpperCase MaxLength = 3 @@ -1032,7 +1068,7 @@ object MainForm: TMainForm Left = 184 Top = 88 Width = 17 - Height = 24 + Height = 21 Anchors = [akLeft, akTop, akBottom] CharCase = ecUpperCase MaxLength = 1 @@ -1055,13 +1091,13 @@ object MainForm: TMainForm TabOrder = 2 end end - object GroupBox14: TGroupBox + object QwkGroupBox: TGroupBox Left = 8 Top = 112 Width = 209 Height = 129 Caption = 'QWK Message Packet' - TabOrder = 2 + TabOrder = 1 DesignSize = ( 209 129) diff --git a/src/sbbs3/useredit/MainFormUnit.h b/src/sbbs3/useredit/MainFormUnit.h index 4b23f688b7066ea6adc1b59c407a3cecee4ee5d4..e0114d9e380b5903f862eb1d10cfe72e40c4d475 100644 --- a/src/sbbs3/useredit/MainFormUnit.h +++ b/src/sbbs3/useredit/MainFormUnit.h @@ -109,7 +109,7 @@ __published: // IDE-managed Components TEdit* ShellEdit; TEdit* EditorEdit; TEdit* TempFileExtEdit; - TGroupBox *GroupBox1; + TGroupBox *TimeOnGroupBox; TCheckBox *ExpertCheckBox; TCheckListBox* TerminalCheckListBox; TCheckListBox* MessageCheckListBox; @@ -121,6 +121,25 @@ __published: // IDE-managed Components TAction* SaveUser; TAction* NewUser; TImageList* ImageList; + TGroupBox *DatesGroupBox; + TGroupBox *LogonsGroupBoxx; + TGroupBox *PostsGroupBox; + TGroupBox *UploadsGroupBox; + TGroupBox *DownloadsGroupBox; + TGroupBox *EmailGroupBox; + TGroupBox *FlagSetGroupBox; + TGroupBox *TerminalGroupBox; + TGroupBox *CommandShellGroupBox; + TGroupBox *LogonGroupBox; + TGroupBox *ChatGroupBox; + TGroupBox *MessageGroupBox; + TGroupBox *FileGroupBox; + TGroupBox *QwkGroupBox; + TGroupBox *AddressGroupBox; + TStaticText *CreditsStaticText; + TStaticText *FreeCreditsStaticText; + TStaticText *UploadedBytesStaticText; + TStaticText *DownloadedBytesStaticText; void __fastcall EditChange(TObject *Sender); void __fastcall FormShow(TObject *Sender); void __fastcall ScrollBarChange(TObject *Sender); @@ -143,6 +162,7 @@ private: // User declarations void __fastcall PutUserStr(TEdit*, enum user_field, const char*); void __fastcall PutUserText(TEdit*, enum user_field); void __fastcall PutUserDate(TEdit*, enum user_field); + void __fastcall PutUserBytes(TEdit*, enum user_field); void __fastcall SaveChanges(void); void __fastcall SetBit(bool set_it, uint32_t& field, uint32_t bit); public: // User declarations