dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dotgnu-pnet-commits] CVS: pnetlib/System/Win32 Makefile,NONE,1.1 PowerM


From: Rhys Weatherley <address@hidden>
Subject: [Dotgnu-pnet-commits] CVS: pnetlib/System/Win32 Makefile,NONE,1.1 PowerModeChangedEventArgs.cs,NONE,1.1 PowerModeChangedEventHandler.cs,NONE,1.1 PowerModes.cs,NONE,1.1 SessionEndReasons.cs,NONE,1.1 SessionEndedEventArgs.cs,NONE,1.1 SessionEndedEventHandler.cs,NONE,1.1SessionEndingEventArgs.cs,NONE,1.1 SessionEndingEventHandler.cs,NONE,1.1 SystemEvents.cs,NONE,1.1 TimerElapsedEventArgs.cs,NONE,1.1TimerElapsedEventHandler.cs,NONE,1.1 UserPreferenceCategory.cs,NONE,1.1 UserPreferenceChangedEventArgs.cs,NONE,1.1 UserPreferenceChangedEventHandler.cs,NONE,1.1 UserPreferenceChangingEventArgs.cs,NONE,1.1 UserPreferenceChangingEventHandler.cs,NONE,1.1
Date: Fri, 23 May 2003 03:21:12 -0400

Update of /cvsroot/dotgnu-pnet/pnetlib/System/Win32
In directory subversions:/tmp/cvs-serv1353/System/Win32

Added Files:
        Makefile PowerModeChangedEventArgs.cs 
        PowerModeChangedEventHandler.cs PowerModes.cs 
        SessionEndReasons.cs SessionEndedEventArgs.cs 
        SessionEndedEventHandler.cs SessionEndingEventArgs.cs 
        SessionEndingEventHandler.cs SystemEvents.cs 
        TimerElapsedEventArgs.cs TimerElapsedEventHandler.cs 
        UserPreferenceCategory.cs UserPreferenceChangedEventArgs.cs 
        UserPreferenceChangedEventHandler.cs 
        UserPreferenceChangingEventArgs.cs 
        UserPreferenceChangingEventHandler.cs 
Log Message:


Add a missing namespace and its implementation.


--- NEW FILE ---

all:
        (cd ..;make)
        (cd ..;make phase-two)

