yashsingh1/xdaforums huggingface dataset:
[Windows Mobile Software Development] michyprima:
public class TestItem : MichyPrima.ManilaDotNetSDK.KListControl.IKListItem
{
Rectangle _Bounds=Rectangle.Empty;
public Rectangle Bounds
{
get
{
return _Bounds;
}
set
{
_Bounds = value;
}
}
int _h;
public int Height
{
get
{
return _h;
}
set
{
_h = value;
}
}

public void OnMouseDown(int X, int Y, ref bool DoScroll)
{
DoScroll = true;
}

public void OnMouseUp(int X, int Y, bool IsSamePoint)
{

}
MichyPrima.ManilaDotNetSDK.KListControl par;
public MichyPrima.ManilaDotNetSDK.KListControl Parent
{
get
{
return par;
}
set
{
par = value;
}
}

public void Render(Graphics g, Rectangle bounds, bool param1)
{
g.DrawEllipse(new Pen(Color.Black), new Rectangle(bounds.X + 10, bounds.Y + 10, bounds.Width - 20, bounds.Height - 20));
}
int y;
public int YIndex
{
get
{
return y;
}
set
{
y = value;
}
}

This is a testitem for ManilaDotNetSDK ver2.1. Since 2.1 is not yet released you should anyway adapt that to ver2.0 ;)
[Windows Mobile Software Development] btxakita:
Wow.that's cool

but when will u realese ver 2.1?
[Windows Mobile Software Development] TeDeV:
2.1 is coming with manilla tabs?
[Windows Mobile Software Development] btxakita:
maybe not

I hope it can fix issues found in ver 2.0
[Windows Mobile Software Development] mike2nl:
Looks great for me. I will do my test and then look further..thanks for sharing
[Windows Mobile Software Development] jmz:
So is there a way to emulate the settings tab with this. i.e. the buttons for like communications, sound, arrange tabs and so forth?
[Windows Mobile Software Development] TeDeV:
give us the 2.1 !! :)
[Windows Mobile Software Development] gingercat:
Nice work on the library! I would however question the origins of the KListControl? It seems to bear (interface wise) a lot in common with the scrolling list started by DOSFan and then converted into a user control by myself, as referred to in this thread:

http://xdaforums.com/showthread.php?t=333124

If not based on this, apologies, and I guess great minds just think alike, but if it is based on that work, an acknowledgement would be appreciated, especially if you are potentially generating money from this library.
[Windows Mobile Software Development] dobb:
Thank you very much!!!
[Windows Mobile Software Development] michyprima:
Hi gingercat,

It is partially based on your/DOSFan work. But I'm progressively replacing lot of code that used to be useless/buggy somewhere specially on scrolling and drawing. Plus I enhanced the interface and the items have not fixed height anymore; Items have Subs OnMouseDown and OnMouseUp; Only mode available now is vertical; etc etc...Basically of your work is there just your scrolling engine...

So of your/DOSFan work is there just a little part. I forgot to mention this, but i will. Btw I've not got any money (and it's free anyway).

anyway i've added a reference on first post. My apologies.
[Windows Mobile Software Development] michyprima:
you are welcome!
[Windows Mobile Software Development] michyprima:
v2.1 online!
[Windows Mobile Software Development] -=(Kad)=-:
Can you post a Visual C# test project?
[Windows Mobile Software Development] PeRKoniX:
Mirror

Nice library. I just tried to download v2.1 but rapidshare does not allow me to download the file "because there are no more slots available" It is possible for you to put them on an extra mirror?
[Windows Mobile Software Development] hobbbbit:
Thanks for a great library, just downloaded and tried it. All controls seems to be working great. Some graphics (like switch) seems a bit low quality, but that's not a huge issue anyways.

However, I couldn't get KListControl to work:-( Created a new class that implements IKListItem and inherits from the UserControl, added ManilaHeader to it and docked it, implemented all of the interface properties, created 50 instances of the control and added it to the KListControl (setting bounds, parent and YIndex first) and I get nothing.. Render method inside my test control doesn't even get called for some reason.. Not sure what am I doing wrong.

Btw, just a question, have you ever considered doing this library as an open source? I'm sure there's a lot of developers here who would love to help out (including myself). More people can polish those controls and make them truly useful.

And a few suggestions/questions:

