yashsingh1/xdaforums huggingface dataset:
[Windows Mobile Software Development] Nixeus:
Hello,

Here is my code

using System.Drawing;
using System.Windows.Forms;

namespace CrashOverHead_Center
{
partial class Form1
{
/// <summary>
/// Variable nécessaire au concepteur.
/// </summary>
private System.ComponentModel.IContainer components = null;
private System.Windows.Forms.MainMenu mainMenu1;

/// <summary>
/// Nettoyage des ressources utilisées.
/// </summary>
/// <param name="disposing">true si les ressources managées doivent être supprimées*; sinon, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}

#region Code généré par le Concepteur Windows Form

/// <summary>
/// Méthode requise pour la prise en charge du concepteur - ne modifiez pas
/// le contenu de cette méthode avec l'éditeur de code.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
this.mainMenu1 = new System.Windows.Forms.MainMenu();
this.Header1 = new SenseSDKExtended.SenseHeaderControlEx.HTCContactsStyle1();
this.SuspendLayout();
//
// Header1
//
this.Header1.Location = new System.Drawing.Point(0, 0);
this.Header1.Name = "Header1";
this.Header1.Size = new System.Drawing.Size(480, 66);
this.Header1.TabIndex = 3;
this.Header1.TextAlignment = System.Drawing.StringAlignment.Center;
this.Header1.TextFontSize = 14F;
this.Header1.Text = "CrashOverHead Center"; // This line is erased sometimes
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(192F, 192F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.AutoScroll = true;
this.ClientSize = new System.Drawing.Size(480, 748);
this.Controls.Add(this.Header1);
this.Location = new System.Drawing.Point(0, 0);
this.Menu = this.mainMenu1;
this.Name = "Form1";
this.Text = "Form1";
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
this.Load += new System.EventHandler(this.Form1_Load);
this.ResumeLayout(false);

}

#endregion

private System.Windows.Forms.PictureBox pictureBox1;
private SenseSDKExtended.SenseHeaderControlEx.HTCContactsStyle1 Header1;
}
}
[Windows Mobile Software Development] greenhacks:
I have not tested controls in this way.

Can you declare/instantiate the control in form load?

See the examples i have given.

Let me know if still that happens.

I use my controls in few of my own apps, and never saw this issue.
[Windows Mobile Software Development] Nixeus:
Another question :

How doing for that your controls appear with the "real design" on the form in Visual Studio ?

Thanks a lot,

Nixeus
[Windows Mobile Software Development] greenhacks:
Sorry, but i am not sure if i understood your question. Can you reframe it please?
[Windows Mobile Software Development] Nixeus:
On visual studio, i see this :

Uploaded with ImageShack.us

I would like to see the "real" SenseHeaderControlEx than the blue rectangle with the name of the control.
[Windows Mobile Software Development] greenhacks:
Ok now i see what you say.

Should be fixed in next release.

This happens because in load the headercontrol background image in runtime.

I have changed this behaviour on my local machine. and should work fine.

PS: you have a very nice HTC image in center of that screenshot with things around it. can you please send me that image. if you can attach here, would appreciate.

thanks.
[Windows Mobile Software Development] meltwater:
Once again another question! But I've tried to do it myself first.

The question is, how do I generate a Context menu which can also reference the sense list item it is pressed on. Currently, I can only refer to the last item which was pressed before the context menu (since I guess it overrides the focus before the sense list can get it).

I've also tried adding a context menu directly to the list item, however I don't know how to get the event to be passed down to the particular item, it just ignores it, I assume because the sense list is intercepting it or I'm not registering it correctly.

Thanks.
[Windows Mobile Software Development] mike3000c:
thanks for your great response!!

this dlls can working similar with original one.

some tiny bug need to point it out and let it so better.

all the text have "..." at the last even my source code haven't.

and even i press the control and don't release it. the control textcolor is black.(original control will highline is white textcolor)

AutoDialog and AutoDialogTitle i needed to my app. (multi-lang)

once this feature ready, my app can release as it is delay so long ago by 3 digi issue of original numberic control.

speak again thanks.
[Windows Mobile Software Development] Nixeus:
@Greenhacks, i have send you a pm with the pictures ;)
[Windows Mobile Software Development] greenhacks:
Sorry i guess i also have to ask you to provide a sample project like i ask from anyone who need help for any issues :),

It helps me to test your things quicker rather then me creating sample project in which i never find any issues.

