Imported Upstream version 3.6.0

Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
This commit is contained in:
Jo Shields
2014-08-13 10:39:27 +01:00
commit a575963da9
50588 changed files with 8155799 additions and 0 deletions

View File

@@ -0,0 +1,83 @@
2005-10-28 Sebastien Pouliot <sebastien@ximian.com>
* IntranetZoneCredentialPolicy.cs: ShouldSendCredential was changed to
virtual in 2.0 final.
2005-10-18 Sebastien Pouliot <sebastien@ximian.com>
* TimerElapsedEventArgs.cs: Re-added [ComVisible (false)] attribute
before NET_2_0.
2005-10-17 Sebastien Pouliot <sebastien@ximian.com>
* IntranetZoneCredentialPolicy.cs: New. Implemented (2.0). This class
decide if the credentials should be sent if the sepcified uri is in
the intranet zone.
2005-10-17 Sebastien Pouliot <sebastien@ximian.com>
* SessionSwitchReason.cs: Fixed start value of enum (no 0 item).
* TimerElapsedEventArgs.cs: Removed [ComVisible (false)] attribute.
2005-10-17 Sebastien Pouliot <sebastien@ximian.com>
* PowerModeChangedEventArgs.cs: Added a LinkDemand and an
InheritanceDemand for FullTrust (i.e. Unrestricted permission set) at
the class level.
* SessionEndingEventArgs.cs: Added a LinkDemand and an
InheritanceDemand for FullTrust (i.e. Unrestricted permission set) at
the class level.
* SessionEndedEventArgs.cs: Added a LinkDemand and an
InheritanceDemand for FullTrust (i.e. Unrestricted permission set) at
the class level.
* SessionSwitchReason.cs: New. Enum for 2.0.
* SessionSwitchEventArgs.cs: New. Class for 2.0.
* SessionSwitchEventHandler.cs: New. Delegate for 2.0.
* SystemEvents.cs: Added a LinkDemand for FullTrust (i.e. Unrestricted
permission set) at the class level. Added new events
DisplaySettingsChanging and SessionSwitch (2.0). Added [Obsolete],
[Browsable] and [EditorBrowsable] on LowMemory event (2.0).
* TimerElapsedEventArgs.cs: Added a LinkDemand and an
InheritanceDemand for FullTrust (i.e. Unrestricted permission set) at
the class level.
* UserPreferenceCategory.cs: Added new VisualStyle value for 2.0.
* UserPreferenceChangedEventArgs.cs: Added a LinkDemand and an
InheritanceDemand for FullTrust (i.e. Unrestricted permission set) at
the class level.
* UserPreferenceChangingEventArgs.cs: Added a LinkDemand and an
InheritanceDemand for FullTrust (i.e. Unrestricted permission set) at
the class level.
2003-11-12 Andreas Nahr <ClassDevelopment@A-SoftTech.com>
* TimerElapsedEventArgs.cs: Added missing Attribute, restyled
2003-07-10 Andreas Nahr <ClassDevelopment@A-SoftTech.com>
* SystemEvents.cs: Implemented preliminary timer support, added private constructor, fixed events
2003-06-12 Duncan Mak <duncan@ximian.com>
* UserPreferenceChangedEventArgs.cs
* UserPreferenceChangingEventArgs.cs
(Category): Fixed typo. Patch from Andreas. Nahr.
(ClassDevelopment@A-SoftTech.com>.
2003-04-17 Nick Drochak <ndrochak@gol.com>
* UserPreferenceCategory.cs: Fix typo.
* SystemEvents.cs: Fix inheritance.2002-9-15 Johannes Roith <johannes@jroith.de>
* ChangeLog: Add the change log to this directory
* PowerModeChangedEventArgs.cs
* PowerModeChangedEventHandler.cs
* PowerModes.cs * SessionEndedEventArgs.cs
* SessionEndedEventHandler.cs
* SessionEndingEventArgs.cs
* SessionEndingEventHandler.cs
* SessionEndReasons.cs
* SystemEvents.cs
* TimerElapsedEventArgs.cs
* TimerElapsedEventHandler.cs
* UserPreferenceCategory.cs
* UserPreferenceChangedEventArgs.cs
* UserPreferenceChangedEventHandler.cs
* UserPreferenceChangingEventArgs.cs
* UserPreferenceChangingEventHandler.cs:
Initial import.

View File

@@ -0,0 +1,51 @@
//
// Microsoft.Win32.IntranetZoneCredentialPolicy class
//
// Author:
// Sebastien Pouliot <sebastien@ximian.com>
//
// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Net;
using System.Security;
using System.Security.Permissions;
using System.Security.Policy;
namespace Microsoft.Win32 {
public class IntranetZoneCredentialPolicy : ICredentialPolicy {
[SecurityPermission (SecurityAction.Demand, ControlPolicy = true)]
public IntranetZoneCredentialPolicy ()
{
}
public virtual bool ShouldSendCredential (Uri challengeUri, WebRequest request,
NetworkCredential credential, IAuthenticationModule authModule)
{
Zone z = Zone.CreateFromUrl (challengeUri.AbsoluteUri);
return (z.SecurityZone == SecurityZone.Intranet);
}
}
}

View File

@@ -0,0 +1,51 @@
//
// PowerModeChangedEventArgs.cs
//
// Author:
// Johannes Roith (johannes@jroith.de)
//
// (C) 2002 Johannes Roith
// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System.Security.Permissions;
namespace Microsoft.Win32 {
[PermissionSet (SecurityAction.LinkDemand, Unrestricted = true)]
[PermissionSet (SecurityAction.InheritanceDemand, Unrestricted = true)]
public class PowerModeChangedEventArgs : System.EventArgs {
PowerModes mymode;
public PowerModeChangedEventArgs(PowerModes mode)
{
this.mymode = mode;
}
public PowerModes Mode {
get{
return mymode;
}
}
}
}

View File

@@ -0,0 +1,35 @@
//
// PowerModeChangedEventHandler.cs
//
// Author:
// Johannes Roith (johannes@jroith.de)
//
// (C) 2002 Johannes Roith
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
namespace Microsoft.Win32 {
/// <summary>
/// </summary>
public delegate void PowerModeChangedEventHandler(object sender, PowerModeChangedEventArgs e);
}

View File

@@ -0,0 +1,39 @@
//
// PowerModes.cs
//
// Author:
// Johannes Roith (johannes@jroith.de)
//
// (C) 2002 Johannes Roith
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
namespace Microsoft.Win32 {
/// <summary>
/// </summary>
public enum PowerModes : int {
Resume = 1,
StatusChange = 2,
Suspend = 3,
};
}

View File

@@ -0,0 +1,38 @@
//
// SessionEndReasons.cs
//
// Author:
// Johannes Roith (johannes@jroith.de)
//
// (C) 2002 Johannes Roith
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
namespace Microsoft.Win32 {
/// <summary>
/// </summary>
public enum SessionEndReasons : int {
Logoff = 1,
SystemShutdown = 2,
};
}

View File

@@ -0,0 +1,49 @@
//
// SessionEndedEventArgs.cs
//
// Author:
// Johannes Roith (johannes@jroith.de)
//
// (C) 2002 Johannes Roith
// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System.Security.Permissions;
namespace Microsoft.Win32 {
[PermissionSet (SecurityAction.LinkDemand, Unrestricted = true)]
[PermissionSet (SecurityAction.InheritanceDemand, Unrestricted = true)]
public class SessionEndedEventArgs : System.EventArgs {
SessionEndReasons myreason;
public SessionEndedEventArgs (SessionEndReasons reason)
{
this.myreason = reason;
}
public SessionEndReasons Reason {
get { return myreason; }
}
}
}

View File

@@ -0,0 +1,36 @@
//
// SessionEndedEventHandler.cs
//
// Author:
// Johannes Roith (johannes@jroith.de)
//
// (C) 2002 Johannes Roith
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
namespace Microsoft.Win32 {
/// <summary>
/// </summary>
public delegate void SessionEndedEventHandler(object sender, SessionEndedEventArgs e);
}

View File

@@ -0,0 +1,55 @@
//
// SessionEndingEventArgs.cs
//
// Author:
// Johannes Roith (johannes@jroith.de)
//
// (C) 2002 Johannes Roith
// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System.Security.Permissions;
namespace Microsoft.Win32 {
[PermissionSet (SecurityAction.LinkDemand, Unrestricted = true)]
[PermissionSet (SecurityAction.InheritanceDemand, Unrestricted = true)]
public class SessionEndingEventArgs : System.EventArgs {
SessionEndReasons myreason;
bool mycancel;
public SessionEndingEventArgs (SessionEndReasons reason)
{
this.myreason = reason;
}
public SessionEndReasons Reason {
get { return myreason; }
}
public bool Cancel {
get { return mycancel; }
set { mycancel = value; }
}
}
}

View File

@@ -0,0 +1,35 @@
//
// SessionEndingEventHandler.cs
//
// Author:
// Johannes Roith (johannes@jroith.de)
//
// (C) 2002 Johannes Roith
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
namespace Microsoft.Win32 {
/// <summary>
/// </summary>
public delegate void SessionEndingEventHandler(object sender, SessionEndingEventArgs e);
}

View File

@@ -0,0 +1,49 @@
//
// Microsoft.Win32.SessionSwitchEventArgs class
//
// Author:
// Sebastien Pouliot <sebastien@ximian.com>
//
// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System.Security.Permissions;
namespace Microsoft.Win32 {
[PermissionSet (SecurityAction.LinkDemand, Unrestricted = true)]
[PermissionSet (SecurityAction.InheritanceDemand, Unrestricted = true)]
public class SessionSwitchEventArgs : System.EventArgs {
SessionSwitchReason reason;
public SessionSwitchEventArgs (SessionSwitchReason reason)
{
this.reason = reason;
}
public SessionSwitchReason Reason {
get { return reason; }
}
}
}

View File

@@ -0,0 +1,32 @@
//
// Microsoft.Win32.SessionSwitchEventHandler delegate
//
// Author:
// Sebastien Pouliot <sebastien@ximian.com>
//
// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
namespace Microsoft.Win32 {
public delegate void SessionSwitchEventHandler (object sender, SessionSwitchEventArgs e);
}

View File

@@ -0,0 +1,42 @@
//
// Microsoft.Win32.SessionSwitchReason enumeration
//
// Author:
// Sebastien Pouliot <sebastien@ximian.com>
//
// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
namespace Microsoft.Win32 {
public enum SessionSwitchReason {
ConsoleConnect = 1,
ConsoleDisconnect,
RemoteConnect,
RemoteDisconnect,
SessionLogon,
SessionLogoff,
SessionLock,
SessionUnlock,
SessionRemoteControl
}
}

View File

@@ -0,0 +1,176 @@
//
// Microsoft.Win32.SystemEvents.cs
//
// Authors:
// Johannes Roith (johannes@jroith.de)
// Andreas Nahr (ClassDevelopment@A-SoftTech.com)
//
// (C) 2002 Johannes Roith
// (C) 2003 Andreas Nahr
// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Collections;
using System.ComponentModel;
using System.Security.Permissions;
using System.Timers;
namespace Microsoft.Win32 {
[PermissionSet (SecurityAction.LinkDemand, Unrestricted = true)]
public sealed class SystemEvents
{
private static Hashtable TimerStore = new Hashtable ();
private SystemEvents ()
{
}
// You can use timers using the CreateTimer, KillTimer methods and the Timerelapsed event
// This is only a partial solution, as it only works in managed code.
// TODO implement this on OS level
// Till done this solution should work if you are only using the mentioned members
public static IntPtr CreateTimer (int interval)
{
Guid Ident = Guid.NewGuid ();
int IdentValue = Ident.GetHashCode ();
Timer t = new System.Timers.Timer (interval);
t.Elapsed += new ElapsedEventHandler (InternalTimerElapsed);
TimerStore.Add (IdentValue, t);
return new IntPtr (IdentValue);
}
public static void KillTimer (IntPtr timerId)
{
Timer t = (Timer) TimerStore[timerId.GetHashCode()];
t.Stop ();
t.Elapsed -= new ElapsedEventHandler (InternalTimerElapsed);
t.Dispose ();
TimerStore.Remove (timerId.GetHashCode());
}
private static void InternalTimerElapsed (object e, ElapsedEventArgs args)
{
if (TimerElapsed != null)
TimerElapsed (null, new TimerElapsedEventArgs (IntPtr.Zero));
}
[MonoTODO]
public static void InvokeOnEventsThread(Delegate method)
{
throw new System.NotImplementedException ();
}
[MonoTODO]
public static event System.EventHandler DisplaySettingsChanged
{
add { }
remove { }
}
[MonoTODO("Currently does nothing on Mono")]
public static event EventHandler DisplaySettingsChanging {
add { }
remove { }
}
[MonoTODO("Currently does nothing on Mono")]
public static event System.EventHandler EventsThreadShutdown
{
add { }
remove { }
}
[MonoTODO("Currently does nothing on Mono")]
public static event System.EventHandler InstalledFontsChanged
{
add { }
remove { }
}
[MonoTODO("Currently does nothing on Mono")]
[Browsable (false)]
[EditorBrowsable (EditorBrowsableState.Never)]
[Obsolete ("")]
public static event System.EventHandler LowMemory
{
add { }
remove { }
}
[MonoTODO("Currently does nothing on Mono")]
public static event System.EventHandler PaletteChanged
{
add { }
remove { }
}
[MonoTODO("Currently does nothing on Mono")]
public static event PowerModeChangedEventHandler PowerModeChanged
{
add { }
remove { }
}
[MonoTODO("Currently does nothing on Mono")]
public static event SessionEndedEventHandler SessionEnded
{
add { }
remove { }
}
[MonoTODO("Currently does nothing on Mono")]
public static event SessionEndingEventHandler SessionEnding
{
add { }
remove { }
}
[MonoTODO("Currently does nothing on Mono")]
public static event SessionSwitchEventHandler SessionSwitch {
add { }
remove { }
}
[MonoTODO("Currently does nothing on Mono")]
public static event System.EventHandler TimeChanged
{
add { }
remove { }
}
public static event TimerElapsedEventHandler TimerElapsed;
[MonoTODO("Currently does nothing on Mono")]
public static event UserPreferenceChangedEventHandler UserPreferenceChanged
{
add { }
remove { }
}
[MonoTODO("Currently does nothing on Mono")]
public static event UserPreferenceChangingEventHandler UserPreferenceChanging
{
add { }
remove { }
}
}
}

View File

@@ -0,0 +1,56 @@
//
// TimerElapsedEventArgs.cs
//
// Authors:
// Johannes Roith (johannes@jroith.de)
// Andreas Nahr (ClassDevelopment@A-SoftTech.com)
//
// (C) 2002 Johannes Roith
// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System.Runtime.InteropServices;
using System.Security.Permissions;
namespace Microsoft.Win32 {
[PermissionSet (SecurityAction.LinkDemand, Unrestricted = true)]
[PermissionSet (SecurityAction.InheritanceDemand, Unrestricted = true)]
#if ONLY_1_1
[ComVisible (false)]
#endif
public class TimerElapsedEventArgs : System.EventArgs
{
System.IntPtr mytimerId;
public TimerElapsedEventArgs (System.IntPtr timerId)
{
this.mytimerId = timerId;
}
public System.IntPtr TimerId {
get {
return mytimerId;
}
}
}
}

View File

@@ -0,0 +1,35 @@
//
// TimerElapsedEventHandler.cs
//
// Author:
// Johannes Roith (johannes@jroith.de)
//
// (C) 2002 Johannes Roith
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
namespace Microsoft.Win32 {
/// <summary>
/// </summary>
public delegate void TimerElapsedEventHandler(object sender, TimerElapsedEventArgs e);
}

View File

@@ -0,0 +1,49 @@
//
// UserPreferenceCategory.cs
//
// Author:
// Johannes Roith (johannes@jroith.de)
//
// (C) 2002 Johannes Roith
// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
namespace Microsoft.Win32 {
public enum UserPreferenceCategory {
Accessibility = 1,
Color = 2,
Desktop = 3,
General = 4,
Icon = 5,
Keyboard = 6,
Menu = 7,
Mouse = 8,
Policy = 9,
Power = 10,
Screensaver = 11,
Window = 12,
Locale = 13,
VisualStyle
}
}

View File

@@ -0,0 +1,50 @@
//
// UserPreferenceChangedEventArgs.cs
//
// Author:
// Johannes Roith (johannes@jroith.de)
//
// (C) 2002 Johannes Roith
// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System.Security.Permissions;
namespace Microsoft.Win32 {
[PermissionSet (SecurityAction.LinkDemand, Unrestricted = true)]
[PermissionSet (SecurityAction.InheritanceDemand, Unrestricted = true)]
public class UserPreferenceChangedEventArgs : System.EventArgs{
UserPreferenceCategory mycategory;
public UserPreferenceChangedEventArgs (UserPreferenceCategory category)
{
this.mycategory = category;
}
public UserPreferenceCategory Category {
get { return mycategory; }
}
}
}

View File

@@ -0,0 +1,35 @@
//
// UserPreferenceChangedEventHandler.cs
//
// Author:
// Johannes Roith (johannes@jroith.de)
//
// (C) 2002 Johannes Roith
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
namespace Microsoft.Win32 {
/// <summary>
/// </summary>
public delegate void UserPreferenceChangedEventHandler( object sender, UserPreferenceChangedEventArgs e);
}

View File

@@ -0,0 +1,49 @@
//
// UserPreferenceChangingEventArgs.cs
//
// Author:
// Johannes Roith (johannes@jroith.de)
//
// (C) 2002 Johannes Roith
// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System.Security.Permissions;
namespace Microsoft.Win32 {
[PermissionSet (SecurityAction.LinkDemand, Unrestricted = true)]
[PermissionSet (SecurityAction.InheritanceDemand, Unrestricted = true)]
public class UserPreferenceChangingEventArgs : System.EventArgs{
UserPreferenceCategory mycategory;
public UserPreferenceChangingEventArgs (UserPreferenceCategory category)
{
this.mycategory = category;
}
public UserPreferenceCategory Category {
get { return mycategory; }
}
}
}

Some files were not shown because too many files have changed in this diff Show More