yashsingh1/xdaforums huggingface dataset:
[Windows Mobile Software Development] meltwater:
Well the way I've done it at the moment:

I loop through my list of data and declare a local "SensePanelItemEx theSenseItem" and then add it to the "senseList.AddItem(theSenseItem);" for each item of data...I can even theSenseItem.Dispose(); within each loop.

I thought it would complain that the original theSenseItem is no longer present.

The only other way I thought to do it is to create a List<SensePanelItemEx> of items and then add them to the senseList afterwards, but I don't want to be wasteful.

Ok, added the screens now. Let me know if that's enough or not (looks like the far alignment has the main problem and sometimes vertically). If you need better examples I'll create some.
[Windows Mobile Software Development] greenhacks:
Do you notice that it only happens when text is with Italic style?

If it is normal it may not be happening. I will fix this issue by adding some extra space at end making sure that when text is set with italic style it dont get cut at the end.
[Windows Mobile Software Development] meltwater:
I'll try it without Italic (since as it happens the "far" aligned items are all italic at the moment). The vertical issue is occurring with both normal and italic, secondary item (might be clipped by the position of the footer instead).

UPDATE: Yep without italic, the clipping on the right has gone.
[Windows Mobile Software Development] greenhacks:
I will fix the italic issue and test it properly to make sure if text is near or far, will not get cut.

Thanks for noticing the issue.
[Windows Mobile Software Development] meltwater:
Just found that the right-aligned italic issue occurs with normal .net label controls too, so no worries.
[Windows Mobile Software Development] greenhacks:
I did notice the same. i will fix it at the end. right now working on major updates. so far going good, no challenges.

We can also update text of controls through event, and they will resize keeping autoheight in mind.

Accept OutofMemoryexception fix, i dont need anything from Ed as of now :)
[Windows Mobile Software Development] meltwater:
Good plan with the update event.

I think I'll have another look at how Ed adds his controls, I have a feeling my bad OutOfMemory issue is down to how I add the controls and destroy the originals (perhaps it keeps them in memory for a while anyway) [EDIT:No the example demo, adds a local item so it would be destroyed too outside the loop]. Just giving the list a wiggle for a bit kills it, but it is a big list I suppose.

I need to redo it anyway, since I have a problem now when it comes to linking events to controls which are only in the list. Need to try inheriting your class and making specific types for my needs, not too familiar with doing such things yet as I'll want different layouts for different items with different event handlers attached.

I also need to work out how to link event handlers to specific objects within a custom control, so some learning for me to do I think!
[Windows Mobile Software Development] leen15:
Some news about the next release of the controls? :)
[Windows Mobile Software Development] greenhacks:
@ To Everyone:

Sorry for no updates last week, had to travel a little.

I am still actively working on next release. Should be couple of days more.

Also adding few other extended controls.

Thanks.
[Windows Mobile Software Development] meltwater:
Just a quick question...

I've noticed that the controls don't have the event handlers setup in quite the same way as the normal controls, how do I link to the event handlers for the items when they are within the senselist?

Thanks
[Windows Mobile Software Development] greenhacks:
We cant link, but need to write events and raise them.

If you can wait 2 to 3 days, then you can use new version, which has lots more events than the normal ones.

I am almost done.
[Windows Mobile Software Development] meltwater:
No problems, I was just wondering noticed the example sense item was also missing them. Changing ROMs at the moment so no rush.
[Windows Mobile Software Development] greenhacks:
Update:

I am done with new updates.

Now writing some sample examples with multiple styles.

Will post the updates as soon as sample app is ready.

thanks.
[Windows Mobile Software Development] leen15:
Great news! :D

I cannot wait! :p
[Windows Mobile Software Development] greenhacks:
Added new release.

See Post 1 for details.

See Post 3 for screenshots.

Looking for feedback.
[Windows Mobile Software Development] leen15:
very very good work!! :D

I'll try it as soon as possible! ;)

p.s. I need some help for read sms inbox.. :(
[Windows Mobile Software Development] greenhacks:
I will now work on SensePanelSMSControl. will let you know.
[Windows Mobile Software Development] leen15:
thanks my friend! :)

i'll give you some feedback about new controls ;)
[Windows Mobile Software Development] meltwater:
Wow there is a lot of new stuff amazing work!

Will start trying them out and let you know.
[Windows Mobile Software Development] mike3000c:
hi greenhacks,