Why did you do AddItem to KListItem? Just override Controls collection and lock it down to IKListItem interface. Why did you do YIndex? Since you have AddItems, you know the order items were inserted into the collection, should be able to get the index from there. Bounds? Ok, I can see the need for setting up height of the item, but x and y should be calculated by the KListControl control automatically. Would be nice to be able to lock the width of the item to the width of the KListControl itself. Same goes for the parent property. Why set it, if you add it to internal collection anyways? Don't you already know the parent of the control at that point?

Please don't take any of those as a complaint! I'm grateful for a cool tool, just had some questions.

P.S. Nevermind, I just disassabled KListControl (just to try to figure out why it's not working for me), and I see some of the answers to my questions, like Bounds and Parent are already set when you do AddItem. You should probably remove them from the interface implementation then.
[Windows Mobile Software Development] TeDeV:
michy, i would be thankful if you could try your own creations before you release them.

i haven't tried the list yet, but.....

1) you created a new control named ManillaNewTextBox, when you already had and have, an existing one (propably with the old problems) named ManillaTextBox. Just remove it man.

Textbox, cannot change it's height.

2) The ManillaHeader doesn't have a Text property at the right. You have to change it from inside the code...

3) The trackbar has the pink transparent color around it.

4) Please make the controls visible in the design time so we can actually see how our form looks like. You had that in ur first version.

5) i agree with the open source thing, so people can help u finish this thing, including myself. but this is totally your decision.
[Windows Mobile Software Development] 50chickens:
agreed on three things... open source, design time support and a c# sample project :)

but, great idea.. it's a shame that .netcf is limited (ie no datagridview) so this will help heaps with UI design.

edit: actually.. i converted the vb.net sample over to C#..

if you have some references missing you need to remove them from the project and readd them. i have included system.sr.dll since .netcf has a problem with exceptions unless you add this dll as a reference into your project.

the output folder for this project is \storage card\ManillaSdk_sample. That means if you are using the emulator in VS then you need to set it up in the emulator options and it will actually point back to a local drive. if you are deploying this app to your htc then obviously it will go to the real microsd. i do this as i flash my htc every few days with a new rom :)
[Windows Mobile Software Development] dairyface:
Got something working my end, and so far im pretty impressed. Noticed a problem with Klistcontrol1.Count, if there are no items this throws an exception rather than just returning 0.

But im liking it!
[Windows Mobile Software Development] TeDeV:
found another problem. if u try to place the checkbox on top of a picture, it always goes behind.....

so u can't see it. i tried bringtofront, etc. didn't work.
[Windows Mobile Software Development] francarl:
problem

Hi Michele

I've a problem using your SDK:

this instruction (2nd)

ManilaPanelCheckBoxItem manilaPanelCheckBoxSIPMenuItem = new ManilaPanelCheckBoxItem();

manilaPanelCheckBoxSIPMenuItem.Checked = true;

always gets runtime error: NullReferenceException. Can you provide a solution or a workaround, please? How can I set ManilaPanelCheckBoxItem initial status?

Regards

Francesco
[Windows Mobile Software Development] dairyface:
Some other bugs/observations:

If you have multiline .MainText on a KListPanelItem, it overlaps with the .SecondaryText

Would be nice to have wordwrap on the KListPanelItem
[Windows Mobile Software Development] 50chickens:
i think sometimes you need to add those objects which implement IKListItem to the klistcontrol object first before you can update the properties. And be sure to set the YIndex property. eg -

ManilaPanelCheckBoxItem manilaPanelCheckBoxSIPMenuItem = new ManilaPanelCheckBoxItem();

KListControl1.AddItem(manilaPanelCheckBoxSIPMenuItem);

manilaPanelCheckBoxSIPMenuItem.YIndex =0;

manilaPanelCheckBoxSIPMenuItem.Checked = true;

i found the order of things sometimes matters.
[Windows Mobile Software Development] francarl:
thank you for your suggestion! I've discovered that order really matters. I've just assigned checked property after adding item to klistcontrol and now all works good. Thanks again!

regards

Francesco
[Windows Mobile Software Development] dairyface:
Another problem, the ManilaPanelSeperator sits on top of other Panel items when added at runtime.

Ive got this working now, seems my YIndex's were a little out causing some odd problems.
[Windows Mobile Software Development] 50chickens:
you guys, if you make some custom classes you should paste the source here. im planning to make an item similar to the checkbox class, but you can display one of a number of images based on a value.
[Windows Mobile Software Development] michyprima:
Hi Francesco, thank you for your notice. I was calling Parent.Invalidate(IKListItem Item) even if Parent was null. Fixed :)
[Windows Mobile Software Development] dairyface:
Small observation with the manilapanelitem. The border is not quite right when compared to HTC's manila. In HTCs you will see it is slightly dashed (there are small gaps in the line). However on your control its a straight line.