--- NEW FILE ---
/*
 * PowerModeChangedEventArgs.cs - Implementation of the
 *              Microsoft.Win32.PowerModeChangedEventArgs class.
 *
 * Copyright (C) 2003  Southern Storm Software, Pty Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

namespace Microsoft.Win32
{

#if !ECMA_COMPAT

public class PowerModeChangedEventArgs : EventArgs
{
        // Internal state.
        private PowerModes mode;

        // Constructor.
        public PowerModeChangedEventArgs(PowerModes mode)
                        {
                                this.mode = mode;
                        }

        // Get the power mode.
        public PowerModes Mode
                        {
                                get
                                {
                                        return mode;
                                }
                        }

}; // class PowerModeChangedEventArgs

#endif // !ECMA_COMPAT

}; // namespace Microsoft.Win32

--- NEW FILE ---
/*
 * PowerModeChangedEventHandler.cs - Implementation of the
 *              Microsoft.Win32.PowerModeChangedEventHandler class.
 *
 * Copyright (C) 2003  Southern Storm Software, Pty Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

namespace Microsoft.Win32
{

#if !ECMA_COMPAT

public delegate void PowerModeChangedEventHandler
                (Object sender, PowerModeChangedEventArgs e);

#endif // !ECMA_COMPAT

}; // namespace Microsoft.Win32

--- NEW FILE ---
/*
 * PowerModes.cs - Implementation of the
 *              Microsoft.Win32.PowerModes class.
 *
 * Copyright (C) 2003  Southern Storm Software, Pty Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

namespace Microsoft.Win32
{

#if !ECMA_COMPAT

public enum PowerModes
{
        Resume                  = 1,
        StatusChange    = 2,
        Suspend                 = 3

}; // enum PowerModes

#endif // !ECMA_COMPAT

}; // namespace Microsoft.Win32

--- NEW FILE ---
/*
 * SessionEndReasons.cs - Implementation of the
 *              Microsoft.Win32.SessionEndReasons class.
 *
 * Copyright (C) 2003  Southern Storm Software, Pty Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

namespace Microsoft.Win32
{

#if !ECMA_COMPAT

public enum SessionEndReasons
{
        Logoff                  = 1,
        SystemShutdown  = 2

}; // enum SessionEndReasons

#endif // !ECMA_COMPAT

}; // namespace Microsoft.Win32

--- NEW FILE ---
/*
 * SessionEndedEventArgs.cs - Implementation of the
 *              Microsoft.Win32.SessionEndedEventArgs class.
 *
 * Copyright (C) 2003  Southern Storm Software, Pty Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

namespace Microsoft.Win32
{

#if !ECMA_COMPAT

public class SessionEndedEventArgs : EventArgs
{
        // Internal state.
        private SessionEndReasons reason;

        // Constructor.
        public SessionEndedEventArgs(SessionEndReasons reason)
                        {
                                this.reason = reason;
                        }

        // Get the session end reason.
        public SessionEndReasons Reason
                        {
                                get
                                {
                                        return reason;
                                }
                        }

}; // class SessionEndedEventArgs

#endif // !ECMA_COMPAT

}; // namespace Microsoft.Win32

--- NEW FILE ---
/*
 * SessionEndedEventHandler.cs - Implementation of the
 *              Microsoft.Win32.SessionEndedEventHandler class.
 *
 * Copyright (C) 2003  Southern Storm Software, Pty Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

namespace Microsoft.Win32
{

#if !ECMA_COMPAT

public delegate void SessionEndedEventHandler
                (Object sender, SessionEndedEventArgs e);

#endif // !ECMA_COMPAT

}; // namespace Microsoft.Win32

--- NEW FILE ---
/*
 * SessionEndingEventArgs.cs - Implementation of the
 *              Microsoft.Win32.SessionEndingEventArgs class.
 *
 * Copyright (C) 2003  Southern Storm Software, Pty Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

namespace Microsoft.Win32
{

#if !ECMA_COMPAT

public class SessionEndingEventArgs : EventArgs
{
        // Internal state.
        private SessionEndReasons reason;
        private bool cancel;

        // Constructor.
        public SessionEndingEventArgs(SessionEndReasons reason)
                        {
                                this.reason = reason;
                                this.cancel = false;
                        }

        // Get or set the cancel flag.
        public bool Cancel
                        {
                                get
                                {
                                        return cancel;
                                }
                                set
                                {
                                        cancel = value;
                                }
                        }

        // Get the session end reason.
        public SessionEndReasons Reason
                        {
                                get
                                {
                                        return reason;
                                }
                        }

}; // class SessionEndingEventArgs

#endif // !ECMA_COMPAT

}; // namespace Microsoft.Win32

--- NEW FILE ---
/*
 * SessionEndingEventHandler.cs - Implementation of the
 *              Microsoft.Win32.SessionEndingEventHandler class.
 *
 * Copyright (C) 2003  Southern Storm Software, Pty Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

namespace Microsoft.Win32
{

#if !ECMA_COMPAT

public delegate void SessionEndingEventHandler
                (Object sender, SessionEndingEventArgs e);

#endif // !ECMA_COMPAT

}; // namespace Microsoft.Win32

--- NEW FILE ---
/*
 * SystemEvents.cs - Implementation of the
 *              Microsoft.Win32.SystemEvents class.
 *
 * Copyright (C) 2003  Southern Storm Software, Pty Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

namespace Microsoft.Win32
{

#if !ECMA_COMPAT

using System.Collections;
using System.Threading;

// System events are highly Windows specific, impossible to emulate
// elsewhere, and arguably a potentional security risk.
//
// We let callers register for events, and then simply never deliver them.
// This should fool the application into believing that the event hasn't
// occurred yet and that it should wait longer for it to occur.
//
// The one exception to the above is timers, which we emulate using
// the "System.Threading.Timer" class.

public sealed class SystemEvents
{
        // This class cannot be instantiated.
        private SystemEvents() {}

        // Execute a delegate on the event listening thread.
        public static void InvokeOnEventsThread(Delegate method)
                        {
                                // There is no event thread, so execute the 
delegate here.
                                if(method != null)
                                {
                                        method.DynamicInvoke(new Object [0]);
                                }
                        }

        // System event handlers.
        public static event EventHandler DisplaySettingsChanged;
        public static event EventHandler EventsThreadShutdown;
        public static event EventHandler InstalledFontsChanged;
        public static event EventHandler LowMemory;
        public static event EventHandler PaletteChanged;
        public static event PowerModeChangedEventHandler PowerModeChanged;
        public static event SessionEndedEventHandler SessionEnded;
        public static event SessionEndingEventHandler SessionEnding;
        public static event EventHandler TimeChanged;
        public static event TimerElapsedEventHandler TimerElapsed;
        public static event UserPreferenceChangedEventHandler
                        UserPreferenceChanged;
        public static event UserPreferenceChangingEventHandler
                        UserPreferenceChanging;

        // List of currently active timers.
        private static ArrayList timers;

        // Timer information block.
        private sealed class TimerInfo
        {
                public int timerId;
                public Timer timer;

        }; // class TimerInfo

        // Handle a timeout.
        private static void Timeout(Object state)
                        {
                                TimerInfo info = (TimerInfo)state;
                                lock(typeof(SystemEvents))
                                {
                                        if(timers[info.timerId] == info)
                                        {
                                                timers[info.timerId] = null;
                                        }
                                        if(info.timer != null)
                                        {
                                                info.timer.Dispose();
                                                info.timer = null;
                                        }
                                }
                                if(TimerElapsed != null)
                                {
                                        TimerElapsed(null,
                                                new TimerElapsedEventArgs
                                                        (new 
IntPtr(info.timerId + 1)));
                                }
                        }

        // Create a timer.
        public static IntPtr CreateTimer(int interval)
                        {
                                lock(typeof(SystemEvents))
                                {
                                        // Create the timer information block.
                                        TimerInfo info = new TimerInfo();

                                        // Allocate a new timer identifier.
                                        if(timers == null)
                                        {
                                                timers = new ArrayList();
                                        }
                                        int timerId = 0;
                                        while(timerId < timers.Count &&
                                                  timers[timerId] != null)
                                        {
                                                ++timerId;
                                        }
                                        if(timerId >= timers.Count)
                                        {
                                                timers.Add(info);
                                        }
                                        else
                                        {
                                                timers[timerId] = info;
                                        }

                                        // Initialize the timer information 
block.
                                        info.timerId = timerId;
                                        info.timer = new Timer(new 
TimerCallback(Timeout),
                                                                                
   info, interval, -1);

                                        // Return the timer identifier, and 
make sure
                                        // that it will never be zero.
                                        return new IntPtr(timerId + 1);
                                }
                        }

        // Kill a previously installed timer.
        public static void KillTimer(IntPtr timerId)
                        {
                                int timId = 
(unchecked((int)(timerId.ToInt64())) - 1);
                                lock(typeof(SystemEvents))
                                {
                                        if(timers != null && timId >= 0 && 
timId < timers.Count)
                                        {
                                                TimerInfo info = 
(TimerInfo)(timers[timId]);
                                                if(info != null && info.timerId 
== timId)
                                                {
                                                        timers[timId] = null;
                                                        if(info.timer != null)
                                                        {
                                                                
info.timer.Dispose();
                                                                info.timer = 
null;
                                                        }
                                                }
                                        }
                                }
                        }

}; // class SystemEvents

#endif // !ECMA_COMPAT

}; // namespace Microsoft.Win32

--- NEW FILE ---
/*
 * TimerElapsedEventArgs.cs - Implementation of the
 *              Microsoft.Win32.TimerElapsedEventArgs class.
 *
 * Copyright (C) 2003  Southern Storm Software, Pty Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

namespace Microsoft.Win32
{

#if !ECMA_COMPAT

using System.Runtime.InteropServices;

[ComVisible(false)]
public class TimerElapsedEventArgs : EventArgs
{
        // Internal state.
        private IntPtr timerId;

        // Constructor.
        public TimerElapsedEventArgs(IntPtr timerId)
                        {
                                this.timerId = timerId;
                        }

        // Get the timer identifier.
        public IntPtr TimerId
                        {
                                get
                                {
                                        return timerId;
                                }
                        }

}; // class TimerElapsedEventArgs

#endif // !ECMA_COMPAT

}; // namespace Microsoft.Win32

--- NEW FILE ---
/*
 * TimerElapsedEventHandler.cs - Implementation of the
 *              Microsoft.Win32.TimerElapsedEventHandler class.
 *
 * Copyright (C) 2003  Southern Storm Software, Pty Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

namespace Microsoft.Win32
{

#if !ECMA_COMPAT

public delegate void TimerElapsedEventHandler
                (Object sender, TimerElapsedEventArgs e);

#endif // !ECMA_COMPAT

}; // namespace Microsoft.Win32

--- NEW FILE ---
/*
 * UserPreferenceCategory.cs - Implementation of the
 *              Microsoft.Win32.UserPreferenceCategory class.
 *
 * Copyright (C) 2003  Southern Storm Software, Pty Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

namespace Microsoft.Win32
{

#if !ECMA_COMPAT

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

}; // enum UserPreferenceCategory

#endif // !ECMA_COMPAT

}; // namespace Microsoft.Win32

--- NEW FILE ---
/*
 * UserPreferenceChangedEventArgs.cs - Implementation of the
 *              Microsoft.Win32.UserPreferenceChangedEventArgs class.
 *
 * Copyright (C) 2003  Southern Storm Software, Pty Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

namespace Microsoft.Win32
{

#if !ECMA_COMPAT

using System.Runtime.InteropServices;

public class UserPreferenceChangedEventArgs : EventArgs
{
        // Internal state.
        private UserPreferenceCategory category;

        // Constructor.
        public UserPreferenceChangedEventArgs(UserPreferenceCategory category)
                        {
                                this.category = category;
                        }

        // Get the timer identifier.
        public UserPreferenceCategory Category
                        {
                                get
                                {
                                        return category;
                                }
                        }

}; // class UserPreferenceChangedEventArgs

#endif // !ECMA_COMPAT

}; // namespace Microsoft.Win32

--- NEW FILE ---
/*
 * UserPreferenceChangedEventHandler.cs - Implementation of the
 *              Microsoft.Win32.UserPreferenceChangedEventHandler class.
 *
 * Copyright (C) 2003  Southern Storm Software, Pty Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

namespace Microsoft.Win32
{

#if !ECMA_COMPAT

public delegate void UserPreferenceChangedEventHandler
                (Object sender, UserPreferenceChangedEventArgs e);

#endif // !ECMA_COMPAT

}; // namespace Microsoft.Win32

--- NEW FILE ---
/*
 * UserPreferenceChangingEventArgs.cs - Implementation of the
 *              Microsoft.Win32.UserPreferenceChangingEventArgs class.
 *
 * Copyright (C) 2003  Southern Storm Software, Pty Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

namespace Microsoft.Win32
{

#if !ECMA_COMPAT

using System.Runtime.InteropServices;

public class UserPreferenceChangingEventArgs : EventArgs
{
        // Internal state.
        private UserPreferenceCategory category;

        // Constructor.
        public UserPreferenceChangingEventArgs(UserPreferenceCategory category)
                        {
                                this.category = category;
                        }

        // Get the timer identifier.
        public UserPreferenceCategory Category
                        {
                                get
                                {
                                        return category;
                                }
                        }

}; // class UserPreferenceChangingEventArgs

#endif // !ECMA_COMPAT

}; // namespace Microsoft.Win32

--- NEW FILE ---
/*
 * UserPreferenceChangingEventHandler.cs - Implementation of the
 *              Microsoft.Win32.UserPreferenceChangingEventHandler class.
 *
 * Copyright (C) 2003  Southern Storm Software, Pty Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

namespace Microsoft.Win32
{

#if !ECMA_COMPAT

public delegate void UserPreferenceChangingEventHandler
                (Object sender, UserPreferenceChangingEventArgs e);

#endif // !ECMA_COMPAT

}; // namespace Microsoft.Win32





reply via email to

[Prev in Thread] Current Thread [Next in Thread]