diff --git a/FodyWeavers.xml b/FodyWeavers.xml new file mode 100644 index 0000000..2e6d4a7 --- /dev/null +++ b/FodyWeavers.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/MainForm.Designer.cs b/MainForm.Designer.cs new file mode 100644 index 0000000..551a572 --- /dev/null +++ b/MainForm.Designer.cs @@ -0,0 +1,200 @@ +/* + * Created by SharpDevelop. + * User: Bernhard + * Date: 24.05.2016 + * Time: 16:25 + */ +namespace SheepItRunner +{ + partial class frmMain + { + /// + /// Designer variable used to keep track of non-visual components. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Disposes resources used by the form. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing) { + if (components != null) { + components.Dispose(); + } + } + base.Dispose(disposing); + } + + /// + /// This method is required for Windows Forms designer support. + /// Do not change the method contents inside the source code editor. The Forms designer might + /// not be able to load this method if it was changed manually. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.trayIcon = new System.Windows.Forms.NotifyIcon(this.components); + this.ctxTray = new System.Windows.Forms.ContextMenuStrip(this.components); + this.startToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.tmrCheck = new System.Windows.Forms.Timer(this.components); + this.lstLog = new System.Windows.Forms.ListBox(); + this.txtCache = new System.Windows.Forms.TextBox(); + this.lblCache = new System.Windows.Forms.Label(); + this.cmbMode = new System.Windows.Forms.ComboBox(); + this.tipTool = new System.Windows.Forms.ToolTip(this.components); + this.lblStatus = new System.Windows.Forms.Label(); + this.lblFrames = new System.Windows.Forms.Label(); + this.tmrStart = new System.Windows.Forms.Timer(this.components); + this.ctxTray.SuspendLayout(); + this.SuspendLayout(); + // + // trayIcon + // + this.trayIcon.ContextMenuStrip = this.ctxTray; + this.trayIcon.Text = "SheepIt Runner"; + this.trayIcon.DoubleClick += new System.EventHandler(this.TrayIconDoubleClick); + // + // ctxTray + // + this.ctxTray.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.startToolStripMenuItem, + this.exitToolStripMenuItem}); + this.ctxTray.Name = "ctxmnuTray"; + this.ctxTray.Size = new System.Drawing.Size(99, 48); + // + // startToolStripMenuItem + // + this.startToolStripMenuItem.Name = "startToolStripMenuItem"; + this.startToolStripMenuItem.Size = new System.Drawing.Size(98, 22); + this.startToolStripMenuItem.Text = "&Start"; + this.startToolStripMenuItem.Click += new System.EventHandler(this.StartToolStripMenuItemClick); + // + // exitToolStripMenuItem + // + this.exitToolStripMenuItem.Name = "exitToolStripMenuItem"; + this.exitToolStripMenuItem.Size = new System.Drawing.Size(98, 22); + this.exitToolStripMenuItem.Text = "E&xit"; + this.exitToolStripMenuItem.Click += new System.EventHandler(this.ExitToolStripMenuItemClick); + // + // tmrCheck + // + this.tmrCheck.Interval = 20; + this.tmrCheck.Tick += new System.EventHandler(this.TmrCheckTick); + // + // lstLog + // + this.lstLog.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.lstLog.FormattingEnabled = true; + this.lstLog.IntegralHeight = false; + this.lstLog.Location = new System.Drawing.Point(4, 30); + this.lstLog.Name = "lstLog"; + this.lstLog.ScrollAlwaysVisible = true; + this.lstLog.Size = new System.Drawing.Size(425, 242); + this.lstLog.TabIndex = 0; + this.lstLog.SelectedIndexChanged += new System.EventHandler(this.LstLogSelectedIndexChanged); + // + // txtCache + // + this.txtCache.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtCache.Location = new System.Drawing.Point(49, 4); + this.txtCache.Name = "txtCache"; + this.txtCache.Size = new System.Drawing.Size(289, 20); + this.txtCache.TabIndex = 1; + // + // lblCache + // + this.lblCache.Location = new System.Drawing.Point(4, 7); + this.lblCache.Name = "lblCache"; + this.lblCache.Size = new System.Drawing.Size(39, 14); + this.lblCache.TabIndex = 2; + this.lblCache.Text = "Cache"; + // + // cmbMode + // + this.cmbMode.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.cmbMode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cmbMode.FormattingEnabled = true; + this.cmbMode.Items.AddRange(new object[] { + "CPU", + "CPU & GPU", + "GPU"}); + this.cmbMode.Location = new System.Drawing.Point(344, 3); + this.cmbMode.Name = "cmbMode"; + this.cmbMode.Size = new System.Drawing.Size(85, 21); + this.cmbMode.TabIndex = 3; + // + // tipTool + // + this.tipTool.Active = false; + // + // lblStatus + // + this.lblStatus.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.lblStatus.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.lblStatus.Location = new System.Drawing.Point(4, 278); + this.lblStatus.Margin = new System.Windows.Forms.Padding(3); + this.lblStatus.Name = "lblStatus"; + this.lblStatus.Size = new System.Drawing.Size(245, 16); + this.lblStatus.TabIndex = 4; + // + // lblFrames + // + this.lblFrames.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.lblFrames.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.lblFrames.Location = new System.Drawing.Point(255, 278); + this.lblFrames.Margin = new System.Windows.Forms.Padding(3); + this.lblFrames.Name = "lblFrames"; + this.lblFrames.Size = new System.Drawing.Size(174, 16); + this.lblFrames.TabIndex = 5; + // + // tmrStart + // + this.tmrStart.Interval = 10000; + this.tmrStart.Tick += new System.EventHandler(this.TmrStartTick); + // + // frmMain + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(433, 298); + this.Controls.Add(this.lblFrames); + this.Controls.Add(this.lblStatus); + this.Controls.Add(this.cmbMode); + this.Controls.Add(this.lblCache); + this.Controls.Add(this.txtCache); + this.Controls.Add(this.lstLog); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; + this.KeyPreview = true; + this.MaximizeBox = false; + this.Name = "frmMain"; + this.Padding = new System.Windows.Forms.Padding(1); + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "SheepIt Runner"; + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmMainFormClosing); + this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.FrmMainKeyDown); + this.ctxTray.ResumeLayout(false); + this.ResumeLayout(false); + this.PerformLayout(); + } + private System.Windows.Forms.Timer tmrStart; + private System.Windows.Forms.Label lblFrames; + private System.Windows.Forms.Label lblStatus; + private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem startToolStripMenuItem; + private System.Windows.Forms.ToolTip tipTool; + private System.Windows.Forms.ComboBox cmbMode; + private System.Windows.Forms.Label lblCache; + private System.Windows.Forms.TextBox txtCache; + private System.Windows.Forms.ContextMenuStrip ctxTray; + private System.Windows.Forms.ListBox lstLog; + private System.Windows.Forms.Timer tmrCheck; + private System.Windows.Forms.NotifyIcon trayIcon; + } +} diff --git a/MainForm.cs b/MainForm.cs new file mode 100644 index 0000000..1e063dc --- /dev/null +++ b/MainForm.cs @@ -0,0 +1,395 @@ +/* + * Created by SharpDevelop. + * User: Bernhard + * Date: 24.05.2016 + * Time: 16:25 + */ +using System; +using System.IO; +using System.Drawing; +using System.Windows.Forms; +using System.Collections.Generic; +using System.Runtime.InteropServices; +using System.Diagnostics; +using Microsoft.WindowsAPICodePack.ApplicationServices; + +namespace SheepItRunner +{ + /// + /// Description of MainForm. + /// + public partial class frmMain : Form + { + [DllImport("user32.dll")] + [return: MarshalAs(UnmanagedType.Bool)] + static extern bool GetKeyboardState(byte [] lpKeyState); + + public static byte[] GetKeys() { + var b = new byte[256]; + GetKeyboardState(b); + return b; + } + + // http://stackoverflow.com/a/9858981 + // Used to check if the screen saver is running + [DllImport("user32.dll", CharSet = CharSet.Auto)] + [return: MarshalAs(UnmanagedType.Bool)] + public static extern bool SystemParametersInfo(uint uAction, uint uParam, ref bool lpvParam, int fWinIni); + + // Used to check if the workstation is locked + [DllImport("user32", SetLastError = true)] + private static extern IntPtr OpenDesktop(string lpszDesktop, uint dwFlags, bool fInherit, uint dwDesiredAccess); + + [DllImport("user32", SetLastError = true)] + private static extern IntPtr OpenInputDesktop(uint dwFlags, bool fInherit, uint dwDesiredAccess); + + [DllImport("user32", SetLastError = true)] + private static extern IntPtr CloseDesktop(IntPtr hDesktop); + + [DllImport("user32", SetLastError = true)] + [return: MarshalAs(UnmanagedType.Bool)] + private static extern bool SwitchDesktop(IntPtr hDesktop); + + // Check if the workstation has been locked. + private bool lastLocked; + public static bool IsWorkstationLocked() + { + const int DESKTOP_SWITCHDESKTOP = 256; + IntPtr hwnd = OpenInputDesktop(0, false, DESKTOP_SWITCHDESKTOP); + + if (hwnd == IntPtr.Zero) + { + // Could not get the input desktop, might be locked already? + hwnd = OpenDesktop("Default", 0, false, DESKTOP_SWITCHDESKTOP); + } + + // Can we switch the desktop? + if (hwnd != IntPtr.Zero) + { + if (SwitchDesktop(hwnd)) + { + // Workstation is NOT LOCKED. + CloseDesktop(hwnd); + } + else + { + CloseDesktop(hwnd); + // Workstation is LOCKED. + return true; + } + } + + return false; + } + + // Check if the screensaver is busy running. + private bool lastScreen; + public static bool IsScreensaverRunning() + { + const int SPI_GETSCREENSAVERRUNNING = 114; + bool isRunning = false; + + if (!SystemParametersInfo(SPI_GETSCREENSAVERRUNNING, 0, ref isRunning, 0)) + { + // Could not detect screen saver status... + return false; + } + + if (isRunning || !PowerManager.IsMonitorOn) + { + // Screen saver is ON. + return true; + } + + // Screen saver is OFF. + return false; + } + + private Process client; + private bool minimized; + + private string login; + private string password; + private bool hide = true; + private BloodyRain2k.AppSettings settings = new BloodyRain2k.AppSettings(); + private string logFile; + + private bool closeAfterRender = false; + private int credits; + private int framesRendered; + private int framesRemaining; + private int lastCredits; + private int lastRendered; + private List blacklist = new List(new string[] { "starting", "requesting job", "extracting renderer", "extracting project", + "reusing cached renderer", "reusing cached project", "rendering" }); + + void updateLogFile() { + var now = DateTime.Now; +// logFile = Application.ExecutablePath.Replace(".exe", ""); + logFile = (txtCache.Text + @"\").Replace(@"\\", @"\"); + logFile += string.Format("SheepItRunner_{0:D4}{1:D2}{2:D2}-{3:D2}{4:D2}.log", now.Year, now.Month, now.Day, now.Hour, now.Minute); + } + + void fileLog(string message) { + var now = DateTime.Now; + + if (InvokeRequired) { + if (((Control)this).IsDisposed) { return; } + Invoke((MethodInvoker) delegate { fileLog(message); }); + } + else { + File.AppendAllText(logFile, now.Year + "." + now.Month + "." + now.Day + " " + now.ToShortTimeString() + " - " + message + "\r\n"); + } + } + + void log(string message, bool timeStamp = true) { + var now = DateTime.Now; + if (timeStamp) { + message = now.Year + "." + now.Month + "." + now.Day + " " + now.ToShortTimeString() + " - " + message; + } + if (InvokeRequired) { + if (((Control)this).IsDisposed) { return; } + Invoke((MethodInvoker) delegate { log(message, false); }); + } + else { + lstLog.Items.Add(message); + lstLog.SelectedIndex = lstLog.Items.Count - 1; + } + } + + void setStatus(string status = "") { + if (InvokeRequired) { + if (((Control)this).IsDisposed) { return; } +// if (((Control)lblStatus).IsDisposed) { return; } + Invoke((MethodInvoker) delegate { lblStatus.Text = status; }); + } + else { + lblStatus.Text = status; + } + } + + void setFrames(string frames = "") { + if (InvokeRequired) { + if (((Control)this).IsDisposed) { return; } +// if (((Control)lblFrames).IsDisposed) { return; } + Invoke((MethodInvoker) delegate { lblFrames.Text = frames; }); + } + else { + lblFrames.Text = frames; + } + } + + bool ClientRunning() { + try { + if (!client.HasExited) { return true; } + } catch (Exception ex) {} + return false; + } + + void client_Exited(object sender, EventArgs e) + { + log("client exited"); + closeAfterRender = false; + + try { + if (InvokeRequired) { + Invoke((MethodInvoker) delegate { Icon = trayIcon.Icon = Resources.ShpIt; }); + } + else { + Icon = trayIcon.Icon = Resources.ShpIt; + } + } + catch (Exception ex) { } + } + + void client_OutputDataReceived(object sender, DataReceivedEventArgs e) + { + setStatus(e.Data); + if (e.Data == null || e.Data == "") { return; } + fileLog(e.Data); + var str = e.Data.ToLower(); + + if (str.StartsWith("frames remaining: ") || str.StartsWith("frames rendered: ") || str.StartsWith("credits earned: ")) { + var splits = str.Split(' '); + if (splits[1] == "earned:") { credits = int.Parse(splits[2]); if (closeAfterRender) { StopClient(); } } + if (splits[1] == "rendered:") { framesRendered = int.Parse(splits[2]) - 1; } + if (splits[1] == "remaining:") { framesRemaining = int.Parse(splits[2]); } + // setFrames(string.Format("Rendered: {0} / {1} - Earned: {2}", framesRendered, framesRemaining, credits)); + setFrames(string.Format("Frames: {0} - Earned: {1}", framesRendered + lastRendered, credits + lastCredits)); + return; + } + + if (blacklist.IndexOf(str) > -1 || str.StartsWith("rendering (remaining") + || (str.StartsWith("rendering ") && str.EndsWith("%")) + || (str.StartsWith("downloading project ") && str.EndsWith("%")) + ) { + return; + } + + log(e.Data); + } + + void client_ErrorDataReceived(object sender, DataReceivedEventArgs e) + { + if (e.Data == null || e.Data == "") { return; } + fileLog("ERROR: " + e.Data); + log("ERROR: " + e.Data); + } + + void StartClient() { + var mode = new string[] { "CPU", "CPU_GPU", "GPU" }; + + if (ClientRunning()) { return; } + client = new Process(); + client.StartInfo.FileName = @"javaw"; + client.StartInfo.Arguments = string.Format("-jar SheepItClient.jar -ui text -login {0} -password {1} -cache-dir \"{2}\" -compute-method {3}", + login, password, txtCache.Text, mode[cmbMode.SelectedIndex] + (cmbMode.SelectedIndex == 0 ? "" : " -gpu CUDA_0")); +// client.StartInfo.Arguments = string.Format("-jar SheepItClient.jar"); + client.StartInfo.CreateNoWindow = true; + client.StartInfo.UseShellExecute = false; + client.StartInfo.RedirectStandardInput = true; + client.StartInfo.RedirectStandardError = true; + client.StartInfo.RedirectStandardOutput = true; + + client.EnableRaisingEvents = true; + client.ErrorDataReceived += new DataReceivedEventHandler(client_ErrorDataReceived); + client.OutputDataReceived += new DataReceivedEventHandler(client_OutputDataReceived); + client.Exited += new EventHandler(client_Exited); + + try { + client.Start(); + client.BeginErrorReadLine(); + client.BeginOutputReadLine(); + log("client started"); + Icon = trayIcon.Icon = Resources.ShpItOn; + updateLogFile(); + } catch (Exception ex) { + log("can't start client: " + ex.Message); + } + + if (hide && WindowState != FormWindowState.Minimized) { + WindowState = FormWindowState.Minimized; + } + } + + void StopClient() { + try { + tmrStart.Stop(); + if (client == null || client.HasExited) { return; } + // client.CloseMainWindow(); + client.Kill(); + fileLog("Killed"); + log("client killed"); + lastCredits += credits; credits = 0; + lastRendered += framesRendered; framesRendered = 0; + var kill = new Process(); + kill.StartInfo.FileName = @"taskkill.exe"; + kill.StartInfo.Arguments = @"/f /im rend.exe"; + kill.StartInfo.CreateNoWindow = true; + kill.StartInfo.UseShellExecute = false; + kill.Start(); + } catch (Exception ex) { + log(ex.Message); + } + } + + + + public frmMain(string[] args) + { + for (var i = 0; i < args.Length; i++) { + switch (args[i].ToLower()) { + case "-nohide": + hide = false; break; + case "-login": + if (i + 1 >= args.Length) { break; } + login = args[i + 1]; break; + case "-password": + if (i + 1 >= args.Length) { break; } + password = args[i + 1]; break; + } + } + + InitializeComponent(); + + txtCache.Text = settings.String["cache"]; + cmbMode.SelectedIndex = settings.Int["mode"]; + Icon = trayIcon.Icon = Resources.ShpIt; + setFrames("Frames: 0 - Earned: 0"); + + log("started"); + if (login == "") { log("no login"); } + if (password == "") { log("no password"); } + tmrCheck.Start(); + } + + void TmrCheckTick(object sender, EventArgs e) + { + if (lastLocked != IsWorkstationLocked()) { + lastLocked = IsWorkstationLocked(); + log(lastLocked ? "locked" : "unlocked"); + if (lastLocked || lastScreen) { StartClient(); } + else { StopClient(); } + } + + if (lastScreen != IsScreensaverRunning()) { + lastScreen = IsScreensaverRunning(); + if (lastLocked || lastScreen) { tmrStart.Start(); } + else { StopClient(); } + } + + if (minimized != (WindowState == FormWindowState.Minimized)) { + minimized = (WindowState == FormWindowState.Minimized); + trayIcon.Visible = minimized; + Visible = ShowInTaskbar = !minimized; + } + } + + void FrmMainKeyDown(object sender, KeyEventArgs e) + { + if (e.KeyCode == Keys.F2) { StartClient(); } + else if (e.KeyCode == Keys.F3) { StopClient(); } + else if (e.KeyCode == Keys.F4 && client != null && !client.HasExited) { + closeAfterRender = true; + log("exiting after render"); + } + } + + void FrmMainFormClosing(object sender, FormClosingEventArgs e) + { + StopClient(); + if (txtCache.Text != "") { settings.Add("cache", txtCache.Text); } + settings.Add("mode", cmbMode.SelectedIndex); + settings.Save(); + } + + void TrayIconDoubleClick(object sender, EventArgs e) + { + WindowState = FormWindowState.Normal; + trayIcon.Visible = false; + Visible = ShowInTaskbar = true; + } + + void LstLogSelectedIndexChanged(object sender, EventArgs e) + { + tipTool.SetToolTip(lstLog, lstLog.SelectedItem.ToString()); + } + + void StartToolStripMenuItemClick(object sender, EventArgs e) + { + StartClient(); + } + + void ExitToolStripMenuItemClick(object sender, EventArgs e) + { + Close(); + } + + void TmrStartTick(object sender, EventArgs e) + { + log("screensaver " + (lastScreen ? "on" : "off")); + StartClient(); + tmrStart.Stop(); + } + } +} diff --git a/MainForm.resx b/MainForm.resx new file mode 100644 index 0000000..30d9eee --- /dev/null +++ b/MainForm.resx @@ -0,0 +1,135 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 202, 17 + + + 293, 17 + + + 17, 17 + + + 117, 17 + + + 381, 17 + + \ No newline at end of file diff --git a/Program.cs b/Program.cs new file mode 100644 index 0000000..a158eef --- /dev/null +++ b/Program.cs @@ -0,0 +1,29 @@ +/* + * Created by SharpDevelop. + * User: Bernhard + * Date: 24.05.2016 + * Time: 16:25 + */ +using System; +using System.Windows.Forms; + +namespace SheepItRunner +{ + /// + /// Class with program entry point. + /// + internal sealed class Program + { + /// + /// Program entry point. + /// + [STAThread] + private static void Main(string[] args) + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new frmMain(args)); + } + + } +} diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..bb49df7 --- /dev/null +++ b/Properties/AssemblyInfo.cs @@ -0,0 +1,31 @@ +#region Using directives + +using System; +using System.Reflection; +using System.Runtime.InteropServices; + +#endregion + +// 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("SheepItRunner")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("SheepItRunner")] +[assembly: AssemblyCopyright("Copyright 2016")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// This sets the default COM visibility of types in the assembly to invisible. +// If you need to expose a type to COM, use [ComVisible(true)] on that type. +[assembly: ComVisible(false)] + +// The assembly version has following format : +// +// Major.Minor.Build.Revision +// +// You can specify all the values or you can use the default the Revision and +// Build Numbers by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.*")] diff --git a/Resources.Designer.cs b/Resources.Designer.cs new file mode 100644 index 0000000..f1fd352 --- /dev/null +++ b/Resources.Designer.cs @@ -0,0 +1,83 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace SheepItRunner { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SheepItRunner.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Icon similar to (Icon). + /// + internal static System.Drawing.Icon ShpIt { + get { + object obj = ResourceManager.GetObject("ShpIt", resourceCulture); + return ((System.Drawing.Icon)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Icon similar to (Icon). + /// + internal static System.Drawing.Icon ShpItOn { + get { + object obj = ResourceManager.GetObject("ShpItOn", resourceCulture); + return ((System.Drawing.Icon)(obj)); + } + } + } +} diff --git a/Resources.resx b/Resources.resx new file mode 100644 index 0000000..cc2ad1a --- /dev/null +++ b/Resources.resx @@ -0,0 +1,148 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + + AAABAAEAEBAAAAEAGABoAwAAFgAAACgAAAAQAAAAIAAAAAEAGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAD///////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////8AAAAAAAAAAAD///////8AAAD///// + //////////////////////////////////////8AAAD///////////8AAAD///////////////////// + //////////////////////8AAAD///////////8AAAD///////////////////////////////////// + //////8AAAD///////////8AAAD///////////////////////////////////////8AAAAAAAAAAAD/ + //8AAAAAAAAAAAD///////////////////////////////////////////////////////////////// + //////////////////////////8AAAAAAAAAAAD///8AAAD///8AAAD///8AAAD///////////////// + //////////////////8AAAD///8AAAD///8AAAD///8AAAD///////////////////////////8AAAAA + AAAAAAD///8AAAAAAAAAAAD///8AAAAAAAAAAAD///////////////////8AAAD///////////8AAAD/ + //8AAAD///8AAAD///8AAAD///////////////////8AAAAAAAAAAAD///8AAAD///8AAAD///8AAAAA + AAAAAAD///////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////8AAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + + + + + AAABAAEAEBACAAEAAQCwAAAAFgAAACgAAAAQAAAAIAAAAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAU9eUAP//AAD//wAA//8AAPG/AAD7vwAA+78AAPu/AADxHwAA//8AAMVfAAD1XwAAxEcAAN1X + AADFRwAA//8AAP//AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAA + + + \ No newline at end of file diff --git a/SheepItRunner.csproj b/SheepItRunner.csproj new file mode 100644 index 0000000..d945514 --- /dev/null +++ b/SheepItRunner.csproj @@ -0,0 +1,101 @@ + + + + {F9EC15A9-0B67-4826-846C-3F7527A9E5EB} + Debug + AnyCPU + WinExe + SheepItRunner + SheepItRunner + v3.5 + Properties + False + False + False + OnBuildSuccess + False + False + False + obj\$(Configuration)\ + 4 + False + D:\Coding\SharpDevelop\4.4\bin\..\Settings\Settings.SourceAnalysis + + + x86 + 4194304 + False + Auto + 4096 + + + bin\Debug\ + True + Full + False + True + DEBUG;TRACE + Project + D:\Programs\ + obj\ + + + bin\Release\ + False + None + True + False + TRACE + + + + packages\WindowsAPICodePack-Core.1.1.2\lib\Microsoft.WindowsAPICodePack.dll + False + True + + + + 3.5 + + + + + + + 3.5 + + + + + clsAppSettings.cs + + + + MainForm.cs + + + + + Resources.resx + True + + + + + MainForm.cs + + + + + ResXFileCodeGenerator + SheepItRunner + Resources.Designer.cs + + + + + copy /Y $(TargetFileName) D:\Programs\ + + + + \ No newline at end of file diff --git a/SheepItRunner.sln b/SheepItRunner.sln new file mode 100644 index 0000000..72bfef0 --- /dev/null +++ b/SheepItRunner.sln @@ -0,0 +1,18 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +# SharpDevelop 4.4 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SheepItRunner", "SheepItRunner.csproj", "{F9EC15A9-0B67-4826-846C-3F7527A9E5EB}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F9EC15A9-0B67-4826-846C-3F7527A9E5EB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F9EC15A9-0B67-4826-846C-3F7527A9E5EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F9EC15A9-0B67-4826-846C-3F7527A9E5EB}.Release|Any CPU.Build.0 = Release|Any CPU + {F9EC15A9-0B67-4826-846C-3F7527A9E5EB}.Release|Any CPU.ActiveCfg = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/ShpIt.ico b/ShpIt.ico new file mode 100644 index 0000000..bafc2d0 Binary files /dev/null and b/ShpIt.ico differ diff --git a/ShpItOn.ico b/ShpItOn.ico new file mode 100644 index 0000000..8b0acd8 Binary files /dev/null and b/ShpItOn.ico differ diff --git a/bin/Debug/SheepItRunner.exe b/bin/Debug/SheepItRunner.exe new file mode 100644 index 0000000..dfc0879 Binary files /dev/null and b/bin/Debug/SheepItRunner.exe differ diff --git a/packages.config b/packages.config new file mode 100644 index 0000000..4ee4ab5 --- /dev/null +++ b/packages.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/packages/Costura.Fody.1.3.3.0/Content/FodyWeavers.xml.install.xdt b/packages/Costura.Fody.1.3.3.0/Content/FodyWeavers.xml.install.xdt new file mode 100644 index 0000000..4bca747 --- /dev/null +++ b/packages/Costura.Fody.1.3.3.0/Content/FodyWeavers.xml.install.xdt @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/Costura.Fody.1.3.3.0/Content/FodyWeavers.xml.uninstall.xdt b/packages/Costura.Fody.1.3.3.0/Content/FodyWeavers.xml.uninstall.xdt new file mode 100644 index 0000000..ccd42a7 --- /dev/null +++ b/packages/Costura.Fody.1.3.3.0/Content/FodyWeavers.xml.uninstall.xdt @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/Costura.Fody.1.3.3.0/Costura.Fody.1.3.3.0.nupkg b/packages/Costura.Fody.1.3.3.0/Costura.Fody.1.3.3.0.nupkg new file mode 100644 index 0000000..3c055ae Binary files /dev/null and b/packages/Costura.Fody.1.3.3.0/Costura.Fody.1.3.3.0.nupkg differ diff --git a/packages/Costura.Fody.1.3.3.0/Costura.Fody.dll b/packages/Costura.Fody.1.3.3.0/Costura.Fody.dll new file mode 100644 index 0000000..e70fc81 Binary files /dev/null and b/packages/Costura.Fody.1.3.3.0/Costura.Fody.dll differ diff --git a/packages/Costura.Fody.1.3.3.0/Costura.Fody.pdb b/packages/Costura.Fody.1.3.3.0/Costura.Fody.pdb new file mode 100644 index 0000000..5e7026f Binary files /dev/null and b/packages/Costura.Fody.1.3.3.0/Costura.Fody.pdb differ diff --git a/packages/Costura.Fody.1.3.3.0/Tools/commands.psm1 b/packages/Costura.Fody.1.3.3.0/Tools/commands.psm1 new file mode 100644 index 0000000..9c2a031 --- /dev/null +++ b/packages/Costura.Fody.1.3.3.0/Tools/commands.psm1 @@ -0,0 +1,106 @@ +function Resolve-ProjectName { + param( + [parameter(ValueFromPipelineByPropertyName = $true)] + [string[]]$ProjectName + ) + + if($ProjectName) { + $projects = Get-Project $ProjectName + } + else { + # All projects by default + $projects = Get-Project + } + + $projects +} + +function Get-MSBuildProject { + param( + [parameter(ValueFromPipelineByPropertyName = $true)] + [string[]]$ProjectName + ) + Process { + (Resolve-ProjectName $ProjectName) | % { + $path = $_.FullName + @([Microsoft.Build.Evaluation.ProjectCollection]::GlobalProjectCollection.GetLoadedProjects($path))[0] + } + } +} + +function Install-CleanReferencesTarget() +{ + $buildProject = Get-MSBuildProject + + if ($buildProject.Xml.Targets | Where-Object { "CleanReferenceCopyLocalPaths" -contains $_.Name }) + { + Write-Host "Target CleanReferenceCopyLocalPaths already exists." -foregroundcolor Black -backgroundcolor Yellow + + return + } + + $usingTask = $buildProject.Xml.AddUsingTask("CosturaCleanup", "`$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll", "") + $usingTask.TaskFactory = "CodeTaskFactory" + $parameterGroup = $usingTask.AddParameterGroup() + $configParam = $parameterGroup.AddParameter("Config", "false", "true", "Microsoft.Build.Framework.ITaskItem") + $filesParam = $parameterGroup.AddParameter("Files", "false", "true", "Microsoft.Build.Framework.ITaskItem[]") + $taskBody = $usingTask.AddUsingTaskBody("true", " + + + + + +(); +var attribute = config.Attribute(`"ExcludeAssemblies`"); +if (attribute != null) + foreach (var item in attribute.Value.Split('|').Select(x => x.Trim()).Where(x => x != string.Empty)) + excludedAssemblies.Add(item); +var element = config.Element(`"ExcludeAssemblies`"); +if (element != null) + foreach (var item in element.Value.Split(new[] { `"\r\n`", `"\n`" }, StringSplitOptions.RemoveEmptyEntries).Select(x => x.Trim()).Where(x => x != string.Empty)) + excludedAssemblies.Add(item); + +var filesToCleanup = Files.Select(f => f.ItemSpec).Where(f => !excludedAssemblies.Contains(Path.GetFileNameWithoutExtension(f), StringComparer.InvariantCultureIgnoreCase)); + +foreach (var item in filesToCleanup) + File.Delete(item); +]]> + ") + + $target = $buildProject.Xml.AddTarget("CleanReferenceCopyLocalPaths") + $target.AfterTargets = "AfterBuild;NonWinFodyTarget" + $deleteTask = $target.AddTask("CosturaCleanup") + $deleteTask.SetParameter("Config", "FodyWeavers.xml") + $deleteTask.SetParameter("Files", "@(ReferenceCopyLocalPaths->`'`$(OutDir)%(DestinationSubDirectory)%(Filename)%(Extension)`')") + + $buildProject.Save() + + Write-Host "Added target CleanReferenceCopyLocalPaths." +} + +function Uninstall-CleanReferencesTarget() +{ + $buildProject = Get-MSBuildProject + + $target = $buildProject.Xml.Targets | Where-Object { "CleanReferenceCopyLocalPaths" -contains $_.Name } + $usingTask = $buildProject.Xml.UsingTasks | Where-Object { "CosturaCleanup" -contains $_.TaskName } + + if (!$target) + { + Write-Host "Target CleanReferenceCopyLocalPaths did not exist." -foregroundcolor Black -backgroundcolor Yellow + + return + } + + $buildProject.Xml.RemoveChild($usingTask) + $buildProject.Xml.RemoveChild($target) + + $buildProject.Save() + + Write-Host "Removed target CleanReferenceCopyLocalPaths." +} \ No newline at end of file diff --git a/packages/Costura.Fody.1.3.3.0/Tools/init.ps1 b/packages/Costura.Fody.1.3.3.0/Tools/init.ps1 new file mode 100644 index 0000000..c3b801e --- /dev/null +++ b/packages/Costura.Fody.1.3.3.0/Tools/init.ps1 @@ -0,0 +1,3 @@ +param($installPath, $toolsPath, $package, $project) + +Import-Module (Join-Path $toolsPath commands.psm1) \ No newline at end of file diff --git a/packages/Fody.1.28.3/Content/FodyWeavers.xml b/packages/Fody.1.28.3/Content/FodyWeavers.xml new file mode 100644 index 0000000..0227a5d --- /dev/null +++ b/packages/Fody.1.28.3/Content/FodyWeavers.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/packages/Fody.1.28.3/Fody.1.28.3.nupkg b/packages/Fody.1.28.3/Fody.1.28.3.nupkg new file mode 100644 index 0000000..c875709 Binary files /dev/null and b/packages/Fody.1.28.3/Fody.1.28.3.nupkg differ diff --git a/packages/Fody.1.28.3/Fody.dll b/packages/Fody.1.28.3/Fody.dll new file mode 100644 index 0000000..c0cd49d Binary files /dev/null and b/packages/Fody.1.28.3/Fody.dll differ diff --git a/packages/Fody.1.28.3/Fody.pdb b/packages/Fody.1.28.3/Fody.pdb new file mode 100644 index 0000000..6747bf2 Binary files /dev/null and b/packages/Fody.1.28.3/Fody.pdb differ diff --git a/packages/Fody.1.28.3/FodyCommon.dll b/packages/Fody.1.28.3/FodyCommon.dll new file mode 100644 index 0000000..bee8942 Binary files /dev/null and b/packages/Fody.1.28.3/FodyCommon.dll differ diff --git a/packages/Fody.1.28.3/FodyCommon.pdb b/packages/Fody.1.28.3/FodyCommon.pdb new file mode 100644 index 0000000..f9f30aa Binary files /dev/null and b/packages/Fody.1.28.3/FodyCommon.pdb differ diff --git a/packages/Fody.1.28.3/FodyIsolated.dll b/packages/Fody.1.28.3/FodyIsolated.dll new file mode 100644 index 0000000..ae9ec8e Binary files /dev/null and b/packages/Fody.1.28.3/FodyIsolated.dll differ diff --git a/packages/Fody.1.28.3/FodyIsolated.pdb b/packages/Fody.1.28.3/FodyIsolated.pdb new file mode 100644 index 0000000..53c6bc1 Binary files /dev/null and b/packages/Fody.1.28.3/FodyIsolated.pdb differ diff --git a/packages/Fody.1.28.3/Mono.Cecil.Mdb.dll b/packages/Fody.1.28.3/Mono.Cecil.Mdb.dll new file mode 100644 index 0000000..703294f Binary files /dev/null and b/packages/Fody.1.28.3/Mono.Cecil.Mdb.dll differ diff --git a/packages/Fody.1.28.3/Mono.Cecil.Pdb.dll b/packages/Fody.1.28.3/Mono.Cecil.Pdb.dll new file mode 100644 index 0000000..86a2145 Binary files /dev/null and b/packages/Fody.1.28.3/Mono.Cecil.Pdb.dll differ diff --git a/packages/Fody.1.28.3/Mono.Cecil.Rocks.dll b/packages/Fody.1.28.3/Mono.Cecil.Rocks.dll new file mode 100644 index 0000000..66bb7e2 Binary files /dev/null and b/packages/Fody.1.28.3/Mono.Cecil.Rocks.dll differ diff --git a/packages/Fody.1.28.3/Mono.Cecil.dll b/packages/Fody.1.28.3/Mono.Cecil.dll new file mode 100644 index 0000000..f1a6913 Binary files /dev/null and b/packages/Fody.1.28.3/Mono.Cecil.dll differ diff --git a/packages/Fody.1.28.3/Tools/install.ps1 b/packages/Fody.1.28.3/Tools/install.ps1 new file mode 100644 index 0000000..82be862 --- /dev/null +++ b/packages/Fody.1.28.3/Tools/install.ps1 @@ -0,0 +1,20 @@ +param($installPath, $toolsPath, $package, $project) + + +# Need to load MSBuild assembly if it's not loaded yet. +Add-Type -AssemblyName 'Microsoft.Build, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' + +# Grab the loaded MSBuild project for the project +$buildProject = [Microsoft.Build.Evaluation.ProjectCollection]::GlobalProjectCollection.GetLoadedProjects($project.FullName) | Select-Object -First 1 + +$fodyPathProperty = $buildProject.GetProperty("FodyPath") + +# Dont do a null check since is seems evaluating the value causes powershit to have a conniption +try +{ + $buildProject.RemoveProperty($fodyPathProperty); +} +catch{} + +$project.Save() + diff --git a/packages/Fody.1.28.3/Tools/uninstall.ps1 b/packages/Fody.1.28.3/Tools/uninstall.ps1 new file mode 100644 index 0000000..e5af210 --- /dev/null +++ b/packages/Fody.1.28.3/Tools/uninstall.ps1 @@ -0,0 +1 @@ +param($installPath, $toolsPath, $package, $project) diff --git a/packages/Fody.1.28.3/build/Fody.targets b/packages/Fody.1.28.3/build/Fody.targets new file mode 100644 index 0000000..4cfe7ba --- /dev/null +++ b/packages/Fody.1.28.3/build/Fody.targets @@ -0,0 +1,86 @@ + + + + + + $(NCrunchOriginalSolutionDir) + + + + + $(SolutionDir) + + + + + $(MSBuildProjectDirectory)..\..\..\ + + + + + + + $(KeyOriginatorFile) + + + + + $(AssemblyOriginatorKeyFile) + + + + + + + + + + $(ProjectDir)$(IntermediateOutputPath) + $(SignAssembly) + $(MSBuildThisFileDirectory)..\ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/WindowsAPICodePack-Core.1.1.2/WindowsAPICodePack-Core.1.1.2.nupkg b/packages/WindowsAPICodePack-Core.1.1.2/WindowsAPICodePack-Core.1.1.2.nupkg new file mode 100644 index 0000000..94e33a6 Binary files /dev/null and b/packages/WindowsAPICodePack-Core.1.1.2/WindowsAPICodePack-Core.1.1.2.nupkg differ diff --git a/packages/WindowsAPICodePack-Core.1.1.2/lib/Microsoft.WindowsAPICodePack.dll b/packages/WindowsAPICodePack-Core.1.1.2/lib/Microsoft.WindowsAPICodePack.dll new file mode 100644 index 0000000..275c251 Binary files /dev/null and b/packages/WindowsAPICodePack-Core.1.1.2/lib/Microsoft.WindowsAPICodePack.dll differ diff --git a/packages/WindowsAPICodePack-Core.1.1.2/lib/Microsoft.WindowsAPICodePack.xml b/packages/WindowsAPICodePack-Core.1.1.2/lib/Microsoft.WindowsAPICodePack.xml new file mode 100644 index 0000000..44c58f7 --- /dev/null +++ b/packages/WindowsAPICodePack-Core.1.1.2/lib/Microsoft.WindowsAPICodePack.xml @@ -0,0 +1,2934 @@ + + + + Microsoft.WindowsAPICodePack + + + + + Provides access to the Application Restart and Recovery + features available in Windows Vista or higher. Application Restart and Recovery lets an + application do some recovery work to save data before the process exits. + + + + + Registers an application for recovery by Application Restart and Recovery. + + An object that specifies + the callback method, an optional parameter to pass to the callback + method and a time interval. + + The registration failed due to an invalid parameter. + + + The registration failed. + The time interval is the period of time within + which the recovery callback method + calls the method to indicate + that it is still performing recovery work. + + + + Removes an application's recovery registration. + + + The attempt to unregister for recovery failed. + + + + Removes an application's restart registration. + + + The attempt to unregister for restart failed. + + + + Called by an application's method + to indicate that it is still performing recovery work. + + A value indicating whether the user + canceled the recovery. + + This method must be called from a registered callback method. + + + + Called by an application's method to + indicate that the recovery work is complete. + + + This should + be the last call made by the method because + Windows Error Reporting will terminate the application + after this method is invoked. + + true to indicate the the program was able to complete its recovery + work before terminating; otherwise false. + + + + Registers an application for automatic restart if + the application + is terminated by Windows Error Reporting. + + An object that specifies + the command line arguments used to restart the + application, and + the conditions under which the application should not be + restarted. + Registration failed due to an invalid parameter. + The attempt to register failed. + A registered application will not be restarted if it executed for less than 60 seconds before terminating. + + + + This exception is thrown when there are problems with registering, unregistering or updating + applications using Application Restart Recovery. + + + + + Default constructor. + + + + + Initializes an exception with a custom message. + + A custom message for the exception. + + + + Initializes an exception with custom message and inner exception. + + A custom message for the exception. + Inner exception. + + + + Initializes an exception with custom message and error code. + + A custom message for the exception. + An error code (hresult) from which to generate the exception. + + + + Initializes an exception from serialization info and a context. + + Serialization info from which to create exception. + Streaming context from which to create exception. + + + + The that represents the callback method invoked + by the system when an application has registered for + application recovery. + + An application-defined state object that is passed to the callback method. + The callback method will be invoked + prior to the application being terminated by Windows Error Reporting (WER). To keep WER from terminating the application before + the callback method completes, the callback method must + periodically call the method. + + + + + Defines a class that contains a callback delegate and properties of the application + as defined by the user. + + + + + Initializes a recovery data wrapper with a callback method and the current + state of the application. + + The callback delegate. + The current state of the application. + + + + Gets or sets a value that determines the recovery callback function. + + + + + Gets or sets a value that determines the application state. + + + + + Invokes the recovery callback function. + + + + + Defines methods and properties for recovery settings, and specifies options for an application that attempts + to perform final actions after a fatal event, such as an + unhandled exception. + + This class is used to register for application recovery. + See the class. + + + + + Initializes a new instance of the RecoverySettings class. + + A recovery data object that contains the callback method (invoked by the system + before Windows Error Reporting terminates the application) and an optional state object. + The time interval within which the + callback method must invoke to + prevent WER from terminating the application. + + + + + Gets the recovery data object that contains the callback method and an optional + parameter (usually the state of the application) to be passed to the + callback method. + + A object. + + + + Gets the time interval for notifying Windows Error Reporting. + The method must invoke + within this interval to prevent WER from terminating the application. + + + The recovery ping interval is specified in milliseconds. + By default, the interval is 5 seconds. + If you specify zero, the default interval is used. + + + + + Returns a string representation of the current state + of this object. + + A object. + + + + Specifies the conditions when Windows Error Reporting + should not restart an application that has registered + for automatic restart. + + + + + Always restart the application. + + + + + Do not restart when the application has crashed. + + + + + Do not restart when the application is hung. + + + + + Do not restart when the application is terminated + due to a system update. + + + + + Do not restart when the application is terminated + because of a system reboot. + + + + + Specifies the options for an application to be automatically + restarted by Windows Error Reporting. + + Regardless of these + settings, the application + will not be restarted if it executed for less than 60 seconds before + terminating. + + + + Creates a new instance of the RestartSettings class. + + The command line arguments + used to restart the application. + A bitwise combination of the RestartRestrictions + values that specify + when the application should not be restarted. + + + + + Gets the command line arguments used to restart the application. + + A object. + + + + Gets the set of conditions when the application + should not be restarted. + + A set of values. + + + + Returns a string representation of the current state + of this object. + + A that displays + the command line arguments + and restrictions for restarting the application. + + + + This exception is thrown when there are problems with getting piece of data within PowerManager. + + + + + Default constructor. + + + + + Initializes an excpetion with a custom message. + + A custom message for the exception. + + + + Initializes an exception with custom message and inner exception. + + A custom message for the exception. + An inner exception on which to base this exception. + + + + Initializes an exception from serialization info and a context. + + SerializationInfo for the exception. + StreamingContext for the exception. + + + + Gets the Guid relating to the currently active power scheme. + + Reserved for future use, this must be set to IntPtr.Zero + Returns a Guid referring to the currently active power scheme. + + + + A snapshot of the state of the battery. + + + + + Gets a value that indicates whether the battery charger is + operating on external power. + + A value. True indicates the battery charger is operating on AC power. + + + + Gets the maximum charge of the battery (in mW). + + An value. + + + + Gets the current charge of the battery (in mW). + + An value. + + + + Gets the rate of discharge for the battery (in mW). + + + If plugged in, fully charged: DischargeRate = 0. + If plugged in, charging: DischargeRate = positive mW per hour. + If unplugged: DischargeRate = negative mW per hour. + + An value. + + + + Gets the estimated time remaining until the battery is empty. + + A object. + + + + Gets the manufacturer's suggested battery charge level + that should cause a critical alert to be sent to the user. + + An value. + + + + Gets the manufacturer's suggested battery charge level + that should cause a warning to be sent to the user. + + An value. + + + + Generates a string that represents this BatteryState object. + + A representation of this object's current state. + + + + This class keeps track of the current state of each type of event. + The MessageManager class tracks event handlers. + This class only deals with each event type (i.e. + BatteryLifePercentChanged) as a whole. + + + + + Determines if a message should be caught, preventing + the event handler from executing. + This is needed when an event is initially registered. + + The event to check. + A boolean value. Returns true if the + message should be caught. + + + + Enumeration of execution states. + + + + + No state configured. + + + + + Forces the system to be in the working state by resetting the system idle timer. + + + + + Forces the display to be on by resetting the display idle timer. + + + + + Enables away mode. This value must be specified with ES_CONTINUOUS. + Away mode should be used only by media-recording and media-distribution applications that must perform critical background processing on desktop computers while the computer appears to be sleeping. See Remarks. + + Windows Server 2003 and Windows XP/2000: ES_AWAYMODE_REQUIRED is not supported. + + + + + Informs the system that the state being set should remain in effect until the next call that uses ES_CONTINUOUS and one of the other state flags is cleared. + + + + + This class generates .NET events based on Windows messages. + The PowerRegWindow class processes the messages from Windows. + + + + + Registers a callback for a power event. + + Guid for the event. + Event handler for the specified event. + + + + Unregisters an event handler for a power event. + + Guid for the event. + Event handler to unregister. + + + + Ensures that the hidden window is initialized and + listening for messages. + + + + + Catch Windows messages and generates events for power specific + messages. + + + + + Adds an event handler to call when Windows sends + a message for an event. + + Guid for the event. + Event handler for the event. + + + + Removes an event handler. + + Guid for the event. + Event handler to remove. + Cannot unregister + a function that is not registered. + + + + Executes any registered event handlers. + + ArrayList of event handlers. + + + + This method is called when a Windows message + is sent to this window. + The method calls the registered event handlers. + + + + + Registers the application to receive power setting notifications + for the specific power setting event. + + Handle indicating where the power setting + notifications are to be sent. + The GUID of the power setting for + which notifications are to be sent. + Returns a notification handle for unregistering + power notifications. + + + + Enables registration for + power-related event notifications and provides access to power settings. + + + + + Raised each time the active power scheme changes. + + The event handler specified for removal was not registered. + Requires Vista/Windows Server 2008. + + + + Raised when the power source changes. + + The event handler specified for removal was not registered. + Requires Vista/Windows Server 2008. + + + + Raised when the remaining battery life changes. + + The event handler specified for removal was not registered. + Requires Vista/Windows Server 2008. + + + + Raised when the monitor status changes. + + The event handler specified for removal was not registered. + Requires Vista/Windows Server 2008. + + + + Raised when the system will not be moving into an idle + state in the near future so applications should + perform any tasks that + would otherwise prevent the computer from entering an idle state. + + The event handler specified for removal was not registered. + Requires Vista/Windows Server 2008. + + + + Gets a snapshot of the current battery state. + + A instance that represents + the state of the battery at the time this method was called. + The system does not have a battery. + Requires XP/Windows Server 2003 or higher. + + + + Gets or sets a value that indicates whether the monitor is + set to remain active. + + Requires XP/Windows Server 2003 or higher. + The caller does not have sufficient privileges to set this property. + + This information is typically used by applications + that display information but do not require + user interaction. For example, video playback applications. + to set this property. Demand value: ; Named Permission Sets: FullTrust. + A value. True if the monitor + is required to remain on. + + + + Gets or sets a value that indicates whether the system + is required to be in the working state. + + Requires XP/Windows Server 2003 or higher. + The caller does not have sufficient privileges to set this property. + + to set this property. Demand value: ; Named Permission Sets: FullTrust. + A value. + + + + Gets a value that indicates whether a battery is present. + The battery can be a short term battery. + + Requires XP/Windows Server 2003 or higher. + A value. + + + + Gets a value that indicates whether the battery is a short term battery. + + Requires XP/Windows Server 2003 or higher. + A value. + + + + Gets a value that indicates a UPS is present to prevent + sudden loss of power. + + Requires XP/Windows Server 2003 or higher. + A value. + + + + Gets a value that indicates the current power scheme. + + Requires Vista/Windows Server 2008. + A value. + + + + Gets a value that indicates the remaining battery life + (as a percentage of the full battery charge). + This value is in the range 0-100, + where 0 is not charged and 100 is fully charged. + + The system does not have a battery. + Requires Vista/Windows Server 2008. + An value. + + + + Gets a value that indictates whether the monitor is on. + + Requires Vista/Windows Server 2008. + A value. + + + + Gets the current power source. + + Requires Vista/Windows Server 2008. + A value. + + + + Allows an application to inform the system that it + is in use, thereby preventing the system from entering + the sleeping power state or turning off the display + while the application is running. + + The thread's execution requirements. + Thrown if the SetThreadExecutionState call fails. + + + + Specifies the supported power personalities. + + + + + The power personality Guid does not match a known value. + + + + + Power settings designed to deliver maximum performance + at the expense of power consumption savings. + + + + + Power settings designed consume minimum power + at the expense of system performance and responsiveness. + + + + + Power settings designed to balance performance + and power consumption. + + + + + Specifies the power source currently supplying power to the system. + + Application should be aware of the power source because + some power sources provide a finite power supply. + An application might take steps to conserve power while + the system is using such a source. + + + + + The computer is powered by an AC power source + or a similar device, such as a laptop powered + by a 12V automotive adapter. + + + + + The computer is powered by a built-in battery. + A battery has a limited + amount of power; applications should conserve resources + where possible. + + + + + The computer is powered by a short-term power source + such as a UPS device. + + + + + Abstract base class for all dialog controls + + + + + Creates a new instance of a dialog control + + + + + Creates a new instance of a dialog control with the specified name. + + The name for this dialog. + + + + The native dialog that is hosting this control. This property is null is + there is not associated dialog + + + + + Gets the name for this control. + + A value. + + + + Gets the identifier for this control. + + An value. + + + + Calls the hosting dialog, if it exists, to check whether the + property can be set in the dialog's current state. + The host should throw an exception if the change is not supported. + Note that if the dialog isn't set yet, + there are no restrictions on setting the property. + + The name of the property that is changing + + + + Calls the hosting dialog, if it exists, to + to indicate that a property has changed, and that + the dialog should do whatever is necessary + to propagate the change to the native control. + Note that if the dialog isn't set yet, + there are no restrictions on setting the property. + + The name of the property that is changing. + + + + Compares two objects to determine whether they are equal + + The object to compare against. + A value. + + + + Serves as a hash function for a particular type. + + An hash code for this control. + + + + Strongly typed collection for dialog controls. + + DialogControl + + + + Inserts an dialog control at the specified index. + + The location to insert the control. + The item to insert. + A control with + the same name already exists in this collection -or- + the control is being hosted by another dialog -or- the associated dialog is + showing and cannot be modified. + + + + Removes the control at the specified index. + + The location of the control to remove. + + The associated dialog is + showing and cannot be modified. + + + + Defines the indexer that supports accessing controls by name. + + + Control names are case sensitive. + This indexer is useful when the dialog is created in XAML + rather than constructed in code. + + The name cannot be null or a zero-length string. + If there is more than one control with the same name, only the first control will be returned. + + + + Searches for the control who's id matches the value + passed in the parameter. + + + An integer containing the identifier of the + control being searched for. + + A DialogControl who's id matches the value of the + parameter. + + + + Indicates that the implementing class is a dialog that can host + customizable dialog controls (subclasses of DialogControl). + + + + + Returns if changes to the collection are allowed. + + true if collection change is allowed. + + + + Applies changes to the collection. + + + + + Handle notifications of individual child + pseudo-controls' properties changing.. + Prefilter should throw if the property + cannot be set in the dialog's current state. + PostProcess should pass on changes to native control, + if appropriate. + + The name of the property. + The control propertyName applies to. + true if the property change is allowed. + + + + Called when a control currently in the collection + has a property changed. + + The name of the property changed. + The control whose property has changed. + + + + Dialog Show State + + + + + Pre Show + + + + + Currently Showing + + + + + Currently Closing + + + + + Closed + + + + + Encapsulates the native logic required to create, + configure, and show a TaskDialog, + via the TaskDialogIndirect() Win32 function. + + A new instance of this class should + be created for each messagebox show, as + the HWNDs for TaskDialogs do not remain constant + across calls to TaskDialogIndirect. + + + + + Encapsulates additional configuration needed by NativeTaskDialog + that it can't get from the TASKDIALOGCONFIG struct. + + + + + Internal class containing most native interop declarations used + throughout the library. + Functions that are not performance intensive belong in this class. + + + + + Gets the handle to the Icon + + + + + Encapsulates a new-to-Vista Win32 TaskDialog window + - a powerful successor to the MessageBox available + in previous versions of Windows. + + + + + Occurs when a progress bar changes. + + + + + Occurs when a user clicks a hyperlink. + + + + + Occurs when the TaskDialog is closing. + + + + + Occurs when a user clicks on Help. + + + + + Occurs when the TaskDialog is opened. + + + + + Gets or sets a value that contains the owner window's handle. + + + + + Gets or sets a value that contains the message text. + + + + + Gets or sets a value that contains the instruction text. + + + + + Gets or sets a value that contains the caption text. + + + + + Gets or sets a value that contains the footer text. + + + + + Gets or sets a value that contains the footer check box text. + + + + + Gets or sets a value that contains the expanded text in the details section. + + + + + Gets or sets a value that determines if the details section is expanded. + + + + + Gets or sets a value that contains the expanded control text. + + + + + Gets or sets a value that contains the collapsed control text. + + + + + Gets or sets a value that determines if Cancelable is set. + + + + + Gets or sets a value that contains the TaskDialog main icon. + + + + + Gets or sets a value that contains the footer icon. + + + + + Gets or sets a value that contains the standard buttons. + + + + + Gets a value that contains the TaskDialog controls. + + + + + Gets or sets a value that determines if hyperlinks are enabled. + + + + + Gets or sets a value that indicates if the footer checkbox is checked. + + + + + Gets or sets a value that contains the expansion mode for this dialog. + + + + + Gets or sets a value that contains the startup location. + + + + + Gets or sets the progress bar on the taskdialog. ProgressBar a visual representation + of the progress of a long running operation. + + + + + Creates a basic TaskDialog window + + + + + Creates and shows a task dialog with the specified message text. + + The text to display. + The dialog result. + + + + Creates and shows a task dialog with the specified supporting text and main instruction. + + The supporting text to display. + The main instruction text to display. + The dialog result. + + + + Creates and shows a task dialog with the specified supporting text, main instruction, and dialog caption. + + The supporting text to display. + The main instruction text to display. + The caption for the dialog. + The dialog result. + + + + Creates and shows a task dialog. + + The dialog result. + + + + Close TaskDialog + + if TaskDialog is not showing. + + + + Close TaskDialog with a given TaskDialogResult + + TaskDialogResult to return from the TaskDialog.Show() method + if TaskDialog is not showing. + + + + Sets important text properties. + + An instance of a object. + + + + Dispose TaskDialog Resources + + + + + TaskDialog Finalizer + + + + + Dispose TaskDialog Resources + + If true, indicates that this is being called via Dispose rather than via the finalizer. + + + + Indicates whether this feature is supported on the current platform. + + + + + Defines a common class for all task dialog bar controls, such as the progress and marquee bars. + + + + + Creates a new instance of this class. + + + + + Creates a new instance of this class with the specified name. + + The name for this control. + + + + Gets or sets the state of the progress bar. + + + + + Resets the state of the control to normal. + + + + + Implements a button that can be hosted in a task dialog. + + + + + Creates a new instance of this class. + + + + + Creates a new instance of this class with the specified property settings. + + The name of the button. + The button label. + + + + Gets or sets a value that controls whether the elevation icon is displayed. + + + + + Defines the abstract base class for task dialog buttons. + Classes that inherit from this class will inherit + the Text property defined in this class. + + + + + Creates a new instance on a task dialog button. + + + + + Creates a new instance on a task dialog button with + the specified name and text. + + The name for this button. + The label for this button. + + + + Raised when the task dialog button is clicked. + + + + + Gets or sets the button text. + + + + + Gets or sets a value that determines whether the + button is enabled. The enabled state can cannot be changed + before the dialog is shown. + + + + + Gets or sets a value that indicates whether + this button is the default button. + + + + + Returns the Text property value for this button. + + A . + + + + Data associated with event. + + + + + Gets or sets the standard button that was clicked. + + + + + Gets or sets the text of the custom button that was clicked. + + + + + Represents a command-link. + + + + + Creates a new instance of this class. + + + + + Creates a new instance of this class with the specified name and label. + + The name for this button. + The label for this button. + + + + Creates a new instance of this class with the specified name,label, and instruction. + + The name for this button. + The label for this button. + The instruction for this command link. + + + + Gets or sets the instruction associated with this command link button. + + + + + Returns a string representation of this object. + + A + + + + Declares the abstract base class for all custom task dialog controls. + + + + + Creates a new instance of a task dialog control. + + + + + Creates a new instance of a task dialog control with the specified name. + + The name for this control. + + + + Specifies the options for expand/collapse sections in dialogs. + + + + + Do not show the content. + + + + + Show the content. + + + + + Expand the footer content. + + + + + Defines event data associated with a HyperlinkClick event. + + + + + Creates a new instance of this class with the specified link text. + + The text of the hyperlink that was clicked. + + + + Gets or sets the text of the hyperlink that was clicked. + + + + + Provides a visual representation of the progress of a long running operation. + + + + + Creates a new instance of this class. + + + + + Creates a new instance of this class with the specified name. + And using the default values: Min = 0, Max = 100, Current = 0 + + The name of the control. + + + + Creates a new instance of this class with the specified + minimum, maximum and current values. + + The minimum value for this control. + The maximum value for this control. + The current value for this control. + + + + Gets or sets the minimum value for the control. + + + + + Gets or sets the maximum value for the control. + + + + + Gets or sets the current value for the control. + + + + + Verifies that the progress bar's value is between its minimum and maximum. + + + + + Resets the control to its minimum value. + + + + + Sets the state of a task dialog progress bar. + + + + + Uninitialized state, this should never occur. + + + + + Normal state. + + + + + An error occurred. + + + + + The progress is paused. + + + + + Displays marquee (indeterminate) style progress + + + + + Defines a radio button that can be hosted in by a + object. + + + + + Creates a new instance of this class. + + + + + Creates a new instance of this class with + the specified name and text. + + The name for this control. + The value for this controls + property. + + + + Indicates the various buttons and options clicked by the user on the task dialog. + + + + + No button was selected. + + + + + "OK" button was clicked + + + + + "Yes" button was clicked + + + + + "No" button was clicked + + + + + "Cancel" button was clicked + + + + + "Retry" button was clicked + + + + + "Close" button was clicked + + + + + A custom button was clicked. + + + + + Identifies one of the standard buttons that + can be displayed via TaskDialog. + + + + + No buttons on the dialog. + + + + + An "OK" button. + + + + + A "Yes" button. + + + + + A "No" button. + + + + + A "Cancel" button. + + + + + A "Retry" button. + + + + + A "Close" button. + + + + + Specifies the icon displayed in a task dialog. + + + + + Displays no icons (default). + + + + + Displays the warning icon. + + + + + Displays the error icon. + + + + + Displays the Information icon. + + + + + Displays the User Account Control shield. + + + + + Specifies the initial display location for a task dialog. + + + + + The window placed in the center of the screen. + + + + + The window centered relative to the window that launched the dialog. + + + + + The event data for a TaskDialogTick event. + + + + + Initializes the data associated with the TaskDialog tick event. + + The total number of ticks since the control was activated. + + + + Gets a value that determines the current number of ticks. + + + + + Represents a network on the local machine. + It can also represent a collection of network + connections with a similar network signature. + + + Instances of this class are obtained by calling + methods on the class. + + + + + Gets or sets the category of a network. The + categories are trusted, untrusted, or + authenticated. + + A value. + + + + Gets the local date and time when the network + was connected. + + A object. + + + + Gets the network connections for the network. + + A object. + + + + Gets the connectivity state of the network. + + A value. + Connectivity provides information on whether + the network is connected, and the protocols + in use for network traffic. + + + + Gets the local date and time when the + network was created. + + A object. + + + + Gets or sets a description for the network. + + A value. + + + + Gets the domain type of the network. + + A value. + The domain + indictates whether the network is an Active + Directory Network, and whether the machine + has been authenticated by Active Directory. + + + + Gets a value that indicates whether there is + network connectivity. + + A value. + + + + Gets a value that indicates whether there is + Internet connectivity. + + A value. + + + + Gets or sets the name of the network. + + A value. + + + + Gets a unique identifier for the network. + + A value. + + + + An enumerable collection of objects. + + + + + Returns the strongly typed enumerator for this collection. + + An object. + + + + Returns the enumerator for this collection. + + An object. + + + + Represents a connection to a network. + + A collection containing instances of this class is obtained by calling + the property. + + + + Retrieves an object that represents the network + associated with this connection. + + A object. + + + + Gets the adapter identifier for this connection. + + A object. + + + + Gets the unique identifier for this connection. + + A object. + + + + Gets a value that indicates the connectivity of this connection. + + A value. + + + + Gets a value that indicates whether the network associated + with this connection is + an Active Directory network and whether the machine + has been authenticated by Active Directory. + + A value. + + + + Gets a value that indicates whether this + connection has Internet access. + + A value. + + + + Gets a value that indicates whether this connection has + network connectivity. + + A value. + + + + An enumerable collection of objects. + + + + + Returns the strongly typed enumerator for this collection. + + A object. + + + + Returns the enumerator for this collection. + + A object. + + + + Specifies types of network connectivity. + + + + + The underlying network interfaces have no + connectivity to any network. + + + + + There is connectivity to the Internet + using the IPv4 protocol. + + + + + There is connectivity to a routed network + using the IPv4 protocol. + + + + + There is connectivity to a network, but + the service cannot detect any IPv4 + network traffic. + + + + + There is connectivity to the local + subnet using the IPv4 protocol. + + + + + There is connectivity to the Internet + using the IPv4 protocol. + + + + + There is connectivity to a local + network using the IPv6 protocol. + + + + + There is connectivity to a network, + but the service cannot detect any + IPv6 network traffic + + + + + There is connectivity to the local + subnet using the IPv6 protocol. + + + + + Specifies the domain type of a network. + + + + + The network is not an Active Directory network. + + + + + The network is an Active Directory network, but this machine is not authenticated against it. + + + + + The network is an Active Directory network, and this machine is authenticated against it. + + + + + Specifies the trust level for a + network. + + + + + The network is a public (untrusted) network. + + + + + The network is a private (trusted) network. + + + + + The network is authenticated against an Active Directory domain. + + + + + Specifies the level of connectivity for + networks returned by the + + class. + + + + + Networks that the machine is connected to. + + + + + Networks that the machine is not connected to. + + + + + All networks. + + + + + Provides access to objects that represent networks and network connections. + + + + + Retrieves a collection of objects that represent the networks defined for this machine. + + + The that specify the connectivity level of the returned objects. + + + A of objects. + + + + + Retrieves the identified by the specified network identifier. + + + A that specifies the unique identifier for the network. + + + The that represents the network identified by the identifier. + + + + + Retrieves a collection of objects that represent the connections for this machine. + + + A containing the network connections. + + + + + Retrieves the identified by the specified connection identifier. + + + A that specifies the unique identifier for the network connection. + + + The identified by the specified identifier. + + + + + Gets a value that indicates whether this machine + has Internet connectivity. + + A value. + + + + Gets a value that indicates whether this machine + has network connectivity. + + A value. + + + + Gets the connectivity state of this machine. + + A value. + + + + Defines a unique key for a Shell Property + + + + + A unique GUID for the property + + + + + Property identifier (PID) + + + + + PropertyKey Constructor + + A unique GUID for the property + Property identifier (PID) + + + + PropertyKey Constructor + + A string represenstion of a GUID for the property + Property identifier (PID) + + + + Returns whether this object is equal to another. This is vital for performance of value types. + + The object to compare against. + Equality result. + + + + Returns the hash code of the object. This is vital for performance of value types. + + + + + + Returns whether this object is equal to another. This is vital for performance of value types. + + The object to compare against. + Equality result. + + + + Implements the == (equality) operator. + + First property key to compare. + Second property key to compare. + true if object a equals object b. false otherwise. + + + + Implements the != (inequality) operator. + + First property key to compare + Second property key to compare. + true if object a does not equal object b. false otherwise. + + + + Override ToString() to provide a user friendly string representation + + String representing the property key + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to Failed to register application for restart due to bad parameters.. + + + + + Looks up a localized string similar to Application was not registered for recovery due to bad parameters.. + + + + + Looks up a localized string similar to Application failed to register for recovery.. + + + + + Looks up a localized string similar to Application failed to registered for restart.. + + + + + Looks up a localized string similar to Unregister for recovery failed.. + + + + + Looks up a localized string similar to Unregister for restart failed.. + + + + + Looks up a localized string similar to This method must be called from the registered callback method.. + + + + + Looks up a localized string similar to ACOnline: {1}{0}Max Charge: {2} mWh{0}Current Charge: {3} mWh{0}Discharge Rate: {4} mWh{0}Estimated Time Remaining: {5}{0}Suggested Critical Battery Charge: {6} mWh{0}Suggested Battery Warning Charge: {7} mWh{0}. + + + + + Looks up a localized string similar to Cancelable cannot be changed while dialog is showing.. + + + + + Looks up a localized string similar to Dialog caption cannot be changed while dialog is showing.. + + + + + Looks up a localized string similar to CheckBox text cannot be changed while dialog is showing.. + + + + + Looks up a localized string similar to Collapsed control text cannot be changed while dialog is showing.. + + + + + Looks up a localized string similar to Only supported on Windows 7 or newer.. + + + + + Looks up a localized string similar to Only supported on Windows Vista or newer.. + + + + + Looks up a localized string similar to Only supported on Windows XP or newer.. + + + + + Looks up a localized string similar to Dialog cannot have more than one control with the same name.. + + + + + Looks up a localized string similar to Dialog control must be removed from current collections first.. + + + + + Looks up a localized string similar to Control name cannot be null or zero length.. + + + + + Looks up a localized string similar to Modifying controls collection while dialog is showing is not supported.. + + + + + Looks up a localized string similar to Dialog control name cannot be empty or null.. + + + + + Looks up a localized string similar to Dialog controls cannot be renamed.. + + + + + Looks up a localized string similar to Application. + + + + + Looks up a localized string similar to . + + + + + Looks up a localized string similar to . + + + + + Looks up a localized string similar to Expanded information mode cannot be changed while dialog is showing.. + + + + + Looks up a localized string similar to Expanded control label cannot be changed while dialog is showing.. + + + + + Looks up a localized string similar to Expanding state of the dialog cannot be changed while dialog is showing.. + + + + + Looks up a localized string similar to Hyperlinks cannot be enabled/disabled while dialog is showing.. + + + + + Looks up a localized string similar to Reference path is invalid.. + + + + + Looks up a localized string similar to The specified event handler has not been registered.. + + + + + Looks up a localized string similar to An error has occurred in dialog configuration.. + + + + + Looks up a localized string similar to Invalid arguments to Win32 call.. + + + + + Looks up a localized string similar to Dialog contents too complex.. + + + + + Looks up a localized string similar to An unexpected internal error occurred in the Win32 call: {0:x}. + + + + + Looks up a localized string similar to TaskDialog feature needs to load version 6 of comctl32.dll but a different version is current loaded in memory.. + + + + + Looks up a localized string similar to Dialog owner cannot be changed while dialog is showing.. + + + + + Looks up a localized string similar to SetThreadExecutionState call failed.. + + + + + Looks up a localized string similar to The caller had insufficient access rights to get the system battery state.. + + + + + Looks up a localized string similar to The caller had insufficient access rights to get the system power capabilities.. + + + + + Looks up a localized string similar to Failed to get active power scheme.. + + + + + Looks up a localized string similar to Battery is not present on this system.. + + + + + Looks up a localized string similar to Progress bar cannot be changed while dialog is showing.. + + + + + Looks up a localized string similar to Progress bar cannot be hosted in multiple dialogs.. + + + + + Looks up a localized string similar to {0}, {1}. + + + + + Looks up a localized string similar to Unable to initialize PropVariant.. + + + + + Looks up a localized string similar to Multi-dimensional SafeArrays not supported.. + + + + + Looks up a localized string similar to String argument cannot be null or empty.. + + + + + Looks up a localized string similar to This Value type is not supported.. + + + + + Looks up a localized string similar to Cannot be cast to unsupported type.. + + + + + Looks up a localized string similar to delegate: {0}, state: {1}, ping: {2}. + + + + + Looks up a localized string similar to command: {0} restrictions: {1}. + + + + + Looks up a localized string similar to StandardButtons cannot be changed while dialog is showing.. + + + + + Looks up a localized string similar to Startup location cannot be changed while dialog is showing.. + + + + + Looks up a localized string similar to Bad button ID in closing event.. + + + + + Looks up a localized string similar to Button text must be non-empty.. + + + + + Looks up a localized string similar to Check box text must be provided to enable the dialog check box.. + + + + + Looks up a localized string similar to Attempting to close a non-showing dialog.. + + + + + Looks up a localized string similar to Application. + + + + + Looks up a localized string similar to . + + + + + Looks up a localized string similar to . + + + + + Looks up a localized string similar to Cannot have more than one default button of a given type.. + + + + + Looks up a localized string similar to Maximum value provided must be greater than the minimum value.. + + + + + Looks up a localized string similar to Minimum value provided must be a positive number.. + + + + + Looks up a localized string similar to Minimum value provided must less than the maximum value.. + + + + + Looks up a localized string similar to Value provided must be greater than equal to the minimum value and less than the maximum value.. + + + + + Looks up a localized string similar to Dialog cannot display both non-standard buttons and standard buttons.. + + + + + Looks up a localized string similar to Dialog cannot display both non-standard buttons and command links.. + + + + + Looks up a localized string similar to Unknown dialog control type.. + + + + + HRESULT Wrapper + + + + + S_OK + + + + + S_FALSE + + + + + E_INVALIDARG + + + + + E_OUTOFMEMORY + + + + + E_NOINTERFACE + + + + + E_FAIL + + + + + E_ELEMENTNOTFOUND + + + + + TYPE_E_ELEMENTNOTFOUND + + + + + NO_OBJECT + + + + + Win32 Error code: ERROR_CANCELLED + + + + + ERROR_CANCELLED + + + + + The requested resource is in use + + + + + The requested resources is read-only. + + + + + Provide Error Message Helper Methods. + This is intended for Library Internal use only. + + + + + This is intended for Library Internal use only. + + + + + This is intended for Library Internal use only. + + + + + This is intended for Library Internal use only. + + The Windows API error code. + The equivalent HRESULT. + + + + This is intended for Library Internal use only. + + The error code. + True if the error code indicates success. + + + + This is intended for Library Internal use only. + + The error code. + True if the error code indicates success. + + + + This is intended for Library Internal use only. + + The error code. + True if the error code indicates failure. + + + + This is intended for Library Internal use only. + + The error code. + True if the error code indicates failure. + + + + This is intended for Library Internal use only. + + The COM error code. + The Win32 error code. + Inticates that the Win32 error code corresponds to the COM error code. + + + + Common Helper methods + + + + + Determines if the application is running on XP + + + + + Throws PlatformNotSupportedException if the application is not running on Windows XP + + + + + Determines if the application is running on Vista + + + + + Throws PlatformNotSupportedException if the application is not running on Windows Vista + + + + + Determines if the application is running on Windows 7 + + + + + Throws PlatformNotSupportedException if the application is not running on Windows 7 + + + + + Get a string resource given a resource Id + + The resource Id + The string resource corresponding to the given resource Id. Returns null if the resource id + is invalid or the string cannot be retrieved for any other reason. + + + + Wrappers for Native Methods and Structs. + This type is intended for internal use only + + + + + Places (posts) a message in the message queue associated with the thread that created + the specified window and returns without waiting for the thread to process the message. + + Handle to the window whose window procedure will receive the message. + If this parameter is HWND_BROADCAST, the message is sent to all top-level windows in the system, + including disabled or invisible unowned windows, overlapped windows, and pop-up windows; + but the message is not sent to child windows. + + Specifies the message to be sent. + Specifies additional message-specific information. + Specifies additional message-specific information. + A return code specific to the message being sent. + + + + Sends the specified message to a window or windows. The SendMessage function calls + the window procedure for the specified window and does not return until the window + procedure has processed the message. + + Handle to the window whose window procedure will receive the message. + If this parameter is HWND_BROADCAST, the message is sent to all top-level windows in the system, + including disabled or invisible unowned windows, overlapped windows, and pop-up windows; + but the message is not sent to child windows. + + Specifies the message to be sent. + Specifies additional message-specific information. + Specifies additional message-specific information. + A return code specific to the message being sent. + + + + Sends the specified message to a window or windows. The SendMessage function calls + the window procedure for the specified window and does not return until the window + procedure has processed the message. + + Handle to the window whose window procedure will receive the message. + If this parameter is HWND_BROADCAST, the message is sent to all top-level windows in the system, + including disabled or invisible unowned windows, overlapped windows, and pop-up windows; + but the message is not sent to child windows. + + Specifies the message to be sent. + Specifies additional message-specific information. + Specifies additional message-specific information. + A return code specific to the message being sent. + + + + Sends the specified message to a window or windows. The SendMessage function calls + the window procedure for the specified window and does not return until the window + procedure has processed the message. + + Handle to the window whose window procedure will receive the message. + If this parameter is HWND_BROADCAST, the message is sent to all top-level windows in the system, + including disabled or invisible unowned windows, overlapped windows, and pop-up windows; + but the message is not sent to child windows. + + Specifies the message to be sent. + Specifies additional message-specific information. + Specifies additional message-specific information. + A return code specific to the message being sent. + + + + Sends the specified message to a window or windows. The SendMessage function calls + the window procedure for the specified window and does not return until the window + procedure has processed the message. + + Handle to the window whose window procedure will receive the message. + If this parameter is HWND_BROADCAST, the message is sent to all top-level windows in the system, + including disabled or invisible unowned windows, overlapped windows, and pop-up windows; + but the message is not sent to child windows. + + Specifies the message to be sent. + Specifies additional message-specific information. + Specifies additional message-specific information. + A return code specific to the message being sent. + + + + Sends the specified message to a window or windows. The SendMessage function calls + the window procedure for the specified window and does not return until the window + procedure has processed the message. + + Handle to the window whose window procedure will receive the message. + If this parameter is HWND_BROADCAST, the message is sent to all top-level windows in the system, + including disabled or invisible unowned windows, overlapped windows, and pop-up windows; + but the message is not sent to child windows. + + Specifies the message to be sent. + Specifies additional message-specific information. + Specifies additional message-specific information. + A return code specific to the message being sent. + + + + Destroys an icon and frees any memory the icon occupied. + + Handle to the icon to be destroyed. The icon must not be in use. + If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. To get extended error information, call GetLastError. + + + + Gets the HiWord + + The value to get the hi word from. + Size + The upper half of the dword. + + + + Gets the LoWord + + The value to get the low word from. + The lower half of the dword. + + + + A Wrapper for a SIZE struct + + + + + Width + + + + + Height + + + + + Represents the OLE struct PROPVARIANT. + This class is intended for internal use only. + + + Originally sourced from http://blogs.msdn.com/adamroot/pages/interop-with-propvariants-in-net.aspx + and modified to support additional types including vectors and ability to set values + + + + + Attempts to create a PropVariant by finding an appropriate constructor. + + Object from which PropVariant should be created. + + + + Default constrcutor + + + + + Set a string value + + + + + Set a string vector + + + + + Set a bool vector + + + + + Set a short vector + + + + + Set a short vector + + + + + Set an int vector + + + + + Set an uint vector + + + + + Set a long vector + + + + + Set a ulong vector + + + + > + Set a double vector + + + + + Set a DateTime vector + + + + + Set a bool value + + + + + Set a DateTime value + + + + + Set a byte value + + + + + Set a sbyte value + + + + + Set a short value + + + + + Set an unsigned short value + + + + + Set an int value + + + + + Set an unsigned int value + + + + + Set a decimal value + + + + + Create a PropVariant with a contained decimal array. + + Decimal array to wrap. + + + + Create a PropVariant containing a float type. + + + + + Creates a PropVariant containing a float[] array. + + + + + Set a long + + + + + Set a ulong + + + + + Set a double + + + + + Set an IUnknown value + + The new value to set. + + + + Set a safe array value + + The new value to set. + + + + Gets or sets the variant type. + + + + + Checks if this has an empty or null value + + + + + + Gets the variant value. + + + + + Disposes the object, calls the clear function. + + + + + Finalizer + + + + + Provides an simple string representation of the contained data and type. + + + + + + Base class for Safe handles with Null IntPtr as invalid + + + + + Default constructor + + + + + Determines if this is a valid handle + + + + + Safe Icon Handle + + + + + Release the handle + + true if handled is release successfully, false otherwise + + + + Safe Region Handle + + + + + Release the handle + + true if handled is release successfully, false otherwise + + + + Safe Window Handle + + + + + Release the handle + + true if handled is release successfully, false otherwise + + + diff --git a/packages/repositories.config b/packages/repositories.config new file mode 100644 index 0000000..0dec135 --- /dev/null +++ b/packages/repositories.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file