thanks for your update.

i use numberic Ex of 3 digi control and have a test only on this control.

here is my feedback:

i create two 3 digi numberic Ex and set them minvalue = 1 and maxvalue = 500. Once i change the value and click OK, two control have change to same value as i set. In fact it is two independent control and the other shouldn't change.

on the other hand, numberic Ex control click and drop to left site. it will like SensePanelMoreItem drop to left site... and no any control on it.

Although the control can use, the control have mirror different between original sensepanelnumberic. when i create a control, it can't have OnValueChanged event on its properties. I can set global event only like this:

SenseSDKExtended.SensePanelNumericItemEx.HTC3DigitStyle1.OnValueChanged += new SenseSDKExtended.SensePanelNumericItemEx.HTC3DigitStyle1.OnValueChangedEventHandler(OnNumericValueChanged);

Can't set different event on same kind control. like this:

//original numberic use method:
itmNum.OnValueChanged += new SensePanelNumericItem.ValueChangedEventHandler(OnNumericValueChanged);

OK, one more question on the resource. Can it compact into dll instead of many files? (like SenseSDK.Resources.VGA.dll)

thanks your great work :D

Regards,

Mike
[Windows Mobile Software Development] greenhacks:
Good find. It is a bug that onclick it changes values of other similar control.

I am working to fix it.

Also i missed to add button press images on smaller up/down buttons, which i will fix as well.

Event part also i will check after that.

I thought about adding them to dll. i will work on it.

Thanks for the feedback. will update new version at earliest.
[Windows Mobile Software Development] greenhacks:
I was able to fix the bug where value were getting changed on SenseListControl Scroll and OnClick on NumericItemEx. (should be part of next release, but will be available on CodePlex in next few hours in bin folder of SenseSDKExtended Source code)

To Block the Right scroll on any of the control do this:

In:

Private Sub OnBeforeShowItemChildren(ByVal sender As SenseListControl.ISenseListItem, ByRef cancel As Boolean)

If TypeOf (sender) Is SensePanelNumericItemEx.HTC3DigitStyle1 Then
cancel = True
Exit Sub
End If

End Sub

That cancel will block that. I never found a way to handle that from within the control, actually i would say i didnt spend much time as this workaround worked properly. Let me know if this stops right scroll which showed empty screen.

I dont understand this:

Can you explain again please? Do you want OnValueChanged Event fire on when control is loaded, or you think it should not be like that?

thanks.
[Windows Mobile Software Development] mike3000c:
thanks for your quick update.

on the question OnValueChanged that means below:

original source code by my use:

SensePanelNumericItem itmNum3 = new SensePanelNumericItem("NumericItemthumbPicHeight");
itmNum3.OnValueChanged += new SensePanelNumericItem.ValueChangedEventHandler(OnNumericValueChanged);
this.senseList.AddItem(itmNum3);

now from your Ex:

SenseSDKExtended.SensePanelNumericItemEx.HTC3DigitStyle1 itmNum3 = new SenseSDKExtended.SensePanelNumericItemEx.HTC3DigitStyle1("NumericItemthumbPicHeight");
//this isn't use because OnValueChanged properties can't found.
//itmNum3.OnValueChanged += new SenseSDKExtended.SensePanelNumericItemEx.HTC3DigitStyle1.OnValueChangedEventHandler(OnNumericValueChanged);
//now my code is below, i think it is global event handler for all HTC3DigitStyle1 control
SenseSDKExtended.SensePanelNumericItemEx.HTC3DigitStyle1.OnValueChanged += new SenseSDKExtended.SensePanelNumericItemEx.HTC3DigitStyle1.OnValueChangedEventHandler(OnNumericValueChanged);
this.senseList.AddItem(itmNum3);

I can't found OnValueChanged properties on itmNum3 control.

Hope that let you understand what i means. cheers
[Windows Mobile Software Development] TeDeV:
hey guys, do u think we can have a datagridview control?

the one that compact framework has, is stupid.
[Windows Mobile Software Development] greenhacks:
That is something i want to work on, but it is too much of work :(.

It will be my last todo list item to work on.

If you want any specific look and feel and not entire gridview, than let me know.

thanks
[Windows Mobile Software Development] TeDeV:
nope i want the functionality of a datagridview. (a lot of columns and rows that load fast data from datasets, and each cell easily editable).

oh and by the way, can u make a Sense Picture control? where i can set the size of the picture and the alignment?

i want to be able to have a big picture in the middle of the screen, and then some other controls below it
[Windows Mobile Software Development] greenhacks:
I understood the issue of event, but not able to fix it somehow.

Already started pulling my hairs which is not good thing :)