Very small detail, but its that that makes it even nicer :D

Looking forward to the next release Michele.
[Windows Mobile Software Development] francarl:
thank you for hard work.

Three further notices on ManilaPanelItem and its derived classes:

1) when SecondaryText is empty, MainText should be rendered centered.

2) when Image is empty, MainText (and SecondaryText) should start from left border.

3) Enabled property set to false should render whole grayed control (not simple only not clickable).

Regards

Francesco
[Windows Mobile Software Development] dairyface:
Further point, that I dont think anyone has brought up is Image transparency. When assigning a png with alpha channel to a PanelItem, the transparent part shows as white.

It doesn't seem to work with any image format. Can you have a look at this Michele?

Finally, can I suggest a "feature"? Would be nice to have .Tag on the Panelitems so we can assign a val to use later on with the onclick event.
[Windows Mobile Software Development] dairyface:
Sorry, I dont mean to keep spotting things! I really appreciate your work! ;)

It would be nice if there was an AutoGrow flag for panelitems, so if lots of text was inputted the box would automatically grow, rather than me having to calculate the anticipated height of a Panelitem based upon its Text.Length.

Thanks!

EDIT: I have found a further bug, if you try to write to the .buttontext property of a ManilaPanelButtonItem, it will give you a nullreferenceexception, UNLESS it has been added to a KListControl first

EDIT 2: Last thing I promise. Are you able to change the width of a button. Ive tried changing ButtonItem.ButtonSize.Width but it won't allow me
[Windows Mobile Software Development] dairyface:
Hi Michele, not sure where you've gone, but I have noticed that the text quality when in landscape mode is not very good. Not sure whats happened there, but you might want to check it out. Im testing on a Blackstone.
[Windows Mobile Software Development] michyprima:
@All when you see an issue could you please post a screenshot?

That helps me more than explaining the issue by words...thank you!
[Windows Mobile Software Development] Warmax88:
edit: problem fixed :p
[Windows Mobile Software Development] michyprima:
ops... wrong topic :D
[Windows Mobile Software Development] mushipkw:
Just subscribing to keep a watch on this one.
[Windows Mobile Software Development] mistm:
checkbox method

I am using dynamically created manila checkboxes. Lets say i put 5 checkboxes in the Form

I assign handler for those checkboxes like this:

MichyPrima.ManilaDotNetSDK.ManilaCheckBox c = new MichyPrima.ManilaDotNetSDK.ManilaCheckBox();
c.CheckStateChanged += manilaCheckBox1_CheckStateChanged;

private void manilaCheckBox1_CheckStateChanged(bool Checked)
{
// todo
}

But how do I know which checkbox was clicked? The sender object is missing in arguments. In case of classic checkbox I can do just (CheckBox)sender and i know which checkbox sent the message.
[Windows Mobile Software Development] mistm:
I solved the problem by putting those checkbox in panels and storing some kind of id of the checkbox in .Tag property of the panel.
[Windows Mobile Software Development] mistm:
Here is my application:

http://xdaforums.com/showthread.php?t=591794
[Windows Mobile Software Development] ebernazz2:
I think Version 2.1 has come a long way from when I tried the first version.

Keep up the good work.

For me the #1 thing to fix is your concept of adding new controls into the KListControl.

I can get it to work fine if I am drawing the control from scratch in the Render routine. However if I inherit an existing control (Your TrackBar for example.). It never gets drawn and the functionality of that control is lost. Someone else posted that the Render event does not fire but for me it does and if I just draw a rectangle is displays fine. I thought the real purpose of the ListItem was to add existing controls as long as they had the required properties.

Eric
[Windows Mobile Software Development] astart_start:
Where should i put the file if i would like to use manila SDK?
[Windows Mobile Software Development] mistm:
I did copy paste the dll.
[Windows Mobile Software Development] ebernazz2:
Not sure what you are asking but it does not matter where you put the file. I would then add the dll to your toolbox. In VS open a form so you can see the toolbox. Right click and do ADD TAB. Give it a name (MY TOOLS?). Then right click in there and select CHOOSE ITEMS. Wait for VS to search its assemblies and then select BROWSE. Browse to the dll (where ever you put it) and you will see the controls to drag onto your form or declare them at runtime (I prefer this especially for KListControl which supports kinetic scrolling).