I am so lost with this controls i dont get much time.

But i try my best to answer most of the post at earliest.

So if you can create a sample, i can look in to that directly and things get resolved quicker.
[Windows Mobile Software Development] greenhacks:
The reason you see ... is because if text is longer, i am taking care of it rather then wrapping on next line.

If your text is short this would not be problem.

If you put long text, then it will get cut at the end.

Not sure if right now i want to make multiline numbericcontrolex primary text even though i can, it is because of lack of time.

If you want i can possibly make a property which you can set to off to turn off this feature.

Let me know.

Rest 2 properties is few minute work for me, will update the dll in an hour or 2.

Text color issue i knew about it, but did not give much importance for now, but was in list to fix.

But will try to get it out as well.

Glad events is now working for you :)

EDIT:

Sorry i just saw your screenshot.

I will fix that. 3 dots issue.
[Windows Mobile Software Development] greenhacks:
Thanks for that picture, appreciated. i liked it.
[Windows Mobile Software Development] greenhacks:
Can you test the attached version now please.

fixed color on pressing down

fixed 3 ... issues

added autodialog

added autodialogtext

If possible test in landscape mode as well.

thanks. let me know.
[Windows Mobile Software Development] meltwater:
No problem, probably more my novice knowledge rather than anything else, will keep at it and if I get really stuck create a test project. Fairly sure it's a fundamental omission on my part.

UPDATE: Yep, my poor understanding of how it all works, for now I can use the sense list context menu if I provide a visual cue for which item is selected.

You've done a great job with the extended controls, working really well. Looking forward to the next release when you are able to make it, thank you for all the controls so far they excellent.
[Windows Mobile Software Development] TeDeV:
hi, just droping a quick question :)

can we have a top header bar, like the iPhone does? i am talking about the blue bar at the top with the 2 buttons left - right. i really like that gui

thanks
[Windows Mobile Software Development] greenhacks:
We can have that, but on pressing those buttons, what are you looking for to happen?
[Windows Mobile Software Development] TeDeV:
options that i will be able to set.

i want to be able to have some styles

1) button left, middle, right

2) button left, and text

3) button right, and text

the buttons will do what the coder wants, like go back to the parent senselist, or do an action. but i really want that blue color there (i love it :))

personally, i believe that if we combine iphone UI in apps, with htc Sense, we will have the best UI that can exist (die WM7!)
[Windows Mobile Software Development] mike3000c:
yes, this release dlls had been used and feature are work.

but the control active response don't agility by compare with original one.

such as i click three control ex and cross to click them and many times click the cancal button is no effect when the autodialog show.

thanks.
[Windows Mobile Software Development] greenhacks:
Buttons are sensitive while pressing. even if you move your finger by 1 pixel, it wont press.

I will try to modify that.
[Windows Mobile Software Development] greenhacks:
for @MichelDiamond.

file attached.
[Windows Mobile Software Development] leen15:
Hi greenhacks, i always have the problem that i told you the last time.. :(

"Impossible to load the type 'SenseSDKExtended.DrawingCEEx.SenseAPIsEx.SenseControlsManager' from the assembly 'SenseSDKExtended, Version=1.0.730.883, Culture=neutral, PublicKeyToken=null'. "

i think that the problem is the SenseControlManager, because if i browse the object, i see that doesn't match the level of the other elements, and doesn't have inside the HTCStyle1/2/3 proprieties..

you can see my screenshot.

PS: I cannot debug your c# project because visual studio start always the VB version. So are you sure that your c# version work?

The problem is that your project have inside references, the vb project and c# project all together.. did you try to create a simple project in c# with only the reference to your 3 dll:

- SenseSDKExtended.dll

- SenseSDKExtended.Resources.QVGA.dll

- SenseSDKExtended.Resources.VGA.dll

.. and see if the SensePanelItemEx work ? :confused:
[Windows Mobile Software Development] TeDeV:
sorry for asking again, but how can i find out what is the backcolor of the senselist?

i am trying to do this.

panel1.backcolor = senselist.backcolor

but it doesn't work
[Windows Mobile Software Development] greenhacks:
@Everyone

I am back.

Had to travel out of city for some unforeseen reasons and had no access to development machine.

Just returned this morning.

I will continue back again today, and update on the next build.

Sorry for delay in between.
[Windows Mobile Software Development] leen15:
welcome back my friend!

;)
[Windows Mobile Software Development] meltwater:
Welcome back. We've been having parties while you were gone, sorry about the broken window & no idea where that traffic cone has come from...
[Windows Mobile Software Development] greenhacks:
What does that mean? I did not understand on what broken window and traffic
[Windows Mobile Software Development] greenhacks:
All transparent png are always displayed transparent when used with IImage or in sense controls IIThumbnail
[Windows Mobile Software Development] greenhacks:
@MichelDiamond,