I am able to properly call that eventhandler in vb.net by using AddHandler.

Can you possibly explain why and when you need to use that eventhandler, so that i can think in that route.

For other issues which are fixed, you can download the updated dll from:

Download the latest version from:

http://sensesdkextended.codeplex.com/SourceControl/list/changesets

and then go to SourceCode / SenseSDKExtended / Bin / Debug / SenseSDKExtended.dll

Edit: Attached dll.

Please test, thanks.
[Windows Mobile Software Development] greenhacks:
Well as i said Gridview is too much work, and as of now no plans to make it or maybe at the end.

Picture control sounds very easy, will try to get that out in a day or 2.
[Windows Mobile Software Development] greenhacks:
PictureControl was like a cake to me, so thought to do it.

Download my latest release, and replace the attached dll.

To use it:

Properties as follows:

Dim s_panelpicturebox As SensePanelPictureBox.Style1 = New SensePanelPictureBox.Style1
s_panelpicturebox.Name = "s_panelpicturebox"
s_panelpicturebox.Image = icon_contact
s_panelpicturebox.Height = 300
s_panelpicturebox.ImageSize = New Size(300, 200)
s_panelpicturebox.ImageAlignment = StringAlignment.Far

Change the control height as required, width is not important.

Change image size.

If you have bitmap image or Image format, then you need to use SenseAPIsEx which is part of my controls, and it has a function which converts ImageToIIMage.

Let me know if this is what you wanted.

I will also add few more properties to this like primary/secondary text, etc.

Note: This control will be part of my v0.2 release.

Updated Code at: http://sensesdkextended.codeplex.com/SourceControl/list/changesets
[Windows Mobile Software Development] mike3000c:
replace this library into project and haven't code change.

it pop up a exception: MissingMethodException

i can't catch the reason of which code abnormal. even i set break ponit.

I guess it is the library have some change as reason.

any hint?
[Windows Mobile Software Development] greenhacks:
I think if you are testing on emulator or device, go in file explorer, program files, and remove the folder of your application.

Then rebuild app and run, it will put all files again, and should fix that.
[Windows Mobile Software Development] mike3000c:
the dll i upload to emulater and it can work.

but when i click the control, it can't pop up the big dialog and click small icon can't change value.

Is it need to modify some code to using this Ex? guideline?

on another question mentioned before, each ValueChanged properties of control should have been add different event. such as ValueChanged1,ValueChanged2, ValueChanged3 on them instead of global.
[Windows Mobile Software Development] greenhacks:
Thats unusual behaviour, let me test it again. Well the demo VB app has all the example for it.

http://sensesdkextended.codeplex.com/SourceControl/list/changesets

Well a numericitem value is 1 value no matter if it is 2 digit or 3 digit.

I am not sure how can we give 3 ValuChange events as that value is 1.

Are you dividing that value in 3 parts or something?

Can you possibly explain how exactly you are using this control, i mean what role it plays in your application. I may be able to make an example for that.
[Windows Mobile Software Development] meltwater:
Ok should be a simple question but searching hasn't found much.

How do I load a Resource image into an IImage object?

i.e. Before using Bitmap objects:

bmp = new Bitmap(Properties.Resources.DefaultPhoto);

OK scrap that, found some code to copy from the original SensePanelItemEx...

For reference:

string path_DefaultPhoto = System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase.Substring(0, System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase.LastIndexOf("\\")) + "\\Resources\\" + "DefaultPhoto" + ".png";

theIImage = SenseAPIs.SenseImage.LoadIImageFromFile(path_DefaultPhoto);

Nice to see MS made it simple...

@GreenHacks

1. Any chance you can indicate which control is which, i.e. the HTCContactsStyle3 relates to which screenshot?

2. Also there such a thing as a list item ComboBox (Drop down list) with thumbnails?

3. Also I seem to need some pointers to get any text to display, I guess I am not setting something (image is displayed but no text, using HTCContactsStyle3 at the moment). Do I need to set up the rectangles?
[Windows Mobile Software Development] greenhacks:
I think you figured out Image issue.

