Help - Search - Members - Calendar
Full Version: Calculator
Desktop Sidebar Forums > Customizations > Panel Announcements
vuystie
Hello,
I finally got my DSCalculator working fine.
Please test and report bugs (if any) and post requests for adjustments.
When installed, you should find it in the category 'Third Party .Net Panels'
It requires .Net Framework 1.1
Tested with WinXP SP2 and DS build 90

New in v2.3
- limitation of the number of digits

New in v2.2
- history added
- control by keyboard is possible now
- decimal seperator dependant of current culture

New in v2.1:
- auto-repeat last action by clicking again on 'equals'
(like doing 2+2 and clicking equals and then clicking equals again gives 6)
- option to align the panel in the dsskin file (standard set tot center)

New features in v2:
- skinning support
special thanks to yyy for the great help with that

UPDATE: added a border around the result-text
looks better that way

Download at: Extension Exchange

TODO:
- add thousand seperator

Click to view attachment
eitaneko
Maybe you should release this as part of the contest...
yyy
Nice work clap.gif Works fine with b.90 so far. Maybe you would like to add it to the Extension Exchange (the DS Add-ins download page).
pmulcahy11b
Now that's a really useful panel! But may I suggest the ability to use parenthetical notation, such as (3+4)*7?
antu^jamban
Just tested it. Just one comment, when I click the operators (+, - , ect) the number goes zero. At first I think it replace the number I key in but actually it doesn't. You should just let the number stay when clicking the operators.

to pmulcahy11b, I suggest you just use the cmdline panel to do that kind of calculation (just as I am biggrin.gif) but I think it's a good idea. Oh yeah.. why not extend it to be a scientific calculator
vuystie
QUOTE(antu^jamban @ May 31 2005, 02:39 PM)
Just tested it. Just one comment, when I click the operators (+, - , ect) the number goes zero. At first I think it replace the number I key in but actually it doesn't. You should just let the number stay when clicking the operators.


i've been thinking about that too, working on it

QUOTE(antu^jamban @ May 31 2005, 02:39 PM)
to pmulcahy11b, I suggest you just use the cmdline panel to do that kind of calculation (just as I am biggrin.gif) but I think it's a good idea. Oh yeah.. why not extend it to be a scientific calculator
*


was going to say the same, it's ment to be a simple calculator
axelant
Not sure if you want this comment here - I'll delete/move it if you want, but the buttons are garbled on mine. XP SP2 and build 90

Click to view attachment
vuystie
QUOTE(axelant @ Jun 1 2005, 04:57 PM)
Not sure if you want this comment here - I'll delete/move it if you want, but the buttons are garbled on mine.  XP SP2 and build 90

Click to view attachment
*