See your PM for flicker issue.
[Windows Mobile Software Development] meltwater:
sorry just a joke. :p

UPDATE:

Any news on your latest release, is it going ok?
[Windows Mobile Software Development] Nixeus:
Hello Greenhacks,

Have you some plans to release a new build ?

Have you plans to create a 'Slide' controle ? Like Slide to unlock,etc, with transparency and Sense' look ?

Thanks a lot :)

regards,

Nixeus
[Windows Mobile Software Development] leen15:
Hi, i use this and work fine for the about screen ;)

IImage iimg = SenseAPIs.SenseImage.LoadIImageFromFile(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase.Substring(0, System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase.LastIndexOf("\\")) + "\\Resources\\" + "LogoJack.png");

// get the size and readjust for VGA/QVGA
Size sz = SenseAPIs.SenseImage.GetIImageSize(iimg);
if (!Resolution.ScreenIsVGA) { sz.Width /= 2; sz.Height /= 2; }

// center the image in the top half of the screen and draw
int offsetX = (int)Math.Round((double)(((double)w / 2.0) - ((double)sz.Width / 2.0)));
int offsetY = (int)Math.Round((double)(((double)screenCenter / 2.0) - ((double)sz.Height / 2.0)));
g.DrawImageAlphaChannel(iimg, new Rectangle(offsetX, offsetY, sz.Width, sz.Height));
SenseAPIs.SenseImage.ReleaseIImage(iimg);
[Windows Mobile Software Development] Nixeus:
Hey,

Thanks a lot for your help ! It' ok with this :)

Now, i have create a new ressource file ( ressource.resx), and added my PNG files in.

I use this:

IImage iimg = SenseAPIs.SenseImage.GetIImageFromResource("Coh_center_logo");

Where Coh_center_logo is my ressource name

With this, it don't function, the same error message : "Error loading image resource ! [Null reference exception]"

Have you an idea,

Thanks a lot,

regards,