for other questions:

1. Download the source code, and it has a VBDemo, in that demo go to bin folder/debug folder, and copy all files to emulator or device, and run the exe file.

It will start the entire demo.all screenshots i took from that demo.

Hope that helps.

2. Is this something you looking for? A combo control with icon support in every item?

3. For every sensepsnelitemex styles except style1, you need to call this at the end:

s_panelitemexStyle.PropertyTable = SensePanelItemEx.HTCContactsStyle3Options.ProcessProperties(s_panelitemexStyle);

this is required for autoheight feature. that will get the text back.

See the examples.

I am working on getting documentations. sorry for that.
[Windows Mobile Software Development] meltwater:
1. No problem, I think I've got the one I want, but might be handy for others later on.

2. For some reason I thought it was already around but yes it would be great if it can be done. The use will be for selecting people from the list, so having photos would help.

3. Ok, I did have a browse in the source code but didn't spot anything. I was thinking that it probably needed something for it to work out where everything is in relation to everything else, so thanks for pointing out what. [WORKS PERFECTLY!]

1st impressions are great though, I think the memory issue is reduced too (able to scroll to the bottom of the list now). Thanks for the pointers, the deeper I get into this the more I still need to learn lol.

IImages are new to me, will need to work out how to resize them etc like the Bitmaps I was using - although really like that whatever the image size the text fits in around it perfectly!
[Windows Mobile Software Development] greenhacks:
In next release i will include function which you can use to resize image. that should help you.

Glad it worked great. i spent so much time in controls, that i got very less time to write documentations.

There are so many new controls i am writing 1 by 1, will keep releasing as i finish.

I almost finish InputBox, testing it now. I thought some might need it to get data from user so InputBox was perfect.
[Windows Mobile Software Development] meltwater:
I put it into the other original control, but that was for the Bitmap side.

Excellent, I'll focus on adding some event handling then instead!

Most of it is clear anyway once you get started, was only missing that little bit at the end and it was plane sailing.

What a pop-up dialogue box with text input? That's perfect, something which compact .net should have never lost.
[Windows Mobile Software Development] greenhacks:
Yes. a popup to input text from user. single line as well as multiline support which .net didnt have either :)
[Windows Mobile Software Development] mike3000c:
I don't dividing value to do something else.

I have download the latest souce and have a look of 3 digi VB demo project.

But still haven't see it use event handler OnValueChanged. (found AddHandler btb_close.OnClick, AddressOf btb_close_OnClick only)

my case is:

numberic control A have OnValueChangedA event

numberic control B have OnValueChangedB event

they can use different or same event depend on which i set at event hander of control A and B on design mode, not in runtime.

such as:

controlA.OnValueCHanged += new OnValueChanged(OnValueChangedA)

or

controlA.OnValueCHanged += new OnValueChanged(OnValueChangedB)

controlB.OnValueCHanged += new OnValueChanged(OnValueChangedA)

or

controlB.OnValueCHanged += new OnValueChanged(OnValueChangedB)

on your numberic Ex control, i can't find any way to set this case.

I found one way only:

SenseSDKExtended.SensePanelNumericItemEx.HTC3DigitStyle1.OnValueChanged += new SenseSDKExtended.SensePanelNumericItemEx.HTC3DigitStyle1.OnValueChangedEventHandler(OnNumericValueChanged);

I don't know which numberic control is it point to? (A or B or A+B?)

thanks.
[Windows Mobile Software Development] leen15:
Some news about c# example? :confused:

ps @greenhacks : No luck with MAPIlib.dll :(
[Windows Mobile Software Development] greenhacks:
C# examples should be posted tomorrow.

I will try to write a sample app using that dll, but that will be in weekend.
[Windows Mobile Software Development] leen15:
The app with that dll work fine, but if i try to include the dll in my app it give me an error.. :(
[Windows Mobile Software Development] TeDeV:
i have a small request.

the numericbox thing doesn't help me. what i want is the option to have an "advanced" panel where the big numeric modal screen comes up, but it has also a numeric keypad open below it. so the user can have numbers like 1.056,24. that's a real numeric box.

what the problems might be when developing this....

1) there is not enough space to have N numbers in the big modal screen

2) there is not enough space in one line in the senselist to show N numbers

what the solution to these problems should be

1) as the numbers are getting more and more digits, the font inside the box should get smaller and smaller