oops ohmy.gif
for the moment i'm working to add some skinning capabilities
so i had to change quite a lot
i used the standard windows forms buttons, now i'm upgrading it to the SkinButtons from the dssdk but it takes more work than expected
(possibly because i'm just a newbie to ds development)

so work in progress, thx for notifying
vuystie
is there a skinner who wants to make the pictures for the buttons? i'm not very experienced with that so i want to leave it to the pro's wink.gif

the smallest buttons like the numbers and some buttons at the right are 18x18
the left buttons like sqrt and so are 26x18 and the equals and plus are 40x18

thx
antu^jamban
While you're working on skin support, I suggest that you fix the GUI a bit. Please refer to the attached screenie.

Now, another suggestion for your calculator. I wish for center aligned for it. Maybe other users like it left aligned so you can make it an option.
vuystie
looks like two times the same image... am i wrong?
but i think i know what you mean wink.gif
will look for it
vuystie
skin support added, download in the first post
reset to zero after clicking an action is also fixed
Banedon
It's not the same image: in the second one the calculator buttons have got the same spacing..

However, really nice panel, really nice idea...
fun_08.gif
vuystie
QUOTE(Banedon @ Jun 4 2005, 11:11 PM)
It's not the same image: in the second one the calculator buttons have got the same spacing..



oh right, didn't see it
vuystie
QUOTE
I wish for center aligned for it.


antu^jamban, do you mean aligning the number buttons so you get equal spacing
or do you mean centering the whole thing in the panel?

if you mean the first, I did this to group the number buttons
vuystie
improved the looks a bit
check the first post for a screenshot
vuystie
someone just suggested me to place the number buttons in the way they useually are on a calculator
should I do that or is it not necessary?
it does not disturb me but maybe for someone else it does...

Click to view attachment
antu^jamban
QUOTE(vuystie @ Jun 5 2005, 05:37 AM)
QUOTE
I wish for center aligned for it.


antu^jamban, do you mean aligning the number buttons so you get equal spacing
or do you mean centering the whole thing in the panel?

if you mean the first, I did this to group the number buttons
*


I mean centering the panel smile.gif Btw, if you've fix the gui, I'm ready with the skin biggrin.gif

EDIT:
I found that the latest version is eating to much system resource. Each time I hover on it, CPU usage immediately raising up and system become sluggish. Anyone experiencing the same thing?.
GoMa
QUOTE
I found that the latest version is eating to much system resource. Each time I hover on it, CPU usage immediately raising up and system become sluggish. Anyone experiencing the same thing?.

Don't know about you, but in my computer, every time I quickly move my mouse over DS there's a high CPU usage, and it's not special to DSCalculator.
Also, I think it's the SkinButtons' controls fault, not vuystie's.

QUOTE(antu^jamban)
I mean centering the pane

This is not what you showed in the picture. wink.gif
Frost
Dunno if this has been mentioned but whats really strange is:

if i do a sum, say 2+2 and press =

i get 4 (which is correct)

but if i press = again the answer 4 doubles. On a usual calculator the answer should have +2 added to it. Eg. 2+2=4 (press= again) 4+2=6 (press= again) 6+2=8

but it goes 4, 8, 16, 32, 64 .... etc

Dunno, it probably supposed to do that....

Hope im not just going mad

Thanks


Frost
vuystie
i know what you mean Frost, I will implement it in the next version
won't be very hard to fix
vuystie
QUOTE
Btw, if you've fix the gui, I'm ready with the skin


the gui should be ready for that in the newest version
you can try your skin by adjusting the dsskin file
if it looks good mail or post your skin and i'll add it to the dspackage

GoMa is right about the high cpu-usage, I can't help it, it's caused by the SkinButtons
antu^jamban
In that case, can you put an option to disable skin? Also, is it possible to reposition the buttons via dsskin file?
vuystie
QUOTE(antu^jamban @ Jun 7 2005, 09:51 AM)
In that case, can you put an option to disable skin? Also, is it possible to reposition the buttons via dsskin file?
*



its quite hard to disable skin, does it cause that much trouble to you?
repositioning through the dsskin is not possible AFAIK
vuystie
QUOTE(Frost @ Jun 6 2005, 06:26 PM)
Dunno if this has been mentioned but whats really strange is:

if i do a sum, say 2+2 and press =

i get 4  (which is correct)

but if i press = again the answer 4 doubles.  On a usual calculator the answer should have +2 added to it.  Eg. 2+2=4 (press= again) 4+2=6 (press= again) 6+2=8

but it goes 4, 8, 16, 32, 64 .... etc

Dunno, it probably supposed to do that....

Hope im not just going mad

Thanks


Frost
*




fixed already, will post the new version this evening
GoMa
QUOTE
repositioning through the dsskin is not possible AFAIK

It is. Specify a "pt" attribute on the skin element (<item name="MyPanel.SkinEl" pt="4,3"></item>), and then use ISkinElement::GetPoint. See:
http://www.desktopsidebar.com/forums/index...?showtopic=4389
rolyat
I agree, it will be a good idea to have the same layout as a normal calculator. It is a little bit disturbing to look for the right digit when you are used to calculators. In fact the current layout is the one of a normal phone.
One more thing, in Europe, the decimal character is the comma "," but in US and some other countries (UK I think too), it is the point ".". That should be an option to be set I think.
Another suggestion is, as an option, to limit the number of digits after the decimal character. IE I entered 44.9 / 6, and of course the number was: 7.4833333333333333333333333333333 etc. so way too much digits to be shown in the DS panel (or with a huge panel).
Is there any way to use the keyboard on the panel? Because using the mouse is less intuitive than with the keyboard.
vuystie
QUOTE(rolyat @ Jun 7 2005, 04:01 PM)
I agree, it will be a good idea to have the same layout as a normal calculator.


already fixed in the last version

QUOTE(rolyat @ Jun 7 2005, 04:01 PM)
One more thing, in Europe, the decimal character is the comma "," but in US and some other countries (UK I think too), it is the point ".". That should be an option to be set I think.


right about that
about the limitation of numbers also right, will fix it

about using the keyboard, will think about it
vuystie
QUOTE(GoMa @ Jun 7 2005, 02:17 PM)
QUOTE
repositioning through the dsskin is not possible AFAIK

It is. Specify a "pt" attribute on the skin element (<item name="MyPanel.SkinEl" pt="4,3"></item>), and then use ISkinElement::GetPoint. See:
http://www.desktopsidebar.com/forums/index...?showtopic=4389
*



oh nice
thx GoMa

EDIT: implemented an option to choose the alignment in the dsskin file
makes it a lot easier than having to set the positions for 24 components
nupkc
QUOTE(rolyat @ Jun 7 2005, 09:01 AM)
One more thing, in Europe, the decimal character is the comma "," but in US and some other countries (UK I think too), it is the point ".". That should be an option to be set I think.

Should you write the panel in .Net, you can use CurrentCulture.NumberFormatInfo to get the decimal separator sign (and much more too). But I guess that's no news. smile.gif
Which gives me the idea - maybe DS should implement some internal class(es) to provide some essential .Net options to panel developers using Win32 programming. Just a thought.
GoMa
QUOTE
Which gives me the idea - maybe DS should implement some internal class(es) to provide some essential .Net options to panel developers using Win32 programming. Just a thought.

Most of these platform-related things in .NET (including NumberFormatInfo) are wrappers of Win32 APIs that can be used from Win32 programming languages. So that's not a problem.
Sorry for the off-topic, vuystie.
antu^jamban
Suggestion: Make the number editable. If you mistakenly entered wrong number you have to clear them all to correct them instead of just editing the mistakenly entered number.
vuystie
QUOTE(antu^jamban @ Jun 8 2005, 03:05 PM)
Suggestion: Make the number editable. If you mistakenly entered wrong number you have to clear them all to correct them instead of just editing the mistakenly entered number.
*



what do you mean antu?
you can remove the last number by clicking 'C' instead of 'CE'
or do I understand you wrong?
vuystie
Version 2.2 released:
- keyboard input is possible now
- handled the thing about ',' and '.'
- history is visible in details window

to all:
thx for all your suggestions and for using the panel, hope you keep enjoying it
axelant
Click to view attachment

There's a bit of a problem installing the new release.
Prism
Try redownloaing it, from the ExEx page.
axelant
Cool - working now thanks!
axelant
By the way just a functional point. I expected "C" to clear everything and "CE" to clear just the last/current entry but they seem to work the other way round?

Is it just me or does that seem wrong?
vuystie
QUOTE(axelant @ Jun 9 2005, 10:35 AM)
By the way just a functional point.  I expected "C" to clear everything and "CE" to clear just the last/current entry but they seem to work the other way round?

Is it just me or does that seem wrong?
*



wouldn't know, i could be wrong
vuystie
fixed the thing about limiting the number of digits
Phantomdrafter
Very nice! Would be even more handy if you could cut & paste entry & result.
vuystie
QUOTE(Phantomdrafter @ Jun 10 2005, 10:50 PM)
Very nice!  Would be even more handy if you could cut & paste entry & result.
*



you can cut in the details window but you're right, it should be possible to paste numbers
i'll give it a try
vuystie
fixed a minor error in keyboard input
Garry
Hi there,

not sure if this is a general problem with Desktop Sidebar, or just DSCalculator - but when I try to install I get the following message:

QUOTE
Cannot install package: C:\Program Files\Desktop Sidebar\DSCalculator.dspackage
Error: This plugin requires .NET Framework v1.1 to be installed



I have .NET Framework v2.0 installed on my system. Should the file not be compatible? Are there any workarounds to installing a package rather than just double clicking?

Thanks,
Garry
Indian_Mayhem
You need to go back to the MS.com site and install .NET 1.1 as well. Both .NET 1.1 and .NET 2.0 will work together.
deathwinger
Oh, you need to add the ability to put in a decimal point. I normally would use the calculator for currency conversion but in this case doesn't seem to work as well.

On that point, anyone could make a command line that takes input of whatever currency you want to convert and uses the page www.xe.org to convert it?
KingOfMyPC58
I like the idea but I couldnt get the plugin to install into the desktop sidebar I keep getting the following error message

Cannot Install Pakage: E:\MyDownloads\Desktop Gadgets\Desktop Sidebar\Plugins\DSCalculator.dspackage Error: End of central-directory signature not found, Either this file is not a zipfil or it constutes one disk of a multi-part archive. In the latter cast the central directory and zipfile commnt wil be found on the last disk(s) of this archive.
UnZip DLL: cannot find zipfile E:\MyDownloads\Desktop Gadgets\Desktop Sidebar\Plugins\DSCalculator.dspackage and cannot find E:\MyDownloads\Desktop Gadgets\Desktop Sidebar\Plugins\DSCalculator.dspackage.zip, periood.


What the does the load of bull mean, cause I dont know what to do now that I downloaded the plugin
could it be a bad upload of the download server here at Invision or what? hairpull.gif
KeithI
That usually indicates a bad download. Try downloading again - and if that fails try using a different browser for the download.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.