Nixeus
[Windows Mobile Software Development] leen15:
uhm.. but know you try load from internal resources? you have to embedded the file in the propriety! drag and drop your file in the resources folder of the project, and then in the propriety set 'embedded'. sorry but now i am not in front of the code, so i go by memory :P
[Windows Mobile Software Development] Nixeus:
I have always the same error :(

Here is my screen:

Thanks a lot,

regards,

Nixeus
[Windows Mobile Software Development] leen15:
@greenhacks: Some news for the next release? :confused:
[Windows Mobile Software Development] eplixo:
Bug on initial keypad click

Have only found this yesterday and spent all last evening reading through the thread. Before I mention the bug(s) I have to say this is a great piece of work.

The first bug (though I am not so worried about this) is I can't get the SDKSEnse items into the toolbox in VS2008. I can live with this and have no problem working in code from extracts from the demo. Yes went through the cmd exit/restart (including the PC) but only the extended items appear. They are in the collection but won't move to the toolbox... (Will get there at some point).

Okay the bug I am more interested in is when you have a Panel. Reproduce as follows:

Load a SenseSDK Textbox in a panel, compile and run. Everything works fine provided you click in the Textbox first. Up pops the keypad and you can edit, add, delete as you should be able to and thereafter the keypad pops up and down as necessary. So far so good......

The problem arises when you run the app and the first thing you do is click on the Keypad at the bottom of the screen to popup (before you click inside any textbox).

The result is that it gives a nullexception (see image) and the application freezes requiring to stop debugging. If anyone has come across this and or knows how to avoid it I would appreciate any comments on it.

The solution is that I need to initialize one of the textboxes as focused. Anyone got the obvious solution? I guess I have been looking at the code for so long the answer is there, but my brain hurts

Gerry

UPDATE: The solution was to initiate with the item focused as in this.senseListCtrl.FocusedItem = itm; before calling the sip_EnabledChanged function.
[Windows Mobile Software Development] TeDeV:
hey guys, anyone seen greenhacks? last activity was 22 August.
[Windows Mobile Software Development] Maverik82:
helllo,

i want create a transparent IImage for iThumbnailLeft .. how do you??

thank you
[Windows Mobile Software Development] leen15:
Thanks for your work, not good news that no auto-height in OnRender function, so i cannot autoheight when go in landscape? :(

ps: I'll try it your new version tonight! ;)
[Windows Mobile Software Development] greenhacks:
My version can auto height for portrait mode, only if you pass primary and secondary text in constructor like i gave example in post#2.

It is very easy to code support for landscape also by changing few cordinates and if conditions. Not sure as of now, but will soon add landscape support for all controls.

Test the last version i updated, and give feedback. thanks
[Windows Mobile Software Development] leen15:
Uhm.. something not working.. :confused:

The code that i use is:

string PrimaryText = Connection.SenderListMsg[ContactIndex].ElencoMessaggiJMS[i].sender + ":" +
"\r\n" + Connection.SenderListMsg[ContactIndex].ElencoMessaggiJMS[i].SMSText;

string Time = "Ieri, " + Connection.SenderListMsg[ContactIndex].ElencoMessaggiJMS[i].SMSTime.ToShortTimeString() ;

string SecondaryText = Time + " - " + Connection.SenderListMsg[ContactIndex].ElencoMessaggiJMS[i].Type.ToString();

itmMsg = new SensePanelItemEx( "itmMsg", PrimaryText, SecondaryText);
itmMsg.HeightAuto = true;

itmMsgHeight = itmMsgHeight + itmMsg.Height;
itmMsg.ButtonAnimation = false;

itmMsg.Thumbnail = _getBitmapFromResource(this._isVGA() ? "vga_NewSMS" : "qvga_NewSMS");
senseList.AddItem(itmMsg);

ps: How can i set the position of thumbnail?
[Windows Mobile Software Development] leen15:
I attach the C# version of sensePanelItemEx v.0.3 ;)
[Windows Mobile Software Development] greenhacks:
Position property is being worked on.

In screenshot what happened to text? is it not wrapping to next lines?

Also what is behind the text overlaying, have you added more text line or something?
[Windows Mobile Software Development] greenhacks:
Does this mean, you have no open issue with this control? other then thumbnail position which is top as of now.

thanks.
[Windows Mobile Software Development] leen15:
The Primary Text don''t wrap in next line, and the secondary text don't go below the primary text, but go underneath of it!

No modify at your version.. the code is what you see. :)
[Windows Mobile Software Development] leen15:
Some modify at the reference for c# compatibility, no code modify. ;)

Thumbnail work great at top! :)

My only problem is what you see in the previous screenshot ;)
[Windows Mobile Software Development] greenhacks:
Never thought anyone would need to wrap primary text, but now i will work on it to wrap with autoheight.

I am not sure if i understand the issue with secondary text you mentioned above.

If you can explain in details, i can get that resolved.
[Windows Mobile Software Development] leen15:
The problem seem to be that the rectangole of the Secondary Text don't start at the end of the rectangole of the Primary Text but start at the top of the panel..

So the Secondary text go on the Primary text and not under it...

For understand try to compare the screenshot :

Normal SensePanelItem with manually height: http://xdaforums.com/showpost.php?p=7129686&postcount=14

Your SensePanelItemEx with automatic wrap: http://xdaforums.com/showpost.php?p=7132712&postcount=23
[Windows Mobile Software Development] greenhacks:
So basically, you have long Primary text, which goes to second line. But that second line is place where secondary text starts, and thats how they overlap.

If the control had proper wrapping and auto height on primary text, then secondary text would automatically start from below primary text and would not overlap.

Am i correct?

I will get the code updated and fix the issue.

Thanks for actively using the control and testing it. i will try my best to keep you happy and stay with you till control is completed with all great features. :)
[Windows Mobile Software Development] greenhacks:
@leen15

What is the resolution of your phone you have?

As you know currently sensesdk supports vga with 480 width and qvga with 240 width.
[Windows Mobile Software Development] leen15:
I test senseSDK with vga emulator and on my hd2 (bigger resolution) ;)

The app had to work with all resolution.. ;)

See my PM! :)

For the previous post, Yeah you're correct. you can compare the screenshot in my last post, it is what i hope to have. :p
[Windows Mobile Software Development] greenhacks:
Ok let me get few things fixed in code for autoheight.

will post once it is fixed.

ps: i replied to your pm.
[Windows Mobile Software Development] mike3000c:
SensePanelNumericItemEx 0.1 C# version

