My complements to the chef cardefbel for cooking up such a wonderful meal =)
The only problem I found with undertaking this modification successfully was the variations in PointsenseWidgetsContainer.cs files. My widgetscontainer file came from the original PointSense 2.0.1.1 beta4 replacement of the OEM PointUI Home2 directory. But of course over time I had added updated my widgetscontainer file to contain such things as PointSenseBatteryWidgets, PointSensePhotoWidget plus probably others. Then running on a HTC Touch Diamond I was running out of space on windows mobile main storage MyDevice partition and so had deleted the AppletRibbon directory to save space because PointSense did not support Applets. So this is how I got mine to work beautifully.
STAGE ONE... backing up my current PointSense configuration.
1. Exit out of PointSense-PointUI.
2. In FileExplorer copy your current Home2 directory containing your PointSense from MyDevice\ProgramFiles\Home2 to a temporary location on InternalStorage ; for example InternalStorage\Tmp. Noting that it will take some time to copy the entire Home2 folder tree.
3. From Start menu go to Settings\System and run RemovePrograms.
4. Uninstall Pointui Home 2.
5. In FileExplorer go to MyDevice\ProgramFiles and delete the entire Home2 directory.
6. Reinstall a fresh clean version of Pointui Home 2 ... dont worry your activation key is stored away in Windows Mobile registry.
7. Start the freshly installed Pointui Home 2 and try some of the OEM applets that were install during the fresh installation. You probably dont want all of these applets but it is good to get reacquainted with how applets actually work because I actually forgot how to add and remove them from the main screen. Remember the names of the few OEM applets that you want to keep, for example Today and World, the others like message and slide have PointSense ones so I ignore them.
8. Stop the freshly installed Pointui Home 2 from running... that is Start menu go to Settings\Today\Items and untick Pointui Home 2.
9. In FileExplorer go to MyDevice\ProgramFiles\Home2 and copy the entire AppletRibbon folder to another different temporary location on InternalStorage, for example to InternalStorage\Stuff.
10. Go to the location on InternalStorage\Stuff where you copied the AppletRibbon folder and make sure you KEEP the following files Applets.xml and Applets.xml.bak plus KEEP the few OEM applets that you want to keep for example Today and World. Delete those other OEM Applets that you don't want to use with PointSense for example message and slides.
11. Go to the temporary location on InternalStorage\Tmp where you copied your PointSense Home2, and see if there is already exists a AppletRibbon folder. If there is such a folder already there then see if there are any applets there that you also wish to keep. If there is then copy these to-be-saved non-OEM applets individual folder to the other temporary stuff location AppletRibbon folder. Then delete the PointSense Home2 AppletRibbon folder entirely from the InternalStorage\Tmp.
12. Go to the InternalStorage\Stuff other temporary locations AppletRibbon folder and copy the entire AppletRibbon folder which also now has your to-be-saved non-OEM applets individual folder and what OEM applets you decided to keep. Copy this AppletRibbon folder and paste it into the temporary location on InternalStorage\Tmp where you copied your PointSense Home2 ie Tmp\Home2\AppletRibbon.
Gee are you still with me ... OKAY GO HAVE A CUP-A-TEA OR MAYBE A SMOKE IF YOU GOT ONE or even better go take the rubbish out before you know who yells at you ... BRB.
STAGE TWO... modifying the PointSenseWidgetsContainer.cs and ScreenHome.cs files.
For comparing your PointSenseWidgetsContainer.cs files and your ScreenHome.cs with the download recommended changes files that have been provided by cardefbel. I found the best way to do this is actually in the PC world.
There is a nice file merging tool available free from WinMerge website which you can use to compare these files to be modified. WinMerge highlights in yellow-gold the differences and gray the text missing.
WARNING with the WinMerge program, you DO NOT want to do a MERGE ALL, instead only want to visually compare and then manually copy and paste what you want.
1. Connect your phone to your PC as though it was a USB drive. We will be working on the PC for a while now.
2. On the PC in file explorer go to the phone as a USB drive; i.e. drive F: and go to the temporary location where in STAGE ONE you copied your PointSense Home2 folder; e.g. F:\Tmp\Home2.
3. Go to the Common and copy-n-paste the file PointSenseWidgetsContainer.cs so it is saved as either ... Copy of PointSenseWidgetsContainer.cs ... or ... PointSenseWidgetsContainer - Copy.cs ... depending on the PC operating system. Rename the backup file to PointSenseWidgetsContainer_org.cs ...
4. Go to the Common and copy-n-paste the file ScreenHome.cs so it is saved as either ... Copy of ScreenHome.cs ... or ... ScreenHome - Copy.cs ... depending on the PC operating system. Rename the backup file to ScreenHome_org.cs ...
5. Download the latest modification files from cardefbel for example modifications
6. With WinMerge compare the cardefbel modified PointSenseWidgetsContainer.cs with your own PointSenseWidgetsContainer.cs. In WinMerge I always put the source file ie. cardefbel file on the left window and the target file on the right i.e. my file.
7. Comparing PointSenseWidgetsContainer.cs files, the first thing I see different is that cardefbel file contains using PointSenseRamsesWidgets; but I do not use Ramses widgets so I will ignore those.
8. So the first thing I will be looking for is something about change the MouseUp function ...
So scrolling down ... something about PointSensemenu, hmmm ignore.
So scrolling down ... gee there are a lot of differences, LoadWidgets ignore.
So scrolling down ... passed the SaveWidgets differences, ignore.
So scrolling down ... shight the AddScreen is a lot different, umm ignore.
So scrolling down ... gee both files have many identical line just whitespaced differently, so ignore
BINGO FOUNDED IT ... found the void MouseUp funtion.
9. Compare the two files MouseUp functions, the real differences start at the line th=GetHeight()/2;
10. Copy cardefbel modified PointSenseWidgetsContainer.cs with my own PointSenseWidgetsContainer.cs, for example
th=GetHeight()/2;
if (absx > absy)
{
if (absx > tw)
{
if (px < 0)
{
MouseMoveLeft();
} else
{
MouseMoveRight();
}
}
} else if (absy > th)
{
if (py < 0)
{
MouseMoveUp();
}
else
{
MouseMoveDown();
}
}
}
Until getting to
just before the
MouseMoveLeft function starts.
11. Now looking for is something about add or change the MouseMoveUp function ...
So scrolling down ... MouseMoveLeft and MouseMoveRight, hmmm difference about respectively
else { int newIndex = 0; SetCurrentScreen(0, false); }
and
else { int newIndex = screenCount - 1; SetCurrentScreen(newIndex, false); }
...
I think that will allow my PointSense widget screens to scroll right around in a circle from the last straight back to the first, think I might take that... maybe later.
12. BINGO FOUNDED IT ... found the MouseMoveUp function ... now replace my file's existing MouseMoveUp text with cardefbel modified PointSenseWidgetsContainer.cs
event OnSlideUp;
void MouseMoveUp() {
OnSlideUp();
}
13. Check out the rest of the difference ... hmmm, think its is best to leave the rest alone.
14. SAVE my modified PointSenseWidgetsContainer.cs ... DONE
15. With WinMerge compare the cardefbel modified ScreenHome.cs with your own ScreenHome.cs. In WinMerge I always put the source file ie. cardefbel file on the left window and the target file on the right i.e. my file.
16. Comparing ScreenHome.cs files, the first thing I see different is that cardefbel file contains using PushButton; but I do not have that in my file but mine works so I will ignore this, and same with the MiniView stuff.
17. I am just looking for the screenhome class ... so only add the bits about
MyAppletRibbon arRibbon; int th; Bool IsShowingAppletRibbon
in the appropriate locations. Again I am ignoring all this stuff about PushButton which Alien added because I don't have it.
18. Looking for the load function and just before the function finishes with
bool handled = CustomHandlers.ScreenHome_AfterLoad(this);
I
add the instructed code lines.
IsShowingAppletRibbon = false;
widgets.OnSlideUp = showAppletRibbon;
arRibbon.OnSlideDown = showWidgets;
arRibbon.SetID("arRibbon");
Controls.Add(arRibbon);
arRibbon.SendToBack();
arRibbon.SetMousePreview(false);
arRibbon.SetVisible(false);
19. [i]Hell if I know what I am doing ... I have nothing about MiniView so I will ignore all of this stuff, but I will just keep following the original posted instructions ... looking for PointSenseMenu_OnMenuHide function.
20. Copy-n-paste cardefbel modified PointSenseMenu_OnMenuHide function over mine.
void PointSenseMenu_OnMenuHide() {
if (IsShowingAppletRibbon) {
arRibbon.SetMousepreview(true);
} else {
widgets.SetMousePreview(true);
}
}
21. Copy-n-paste cardefbel file additional functions into my file just before the PointSenseMenu_OnSelectScreenClick function .
void showAppletRibbon() {
IsShowingAppletRibbon=true;
widgets.StopEditing();
if (IsShowTitleBar) {
title.SetVisible(true);
th=title.GetHeight();
} else {
th=0;
}
arRibbon.SetBounds(0,th,GetWidth(),(GetHeight()-(PointSenseMenu.GetHeight()+th)));
arRibbon.SetVisible(true);
arRibbon.SetMousePreview(true);
//widgets.Deactivated();
widgets.SetVisible(false);
widgets.SetMousePreview(false);
arRibbon.test.SetText("");
}
void showWidgets() {
IsShowingAppletRibbon = false;
arRibbon.SetVisible(false);
arRibbon.SetMousePreview(false);
widgets.SetVisible(true);
widgets.SetMousePreview(true);
//widgets.Activated();
}
22. Add the aiIndicator_OnDone and aiIndicator_OnChange functions at the end of that lot of changes.
void aiIndicator_OnDone() {
arRibbon.RefreshApplets();
}
void aiIndicator_OnChange() {
arRibbon.RefreshApplets();
}
Gee this is complicated, I can't believe how many differences there are between just two files.
23. I am looking for psMenu_OnCenterClick function and ignore the miniview stuff which makes our psMenu_OnLeftClickHold functions different.
24. Copy-n-paste cardefbel modified psMenu_OnCenterClick function over mine.
void psMenu_OnCenterClick()
{
if (IsShowingAppletRibbon)
{
ScreenAI s;
s.OnDone = aiIndicator_OnDone;
s.OnChange = aiIndicator_OnChange;
FlowStack.Branch(s);
}
else
{
if (widgets.screenIndex == 0)
{
String s;
s = Application.Attributes.Item("BottomCenterOnClick");
if (s == "")
{
s = "default";
}
if (s == "default")
{
Process.Start("cprog.exe");
}
else
{
ShowScreen(s);
}
}
else
{
widgets.SetCurrentScreen(0, false);
}
}
}
25. Ignoring the miniview stuff.
26. At the end of my ScreenHome.cs file add
class MyAppletRibbon: AppletRibbon {
label test;
int mouseX,mouseY;
event OnSlideDown;
void load() {
SetTabStop(true);
Controls.Add(test);
test.SetBounds(0,0,300,20);
}
void MouseDown(int x, int y) {
mouseX = x;
mouseY = y;
}
void MouseUp(int x, int y) {
int py,absy,th;
py=y-mouseY;
if (py<0) {
absy=(-1)*py;
} else {
absy = py;
}
th=GetHeight()/2;
if (absy > th) {
if (py > 0) {
OnSlideDown();
test.SetText("");
} else {
OnSlideDown();
test.SetText("");
}
}
}
}
27.SAVE my modified ScreenHome.cs ... DONE
[i]Gee this is complicated, I can't believe how many differences there are between just two files. ...
NOTE: cardefbel ... IMHO I think you need to issue a new set of "How to make this happen?" containing all of the minor code changes since post 2.
Gee are you still with me ... I need to wee ... BRB.
So a QUICK UPDATE[/u];
* PointSense and or PointUI is currently not running on the phone.
* In the temporary location on InternalStorage\Tmp\Home2\Common we have backups of files of PointsenseWidgetsContainer.cs and ScreenHome.cs files as ***_org.cs ...
* Via the PC we have modified PointsenseWidgetsContainer.cs and ScreenHome.cs files ...
* In the temporary location on InternalStorage\Tmp\Home2 where we copied our PointSense Home2, and also added the AppletRibbon folder. Plus now have our modified PointsenseWidgetsContainer.cs and ScreenHome.cs files.
* Even though according to Windows mobile Pointui Home 2 is installed we had previously deleted the entire MyDevice\ProgramFiles\Home2 folder.
STAGE THREE... putting it all together on the phone.
1. In FileExplorer copy the entire InternalStorage\Tmp\Home2 folder to MyDevice\ProgramFiles so that the MyDevice\ProgramFiles\Home2 folder now exists. Wait for it as this code take sometime.
2. Start the hack-job Pointui Home 2 running... that is Start menu go to Settings\Today\Items and tick Pointui Home 2.
3. if SenseUi does not start then FileExplorer to MyDevice\ProgramFiles\Home2 folder and open the ScriptError text file to determine what the problem is. Oh look mine did not error.
4. Now to add the Applets to the screen ... see pictures below.

