Billing system

HMG Samples and Enhancements

Moderator: Rathinagiri

PeteWG
Posts: 148
Joined: Sun Mar 21, 2010 5:45 pm
Has thanked: 13 times
Been thanked: 50 times

Re: Billing system

Post by PeteWG » Fri Jul 30, 2010 11:30 am

mol wrote: ...
Thanks for opinion, especially for these bad ones ;)
I'm afraid that I shall totally disappoint you! no bad opinions at all, here.. ;-)
instead, very positive visual impressions.
professional design, elegant UI! (ah, good Polish also, should I guess?)
mol wrote:If anybody wants to see sources, I'll post them on PV.
It would be interesting and perhaps useful to peek into your sources if you'd post them in PV. (now, what is PV? :? )

regards,

---
Pete

User avatar
mol
Posts: 3195
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 214 times
Been thanked: 120 times
Contact:

Post by mol » Fri Jul 30, 2010 11:56 am

PeteWG wrote:
mol wrote: ...
Thanks for opinion, especially for these bad ones ;)
I'm afraid that I shall totally disappoint you! no bad opinions at all, here.. ;-)
instead, very positive visual impressions.
professional design, elegant UI! (ah, good Polish also, should I guess?)
mol wrote:If anybody wants to see sources, I'll post them on PV.
It would be interesting and perhaps useful to peek into your sources if you'd post them in PV. (now, what is PV? :? )

regards,

---
Pete
Thanks for interesting, Pete
PV means private.
I'm not ready to make this system public now, but if you want, I'll send you a copy via e-mail

User avatar
bpd2000
Posts: 1074
Joined: Sat Sep 10, 2011 4:07 am
Location: India
Has thanked: 196 times
Been thanked: 95 times

Post by bpd2000 » Sun Oct 09, 2011 9:20 am

Dear Mrduck

Request for Source code

BPD
BPD
Convert Dream into Reality through HMG

mrduck
Posts: 497
Joined: Fri Sep 10, 2010 5:22 pm

Post by mrduck » Sun Oct 09, 2011 3:17 pm

it's Mol code, not mine.....

bpd2000 wrote:Dear Mrduck

Request for Source code

BPD

User avatar
mol
Posts: 3195
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 214 times
Been thanked: 120 times
Contact:

Post by mol » Sun Oct 09, 2011 7:02 pm

I'll send tomorrow...
I want to present my new ideas in the program about user interface. I'lol post some images tomorrow, too.

Best regards, Marek

User avatar
mol
Posts: 3195
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 214 times
Been thanked: 120 times
Contact:

Post by mol » Mon Oct 10, 2011 6:05 am

Some time ago, I've realised my idea about definable buttons:
Image


After selecting this function, you can define caption of button, action realised by button and its action.
You can also decide if the button is active - visible.


Image


I've used arrow keys to navigate in "excel" style:

Code: Select all

	ON KEY DOWN OF OknoGlowne ACTION ChangeActiveButton("DOWN")
	ON KEY UP OF OknoGlowne ACTION ChangeActiveButton("UP")
	ON KEY RIGHT OF OknoGlowne ACTION ChangeActiveButton("RIGHT")
	ON KEY LEFT OF OknoGlowne ACTION ChangeActiveButton("LEFT")
.
.
.
function ChangeActiveButton
	param cDirection
	local cNameofButton, lLoop := .f.
	cNameofButton := "BUTTON_"+alltrim(str(nActiveRow))+"_"+alltrim(str(nActiveCol))
	SetProperty("MainForm", cNameofButton,"FontBold",.f.)
	do case
		case cDirection == "DOWN"
			do while .t.
				if ++nActiveRow > nMaxRow
					nActiveRow := 1
					if lLoop
						exit
					endif
					lLoop := .t.
				endif
				if aButtonsDefinition[ nActiveRow, nActiveCol, 3]
					exit
				endif
			enddo

		case cDirection == "UP"
			do while .t.
				if --nActiveRow = 0
					nActiveRow := nMaxRow
					if lLoop
						exit
					endif
					lLoop := .t.
				endif
				if aButtonsDefinition[ nActiveRow, nActiveCol, 3]
					exit
				endif
			enddo
		case cDirection == "RIGHT"
			do while .t.
				if ++nActiveCol > nMaxCol
					nActiveCol := 1
					if lLoop
						exit
					endif
					lLoop := .t.
				endif
				if aButtonsDefinition[ nActiveRow, nActiveCol, 3]
					exit
				endif
			enddo

		case cDirection == "LEFT"
			do while .t.
				if --nActiveCol = 0
					nActiveCol := nMaxCol
					if lLoop
						exit
					endif
					lLoop := .t.
				endif
				if aButtonsDefinition[ nActiveRow, nActiveCol, 3]
					exit
				endif
			enddo
	endcase

	cNameofButton := "BUTTON_"+alltrim(str(nActiveRow))+"_"+alltrim(str(nActiveCol))
	DoMethod("MainForm",cNameofButton,"SETFOCUS")
	SetProperty("MainForm", cNameofButton,"FontBold",.t.)
 return

