* Removed SecondGlance since it never went anywhere and is now superseded by WinGridProxy
* Modified Prebuild to add better support for WinForms projects git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@2905 52acb1d6-8a22-11de-b505-999d5b087335
This commit is contained in:
@@ -105,6 +105,11 @@ namespace Prebuild.Core.Nodes
|
||||
/// <returns></returns>
|
||||
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;
|
||||
|
||||
@@ -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(" <EmbeddedResource Include=\"{0}\">", file.Substring(0, file.LastIndexOf('.')) + ".resx");
|
||||
ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", Path.GetFileName(file));
|
||||
ps.WriteLine(" <SubType>Designer</SubType>");
|
||||
//ps.WriteLine(" <SubType>Designer</SubType>");
|
||||
ps.WriteLine(" </EmbeddedResource>");
|
||||
//
|
||||
}
|
||||
|
||||
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(" <Generator>ResXFileCodeGenerator</Generator>");
|
||||
//ps.WriteLine(" <LastGenOutput>{0}</LastGenOutput>", Path.GetFileName(autogen_name));
|
||||
ps.WriteLine(" <Generator>ResXFileCodeGenerator</Generator>");
|
||||
ps.WriteLine(" <LastGenOutput>{0}</LastGenOutput>", Path.GetFileName(autogen_name));
|
||||
ps.WriteLine(" <SubType>" + subType + "</SubType>");
|
||||
}
|
||||
|
||||
ps.WriteLine(" </EmbeddedResource>");
|
||||
if (File.Exists(autogen_name))
|
||||
/*if (File.Exists(autogen_name))
|
||||
{
|
||||
ps.WriteLine(" <Compile Include=\"{0}\">", autogen_name);
|
||||
//ps.WriteLine(" <DesignTime>True</DesignTime>");
|
||||
@@ -417,8 +419,10 @@ namespace Prebuild.Core.Targets
|
||||
}
|
||||
|
||||
ps.WriteLine(" </Compile>");
|
||||
}
|
||||
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(" <SubType>Code</SubType>");
|
||||
string fileNameShort = fileName.Substring(0, fileName.LastIndexOf('.'));
|
||||
string fileNameShorter = fileNameShort.Substring(0, fileNameShort.LastIndexOf('.'));
|
||||
|
||||
ps.WriteLine(" <AutoGen>True</AutoGen>");
|
||||
ps.WriteLine(" <DesignTimeSharedInput>True</DesignTimeSharedInput>");
|
||||
string fileNameShort = fileName.Substring(0, fileName.LastIndexOf('.'));
|
||||
string fileNameShorter = fileNameShort.Substring(0, fileNameShort.LastIndexOf('.'));
|
||||
ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", Path.GetFileName(fileNameShorter + ".settings"));
|
||||
ps.WriteLine(" <DesignTimeSharedInput>True</DesignTimeSharedInput>");
|
||||
}
|
||||
ps.WriteLine(" </{0}>", 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(" <DependentUpon>{0}</DependentUpon>", Path.GetFileName(file_name));
|
||||
else if (File.Exists(file_name + ".resx"))
|
||||
ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", Path.GetFileName(file_name + ".resx"));
|
||||
if (File.Exists(file_name + ".cs"))
|
||||
{
|
||||
ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", Path.GetFileName(file_name + ".cs"));
|
||||
}
|
||||
else if (File.Exists(file_name + ".resx"))
|
||||
{
|
||||
ps.WriteLine(" <AutoGen>True</AutoGen>");
|
||||
ps.WriteLine(" <DependentUpon>{0}</DependentUpon>", 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(" <SubType>Form</SubType>");
|
||||
else
|
||||
ps.WriteLine(" <SubType>{0}</SubType>", subType);
|
||||
//else
|
||||
// ps.WriteLine(" <SubType>{0}</SubType>", subType);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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")]
|
||||
@@ -1,71 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 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.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace SecondGlance.Properties
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// 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()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[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;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture
|
||||
{
|
||||
get
|
||||
{
|
||||
return resourceCulture;
|
||||
}
|
||||
set
|
||||
{
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,117 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -1,30 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 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.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
||||
@@ -1,20 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace SecondGlance
|
||||
{
|
||||
static class SecondGlance
|
||||
{
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new frmSecondGlance());
|
||||
}
|
||||
}
|
||||
}
|
||||
232
Programs/SecondGlance/frmSecondGlance.Designer.cs
generated
232
Programs/SecondGlance/frmSecondGlance.Designer.cs
generated
@@ -1,232 +0,0 @@
|
||||
namespace SecondGlance
|
||||
{
|
||||
partial class frmSecondGlance
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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<LoggedPacket> Inbox = new Queue<LoggedPacket>();
|
||||
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 <jhurliman@wsu.edu>",
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,123 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
Reference in New Issue
Block a user