Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Open Source Projects
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Open Source Projects The place to discuss Basic4ppc open source applications.


Pocket Weather


Reply
 
LinkBack (2) Thread Tools Display Modes
  #111 (permalink)  
Old 12-18-2008, 03:19 PM
Basic4ppc Veteran
 
Join Date: Jan 2008
Posts: 213
Default

Quote:
Originally Posted by klaus View Post
Hi Don,
What words are overlapping or running together, I tried mainly in English,French and German and have not yet found overlapping words.
Is it the first line with Today and the date, the 2nd one with the day name and the temperatures or the 3rd one with the conditions? Is it on the device only or on both?
Did you also have a look at the desktop version, what about having two arrows up and down before the temperatures instead of the two letters?

Best regards.
I got the overlaps on my PC (the temp was overwritten by the German day word) as well as on my PDA.

I've been trying to create a routine to justify text, but I'm not having much success because I don't have much experience with font sizes and calculating spaces. Here is what I'm trying to print, I think this may get everything in the spaces needed:

Today (left justified, font 12) - mm/dd/yy (right justified, font 11) - image
Day of week (left justified, font 11) - high / low (right justified, font 11) - image
Weather conditions (left justified, font 11)

The text that is right justified (date, temps) will be consistent so they will always align properly, and most of the language text seems to fit left justified (we can truncate if necessary)

[update] Attached is screenshot of what I have working, I'm going to clean up the code and upload that shortly
[update2] Attached is 46.2
Attached Images
File Type: jpg pfcast.JPG (23.3 KB, 15 views)

Last edited by digitaldon37 : 01-10-2009 at 09:42 PM.
Reply With Quote
  #112 (permalink)  
Old 12-18-2008, 03:36 PM
klaus's Avatar
Basic4ppc Expert
 
Join Date: Oct 2007
Location: Switzerland
Posts: 1,797
Awards Showcase
Forum Contributer Beta Tester Competition Winner 
Total Awards: 3
Default

What is your default Font on the desktop, I use Arial, yours look wider.

The DrawText routine has text justification already included, cLeft, cRight, cCenter !
__________________
Klaus
Switzerland

Last edited by klaus : 12-18-2008 at 03:39 PM.
Reply With Quote
  #113 (permalink)  
Old 12-18-2008, 03:44 PM
Basic4ppc Veteran
 
Join Date: Jan 2008
Posts: 213
Default

Quote:
Originally Posted by klaus View Post
What is your default Font on the desktop, I use Arial, yours look wider.

The DrawText routine has text justification already included, cLeft, cRight, cCenter !
I use Arial. If there is not a font name listed in the theme.ini it defaults to Arial on the desktop, and Tahoma on the PDA.

By the way, your finger swiping to change locations is really cool!
Reply With Quote
  #114 (permalink)  
Old 12-18-2008, 03:57 PM
klaus's Avatar
Basic4ppc Expert
 
Join Date: Oct 2007
Location: Switzerland
Posts: 1,797
Awards Showcase
Forum Contributer Beta Tester Competition Winner 
Total Awards: 3
Default

I use Arial too, and get the attached image.

But anyway, yours is OK too !
Attached Images
File Type: jpg TextAlignment.jpg (24.9 KB, 11 views)
__________________
Klaus
Switzerland
Reply With Quote
  #115 (permalink)  
Old 12-18-2008, 04:25 PM
Basic4ppc Veteran
 
Join Date: Jan 2008
Posts: 213
Default

Quote:
Originally Posted by klaus View Post
I use Arial too, and get the attached image.

But anyway, yours is OK too !
I added the condition description to the top "current" weather - I had to change how the city/region is displayed and check for string length & set font size for long city/region

current version=.46.4

[update] I changed the sorted lists for city from "index/city" to "city/index" with a check before inserting. The cities were not sorted in the drop down list.
[update2] fixed bug where "today" was listed in "tomorrow" section
Attached Files
File Type: sbp Weather.sbp (86.1 KB, 7 views)

Last edited by digitaldon37 : 12-18-2008 at 08:14 PM.
Reply With Quote
  #116 (permalink)  
Old 12-19-2008, 02:48 PM
Basic4ppc Veteran
 
Join Date: Jan 2008
Posts: 213
Default Version .47

Cross-posted at XDA

I have uploaded version .47 to the main post. This version integrates with Levenum's Today Screen plug-in ([New release] Registry display plugin - xda-developers) to display either the current weather or forecast.

If everything tests out ok I will be rolling all the latest development releases into a new public release build.

.47 (12/19/08)
================================================== ================
- add Today Screen plug-in integration (Levenum project)

.46 (12/18/08)
================================================== =================
- add condition descriptions on main page


.45 (12/17/08)
================================================== ==================
- left/right & right/left finger swipe to switch locations (klaus)

.44 (12/17/08)
================================================== ==================
- fix offline cache / location switching bug

.43 (12/17/08)
================================================== ==================
- add S2U key update to "RefreshWeather"
- fix bug where interval set to zero and deletes location cache
- fix refreshweather bug (sets timer off for ini=0)