These buttons are created in this way:

Code: Select all

for r := 1 to nMaxRow
	for c := 1 to nMaxCol
		//msgbox(hb_valtoexp(aButtonsDefinition[r,c][4]))
		xIkona := alltrim(aButtonsDefinition[r,c][4])
		if empty(xIkona)
			xIkona := "MALYPUSTY"
		endif

		cNameOfButton := "Button_"+alltrim(str(r))+"_"+alltrim(str(c))
		cAkcja := "AktionTestButton("+alltrim(str(r))+","+alltrim(str(c))+")"
		DEFINE BUTTON &cNameOfButton
			ROW 40+(r-1)*70
			COL 20+(c-1)*150
			CAPTION aButtonsDefinition[r,c,2]
			PICTURE xIkona
			PICTALIGNMENT Left
			WIDTH 140
			HEIGHT 60
			FONTNAME "ARIAL"
			FONTSIZE 11
			VISIBLE aButtonsDefinition[r,c,3]
			MULTILINE .T.
			ONCLICK &cAkcja
		END BUTTON
	next c
next r

User avatar
Rathinagiri
Posts: 5263
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Has thanked: 169 times
Been thanked: 172 times
Contact:

Post by Rathinagiri » Mon Oct 10, 2011 9:25 am

It looks very nice Marek.

I have following doubts:

1. Whether these captions/actions are stored in a database for future application running? If so in what format?

2. What will happen if there are more number of buttons than the screen accommodates? Are you using virtual windows? How will you determine the number of rows and number of columns of buttons?

I have started using buttons in the main window and all the operations are called from there. My clients like that approach a lot. It looks very similar to that one. But, user definable actions is a great idea Marek.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.

User avatar
esgici
Posts: 4508
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Has thanked: 386 times
Been thanked: 111 times
Contact:

Post by esgici » Mon Oct 10, 2011 10:05 am

Hi Mol

definable buttons is an interesting concept :)

Thanks to sharing your code, it is cool and useful.

BTW, did you inspect Floating Buttons concept in DBA ?

Regards

--

Esgici
Viva INTERNATIONAL HMG :D

User avatar
mol
Posts: 3195
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 214 times
Been thanked: 120 times
Contact:

Post by mol » Mon Oct 10, 2011 10:46 am

rathinagiri wrote:It looks very nice Marek.

I have following doubts:

1. Whether these captions/actions are stored in a database for future application running? If so in what format?

2. What will happen if there are more number of buttons than the screen accommodates? Are you using virtual windows? How will you determine the number of rows and number of columns of buttons?

I have started using buttons in the main window and all the operations are called from there. My clients like that approach a lot. It looks very similar to that one. But, user definable actions is a great idea Marek.
ad.1. Definitions are stored in database and read at program startup. Database contains coordinates of button, realised function - index of table containing called function:

Code: Select all

aAction[1]	:= "FakturaVAT(1,0,.f.,.f.)"
aDescriptionOfAction[1]	:= "Faktura VAT"
ad.2. I've determinated size and count of buttons - user can only change called action from button, its caption and icon.


User definable buttons are very comfortable for users - each one can place most used function on the main screen of application.

User avatar
mol
Posts: 3195
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 214 times
Been thanked: 120 times
Contact:

Post by mol » Mon Oct 10, 2011 10:49 am

esgici wrote:Hi Mol

definable buttons is an interesting concept :)

Thanks to sharing your code, it is cool and useful.

BTW, did you inspect Floating Buttons concept in DBA ?

Regards

--

Esgici
It's only draft of code... I can prepare whole sample for it, eventually.

I've installed last version of DBA, but ca't find Floating Buttons, where they are?

Post Reply