2) when we say N numbers, i guess 10 digits should be enough, so the box can fit just fine in a single line inside senselist.
[Windows Mobile Software Development] greenhacks:
How about if you simply use Input Panel? it is available in the dll which is latest on codeplex code.

SenseInputBox.

Will that work?

The reason i say input box, because you cant use Up/Down button of numeric items anyway for big number.

Instead you can simply ask user with help of input box to enter a number which also pops up keyboard. and then use that number to either display on sensepanelitem or just process it internally as you need it.
[Windows Mobile Software Development] greenhacks:
Will it be possible to create a sample project using the original numeciritem, and use the events the way you are trying to do. that way i can test my control and modify. that will help me a lot to quickly fix the issue. I know it is just minor few minutes work. but an example would be great.

thanks.
[Windows Mobile Software Development] TeDeV:
i would like to have the up and down arrows too, because they are big and very easy for the end user to understand. if the number he wants is small (like 3-4) he is going to use the arrows, not the keyboard.
[Windows Mobile Software Development] greenhacks:
Ok so if i understand correct, it needs up/down button, and also should be like textbox, so we can manually enter it.

I can give it a try after my current list gets over possibly by next mid week.

Surely easily doable i guess.

I will make it dynamic in width, so it will expand as numbers addup on left side.
[Windows Mobile Software Development] TeDeV:
thank you very much i appreciate it. don't forget the decimals.

i hope i can get some free time, so i can finally test your controls :)

i guess i will wait for ur version 2
[Windows Mobile Software Development] greenhacks:
Yes sure, wont forget.

It will be released as a Style for numericitemex.
[Windows Mobile Software Development] greenhacks:
C# examples are now added for all the controls.

Are available to download with the code from:

http://sensesdkextended.codeplex.com/SourceControl/list/changesets

Hope that helps to all.
[Windows Mobile Software Development] meltwater:
SOLVED: Hi I've been trying to do it myself but can't quite manage it:

Back to trying to load an embedded resource into an IImage file.

I'm using the following function, which is used in the SenseSDKDemo, but whatever I do I always end up with "strm" being null.

private IImage _getIImageFromResource(string resource)
{
IImage iimg;

using (MemoryStream strm = (MemoryStream)Assembly.GetExecutingAssembly().GetManifestResourceStream("FacebookUtil.Resources." + resource + ".png"))
{
(ImagingFactory.GetImaging()).CreateImageFromBuffer(strm.GetBuffer(), (uint)strm.Length, BufferDisposalFlag.BufferDisposalFlagNone, out iimg);
}
return iimg;
}

I am guessing I am getting the following bit incorrect, not totally sure how it is determined...

"FacebookUtil.Resources." + resource + ".png"

Tried:

"Properties.Resources." too but no luck.

In the SenseSDKDemo, it's "SenseSDKDemo.Resources." + resource + ".png"

In the SamplePanelItem1, it's "SamplePanelItem1.Resources." + resource + ".png"

So I can't work out quite why mine doesn't work. Humm, are the SenseSDK resources being referenced from the dll perhaps?

So how do I use embedded resources with IImage objects, like I did with bitmaps?:

Bitmap bmp = new Bitmap(Properties.Resources.DefaultPhoto);

Sorry but can't find much info on IImage objects, so a little stuck.

Ok, FINALLY found some info:

http://www.attilan.com/2006/08/accessing_embedded_resources_u.php

Looks like a similar problem (I'd tried GetManifestResourceNames() and had similar results...).

The missing piece was:

Build Action: Embedded Resource in the resource property window!

I'll leave this post so others can find the solution quicker!
[Windows Mobile Software Development] greenhacks:
What is name of your image file?
[Windows Mobile Software Development] meltwater:
It was DefaultPhoto.png, sorted now anyway (wasn't embedded on build).
[Windows Mobile Software Development] greenhacks:
Ohh ok. Also i am now using and moving all images to Resource dll in my extended sdk. you can check the code if incase needed.
[Windows Mobile Software Development] mike3000c:
OK. sorry for reply so late.

i create a simple demo app for descript the issue. please find the attachment project as i remark on the code. thanks.
[Windows Mobile Software Development] greenhacks:
Thanks for demo, but i started to check on this issue yesterday and found it and fixed it.

Should updated on CodePlex in few hours and you can test it.

Will leave a message here after updating.

Thanks.