I had been convert into c# of SensePanelNumericItemEx item.

And simply to retest on my HD2 and show the result as ok.

please see the top of screenshot and source code. have fun!
[Windows Mobile Software Development] greenhacks:
Thanks for feedback and screenshot and conversion.

Not sure if you already noticed, the numbers needs to be drawn a little down by maybe 2 pixels if you closely look.

Will be enhanced and fixed in next version.

thanks.
[Windows Mobile Software Development] mike3000c:
maybe sure. and i found some strange of it.

when i click the item and missing the original event properties of "AutoShowDialog" and "AutoShowDialogText", it will pop up a window for you change the number instead of click the small icon only.

and about click the small icon, even i click up and the number can down only.

Can i missing some setting or is it not integrate feature on 0.1?
[Windows Mobile Software Development] greenhacks:
AutoShowDialog" and "AutoShowDialogText must be missing, never was aware about it, will check it out and try to get it developed too in next release.

I will also check about the clicking up and number going down.

thanks for feedback.
[Windows Mobile Software Development] greenhacks:
New version of SensePanelItemEx v0.4 has posted.

v0.4

[Fixes] Rewrite of entire drawing calculations

[Added] Portrait and Landscape support

[Added] Auto Height support for primary text

[Added] Line height property for primary/secondary text

[Added] Text alignment property for primary/secondary text

[Added] Font Name/Size property

[Added] Hidden Field property to store anything in it

[Modified] Updated Resources folder and all images in it
[Windows Mobile Software Development] leen15:
Hi, what is mean for?

bool allowSelectionWithCheckBox, [System.Runtime.InteropServices.OptionalAttribute, System.Runtime.InteropServices.DefaultParameterValueAttribute(false)] // ERROR: Optional parameters aren't supported in C#

Sorry, it's a comment by the converter.

No optional parameter in c# ;)
[Windows Mobile Software Development] greenhacks:
Is it resolved?

You can safely make it as a normal parameter, and in code it is already forced to be as False by default so no worries.

Do give feedback on this version, lot of efforts are put to make it proper.
[Windows Mobile Software Development] leen15:
I've some problem with this version...no Primary text or Secondary text appear with this code:

SensePanelItemEx BoldItem = new SensePanelItemEx("BoldItem", "Test Bold Item Primary Text", 0, true, "Helvetica Neue OTS", 9f, FontStyle.Bold, "Test Bold Item Secondary Text", 0, true, "Helvetica Neue OTS", 7f, FontStyle.Bold, false, true);

One thing, i cannot set an int to "null", only to 0.
[Windows Mobile Software Development] greenhacks:
Setting LineHeight will create problem.

You will have to make a small modification in code.

search for a place in code:

If primaryTextLineHeight = Nothing Then

Replace that with:

If primaryTextLineHeight = 0 Then

Same for secondaryTextLineHeight, search for:

If secondaryTextLineHeight = Nothing Then

Replace that with:

If secondaryTextLineHeight = 0 Then

Now pass as 0 in parameter like you already did, and should work.

Let me know if that solves the issue.
[Windows Mobile Software Development] leen15:
Ok resolved modify your internal control:

//If primaryTextLineHeight is nothing, then it means we have to Auto calculate Height

if (primaryTextLineHeight == null )

to:

//If primaryTextLineHeight is nothing, then it means we have to Auto calculate Height

if (primaryTextLineHeight == null | primaryTextLineHeight == 0 )

So the problem now is that the autoheight is not working so good..
[Windows Mobile Software Development] greenhacks:
i allowed to put line height, if someone wants to manage line height as static, so for e.g. lineheight set to 10, will make the primarytext rectangle height as 10, and same for secondarytext.

So if you set that value to 0 or nothing or null, then that property will be overridden by Autoheight property, and height will be managed automatically.
[Windows Mobile Software Development] leen15:
Yes, now i set to manage the height automatically, but the problem seem to be that every line that insert the height is set for + 2 line..

With a one line for primary text, all work good, for 2 line, it add a line-height, and so on.

See the screenshot.
[Windows Mobile Software Development] greenhacks:
Can you paste that exact code which you use for the control, including primary and secondary text which i see in screenshot.

What is happening, that you are breaking primary line in to two, which makes the measure string go crazy.
[Windows Mobile Software Development] greenhacks:
Looks like you need 3rd line, so you can display all the information without breaking Primarytext on another line.

What do you think?