Eric
[Windows Mobile Software Development] Eraser85:
on/off button display some compression artifacts.. why don't you use PNG images instead?
[Windows Mobile Software Development] AgentBignose:
If I follow your advice: Add a Tab to Toolbox- rightklick- add items- browse ManilaDotNetSDK.dl l- check all manila controlitems - klick ok

My created tab is still empty saying "In this Group are no usable Controlitems. Drog -Items on this Text to add them to the toolbox."

Can Anybody help me?
[Windows Mobile Software Development] {SBR}_L3GION:
I do the method above for putting the controls in VS and when i drag them on my form they just show up saying something with micheyprima in a box
[Windows Mobile Software Development] ebernazz2:
Yes the controls in this dll are not enabled for IDE representation during form design. I am not sure why the author did that.

AgentBignose. I can oly assume that the new tab was not the slected active tab when you added them. Could you check the other tabs to see if you have the conttrols there. Also what version of VS are you using?

Eric
[Windows Mobile Software Development] astart_start:
One more question. Can i use Visual C# Express to create software to use in WINMO?I doubt if WINMO 6.0 SDK can be installed without VS 2005.
[Windows Mobile Software Development] AgentBignose:
I did check all the others tabs. But I will try again. Maybe a reboot helps. My Version is a Student Version of Visual Studio 2008 Professional Edition.

As far as I know .net compact development isn't possiple in the light Versions.

It want work!!! I am getting crazy! Does somebody have a Tipp for me?

At the Moment I'm using the Test project where the Controls are correctly in the Toolbox and edit the Projekt with my Code.
[Windows Mobile Software Development] ebernazz2:
Sure. Lets start from the beginning and see where you are going off track. First what VS version and what language are you comfortable in? VB, C#? Then forget the sample project I want you to create a new project and make sure you select a smartdevice app as the template. At that point stop and post what is in your toolbox.

Eric
[Windows Mobile Software Development] AgentBignose:
Thanks for your help!

I use a German Visual Stuido 2008 Professionell Edition.

My favorite programming language is VB.net.

Ok I will now do the following:

-Close all running Instances of Visual Studio

-Start Visual Studio from Start-> All Programms

-File->New Project->Visual Basic->Smart Device->Project for Smart Device

-In drop down on the upper right I select .NET Framework 2.0

-As Name I choose ManilaApp

-I click OK

-In new Wizard Window I click Windows Mobile 6 Professionell SDK and again .NET Framework 2.0

-I choose Device Application and click OK again

And now my Toolbox contains NO WAY WTF Manila is there!!!

I will test that. I did the exact same thing a hundred times, I tought!

Sorry for wasting your time with this stupid problem.

And another Question:

Is there a way to enable Multiline in ManilaTextbox in the current SDK Version?
[Windows Mobile Software Development] nathanpc:
That's a very good library!

Thanks. :)
[Windows Mobile Software Development] AgentBignose:
First of all a big thanks again to michiprima of course, but also to ebernazz2 for helping me with my very stupid mistake.

I am currently working aon a programm that uses the manila sdk.

It plays an alert and a vibrate if there are missed sms,mms,emails or calls.

U can see a Screenshot in the Attachment.

@michiprima and all others who know:

How did you manage in your Test Project to make the KListControl both DockStyle Fit to screen, but also beginning under the Header? I only manage one of the two.

And is it possible to cache a klick event for the OnOffSwitches?

By the way I mentioned your work a lot.
[Windows Mobile Software Development] ebernazz2:
If I understand what you are asking....

1) You add the header and set its dock property to TOP (i recommend doing this in code rather that design time). Then you add the KlistControl and set its dock to TOP and you are good to go. That also help as the manilla sdk tries to figure out the screen resolution.

2) I am guessing you meant catch a click event not cache. If catch you declare your manilapanelitem "with events". Then you can use the handles object.click where object is the name of the panel item you declared.

If you get stuck I will gladly post some vb code.

Eric
[Windows Mobile Software Development] AgentBignose:
After removing and readdding both controls in the korrect order, now it works.

You mean the KlistItem is able to set its height automaticly to fill the screen?

That does not work for me. I have to set the Height wich means the Programm is WVGA kompatibel or VGA not both. What am I doing wrong?

Yes I did, I typed wrong. Sorry for my english.

I tried:

Dim WithEvents MoosStatus As New ManilaDotNetSDK.ManilaPanelOnOffItem
Private Sub MoosStatus_Click(ByVal sender As System.Object, ByVal e As
_ System.EventArgs) Handles MoosStatus.Click
MsgBox("Do sth.")
End Sub