.42 (12/16/08)
================================================== ==================
- add klaus's update for city/location id (sorted array)

1.1 (12/14/08)
================================================== ==================
- public release containing developer fixes d.39 to d.41
Reply With Quote
  #117 (permalink)  
Old 12-20-2008, 12:14 PM
Filippo's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Location: Schwäb. Gmünd, Germany
Posts: 575
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Hi digitaldon37,

I have a mistake in the procedure found ChangeToVGA.
Please change the procedure this way:
Quote:
Sub ChangeToVGA
'Handles resolutions of 480 * 640
Controls() = GetControls("")

For i = 0 To ArrayLen(Controls()) - 1
Crttype=ControlType(Controls(i))
If Crttype = "CheckBox" OR Crttype = "TextBox" OR Crttype = "Label" OR Crttype = "Button" OR Crttype = "Panel" OR Crttype = "Image" OR Crttype = "ComboBox" OR Crttype = "ImageButton" OR Crttype = "RadioBtn" Then
Control(Controls(i)).Left = 2 * Control(Controls(i)).Left
Control(Controls(i)).Top = 2 * Control(Controls(i)).Top
Control(Controls(i)).Height = 2 * Control(Controls(i)).Height
Control(Controls(i)).Width = 2 * Control(Controls(i)).Width
If Not(cPPC) Then
Control(Controls(i)).FontSize = 2 * Control(Controls(i)).FontSize
'There is no need to change the font size on the VGA device.
End If
End If
Next
' VScroll.Left = 2 * VScroll.Left
' VScroll.Top = 2 * VScroll.Top
' VScroll.Height = 2 * VScroll.Height
' VScroll.Width = 2 * VScroll.Width
' VScroll.Maximum = 2 * VScroll.Maximum
' VScroll.LargeChange = 2 * VScroll.LargeChange
' VScroll.SmallChange = 2 * VScroll.SmallChange
End Sub
and so these lines:
Quote:
VScroll.New1("pnlLocations",210 * scale,0,15 * scale,125 * scale,True)
VScroll.Minimum=0
VScroll.Maximum=150 * scale
VScroll.LargeChange=25 * scale
VScroll.SmallChange=25 * scale
Ciao,
Filippo
Attached Images
File Type: jpg Start-Error.jpg (14.6 KB, 5 views)
__________________
PPC: MDA Pro, 2GB SD
PPC: HTC Touch Diamond, 4GB
______________________
Reply With Quote
  #118 (permalink)  
Old 12-20-2008, 12:55 PM
Basic4ppc Veteran
 
Join Date: Jan 2008
Posts: 213
Default

Quote:
Originally Posted by Filippo View Post
Hi digitaldon37,

I have a mistake in the procedure found ChangeToVGA.
Please change the procedure this way:


and so these lines:


Ciao,
Filippo
Changes made - could you please test? Thanks!
Attached Files
File Type: sbp Weather.sbp (88.8 KB, 6 views)
Reply With Quote
  #119 (permalink)  
Old 12-20-2008, 01:51 PM
Filippo's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Location: Schwäb. Gmünd, Germany
Posts: 575
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Hi digitaldon37,

Quote:
Changes made - could you please test? Thanks!
Test OK!
__________________
PPC: MDA Pro, 2GB SD
PPC: HTC Touch Diamond, 4GB
______________________
Reply With Quote
  #120 (permalink)  
Old 12-20-2008, 11:17 PM
Basic4ppc Veteran
 
Join Date: Jan 2008
Posts: 213
Default

Quote:
Originally Posted by Filippo View Post
Hi digitaldon37,


Test OK!
Thanks for the code and for testing.

[update] Version .49 is attached - changes made so that when you scroll through location is parses the cached location file (if it exists) instead of going out to the internet. The reasoning is that people may scroll through several locations to get to the one that they want and downloading for each location scrolled uses a lot of air-time.
Attached Files
File Type: sbp Weather.sbp (89.1 KB, 7 views)

Last edited by digitaldon37 : 12-21-2008 at 12:16 AM.
Reply With Quote
Reply



LinkBacks (?)
LinkBack to this Thread: http://www.basic4ppc.com/forum/open-source-projects/3323-pocket-weather.html
Posted By For Type Date
1800 PocketPC - Pocket Pc Freeware and Windows Mobile 6 Software - Part 2 This thread Refback 11-24-2008 11:40 AM
Pocket Forecast [v.25] (formerly Pocket Weather) - xda-developers This thread Refback 11-17-2008 10:17 PM
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Another Pocket Wiki digitaldon37 Open Source Projects 4 12-30-2009 02:12 AM
Personal Pocket PC Wiki tsteward Open Source Projects 133 02-24-2009 10:01 AM
Pocket Burning Sand neilnapier Questions & Help Needed 2 11-05-2007 07:53 PM
print class for pocket pc tanrikuluahmet Basic4ppc Wishlist 1 10-01-2007 09:10 AM
Weather web service using HTTP lost2 Share Your Creations 3 06-10-2007 02:40 PM


All times are GMT. The time now is 11:47 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0