diff --git a/Programs/Prebuild/src/Core/Nodes/FilesNode.cs b/Programs/Prebuild/src/Core/Nodes/FilesNode.cs index f071f1a4..008f5b06 100644 --- a/Programs/Prebuild/src/Core/Nodes/FilesNode.cs +++ b/Programs/Prebuild/src/Core/Nodes/FilesNode.cs @@ -105,6 +105,11 @@ namespace Prebuild.Core.Nodes /// public BuildAction GetBuildAction(string file) { + if (file.EndsWith(".settings")) + return BuildAction.None; + else if (file.EndsWith(".ico")) + return BuildAction.Content; + if(!m_BuildActions.ContainsKey(file)) { return BuildAction.Compile; diff --git a/Programs/Prebuild/src/Core/Targets/VSGenericTarget.cs b/Programs/Prebuild/src/Core/Targets/VSGenericTarget.cs index 6b9308c7..8e8c6523 100644 --- a/Programs/Prebuild/src/Core/Targets/VSGenericTarget.cs +++ b/Programs/Prebuild/src/Core/Targets/VSGenericTarget.cs @@ -364,14 +364,16 @@ namespace Prebuild.Core.Targets SubType subType = project.Files.GetSubType(file); + if (file.EndsWith("Settings.Designer.cs")) + subType = SubType.Settings; + if (subType != SubType.Code && subType != SubType.Settings && subType != SubType.Designer && subType != SubType.CodeBehind) { ps.WriteLine(" ", file.Substring(0, file.LastIndexOf('.')) + ".resx"); ps.WriteLine(" {0}", Path.GetFileName(file)); - ps.WriteLine(" Designer"); + //ps.WriteLine(" Designer"); ps.WriteLine(" "); - // } if (subType == SubType.Designer) @@ -393,13 +395,13 @@ namespace Prebuild.Core.Targets * These two lines screw up the designer, ie: if you make a change to a form, * when you press Save VS corrups the .Designer.cs file */ - //ps.WriteLine(" ResXFileCodeGenerator"); - //ps.WriteLine(" {0}", Path.GetFileName(autogen_name)); + ps.WriteLine(" ResXFileCodeGenerator"); + ps.WriteLine(" {0}", Path.GetFileName(autogen_name)); ps.WriteLine(" " + subType + ""); } ps.WriteLine(" "); - if (File.Exists(autogen_name)) + /*if (File.Exists(autogen_name)) { ps.WriteLine(" ", autogen_name); //ps.WriteLine(" True"); @@ -417,8 +419,10 @@ namespace Prebuild.Core.Targets } ps.WriteLine(" "); - } - list.Add(autogen_name); + }*/ + + if (!list.Contains(autogen_name)) + list.Add(autogen_name); } if (subType == SubType.Settings) { @@ -432,12 +436,12 @@ namespace Prebuild.Core.Targets } else { - ps.WriteLine(" Code"); + string fileNameShort = fileName.Substring(0, fileName.LastIndexOf('.')); + string fileNameShorter = fileNameShort.Substring(0, fileNameShort.LastIndexOf('.')); + ps.WriteLine(" True"); - ps.WriteLine(" True"); - string fileNameShort = fileName.Substring(0, fileName.LastIndexOf('.')); - string fileNameShorter = fileNameShort.Substring(0, fileNameShort.LastIndexOf('.')); ps.WriteLine(" {0}", Path.GetFileName(fileNameShorter + ".settings")); + ps.WriteLine(" True"); } ps.WriteLine(" ", project.Files.GetBuildAction(file)); } @@ -446,7 +450,7 @@ namespace Prebuild.Core.Targets string path = Helper.NormalizePath(file); string path_lower = path.ToLower(); - if (!list.Contains(file)) + //if (!list.Contains(file)) { ps.Write(" <{0} ", project.Files.GetBuildAction(path)); @@ -474,10 +478,15 @@ namespace Prebuild.Core.Targets int designer_index = path_lower.IndexOf(designer_format); string file_name = path.Substring(0, designer_index); - if (File.Exists(file_name)) - ps.WriteLine(" {0}", Path.GetFileName(file_name)); - else if (File.Exists(file_name + ".resx")) - ps.WriteLine(" {0}", Path.GetFileName(file_name + ".resx")); + if (File.Exists(file_name + ".cs")) + { + ps.WriteLine(" {0}", Path.GetFileName(file_name + ".cs")); + } + else if (File.Exists(file_name + ".resx")) + { + ps.WriteLine(" True"); + ps.WriteLine(" {0}", Path.GetFileName(file_name + ".resx")); + } } else if (subType == SubType.CodeBehind) { @@ -495,10 +504,10 @@ namespace Prebuild.Core.Targets if (project.Files.GetBuildAction(file) != BuildAction.EmbeddedResource) { //HACK: Ugly method of supporting WinForms - if (file.Contains("frm")) + if (file.Contains("frm") && !file.Contains("Designer.cs")) ps.WriteLine(" Form"); - else - ps.WriteLine(" {0}", subType); + //else + // ps.WriteLine(" {0}", subType); } } diff --git a/Programs/SecondGlance/Properties/AssemblyInfo.cs b/Programs/SecondGlance/Properties/AssemblyInfo.cs deleted file mode 100644 index e21fc67b..00000000 --- a/Programs/SecondGlance/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("SecondGlance")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("SecondGlance")] -[assembly: AssemblyCopyright("Copyright © 2006")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("02456c47-f074-4302-a3a3-01a719de9d20")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Programs/SecondGlance/Properties/Resources.Designer.cs b/Programs/SecondGlance/Properties/Resources.Designer.cs deleted file mode 100644 index 65ad993e..00000000 --- a/Programs/SecondGlance/Properties/Resources.Designer.cs +++ /dev/null @@ -1,71 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:2.0.50727.308 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace SecondGlance.Properties -{ - - - /// - /// 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", "2.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 ((resourceMan == null)) - { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SecondGlance.Properties.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; - } - } - } -} diff --git a/Programs/SecondGlance/Properties/Resources.resx b/Programs/SecondGlance/Properties/Resources.resx deleted file mode 100644 index ffecec85..00000000 --- a/Programs/SecondGlance/Properties/Resources.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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 - - \ No newline at end of file diff --git a/Programs/SecondGlance/Properties/Settings.Designer.cs b/Programs/SecondGlance/Properties/Settings.Designer.cs deleted file mode 100644 index f7808fdc..00000000 --- a/Programs/SecondGlance/Properties/Settings.Designer.cs +++ /dev/null @@ -1,30 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:2.0.50727.308 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace SecondGlance.Properties -{ - - - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "8.0.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase - { - - private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default - { - get - { - return defaultInstance; - } - } - } -} diff --git a/Programs/SecondGlance/Properties/Settings.settings b/Programs/SecondGlance/Properties/Settings.settings deleted file mode 100644 index abf36c5d..00000000 --- a/Programs/SecondGlance/Properties/Settings.settings +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/Programs/SecondGlance/SecondGlance.cs b/Programs/SecondGlance/SecondGlance.cs deleted file mode 100644 index 1a8aefee..00000000 --- a/Programs/SecondGlance/SecondGlance.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Windows.Forms; - -namespace SecondGlance -{ - static class SecondGlance - { - /// - /// The main entry point for the application. - /// - [STAThread] - static void Main() - { - Application.EnableVisualStyles(); - Application.SetCompatibleTextRenderingDefault(false); - Application.Run(new frmSecondGlance()); - } - } -} \ No newline at end of file diff --git a/Programs/SecondGlance/frmSecondGlance.Designer.cs b/Programs/SecondGlance/frmSecondGlance.Designer.cs deleted file mode 100644 index 992ef1cc..00000000 --- a/Programs/SecondGlance/frmSecondGlance.Designer.cs +++ /dev/null @@ -1,232 +0,0 @@ -namespace SecondGlance -{ - partial class frmSecondGlance - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.panel1 = new System.Windows.Forms.Panel(); - this.splitContainer1 = new System.Windows.Forms.SplitContainer(); - this.menuStrip1 = new System.Windows.Forms.MenuStrip(); - this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.newToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.openToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripSeparator(); - this.saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripSeparator(); - this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.cboToLog = new System.Windows.Forms.ComboBox(); - this.cmdAddLogger = new System.Windows.Forms.Button(); - this.cmdDontLog = new System.Windows.Forms.Button(); - this.cboLogged = new System.Windows.Forms.ComboBox(); - this.lstPackets = new System.Windows.Forms.ListBox(); - this.panel1.SuspendLayout(); - this.splitContainer1.Panel1.SuspendLayout(); - this.splitContainer1.SuspendLayout(); - this.menuStrip1.SuspendLayout(); - this.SuspendLayout(); - // - // panel1 - // - this.panel1.Controls.Add(this.splitContainer1); - this.panel1.Location = new System.Drawing.Point(29, 100); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(664, 333); - this.panel1.TabIndex = 0; - // - // splitContainer1 - // - this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; - this.splitContainer1.Location = new System.Drawing.Point(0, 0); - this.splitContainer1.Name = "splitContainer1"; - // - // splitContainer1.Panel1 - // - this.splitContainer1.Panel1.Controls.Add(this.lstPackets); - this.splitContainer1.Size = new System.Drawing.Size(664, 333); - this.splitContainer1.SplitterDistance = 294; - this.splitContainer1.TabIndex = 0; - // - // menuStrip1 - // - this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.fileToolStripMenuItem, - this.aboutToolStripMenuItem}); - this.menuStrip1.Location = new System.Drawing.Point(0, 0); - this.menuStrip1.Name = "menuStrip1"; - this.menuStrip1.Size = new System.Drawing.Size(705, 24); - this.menuStrip1.TabIndex = 1; - this.menuStrip1.Text = "menuStrip1"; - // - // fileToolStripMenuItem - // - this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.newToolStripMenuItem, - this.openToolStripMenuItem, - this.toolStripMenuItem1, - this.saveToolStripMenuItem, - this.toolStripMenuItem2, - this.exitToolStripMenuItem}); - this.fileToolStripMenuItem.Name = "fileToolStripMenuItem"; - this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20); - this.fileToolStripMenuItem.Text = "File"; - // - // newToolStripMenuItem - // - this.newToolStripMenuItem.Name = "newToolStripMenuItem"; - this.newToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.N))); - this.newToolStripMenuItem.Size = new System.Drawing.Size(188, 22); - this.newToolStripMenuItem.Text = "New Session"; - // - // openToolStripMenuItem - // - this.openToolStripMenuItem.Name = "openToolStripMenuItem"; - this.openToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O))); - this.openToolStripMenuItem.Size = new System.Drawing.Size(188, 22); - this.openToolStripMenuItem.Text = "Open Session"; - // - // toolStripMenuItem1 - // - this.toolStripMenuItem1.Name = "toolStripMenuItem1"; - this.toolStripMenuItem1.Size = new System.Drawing.Size(185, 6); - // - // saveToolStripMenuItem - // - this.saveToolStripMenuItem.Name = "saveToolStripMenuItem"; - this.saveToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.S))); - this.saveToolStripMenuItem.Size = new System.Drawing.Size(188, 22); - this.saveToolStripMenuItem.Text = "Save Session"; - // - // toolStripMenuItem2 - // - this.toolStripMenuItem2.Name = "toolStripMenuItem2"; - this.toolStripMenuItem2.Size = new System.Drawing.Size(185, 6); - // - // exitToolStripMenuItem - // - this.exitToolStripMenuItem.Name = "exitToolStripMenuItem"; - this.exitToolStripMenuItem.Size = new System.Drawing.Size(188, 22); - this.exitToolStripMenuItem.Text = "Exit"; - // - // aboutToolStripMenuItem - // - this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem"; - this.aboutToolStripMenuItem.Size = new System.Drawing.Size(52, 20); - this.aboutToolStripMenuItem.Text = "About"; - // - // cboToLog - // - this.cboToLog.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cboToLog.FormattingEnabled = true; - this.cboToLog.Location = new System.Drawing.Point(12, 27); - this.cboToLog.Name = "cboToLog"; - this.cboToLog.Size = new System.Drawing.Size(150, 21); - this.cboToLog.TabIndex = 4; - // - // cmdAddLogger - // - this.cmdAddLogger.Location = new System.Drawing.Point(168, 25); - this.cmdAddLogger.Name = "cmdAddLogger"; - this.cmdAddLogger.Size = new System.Drawing.Size(75, 23); - this.cmdAddLogger.TabIndex = 5; - this.cmdAddLogger.Text = "Log"; - this.cmdAddLogger.UseVisualStyleBackColor = true; - this.cmdAddLogger.Click += new System.EventHandler(this.cmdAddLogger_Click); - // - // cmdDontLog - // - this.cmdDontLog.Location = new System.Drawing.Point(430, 25); - this.cmdDontLog.Name = "cmdDontLog"; - this.cmdDontLog.Size = new System.Drawing.Size(75, 23); - this.cmdDontLog.TabIndex = 7; - this.cmdDontLog.Text = "Don\'t Log"; - this.cmdDontLog.UseVisualStyleBackColor = true; - this.cmdDontLog.Click += new System.EventHandler(this.cmdDontLog_Click); - // - // cboLogged - // - this.cboLogged.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cboLogged.FormattingEnabled = true; - this.cboLogged.Location = new System.Drawing.Point(274, 27); - this.cboLogged.Name = "cboLogged"; - this.cboLogged.Size = new System.Drawing.Size(150, 21); - this.cboLogged.TabIndex = 6; - // - // lstPackets - // - this.lstPackets.FormattingEnabled = true; - this.lstPackets.Location = new System.Drawing.Point(26, 40); - this.lstPackets.Name = "lstPackets"; - this.lstPackets.Size = new System.Drawing.Size(243, 277); - this.lstPackets.TabIndex = 1; - // - // frmSecondGlance - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(705, 498); - this.Controls.Add(this.cmdDontLog); - this.Controls.Add(this.cboLogged); - this.Controls.Add(this.cmdAddLogger); - this.Controls.Add(this.cboToLog); - this.Controls.Add(this.panel1); - this.Controls.Add(this.menuStrip1); - this.MainMenuStrip = this.menuStrip1; - this.Name = "frmSecondGlance"; - this.Text = "Second Glance"; - this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.frmSecondGlance_FormClosing); - this.panel1.ResumeLayout(false); - this.splitContainer1.Panel1.ResumeLayout(false); - this.splitContainer1.ResumeLayout(false); - this.menuStrip1.ResumeLayout(false); - this.menuStrip1.PerformLayout(); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.Panel panel1; - private System.Windows.Forms.SplitContainer splitContainer1; - private System.Windows.Forms.MenuStrip menuStrip1; - private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem newToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem openToolStripMenuItem; - private System.Windows.Forms.ToolStripSeparator toolStripMenuItem1; - private System.Windows.Forms.ToolStripMenuItem saveToolStripMenuItem; - private System.Windows.Forms.ToolStripSeparator toolStripMenuItem2; - private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem aboutToolStripMenuItem; - private System.Windows.Forms.ComboBox cboToLog; - private System.Windows.Forms.Button cmdAddLogger; - private System.Windows.Forms.Button cmdDontLog; - private System.Windows.Forms.ComboBox cboLogged; - private System.Windows.Forms.ListBox lstPackets; - } -} - diff --git a/Programs/SecondGlance/frmSecondGlance.cs b/Programs/SecondGlance/frmSecondGlance.cs deleted file mode 100644 index fab0b37b..00000000 --- a/Programs/SecondGlance/frmSecondGlance.cs +++ /dev/null @@ -1,154 +0,0 @@ -/* - * - * Copyright (c) 2007 openmetaverse.org - * All rights reserved. - * - * - Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * - Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * - Neither the name of the openmetaverse.org nor the names - * of its contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Net; -using System.Windows.Forms; -using OpenMetaverse; -using OpenMetaverse.Packets; -using GridProxy; - -namespace SecondGlance -{ - public partial class frmSecondGlance : Form - { - private Proxy Proxy; - private Queue Inbox = new Queue(); - private System.Timers.Timer DisplayTimer = new System.Timers.Timer(200); - - public frmSecondGlance() - { - InitializeComponent(); - - PacketType[] types = (PacketType[])Enum.GetValues(typeof(PacketType)); - - // Fill up the "To Log" combo box with options - foreach (PacketType type in types) - { - if (type != PacketType.Default) cboToLog.Items.Add(type); - } - - // Set the default selection to the first entry - cboToLog.SelectedIndex = 0; - - // Setup the proxy - ProxyConfig proxyConfig = new ProxyConfig("Second Glance", "John Hurliman ", - new string[0]); - Proxy = new Proxy(proxyConfig); - - Proxy.Start(); - - // Start the timer that moves packets from the queue and displays them - DisplayTimer.Elapsed += new System.Timers.ElapsedEventHandler(DisplayTimer_Elapsed); - DisplayTimer.Start(); - } - - void DisplayTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e) - { - this.BeginInvoke(new MethodInvoker(UpdateDisplay)); - } - - void UpdateDisplay() - { - lock (Inbox) - { - while (Inbox.Count > 0) - { - lstPackets.Items.Add(Inbox.Dequeue()); - } - } - } - - private void frmSecondGlance_FormClosing(object sender, FormClosingEventArgs e) - { - DisplayTimer.Stop(); - Proxy.Stop(); - } - - private void cmdAddLogger_Click(object sender, EventArgs e) - { - if (!cboLogged.Items.Contains(cboToLog.SelectedItem)) - { - PacketType type = (PacketType)cboToLog.SelectedItem; - - cboLogged.Items.Add(type); - - Proxy.AddDelegate(type, Direction.Incoming, new PacketDelegate(IncomingPacketHandler)); - Proxy.AddDelegate(type, Direction.Outgoing, new PacketDelegate(OutgoingPacketHandler)); - } - } - - private void cmdDontLog_Click(object sender, EventArgs e) - { - ; - } - - private Packet IncomingPacketHandler(Packet packet, IPEndPoint sim) - { - return PacketHandler(packet, sim, Direction.Incoming); - } - - private Packet OutgoingPacketHandler(Packet packet, IPEndPoint sim) - { - return PacketHandler(packet, sim, Direction.Outgoing); - } - - private Packet PacketHandler(Packet packet, IPEndPoint sim, Direction direction) - { - LoggedPacket logged = new LoggedPacket(); - logged.Packet = packet; - logged.Sim = sim; - logged.Direction = direction; - - lock (Inbox) - Inbox.Enqueue(logged); - - // TODO: Packet modifications - - return packet; - } - } - - public class LoggedPacket - { - public Packet Packet; - public IPEndPoint Sim; - public Direction Direction; - - public override string ToString() - { - string text = (Direction == Direction.Incoming) ? "<-- " : "--> "; - text += Sim.ToString() + " " + Packet.Type.ToString(); - - return text; - } - } -} diff --git a/Programs/SecondGlance/frmSecondGlance.resx b/Programs/SecondGlance/frmSecondGlance.resx deleted file mode 100644 index 69c56499..00000000 --- a/Programs/SecondGlance/frmSecondGlance.resx +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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 - - - 17, 17 - - \ No newline at end of file diff --git a/bin/Prebuild.exe b/bin/Prebuild.exe index 4f3a5efd..aa14ddcd 100644 Binary files a/bin/Prebuild.exe and b/bin/Prebuild.exe differ diff --git a/prebuild.xml b/prebuild.xml index c4ced7ed..f02ee900 100644 --- a/prebuild.xml +++ b/prebuild.xml @@ -1 +1 @@ - TRACE;DEBUG false false true 4 false 1591,1574,0419,0618 bin true true false TRACE true false true 4 false 1591,1574,0419,0618 bin false true false ../bin/ ../bin/ ../bin/ ../bin/ ../bin/ OpenMetaverseTypes.XML ../bin/ ../bin/ ../bin/ OpenMetaverse.StructuredData.XML ../bin/ ../bin/ ../bin/ OpenMetaverse.Http.XML ../bin/ ../bin/ ../bin/ OpenMetaverse.XML ../bin/ ../bin/ ../bin/ OpenMetaverse.Utilities.XML ../bin/ ../bin/ ../bin/ ../bin/ ../../bin/ ../../bin/ ../../bin/ ../bin/ ../bin/ ../bin/ ../bin/ ../bin/ ../bin/ ../bin/ ../bin/ ../bin/ ../bin/ ../bin/ OpenMetaverse.GUI.XML ../bin/ ../../bin/ ../../bin/ ../../bin/ ../../bin/ ../../bin/ ../../bin/ ../../bin/ ../../bin/ ../../bin/ ../../bin/ ../../bin/ ../../bin/ ../../../bin/ ../../../bin/ ../../../bin/ ../../../bin/ ../../../bin/ ../../../bin/ ../../bin/ ../../bin/ ../../bin/ ../../bin/ ../../bin/ ../../bin/ ../../bin/ ../../bin/ ../../bin/ ../../bin/ ../../bin/ ../../bin/ ../../bin/ ../../bin/ ../../bin/ ../../bin/ ../../bin/ ../../bin/ ../../bin/ ../../bin/ ../../bin/ ../../../bin/ ../../../bin/ ../../../bin/ ../../../bin/ ../../../bin/ ../../../bin/ ../../../bin/ ../../../bin/ ../../../bin/ ../../../bin/ ../../../bin/ ../../../bin/ ../../../bin/ ../../../bin/ ../../../bin/ + TRACE;DEBUG false false true 4 false 1591,1574,0419,0618 bin true true false TRACE true false true 4 false 1591,1574,0419,0618 bin false true false ../bin/ ../bin/ ../bin/ ../bin/ ../bin/ OpenMetaverseTypes.XML ../bin/ ../bin/ ../bin/ OpenMetaverse.StructuredData.XML ../bin/ ../bin/ ../bin/ OpenMetaverse.Http.XML ../bin/ ../bin/ ../bin/ OpenMetaverse.XML ../bin/ ../bin/ ../bin/ OpenMetaverse.Utilities.XML ../bin/ ../bin/ ../bin/ ../bin/ ../../bin/ ../../bin/ ../../bin/ ../bin/ ../bin/ ../bin/ ../bin/ ../bin/ ../bin/ ../bin/ ../bin/ ../bin/ ../bin/ ../bin/ OpenMetaverse.GUI.XML ../bin/ ../../bin/ ../../bin/ ../../bin/ ../../bin/ ../../bin/ ../../bin/ ../../bin/ ../../bin/ ../../bin/ ../../bin/ ../../bin/ ../../bin/ ../../../bin/ ../../../bin/ ../../../bin/ ../../../bin/ ../../../bin/ ../../../bin/ ../../bin/ ../../bin/ ../../bin/ ../../bin/ ../../bin/ ../../bin/ ../../bin/ ../../bin/ ../../bin/ ../../bin/ ../../bin/ ../../bin/ ../../bin/ ../../bin/ ../../bin/ ../../bin/ ../../bin/ ../../bin/ ../../../bin/ ../../../bin/ ../../../bin/ ../../../bin/ ../../../bin/ ../../../bin/ ../../../bin/ ../../../bin/ ../../../bin/ ../../../bin/ ../../../bin/ ../../../bin/ ../../../bin/ ../../../bin/ ../../../bin/ \ No newline at end of file