But then I get "The Click Event was not found" Error.

I would be thankfull for a code snipplet.

Is there any Chance to add a ManilaPrograssbar or ManilaNewTextbox to the KlistItem?

I didnt manage it because they are now PanelItems.

@MichiPrima:

Please add ManilaProgressbarPanelItem, ManilaRadioButtonPanelItem and ManilaTextboxPanelItem !!! Your SDK is a Milestone in WinMo Application Development!

And please make the Textbox Multilinecompatible.

Thanks for helping me!!
[Windows Mobile Software Development] ebernazz2:
Here you go.

Couple of notes. If you want the Klist control to fill your screen then dock it as FILL.

Once you declare your item with events thenif you want to see what events the author exposed for you then type in the objectname and when you hit the period you will see the popup window showing what events are avaialable. In th example you should see onclick and statuschanged.

Yes you are correct that there are several other panel item that are necessary for this to be complete. If you want you can create your own. I would love to but right now much to busy in work.

Eric

Imports System
Imports MichyPrima

Public Class Sound

Dim WithEvents Silentitem As New ManilaDotNetSDK.ManilaPanelCheckBoxItem

Public Sub Silentitem_click(ByVal sender As Object) Handles Silentitem.OnClick
Silentitem.Checked = Not Silentitem.Checked
End Sub

Public Sub silentitem_changed(ByVal sender As Object, ByVal checked As Boolean) Handles Silentitem.StatusChanged
If checked Then
Vibeitem.Checked = False
Normalitem.Checked = False
SetVol(3)
Else
If Vibeitem.Checked = False And Normalitem.Checked = False Then
Silentitem.Checked = True
End If
End If
End Sub

Private Sub Sound_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Dim x As New ManilaDotNetSDK.ManilaPanelSeparatorItem
x.Text = "Profile"
x.YIndex = 0
KListControl1.AddItem(x)

Silentitem.MainText = "Silent"
Silentitem.Image = ImageList1.Images.Item(0)
Silentitem.SecondaryText = ""
Silentitem.YIndex = 1
Silentitem.Height = 60
KListControl1.AddItem(Silentitem)

End Sub

End Class
[Windows Mobile Software Development] vicbush:
Would someone please upload the SDK to another mirror? Rapidshare won't let me download it.

Thanks!
[Windows Mobile Software Development] AgentBignose:
michi doesn't wont to and he deserves the credits.
[Windows Mobile Software Development] AgentBignose:
Ok everything you wrote worked well.

But in StatusChanged Function "ByVal checked As Boolean" musnt be a parameter.

It only works with:

Dim WithEvents MoosStatus As New ManilaDotNetSDK.ManilaPanelOnOffItem

Public Sub MoosStatus_changed(ByVal sender As Object) Handles MoosStatus.StatusChanged

End Sub

Otherwise you get:

Error The Public Sub MoosStatus_changed(sender As Object, checked As Boolean)-Method can not handle Public Event StatusChanged(Status As MichyPrima.ManilaDotNetSDK.ManilaOnOffSwitch.Status)- because Ginatures are Different.	C:\Users\Stefan\Documents\Visual Studio 2008\Projects\SellSoft\ManilaReminder\ManilaReminder\ManilaReminder.vb	121	104	ManilaReminder

Maybe its offtopic here, but you seem to be the one how could know:

I want to hide a form wich works well with "Me.Hide()" in MyBase.Activated or FormLoad.

But even if the Form is hiden, the Title remains in Taskbar until the user clicks the close X, then its completly hidden.

Is there a way to hide it also in titlebar?
[Windows Mobile Software Development] mistm:
maybe to minimalize it?
[Windows Mobile Software Development] ebernazz2:
Glad the sample code is workig for you.

The reason why my parameters are different is because I was demonstarting a CheckBoxItem and you are using an OnOffItem which has different paramaters.

As for your titlebar mistm set you on the right path. If you set your form's minimizebox to true closing the app really only minimizes it and the titlebar is cleared of your app. If set to false then the close method will termiate the program from memory and perform GC.

Now you probably could set the minimizebox to false and have a button or menu item that calls the minimize API in coredll and have both in an app.

Good Luck.

Eric
[Windows Mobile Software Development] vicbush:
Never mind, after many tries I finally got it to go through.
[Windows Mobile Software Development] grf110:
very thx.:)