[.netCF 3.5] Sense Interface SDK v1.50 (03.19.2011) [HTC's Sense UI Look 'n Feel]

Search This thread

eboelzner

Retired Recognized Developer
May 19, 2008
198
64
Manchester
OnePlus 10 Pro
I'll try that out. But I dont think that is the problem. The size that is returned is correct but when I add it to the Sense List Control, it adds the extra line breaks. When I draw the string outside of the list control, it draws just fine without the extra line breaks.

The problem you are having is that the Panel Items have a default height... see the SenseSDK [SensePanels enum] values.

Once you get the string height... set the panel.Height property and you should be all set.
 

eboelzner

Retired Recognized Developer
May 19, 2008
198
64
Manchester
OnePlus 10 Pro
Ah ... so the IImages are the reason for the ComExceptions! I only used IThumbnail, so I couldn't figure out what the reason was.
Good to know!

Yes... this is the issue using Microsofts IImage com interop wrapper... I works fine, but every so often, it lays an egg... especially with multiple instantiations.

I have tried my best to shield and cache the objects, but the issue is with the com object and memory usage.
 

eboelzner

Retired Recognized Developer
May 19, 2008
198
64
Manchester
OnePlus 10 Pro
In allmost all panel items the methods, properties and events are public, but not virtual. So it is impossible to inherit i.e. from SensePanelCheckboxItem and enhance it. I nees some actions in case the item gets the focus. But OnGotFocus is never called when I inherit from that class.

Can this plz be added? It wpuld be easy to imlement and gives us developers a lot of possibilities.

It would be better to use the base class or better yet, the panel interface to create your own panel... this is an issue where another layer of indirection will hamper the list rendering speed and subsequently performance... this is why the base panels that I created are sealed.

I am preparing a few panel examples that use the interface, not the base class... this is really the most productive/best performance method.
 

eboelzner

Retired Recognized Developer
May 19, 2008
198
64
Manchester
OnePlus 10 Pro
@eboelzer

I think I have a new issue. As I wrote before, I do not use the SensePanelBase class for my own items but a class implementing the SenseListControl.ISenseListItem interface.
This works for me very well.

Now I chnaged my app mo more using more then one Form with iths own SenseListContol. I switched to use the SenseSlider.
This implies to have only obe form. Do be able to display different content on the SenseSlider panels
I clear the SenseListControl everytime a new panel is activated and fill the list control with the appropriate items.

What I figured out now, when adding items to the SenseListControl the first time,
the OnResize event is fired for every item inserted.
But after I do a clear on the list control and add the items again (the same ones or other ones) the OnResize event is no more fired.

Can that plz improved?

This can be controled two ways... set the myList.BeginUpdate()... and in the onresize, throw away the event if the ClientRectangle has not been set... aka = Rectangle.Empty

Rule of thumb... ANYTIME you modify a property that may invoke the rendering of the list control, wrap Begin and End Update around it... this WILL greatly inhance the perfomance! Especially when loading and unloading items!
 
Last edited:

The-Kevster

Senior Member
Nov 2, 2007
240
57
London, UK
I'm using SensePanelBase and it acts like a SensePanelMoreItem in that you can scroll to the right where there are no items. This is the same in the SensePanel sample. Anyway to stop it being able to slide to the right?

Thanks,
Kev
 

greenhacks

Senior Member
Dec 30, 2007
284
0
I'm using SensePanelBase and it acts like a SensePanelMoreItem in that you can scroll to the right where there are no items. This is the same in the SensePanel sample. Anyway to stop it being able to slide to the right?

Thanks,
Kev

Not sure about correct way, but i simply used to add a panelitem to show as a message as "No items exit, click back" so i can inform user about it rather than not able to click on it.

you can try to show a message on clickhandler possibly and then execute:
senselistcontrol.ShowParent(), so that it goes back to sensepanelmoreitem.

but as i said i am not sure about the exact way, never checked if there is any RemoveHandler for handling that in runtime.

if you find it do let us know too.
 

alto

Senior Member
May 16, 2006
65
3
SensePanelMoreItem MoreIImage Error

I used the SensePanelMoreItem MoreIImage to change the more item image, works great but:
On close the MoreItems screen and return to parent by calling: this.senseListCtrl.ShowParent()
I get this error:

A first chance exception of type 'System.Runtime.InteropServices.InvalidComObjectException' occurred in StedySoft.SenseSDK.dll
0x80131527
at Microsoft.Drawing.GraphicsExtension.DrawImageAlphaChannel(Graphics gx, IImage image, Rectangle dest)
at StedySoft.SenseSDK.DrawingCE.SenseAPIs.SenseImage.Panel.Draw.MoreImage(Graphics g, Rectangle r, Image imgMore, IImage iimgMore, Size sz)
at StedySoft.SenseSDK.SensePanelMoreItem.OnRender(Graphics g)
at StedySoft.SenseSDK.SenseListControl._renderGraphics()
at StedySoft.SenseSDK.SenseListControl._animateRight()
at StedySoft.SenseSDK.SenseListControl.ShowParent()
at testApp.testApp.miDone_Click(Object sender, EventArgs e)
at System.Windows.Forms.MenuItem.OnClick(EventArgs e)
at System.Windows.Forms.Menu.ProcessMnuProc(Control ctlThis, WM wm, Int32 w
 

elgarv

New member
Jul 13, 2006
1
0
OutOfMemoryException

Hi,

First, I want to say this is a very nice library, I wrote my first application with it in few hours.

But the problem is my application runs nicely on various 6.5 emulators but throws an OutOfMemoryException on my HTC Blackstone.

This happens in an More Item page with 2 combo boxes. When I select an item in the first combo it works but when I try to select an item in the second combo the exception is thrown. The exception is thrown by SenseListControl._createGraphicsObject().

What I'm missing ?

Thank you.
 

ricodomonkos

New member
Jul 1, 2010
3
1
COM Exception

Hey there eboelzner!

First of all, congratulations for this SDK, it's quite cool.
Thank you for contributing this.

I'm in the creation of my first app with it, but encountered a problem,
perhaps with the thumbnails. If I add thumbnails to the items, I got an

Unhandled COM exception

Code:
   at StedySoft.SenseSDK.SensePanelItem._getImageSize()
   at StedySoft.SenseSDK.SensePanelItem.OnRender(Graphics g)
   at StedySoft.SenseSDK.SenseListControl._renderGraphics()
   at StedySoft.SenseSDK.SenseListControl.OnPaint(PaintEventArgs e)
   at System.Windows.Forms.Control.WnProc(WM wm, Int32 wParam, Int32 lParam)
   at System.Windows.Forms.Control._InternalWnProc(WM wm, Int32 wParam, Int32 lParam)
   at Microsoft.AGL.Forms.EVL.EnterMainLoop(IntPtr hwnMain)
   at System.Windows.Forms.Application.Run(Form fm)
   at NewsPaperReporter.Program.Main()

Any ideas? If I remove the thumbnails, the problem is gone, but I want to use the thumbnails because it's much more impressive with them :)

I'm using the 1.39 version.

Another question. How can I apply the theme you posted?

Thanks in advance, regards,

Rico from Hungary.
 
  • Like
Reactions: jjhiza

meltwater

Inactive Recognized Developer
Jan 28, 2009
2,070
325
Hi can anyone answer this.

When I make a sensepanel item visible or hide it triggered by a check box, the screen isn't updated the 1st time but it's fine afterwards. I've tried:

//Handle enable Auto Update
if (checkAutoUpdate.Status == ItemStatus.On)
{
numericUpdateInterval.Visible = true;
}
else
{
numericUpdateInterval.Visible = false;
}

//Force re-draw of display
this.Invalidate();
this.Refresh();
this.Update();

But it still only updates when the panel is moved.

Answer is:
this.senseList.Invalidate();
 
Last edited:

KUV1977

Senior Member
Apr 27, 2010
50
0
The COM exception with IImages is a common problem. After long trying and searching i couldn't fix it and resorted to Standard Images. Instead of setting an IThumbnail you can set a regular Thumbnail. The transparency will be pretty bad but if you can adjust your images it can be ok. I have not yet had a single COM-exception in the normal images...
 

alto

Senior Member
May 16, 2006
65
3
The COM exception with IImages is a common problem. After long trying and searching i couldn't fix it and resorted to Standard Images. Instead of setting an IThumbnail you can set a regular Thumbnail. The transparency will be pretty bad but if you can adjust your images it can be ok. I have not yet had a single COM-exception in the normal images...
Thanks for the idea, can you post the code how to load Image instead of the IImage as it's in the sample program?
(sorry, my UI programing capabilities are very bad)
 

kliptik

Senior Member
Apr 22, 2009
268
18
Austin, TX
@eboelzner

I wanted to say another HUGE thanks for this awesome SDK!!! I was actually getting ready to start working on an app when I found this, so I've been using it for the past week or so. Very well put together!!! I will PM you a link to my app once I post it (probably next week) so you can show off some more of your awesome UI!!!

One small comment: An Image Box/Panel Item would be AWESOME!!! Something that has SizeMode available like the standard SM control. I tried using the the Thumbnail Image but resizing images at runtime on .NETCF is ridiculously complicated, and does not usually turn ou well...

Thanks again!!!

Kliptik
 

KUV1977

Senior Member
Apr 27, 2010
50
0
Thanks for the idea, can you post the code how to load Image instead of the IImage as it's in the sample program?
(sorry, my UI programing capabilities are very bad)

Instead of using
itm.IThumbnail = ...

you can just use
itm.Thumbnail = new Bitmap(PATH + IMAGE); //from file - from resource will also work
 

ricodomonkos

New member
Jul 1, 2010
3
1
I cannot achieve the same keyboard and SIP as it shown on the first post screenshots.
How can I do that?
And how can I change the theme?
Anyone?

Thanks!
 

ricodomonkos

New member
Jul 1, 2010
3
1
Thanks for the reply! And how can I automatically scroll the list to the active editbox so the keyboard not overlay the editbox? Now its a problem, when I click on an editbox to write it and the keyboard shows up, i can not see the editbox anymore.
Any idea?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 7
    Sorry for the delay getting this update to you guys... have been VERY busy, but here ya go... Version 1.5!!!

    Lot's of bug fixes, and some new features too!!

    In the ROM that I cook for the Imagio, I have replaced this version for RSS Tab, Facebook Tab, and Cookie Home Tab Editor... with no issues, actually fixes a bug in CHTEditor 2.0!!!!!

    Take care... Ed
    2
    i'm still having issue with my toolbox doesn't show up the controls when creating .net 3.5 project. how to solve this?

    The toolbox does not work with this SDK, it is a known problem. Once you've got through a few examples the toolbox isn't quite as important.
    1
    COM Exception

    Hey there eboelzner!

    First of all, congratulations for this SDK, it's quite cool.
    Thank you for contributing this.

    I'm in the creation of my first app with it, but encountered a problem,
    perhaps with the thumbnails. If I add thumbnails to the items, I got an

    Unhandled COM exception

    Code:
       at StedySoft.SenseSDK.SensePanelItem._getImageSize()
       at StedySoft.SenseSDK.SensePanelItem.OnRender(Graphics g)
       at StedySoft.SenseSDK.SenseListControl._renderGraphics()
       at StedySoft.SenseSDK.SenseListControl.OnPaint(PaintEventArgs e)
       at System.Windows.Forms.Control.WnProc(WM wm, Int32 wParam, Int32 lParam)
       at System.Windows.Forms.Control._InternalWnProc(WM wm, Int32 wParam, Int32 lParam)
       at Microsoft.AGL.Forms.EVL.EnterMainLoop(IntPtr hwnMain)
       at System.Windows.Forms.Application.Run(Form fm)
       at NewsPaperReporter.Program.Main()

    Any ideas? If I remove the thumbnails, the problem is gone, but I want to use the thumbnails because it's much more impressive with them :)

    I'm using the 1.39 version.

    Another question. How can I apply the theme you posted?

    Thanks in advance, regards,

    Rico from Hungary.
    1
    I fill a Panel with filenames and by clicking on a panel item I want to open the file, the problem is that I can't send any variables to the EventHandler function.

    Code:
    for (int i = 1; i <= 7; i++)
    {
                    MyPanelItem1 itm = new MyPanelItem1();
    
                    // base properties
                    itm.ButtonAnimation = true;
                    itm.Name = "PanelItem" + i.ToString("0#");
                    itm.ShowSeparator = true;
    
                    // MyPanelItem1 properties
                    switch (i) {
                        case 1:
                            itm.Thumbnail = iimg;
                            itm.PrimaryText = string.Format("Primary Text for '{0}'", itm.Name);
                            itm.SecondaryText = string.Format("This is the Secondary Text for '{0}'", itm.Name);
                            break;
    
                        ... etc.
                    }
                    itm.OnClick += new MyPanelItem1.ClickEventHandler(OnClickGeneric);
    
                    this.senseListCtrl.AddItem(itm);
    
    void OnClickGeneric(object sender)
    {
         // Here is my Code - I want to get the "on-clicked" Filename
    }

    if for example you put in PrimaryText the filename you can replace your function OnClickGeneric with this:

    Code:
    void OnClickGeneric(object Sender)
    {
    MyPanelItem1  itm = (Sender as MyPanelItem1 );
    // itm.PrimaryText <- This is your FileName.
    }
    1
    It's not possible my friend !
    This SDK is designed for c# with framework.Net 3.5 !