[Roam-commit] SF.net SVN: roam: [84] Trunk
Status: Alpha
Brought to you by:
jonfroehlich
|
From: <jon...@us...> - 2007-07-21 06:19:48
|
Revision: 84
http://roam.svn.sourceforge.net/roam/?rev=84&view=rev
Author: jonfroehlich
Date: 2007-07-20 23:19:34 -0700 (Fri, 20 Jul 2007)
Log Message:
-----------
1. added PowerNotificationUIThread.cs which simply calls the EventHandler delegate in the UI thread
2. added some overloaded constructors to NumericTextBox and TextBox
3. added WallpaperChanger sample, see http://csharponphone.blogspot.com/2007/07/wallpaper-screenshots-and-application.html
Modified Paths:
--------------
Trunk/Source/Roam/Utils/PerformanceUtils.cs
Trunk/Source/Roam/Utils/PowerNotification.cs
Trunk/Source/Roam.UI/Controls/NumericTextBox.cs
Trunk/Source/Roam.UI/Controls/TextBox.cs
Trunk/Source/Roam.UI/Roam.UI.csproj
Trunk/Source/Roam.UI/Utils/DesktopUtils.cs
Trunk/Source/Roam.suo
Added Paths:
-----------
Trunk/Samples/
Trunk/Samples/Samples.sln
Trunk/Samples/Samples.suo
Trunk/Samples/WallpaperChanger/
Trunk/Samples/WallpaperChanger/CapturedScreenForm.cs
Trunk/Samples/WallpaperChanger/CapturedScreenForm.designer.cs
Trunk/Samples/WallpaperChanger/CapturedScreenForm.resx
Trunk/Samples/WallpaperChanger/Form1.cs
Trunk/Samples/WallpaperChanger/Form1.designer.cs
Trunk/Samples/WallpaperChanger/Form1.resx
Trunk/Samples/WallpaperChanger/Program.cs
Trunk/Samples/WallpaperChanger/Properties/
Trunk/Samples/WallpaperChanger/Properties/AssemblyInfo.cs
Trunk/Samples/WallpaperChanger/Properties/Resources.Designer.cs
Trunk/Samples/WallpaperChanger/Properties/Resources.resx
Trunk/Samples/WallpaperChanger/WallpaperChanger.csproj
Trunk/Samples/WallpaperChanger/WallpaperChanger.csproj.user
Trunk/Source/Roam.UI/Utils/PowerNotificationUIThread.cs
Added: Trunk/Samples/Samples.sln
===================================================================
--- Trunk/Samples/Samples.sln (rev 0)
+++ Trunk/Samples/Samples.sln 2007-07-21 06:19:34 UTC (rev 84)
@@ -0,0 +1,22 @@
+
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WallpaperChanger", "WallpaperChanger\WallpaperChanger.csproj", "{4958E328-69B8-4E0C-A669-73E0DB11C071}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {4958E328-69B8-4E0C-A669-73E0DB11C071}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {4958E328-69B8-4E0C-A669-73E0DB11C071}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {4958E328-69B8-4E0C-A669-73E0DB11C071}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
+ {4958E328-69B8-4E0C-A669-73E0DB11C071}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {4958E328-69B8-4E0C-A669-73E0DB11C071}.Release|Any CPU.Build.0 = Release|Any CPU
+ {4958E328-69B8-4E0C-A669-73E0DB11C071}.Release|Any CPU.Deploy.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
Added: Trunk/Samples/Samples.suo
===================================================================
(Binary files differ)
Property changes on: Trunk/Samples/Samples.suo
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: Trunk/Samples/WallpaperChanger/CapturedScreenForm.cs
===================================================================
--- Trunk/Samples/WallpaperChanger/CapturedScreenForm.cs (rev 0)
+++ Trunk/Samples/WallpaperChanger/CapturedScreenForm.cs 2007-07-21 06:19:34 UTC (rev 84)
@@ -0,0 +1,50 @@
+#region Copyright & License
+//
+// Copyright (c) 2005 - 2007 The Regents of the University of Washington, Intel
+// Research Seattle, and the Roam project. All rights reserved.
+//
+// This software is open-source under the BSD license. You may obtain a copy
+// of this license at
+//
+// http://roam.sourceforge.net/license.txt
+//
+// Alternatively, please see "license.txt" which should be included in
+// this source code distribution.
+//
+#endregion Copyright & License
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Text;
+using System.Windows.Forms;
+
+namespace WallpaperChanger
+{
+ /// <summary>
+ ///
+ /// </summary>
+ /// <remarks>
+ ///
+ /// </remarks>
+ /// <author>Jon Froehlich</author>
+ public partial class CapturedScreenForm : Form
+ {
+ public CapturedScreenForm(Bitmap bm)
+ : this()
+ {
+ _pictureBox.Image = bm;
+ }
+
+ public CapturedScreenForm()
+ {
+ InitializeComponent();
+ }
+
+ private void menuItem1_Click(object sender, EventArgs e)
+ {
+ this.Close();
+ }
+ }
+}
\ No newline at end of file
Added: Trunk/Samples/WallpaperChanger/CapturedScreenForm.designer.cs
===================================================================
--- Trunk/Samples/WallpaperChanger/CapturedScreenForm.designer.cs (rev 0)
+++ Trunk/Samples/WallpaperChanger/CapturedScreenForm.designer.cs 2007-07-21 06:19:34 UTC (rev 84)
@@ -0,0 +1,73 @@
+namespace WallpaperChanger
+{
+ partial class CapturedScreenForm
+ {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+ private System.Windows.Forms.MainMenu mainMenu1;
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent()
+ {
+ this.mainMenu1 = new System.Windows.Forms.MainMenu();
+ this.menuItem1 = new System.Windows.Forms.MenuItem();
+ this._pictureBox = new System.Windows.Forms.PictureBox();
+ this.SuspendLayout();
+ //
+ // mainMenu1
+ //
+ this.mainMenu1.MenuItems.Add(this.menuItem1);
+ //
+ // menuItem1
+ //
+ this.menuItem1.Text = "Exit";
+ this.menuItem1.Click += new System.EventHandler(this.menuItem1_Click);
+ //
+ // _pictureBox
+ //
+ this._pictureBox.Dock = System.Windows.Forms.DockStyle.Fill;
+ this._pictureBox.Location = new System.Drawing.Point(0, 0);
+ this._pictureBox.Name = "_pictureBox";
+ this._pictureBox.Size = new System.Drawing.Size(240, 266);
+ this._pictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
+ //
+ // CapturedScreenForm
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(131F, 131F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
+ this.AutoScroll = true;
+ this.ClientSize = new System.Drawing.Size(240, 266);
+ this.Controls.Add(this._pictureBox);
+ this.Menu = this.mainMenu1;
+ this.Name = "CapturedScreenForm";
+ this.Text = "CapturedScreenForm";
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.MenuItem menuItem1;
+ private System.Windows.Forms.PictureBox _pictureBox;
+ }
+}
\ No newline at end of file
Added: Trunk/Samples/WallpaperChanger/CapturedScreenForm.resx
===================================================================
--- Trunk/Samples/WallpaperChanger/CapturedScreenForm.resx (rev 0)
+++ Trunk/Samples/WallpaperChanger/CapturedScreenForm.resx 2007-07-21 06:19:34 UTC (rev 84)
@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <metadata name="mainMenu1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>17, 17</value>
+ </metadata>
+ <metadata name="$this.FormFactorShadowProperty" xml:space="preserve">
+ <value>Smartphone QVGA</value>
+ </metadata>
+ <metadata name="$this.Skin" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <value>True</value>
+ </metadata>
+</root>
\ No newline at end of file
Added: Trunk/Samples/WallpaperChanger/Form1.cs
===================================================================
--- Trunk/Samples/WallpaperChanger/Form1.cs (rev 0)
+++ Trunk/Samples/WallpaperChanger/Form1.cs 2007-07-21 06:19:34 UTC (rev 84)
@@ -0,0 +1,241 @@
+#region Copyright & License
+//
+// Copyright (c) 2005 - 2007 The Regents of the University of Washington, Intel
+// Research Seattle, and the Roam project. All rights reserved.
+//
+// This software is open-source under the BSD license. You may obtain a copy
+// of this license at
+//
+// http://roam.sourceforge.net/license.txt
+//
+// Alternatively, please see "license.txt" which should be included in
+// this source code distribution.
+//
+#endregion Copyright & License
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Text;
+using System.Windows.Forms;
+using Roam.UI.Utils;
+using Roam.Utils;
+using Roam.Common.Utils;
+using System.Threading;
+using System.Diagnostics;
+using Roam.UI.Forms;
+using Roam.UI.Controls;
+
+namespace WallpaperChanger
+{
+ /// <summary>
+ ///
+ /// </summary>
+ /// <remarks>
+ ///
+ /// </remarks>
+ /// <author>Jon Froehlich</author>
+ public partial class Form1 : Form
+ {
+ private PowerNotificationUIThread _powerNotification;
+ private WindowUtils.EnumWindowsProc _enumWindowsProc;
+ private Bitmap _capturedScreen;
+
+ public Form1()
+ {
+ InitializeComponent();
+ _textBoxFilteredList.ShowAddButton = false;
+ //_textBoxFilteredList.Items.Add("Internet Explorer");
+ //_textBoxFilteredList.Items.Add("Opera");
+ //_textBoxFilteredList.Items.Add("Contacts");
+ //_textBoxFilteredList.Items.Add("Call History");
+ //_textBoxFilteredList.Items.Add("Text Messages");
+ _powerNotification = new PowerNotificationUIThread(this);
+ _powerNotification.PowerNotificationEvent += new EventHandler<PowerNotificationEventArgs>(OnPowerNotificationEvent);
+ _enumWindowsProc = new WindowUtils.EnumWindowsProc(OnEnumWindows);
+ WindowUtils.EnumWindows(_enumWindowsProc);
+ }
+
+ private void OnPowerNotificationEvent(object sender, PowerNotificationEventArgs e)
+ {
+ string powerMessage = e.PowerBroadcast.GetSystemPowerStateAsString();
+ bool isDeviceIdleMessage = IsDeviceIdleMessage(powerMessage);
+ Debug.WriteLine("Power message: " + powerMessage);
+
+ if (_menuItemStartAfterDeviceIdle.Checked && isDeviceIdleMessage)
+ {
+ _menuItemStartAfterDeviceIdle.Checked = false;
+ SwitchWallpaper();
+ int success = PowerUtils.SetSystemPowerState(IntPtr.Zero, PowerStateFlags.Idle, PowerUtils.POWER_FORCE);
+ //we could also try the Idle2 flag :)
+ //PowerUtils.SetSystemPowerState(IntPtr.Zero, PowerStateFlags.Idle2, PowerUtils.POWER_FORCE);
+ }
+ }
+
+ private bool IsDeviceIdleMessage(string powerMessage)
+ {
+ //device idle messages I have seen:
+ //backlightoff
+ //screenoff
+ //useridle
+ return powerMessage.IndexOf("idle") != -1 || powerMessage.IndexOf("off") != -1;
+ }
+
+ private void SwitchWallpaper()
+ {
+ string windowTitleToMatch = _textBoxFilteredList.SelectedText;
+ Debug.WriteLine("Looking for hwnd to " + windowTitleToMatch);
+ IntPtr matchingHwnd = WindowUtils.FindWindow(windowTitleToMatch);
+
+ if (matchingHwnd != IntPtr.Zero)
+ {
+ Debug.WriteLine(string.Format("FindWindow returned hwnd={0} title={1} when looking for {2}",
+ matchingHwnd, WindowUtils.GetWindowText(matchingHwnd), windowTitleToMatch));
+
+ IntPtr currentForegroundWindow = WindowUtils.GetForegroundWindow();
+ Debug.WriteLine(string.Format("The current foreground window hwnd={0} title={1}",
+ currentForegroundWindow, WindowUtils.GetWindowText(currentForegroundWindow)));
+
+ SetForegroundWindow(matchingHwnd);
+ Application.DoEvents();
+ Thread.Sleep(100);
+ if (_capturedScreen != null) { _capturedScreen.Dispose(); }
+ _capturedScreen = ScreenUtils.CaptureScreen();
+
+ //crop bitmap
+ Bitmap bmCropped = new Bitmap(_cropRect.Width, _cropRect.Height);
+ Graphics g = Graphics.FromImage(bmCropped);
+ g.DrawImage(_capturedScreen,
+ new Rectangle(0, 0, bmCropped.Width, bmCropped.Height),
+ _cropRect, GraphicsUnit.Pixel);
+ _capturedScreen.Dispose();
+ g.Dispose();
+ _capturedScreen = bmCropped;
+
+ DesktopUtils.SetWallpaper(_capturedScreen, @"\Storage Card\bgimagefile.jpg");
+ IntPtr hWndDesktop = WindowUtils.GetDesktopWindow();
+
+ //wait for this to occur as well
+ SetForegroundWindow(hWndDesktop);
+ Thread.Sleep(1000);
+ SetForegroundWindow(currentForegroundWindow);
+ }
+ else
+ {
+ Debug.WriteLine(string.Format("FindWindow returned hwnd={0} when looking for {1}",
+ matchingHwnd, windowTitleToMatch));
+ }
+ }
+
+ private void SetForegroundWindow(IntPtr hwnd)
+ {
+ //wait until window switch is complete or time threshold exceeded
+ string title = WindowUtils.GetWindowText(hwnd);
+ Debug.WriteLine(string.Format("Attempting to set hwnd={0} title={1} to foreground",
+ hwnd, title));
+ bool successfullySwitchedForeground = WindowUtils.SetForegroundWindow(hwnd);
+
+ TimeSpan timeThreshold = TimeSpan.FromSeconds(10);
+ DateTime start = DateTime.Now;
+ while (WindowUtils.GetForegroundWindow() != hwnd &&
+ (TimeSpan)(DateTime.Now - start) < timeThreshold)
+ {
+ Debug.WriteLine(string.Format("Failed to switch to hwnd={0} title={1}. SetForegroundWindow returned {2}",
+ hwnd, title, successfullySwitchedForeground));
+
+ Thread.Sleep(1000);
+ successfullySwitchedForeground = WindowUtils.SetForegroundWindow(hwnd);
+ }
+ //Debug.WriteLine("Time: " + (TimeSpan)(DateTime.Now - start));
+ Debug.WriteLine(string.Format("CurrentForegroundWindow={0}, WaitingForWindow={1}, Foreground=Desired? {2}",
+ WindowUtils.GetForegroundWindow(), hwnd, hwnd == WindowUtils.GetForegroundWindow()));
+ }
+
+
+ private int OnEnumWindows(IntPtr hWnd, IntPtr lParam)
+ {
+ string windowText = WindowUtils.GetWindowText(hWnd);
+ if (!string.IsNullOrEmpty(windowText))
+ {
+ int index = _textBoxFilteredList.Items.Add(windowText);
+ _textBoxFilteredList.Items[index].Font = _textBoxFilteredList.Font;
+ }
+ return 1;
+ }
+
+ private void OnMenuItemExit(object sender, EventArgs e)
+ {
+ this.Close();
+ Application.Exit();
+ }
+
+ private void OnMenuItemStartNow(object sender, EventArgs e)
+ {
+ //_windowTitleToMatch = _textBoxFilteredList.
+ //WindowUtils.EnumWindows(_enumWindowsProc);
+ Cursor.Current = Cursors.WaitCursor;
+ SwitchWallpaper();
+ Cursor.Current = Cursors.Default;
+ }
+
+ private void OnMenuItemStartAfterDeviceIdle(object sender, EventArgs e)
+ {
+ //after idle
+ _menuItemStartAfterDeviceIdle.Checked = !_menuItemStartAfterDeviceIdle.Checked;
+ }
+
+ private void OnMenuItemUpdateWindowTitleList(object sender, EventArgs e)
+ {
+ _textBoxFilteredList.RemoveFilteredItems();
+ _textBoxFilteredList.Items.Clear();
+ WindowUtils.EnumWindows(_enumWindowsProc);
+ }
+
+ private void OnMenuItemClearWindowTitleList(object sender, EventArgs e)
+ {
+ _textBoxFilteredList.RemoveFilteredItems();
+ _textBoxFilteredList.Items.Clear();
+ }
+
+ private void OnMenuItemViewCapturedScreen(object sender, EventArgs e)
+ {
+ CapturedScreenForm csf = new CapturedScreenForm(_capturedScreen);
+ csf.ShowDialog();
+ }
+
+ private void OnMenuItemForceDeviceIdle(object sender, EventArgs e)
+ {
+ PowerUtils.SetSystemPowerState(IntPtr.Zero, PowerStateFlags.Idle2, PowerUtils.POWER_FORCE);
+ }
+
+ private void OnMenuItemMoveSelectedWindowToForeground(object sender, EventArgs e)
+ {
+ IntPtr hWnd = WindowUtils.FindWindow(_textBoxFilteredList.SelectedText);
+ if (hWnd != IntPtr.Zero)
+ {
+ WindowUtils.SetForegroundWindow(hWnd);
+ }
+ }
+
+ private Rectangle _cropRect = new Rectangle(0, 0, 240, 320);
+ private void OnCaptureCropDimensions(object sender, EventArgs e)
+ {
+ LabelControlPair lcpX = new LabelControlPair("X: ", new NumericTextBox(false, true, _cropRect.X));
+ LabelControlPair lcpY = new LabelControlPair("Y: ", new NumericTextBox(false, true, _cropRect.Y));
+ LabelControlPair lcpWidth = new LabelControlPair("Width: ", new NumericTextBox(false, true, _cropRect.Width));
+ LabelControlPair lcpHeight = new LabelControlPair("Height: ", new NumericTextBox(false, true, _cropRect.Height));
+
+ Form form = FormFactory.Create(new LabelControlPair[] { lcpX, lcpY, lcpWidth, lcpHeight });
+
+ if (form.ShowDialog() == DialogResult.OK)
+ {
+ _cropRect = new Rectangle(
+ ((NumericTextBox)(lcpX.Element2)).TextAsInt,
+ ((NumericTextBox)(lcpY.Element2)).TextAsInt,
+ ((NumericTextBox)(lcpWidth.Element2)).TextAsInt,
+ ((NumericTextBox)(lcpHeight.Element2)).TextAsInt);
+ }
+ }
+ }
+}
\ No newline at end of file
Added: Trunk/Samples/WallpaperChanger/Form1.designer.cs
===================================================================
--- Trunk/Samples/WallpaperChanger/Form1.designer.cs (rev 0)
+++ Trunk/Samples/WallpaperChanger/Form1.designer.cs 2007-07-21 06:19:34 UTC (rev 84)
@@ -0,0 +1,181 @@
+using Roam.UI.Controls;
+namespace WallpaperChanger
+{
+ partial class Form1
+ {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+ private System.Windows.Forms.MainMenu mainMenu1;
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent()
+ {
+ this.label1 = new System.Windows.Forms.Label();
+ this.mainMenu1 = new System.Windows.Forms.MainMenu();
+ this.menuItem1 = new System.Windows.Forms.MenuItem();
+ this.menuItem2 = new System.Windows.Forms.MenuItem();
+ this._menuItemStartNow = new System.Windows.Forms.MenuItem();
+ this.menuItem3 = new System.Windows.Forms.MenuItem();
+ this._menuItemClearWindowTitleList = new System.Windows.Forms.MenuItem();
+ this._updateWindowTitleList = new System.Windows.Forms.MenuItem();
+ this._menuItemMoveSelectedWindowToForeground = new System.Windows.Forms.MenuItem();
+ this.menuItem4 = new System.Windows.Forms.MenuItem();
+ this._menuItemForceDeviceIdle = new System.Windows.Forms.MenuItem();
+ this._menuItemStartAfterDeviceIdle = new System.Windows.Forms.MenuItem();
+ this.menuItem5 = new System.Windows.Forms.MenuItem();
+ this._menuItemViewCapturedScreen = new System.Windows.Forms.MenuItem();
+ this.menuItem6 = new System.Windows.Forms.MenuItem();
+ this._textBoxFilteredList = new Roam.UI.Controls.TextBoxFilteredList();
+ this.SuspendLayout();
+ //
+ // label1
+ //
+ this.label1.Font = new System.Drawing.Font("Segoe Condensed", 8F, System.Drawing.FontStyle.Regular);
+ this.label1.Location = new System.Drawing.Point(4, 4);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(207, 19);
+ this.label1.Text = "Window Title to Search For:";
+ //
+ // mainMenu1
+ //
+ this.mainMenu1.MenuItems.Add(this.menuItem1);
+ this.mainMenu1.MenuItems.Add(this.menuItem2);
+ //
+ // menuItem1
+ //
+ this.menuItem1.Text = "Exit";
+ this.menuItem1.Click += new System.EventHandler(this.OnMenuItemExit);
+ //
+ // menuItem2
+ //
+ this.menuItem2.MenuItems.Add(this._menuItemStartNow);
+ this.menuItem2.MenuItems.Add(this.menuItem3);
+ this.menuItem2.MenuItems.Add(this.menuItem4);
+ this.menuItem2.MenuItems.Add(this.menuItem5);
+ this.menuItem2.Text = "Menu";
+ //
+ // _menuItemStartNow
+ //
+ this._menuItemStartNow.Text = "Start Now";
+ this._menuItemStartNow.Click += new System.EventHandler(this.OnMenuItemStartNow);
+ //
+ // menuItem3
+ //
+ this.menuItem3.MenuItems.Add(this._menuItemClearWindowTitleList);
+ this.menuItem3.MenuItems.Add(this._updateWindowTitleList);
+ this.menuItem3.MenuItems.Add(this._menuItemMoveSelectedWindowToForeground);
+ this.menuItem3.Text = "Window List";
+ //
+ // _menuItemClearWindowTitleList
+ //
+ this._menuItemClearWindowTitleList.Text = "Clear list";
+ this._menuItemClearWindowTitleList.Click += new System.EventHandler(this.OnMenuItemClearWindowTitleList);
+ //
+ // _updateWindowTitleList
+ //
+ this._updateWindowTitleList.Text = "Update Window Title List";
+ this._updateWindowTitleList.Click += new System.EventHandler(this.OnMenuItemUpdateWindowTitleList);
+ //
+ // _menuItemMoveSelectedWindowToForeground
+ //
+ this._menuItemMoveSelectedWindowToForeground.Text = "Selected Window To Foreground";
+ this._menuItemMoveSelectedWindowToForeground.Click += new System.EventHandler(this.OnMenuItemMoveSelectedWindowToForeground);
+ //
+ // menuItem4
+ //
+ this.menuItem4.MenuItems.Add(this._menuItemForceDeviceIdle);
+ this.menuItem4.MenuItems.Add(this._menuItemStartAfterDeviceIdle);
+ this.menuItem4.Text = "Device Idle";
+ //
+ // _menuItemForceDeviceIdle
+ //
+ this._menuItemForceDeviceIdle.Text = "Force Device Idle";
+ this._menuItemForceDeviceIdle.Click += new System.EventHandler(this.OnMenuItemForceDeviceIdle);
+ //
+ // _menuItemStartAfterDeviceIdle
+ //
+ this._menuItemStartAfterDeviceIdle.Checked = true;
+ this._menuItemStartAfterDeviceIdle.Text = "Start After Device Idle";
+ this._menuItemStartAfterDeviceIdle.Click += new System.EventHandler(this.OnMenuItemStartAfterDeviceIdle);
+ //
+ // menuItem5
+ //
+ this.menuItem5.MenuItems.Add(this._menuItemViewCapturedScreen);
+ this.menuItem5.MenuItems.Add(this.menuItem6);
+ this.menuItem5.Text = "Captured Screen";
+ //
+ // _menuItemViewCapturedScreen
+ //
+ this._menuItemViewCapturedScreen.Text = "View Captured Screen";
+ this._menuItemViewCapturedScreen.Click += new System.EventHandler(this.OnMenuItemViewCapturedScreen);
+ //
+ // menuItem6
+ //
+ this.menuItem6.Text = "Capture Crop Dimensions";
+ this.menuItem6.Click += new System.EventHandler(this.OnCaptureCropDimensions);
+ //
+ // _textBoxFilteredList
+ //
+ this._textBoxFilteredList.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this._textBoxFilteredList.Font = new System.Drawing.Font("Segoe Condensed", 7F, System.Drawing.FontStyle.Regular);
+ this._textBoxFilteredList.Location = new System.Drawing.Point(4, 22);
+ this._textBoxFilteredList.Name = "_textBoxFilteredList";
+ this._textBoxFilteredList.Size = new System.Drawing.Size(233, 241);
+ this._textBoxFilteredList.TabIndex = 0;
+ //
+ // Form1
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(131F, 131F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
+ this.AutoScroll = true;
+ this.ClientSize = new System.Drawing.Size(240, 266);
+ this.Controls.Add(this._textBoxFilteredList);
+ this.Controls.Add(this.label1);
+ this.Menu = this.mainMenu1;
+ this.Name = "Form1";
+ this.Text = "Form1";
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.MenuItem menuItem1;
+ private Roam.UI.Controls.TextBoxFilteredList _textBoxFilteredList;
+ private System.Windows.Forms.MenuItem menuItem2;
+ private System.Windows.Forms.MenuItem _menuItemStartNow;
+ private System.Windows.Forms.MenuItem _menuItemStartAfterDeviceIdle;
+ private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.MenuItem _updateWindowTitleList;
+ private System.Windows.Forms.MenuItem _menuItemClearWindowTitleList;
+ private System.Windows.Forms.MenuItem _menuItemViewCapturedScreen;
+ private System.Windows.Forms.MenuItem _menuItemForceDeviceIdle;
+ private System.Windows.Forms.MenuItem _menuItemMoveSelectedWindowToForeground;
+ private System.Windows.Forms.MenuItem menuItem3;
+ private System.Windows.Forms.MenuItem menuItem4;
+ private System.Windows.Forms.MenuItem menuItem5;
+ private System.Windows.Forms.MenuItem menuItem6;
+ }
+}
+
Added: Trunk/Samples/WallpaperChanger/Form1.resx
===================================================================
--- Trunk/Samples/WallpaperChanger/Form1.resx (rev 0)
+++ Trunk/Samples/WallpaperChanger/Form1.resx 2007-07-21 06:19:34 UTC (rev 84)
@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <metadata name="mainMenu1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>17, 17</value>
+ </metadata>
+ <metadata name="$this.FormFactorShadowProperty" xml:space="preserve">
+ <value>Smartphone QVGA</value>
+ </metadata>
+ <metadata name="$this.Skin" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <value>True</value>
+ </metadata>
+</root>
\ No newline at end of file
Added: Trunk/Samples/WallpaperChanger/Program.cs
===================================================================
--- Trunk/Samples/WallpaperChanger/Program.cs (rev 0)
+++ Trunk/Samples/WallpaperChanger/Program.cs 2007-07-21 06:19:34 UTC (rev 84)
@@ -0,0 +1,39 @@
+#region Copyright & License
+//
+// Copyright (c) 2005 - 2007 The Regents of the University of Washington, Intel
+// Research Seattle, and the Roam project. All rights reserved.
+//
+// This software is open-source under the BSD license. You may obtain a copy
+// of this license at
+//
+// http://roam.sourceforge.net/license.txt
+//
+// Alternatively, please see "license.txt" which should be included in
+// this source code distribution.
+//
+#endregion Copyright & License
+using System;
+using System.Collections.Generic;
+using System.Windows.Forms;
+
+namespace WallpaperChanger
+{
+ /// <summary>
+ ///
+ /// </summary>
+ /// <remarks>
+ ///
+ /// </remarks>
+ /// <author>Jon Froehlich</author>
+ static class Program
+ {
+ /// <summary>
+ /// The main entry point for the application.
+ /// </summary>
+ [MTAThread]
+ static void Main()
+ {
+ Application.Run(new Form1());
+ }
+ }
+}
\ No newline at end of file
Added: Trunk/Samples/WallpaperChanger/Properties/AssemblyInfo.cs
===================================================================
--- Trunk/Samples/WallpaperChanger/Properties/AssemblyInfo.cs (rev 0)
+++ Trunk/Samples/WallpaperChanger/Properties/AssemblyInfo.cs 2007-07-21 06:19:34 UTC (rev 84)
@@ -0,0 +1,33 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("WallpaperChanger")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("WallpaperChanger")]
+[assembly: AssemblyCopyright("Copyright © 2007")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("e38eba99-4619-4de5-9f2e-0c85c79a30ff")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+[assembly: AssemblyVersion("1.0.0.0")]
+
Added: Trunk/Samples/WallpaperChanger/Properties/Resources.Designer.cs
===================================================================
--- Trunk/Samples/WallpaperChanger/Properties/Resources.Designer.cs (rev 0)
+++ Trunk/Samples/WallpaperChanger/Properties/Resources.Designer.cs 2007-07-21 06:19:34 UTC (rev 84)
@@ -0,0 +1,68 @@
+//------------------------------------------------------------------------------
+// <autogenerated>
+// This code was generated by a tool.
+// Runtime Version:2.0.50727.832
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </autogenerated>
+//------------------------------------------------------------------------------
+
+namespace WallpaperChanger.Properties
+{
+
+
+ /// <summary>
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ /// </summary>
+ // This class was auto-generated by the Strongly Typed Resource Builder
+ // class via a tool like ResGen or Visual Studio.NET.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ class Resources
+ {
+
+ private static System.Resources.ResourceManager _resMgr;
+
+ private static System.Globalization.CultureInfo _resCulture;
+
+ /*FamANDAssem*/
+ internal Resources()
+ {
+ }
+
+ /// <summary>
+ /// Returns the cached ResourceManager instance used by this class.
+ /// </summary>
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
+ public static System.Resources.ResourceManager ResourceManager
+ {
+ get
+ {
+ if ((_resMgr == null))
+ {
+ System.Resources.ResourceManager temp = new System.Resources.ResourceManager("WallpaperChanger.Properties.Resources", typeof(Resources).Assembly);
+ _resMgr = temp;
+ }
+ return _resMgr;
+ }
+ }
+
+ /// <summary>
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ /// </summary>
+ [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
+ public static System.Globalization.CultureInfo Culture
+ {
+ get
+ {
+ return _resCulture;
+ }
+ set
+ {
+ _resCulture = value;
+ }
+ }
+ }
+}
Added: Trunk/Samples/WallpaperChanger/Properties/Resources.resx
===================================================================
--- Trunk/Samples/WallpaperChanger/Properties/Resources.resx (rev 0)
+++ Trunk/Samples/WallpaperChanger/Properties/Resources.resx 2007-07-21 06:19:34 UTC (rev 84)
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+</root>
\ No newline at end of file
Added: Trunk/Samples/WallpaperChanger/WallpaperChanger.csproj
===================================================================
--- Trunk/Samples/WallpaperChanger/WallpaperChanger.csproj (rev 0)
+++ Trunk/Samples/WallpaperChanger/WallpaperChanger.csproj 2007-07-21 06:19:34 UTC (rev 84)
@@ -0,0 +1,119 @@
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{4958E328-69B8-4E0C-A669-73E0DB11C071}</ProjectGuid>
+ <OutputType>WinExe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>WallpaperChanger</RootNamespace>
+ <AssemblyName>WallpaperChanger</AssemblyName>
+ <ProjectTypeGuids>{4D628B5B-2FBC-4AA6-8C16-197242AEB884};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <PlatformFamilyName>Smartphone</PlatformFamilyName>
+ <PlatformID>BD0CC567-F6FD-4ca3-99D2-063EFDFC0A39</PlatformID>
+ <OSVersion>5.01</OSVersion>
+ <DeployDirSuffix>WallpaperChanger</DeployDirSuffix>
+ <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
+ <FormFactorID>
+ </FormFactorID>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE;$(PlatformFamilyName)</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <FileAlignment>512</FileAlignment>
+ <WarningLevel>4</WarningLevel>
+ <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE;$(PlatformFamilyName)</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <FileAlignment>512</FileAlignment>
+ <WarningLevel>4</WarningLevel>
+ <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="mscorlib" />
+ <Reference Include="OpenNETCF.WindowsCE, Version=2.0.0.0, Culture=neutral, PublicKeyToken=e60dbea84bb431b7, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\Research\Roam\Trunk\Source\Roam.UI\bin\Release\OpenNETCF.WindowsCE.dll</HintPath>
+ </Reference>
+ <Reference Include="Roam, Version=1.0.2755.40810, Culture=neutral, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\Source\Roam.UI\bin\Release\Roam.dll</HintPath>
+ </Reference>
+ <Reference Include="Roam.Common, Version=1.0.2754.14429, Culture=neutral, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\Source\Roam.UI\bin\Release\Roam.Common.dll</HintPath>
+ </Reference>
+ <Reference Include="Roam.UI, Version=1.0.2756.13386, Culture=neutral, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\Source\Roam.UI\bin\Release\Roam.UI.dll</HintPath>
+ </Reference>
+ <Reference Include="System" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Drawing" />
+ <Reference Include="System.Windows.Forms" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="CapturedScreenForm.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="CapturedScreenForm.designer.cs">
+ <DependentUpon>CapturedScreenForm.cs</DependentUpon>
+ </Compile>
+ <Compile Include="Form1.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="Form1.designer.cs">
+ <DependentUpon>Form1.cs</DependentUpon>
+ </Compile>
+ <Compile Include="Program.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <EmbeddedResource Include="CapturedScreenForm.resx">
+ <DependentUpon>CapturedScreenForm.cs</DependentUpon>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
+ <EmbeddedResource Include="Form1.resx">
+ <DependentUpon>Form1.cs</DependentUpon>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
+ <EmbeddedResource Include="Properties\Resources.resx">
+ <Generator>ResXFileCodeGenerator</Generator>
+ <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
+ <Compile Include="Properties\Resources.Designer.cs">
+ <AutoGen>True</AutoGen>
+ <DependentUpon>Resources.resx</DependentUpon>
+ </Compile>
+ </ItemGroup>
+ <Import Condition="'$(TargetFrameworkVersion)' == 'v1.0'" Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.v1.targets" />
+ <Import Condition="'$(TargetFrameworkVersion)' == 'v2.0'" Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" />
+ <ProjectExtensions>
+ <VisualStudio>
+ <FlavorProperties GUID="{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}">
+ <HostingProcess disable="1" />
+ </FlavorProperties>
+ </VisualStudio>
+ </ProjectExtensions>
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file
Added: Trunk/Samples/WallpaperChanger/WallpaperChanger.csproj.user
===================================================================
--- Trunk/Samples/WallpaperChanger/WallpaperChanger.csproj.user (rev 0)
+++ Trunk/Samples/WallpaperChanger/WallpaperChanger.csproj.user 2007-07-21 06:19:34 UTC (rev 84)
@@ -0,0 +1,5 @@
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <DeployDeviceID>BD0CC567-F6FD-4ca3-99D2-063EFDFC0A39d6518ffb-710f-11d3-99f2-00105a0df099</DeployDeviceID>
+ </PropertyGroup>
+</Project>
\ No newline at end of file
Modified: Trunk/Source/Roam/Utils/PerformanceUtils.cs
===================================================================
--- Trunk/Source/Roam/Utils/PerformanceUtils.cs 2007-07-18 08:42:09 UTC (rev 83)
+++ Trunk/Source/Roam/Utils/PerformanceUtils.cs 2007-07-21 06:19:34 UTC (rev 84)
@@ -1,3 +1,17 @@
+#region Copyright & License
+//
+// Copyright (c) 2005 - 2007 The Regents of the University of Washington, Intel
+// Research Seattle, and the Roam project. All rights reserved.
+//
+// This software is open-source under the BSD license. You may obtain a copy
+// of this license at
+//
+// http://roam.sourceforge.net/license.txt
+//
+// Alternatively, please see "license.txt" which should be included in
+// this source code distribution.
+//
+#endregion Copyright & License
using System;
using System.Collections.Generic;
using System.Text;
@@ -5,6 +19,13 @@
namespace Roam.Utils
{
+ /// <summary>
+ ///
+ /// </summary>
+ /// <remarks>
+ ///
+ /// </remarks>
+ /// <author>Jon Froehlich</author>
public static class PerformanceUtils
{
[DllImport("coredll.dll", EntryPoint = "QueryPerformanceCounter")]
Modified: Trunk/Source/Roam/Utils/PowerNotification.cs
===================================================================
--- Trunk/Source/Roam/Utils/PowerNotification.cs 2007-07-18 08:42:09 UTC (rev 83)
+++ Trunk/Source/Roam/Utils/PowerNotification.cs 2007-07-21 06:19:34 UTC (rev 84)
@@ -95,10 +95,7 @@
_log.DebugFormat("{0}: Message: {1}} Flags: {2} IsAlert: {3} Length: {4} MessageString: {5}",
pb.Message, pb.Flags, pb.IsAlert, pb....
[truncated message content] |