chore: Add DSQA (work-in-progress)

This commit is contained in:
John Colvin committed 2023-09-21 23:48:57 -04:00
1 parent 7cc7dd652f
commit 700bc45998
51 files changed
+5010 -6

No files matched your search

@@ -1,11 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">
<ItemGroup>
<ProjectReference Include="..\..\client\spark_api\spark_api.csproj" />
<ProjectReference Include="..\..\client\spark_core\spark_core.csproj" />
<ProjectReference Include="..\pubsub\pubsub.csproj" />
<!-- <ProjectReference Include="..\..\client\spark_core\spark_core.csproj" /> -->
</ItemGroup>
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0-windows</TargetFramework>
@@ -13,4 +7,23 @@
<UseWindowsForms>true</UseWindowsForms>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\client\spark_api\spark_api.csproj" />
<ProjectReference Include="..\..\client\spark_core\spark_core.csproj" />
<ProjectReference Include="..\PubSub\PubSub.csproj" />
<ProjectReference Include="..\DataStream\DataStream.csproj" />
<ProjectReference Include="..\BlueRegistry\BlueRegistry.csproj" />
<ProjectReference Include="..\BaseUtilities\BaseUtilities.csproj" />
</ItemGroup>
<ItemGroup>
<Reference Include="Tools">
<HintPath>$(Externals)\bin\cstools\Tools.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="$(DataStreamGrammarDir)\DataStreamExpressionSyntax.parser.cs" />
</ItemGroup>
</Project>
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

@@ -0,0 +1,7 @@
namespace BCG.Utilities.XPControls {
class XPControlsDummy {}
}
namespace BCG.Utilities.BlueConfiguration {
class BlueConfigurationDummy {}
}
@@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
namespace BCG
{
public class HScrollGrid : DataGridView
{
public int HorizScrollBarValue
{
get
{
return this.HorizontalScrollBar.Value;
}
set
{
GridHScrolled (this, new ScrollEventArgs (System.Windows.Forms.ScrollEventType.LargeIncrement, value));
}
}
}
}
@@ -0,0 +1,62 @@
using System;
using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Windows.Forms;
using BCG.Utilities.General;
namespace BCG.Utilities.XPControls
{
[ToolboxItem (true)]
[ToolboxBitmap (typeof (ListBox))]
public class ListBoxXP : System.Windows.Forms.ListBox
{
public ListBoxXP ()
{
DrawMode = DrawMode.OwnerDrawFixed;
ItemHeight = ItemHeight + 1;
}
protected override void OnPaint(PaintEventArgs pe)
{
base.OnPaint(pe);
}
protected override void OnDrawItem(DrawItemEventArgs e)
{
Graphics g = e.Graphics;
Rectangle bounds = e.Bounds;
bool selected = (e.State & DrawItemState.Selected) > 0;
if (e.Index >= 0 & Items.Count > 0)
myDrawListBoxItem (g, bounds, e.Index, selected);
}
protected void myDrawListBoxItem (Graphics g, Rectangle bounds, int Index, bool selected)
{
if (selected)
{
// Draw Background
g.FillRectangle (new SolidBrush (ColorUtil.VSNetSelectionColor),
bounds.Left + 1, bounds.Top + 1, bounds.Width - 2, bounds.Height - 2);
// Draw border rectangle
g.DrawRectangle (SystemPens.Highlight,
bounds.Left + 1, bounds.Top + 1, bounds.Width - 3, bounds.Height - 2);
}
else
{
// erases everything
g.FillRectangle (new SolidBrush (BackColor), bounds);
}
g.DrawString((string) Items[Index], Font, new SolidBrush (ForeColor),
new Point (bounds.Left + 1, bounds.Top + 1));
}
}
}
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8" ?>
<root>
<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="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" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</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>1.0.0.0</value>
</resheader>
<resheader name="Reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.3102.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="Writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.3102.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
@@ -0,0 +1,565 @@
namespace BCG
{
public partial class MainForm
{
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose (bool disposing)
{
if (disposing)
{
if (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.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
this.myQueryTextBox = new System.Windows.Forms.RichTextBox();
this.myTabControl = new System.Windows.Forms.TabControl();
this.myViewTabPage = new System.Windows.Forms.TabPage();
this.myDataGrid = new BCG.HScrollGrid();
this.myCSharpTabPage = new System.Windows.Forms.TabPage();
this.myCSharpText = new System.Windows.Forms.RichTextBox();
this.myErrorTabPage = new System.Windows.Forms.TabPage();
this.myErrorTextBox = new System.Windows.Forms.RichTextBox();
this.myTableListTabPage = new System.Windows.Forms.TabPage();
this.myTableListBox = new BCG.Utilities.XPControls.ListBoxXP();
this.myTableListTopPanel = new System.Windows.Forms.Panel();
this.myTableFilterBox = new System.Windows.Forms.TextBox();
this.myTableFilterLabel = new System.Windows.Forms.Label();
this.myPrimitivesPage = new System.Windows.Forms.TabPage();
this.myTreeView = new System.Windows.Forms.TreeView();
this.myConsoleTabPage = new System.Windows.Forms.TabPage();
this.myConsoleRichTextBox = new System.Windows.Forms.RichTextBox();
this.myTimer = new System.Windows.Forms.Timer(this.components);
this.mySplitter = new System.Windows.Forms.Splitter();
this.myStatusStrip = new System.Windows.Forms.StatusStrip();
this.myToolStripStatusLabelTime = new System.Windows.Forms.ToolStripStatusLabel();
this.myToolStripStatusLabelRows = new System.Windows.Forms.ToolStripStatusLabel();
this.myMenuStrip = new System.Windows.Forms.MenuStrip();
this.myToolStripMenuItemFile = new System.Windows.Forms.ToolStripMenuItem();
this.myToolStripMenuItemOpen = new System.Windows.Forms.ToolStripMenuItem();
this.myToolStripMenuItemSave = new System.Windows.Forms.ToolStripMenuItem();
this.myToolStripMenuItemSaveAs = new System.Windows.Forms.ToolStripMenuItem();
this.myToolStripMenuItemExit = new System.Windows.Forms.ToolStripMenuItem();
this.testGridToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.myToolStripMenuItemQuery = new System.Windows.Forms.ToolStripMenuItem();
this.myToolStripMenuItemExecute = new System.Windows.Forms.ToolStripMenuItem();
this.myToolStripMenuItemExecSel = new System.Windows.Forms.ToolStripMenuItem();
this.myToolStripMenuItemFreeze = new System.Windows.Forms.ToolStripMenuItem();
this.myToolStripMenuItemStep = new System.Windows.Forms.ToolStripMenuItem();
this.myToolStripMenuItemTools = new System.Windows.Forms.ToolStripMenuItem();
this.myToolStripMenuItemLoadAss = new System.Windows.Forms.ToolStripMenuItem();
this.myToolStripMenuItemTest = new System.Windows.Forms.ToolStripMenuItem();
this.myToolStripMenuItemToolsSep = new System.Windows.Forms.ToolStripSeparator();
this.myToolStripMenuItemClearConsole = new System.Windows.Forms.ToolStripMenuItem();
this.myToolStripMenuItemSite = new System.Windows.Forms.ToolStripMenuItem();
this.libraryToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.myTabControl.SuspendLayout();
this.myViewTabPage.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.myDataGrid)).BeginInit();
this.myCSharpTabPage.SuspendLayout();
this.myErrorTabPage.SuspendLayout();
this.myTableListTabPage.SuspendLayout();
this.myTableListTopPanel.SuspendLayout();
this.myPrimitivesPage.SuspendLayout();
this.myConsoleTabPage.SuspendLayout();
this.myStatusStrip.SuspendLayout();
this.myMenuStrip.SuspendLayout();
this.SuspendLayout();
//
// myQueryTextBox
//
this.myQueryTextBox.AutoWordSelection = true;
this.myQueryTextBox.BackColor = System.Drawing.Color.White;
this.myQueryTextBox.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.myQueryTextBox.Dock = System.Windows.Forms.DockStyle.Top;
this.myQueryTextBox.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.myQueryTextBox.ForeColor = System.Drawing.Color.Black;
this.myQueryTextBox.Location = new System.Drawing.Point(0, 24);
this.myQueryTextBox.Name = "myQueryTextBox";
this.myQueryTextBox.Size = new System.Drawing.Size(904, 208);
this.myQueryTextBox.TabIndex = 0;
this.myQueryTextBox.Text = "";
//
// myTabControl
//
this.myTabControl.Appearance = System.Windows.Forms.TabAppearance.FlatButtons;
this.myTabControl.Controls.Add(this.myViewTabPage);
this.myTabControl.Controls.Add(this.myCSharpTabPage);
this.myTabControl.Controls.Add(this.myErrorTabPage);
this.myTabControl.Controls.Add(this.myTableListTabPage);
this.myTabControl.Controls.Add(this.myPrimitivesPage);
this.myTabControl.Controls.Add(this.myConsoleTabPage);
this.myTabControl.Dock = System.Windows.Forms.DockStyle.Fill;
this.myTabControl.Location = new System.Drawing.Point(0, 232);
this.myTabControl.Multiline = true;
this.myTabControl.Name = "myTabControl";
this.myTabControl.SelectedIndex = 0;
this.myTabControl.Size = new System.Drawing.Size(904, 335);
this.myTabControl.TabIndex = 1;
//
// myViewTabPage
//
this.myViewTabPage.Controls.Add(this.myDataGrid);
this.myViewTabPage.Location = new System.Drawing.Point(4, 26);
this.myViewTabPage.Name = "myViewTabPage";
this.myViewTabPage.Size = new System.Drawing.Size(896, 305);
this.myViewTabPage.TabIndex = 0;
this.myViewTabPage.Text = "View";
//
// myDataGrid
//
this.myDataGrid.BackgroundColor = System.Drawing.Color.Gainsboro;
this.myDataGrid.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.myDataGrid.CaptionBackColor = System.Drawing.Color.Wheat;
this.myDataGrid.CaptionFont = new System.Drawing.Font("Comic Sans MS", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.myDataGrid.CaptionForeColor = System.Drawing.Color.Black;
this.myDataGrid.DataMember = "";
this.myDataGrid.Dock = System.Windows.Forms.DockStyle.Fill;
this.myDataGrid.FlatMode = true;
this.myDataGrid.GridLineColor = System.Drawing.Color.Gainsboro;
this.myDataGrid.HeaderBackColor = System.Drawing.Color.Gainsboro;
this.myDataGrid.HeaderFont = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.myDataGrid.HeaderForeColor = System.Drawing.Color.Black;
this.myDataGrid.HorizScrollBarValue = 0;
this.myDataGrid.Location = new System.Drawing.Point(0, 0);
this.myDataGrid.Name = "myDataGrid";
this.myDataGrid.PreferredRowHeight = 20;
this.myDataGrid.ReadOnly = true;
this.myDataGrid.RowHeadersVisible = false;
this.myDataGrid.RowHeaderWidth = 0;
this.myDataGrid.Size = new System.Drawing.Size(896, 305);
this.myDataGrid.TabIndex = 0;
this.myDataGrid.MouseEnter += new System.EventHandler(this.myDataGrid_MouseEnter);
this.myDataGrid.MouseLeave += new System.EventHandler(this.myDataGrid_MouseLeave);
//
// myCSharpTabPage
//
this.myCSharpTabPage.Controls.Add(this.myCSharpText);
this.myCSharpTabPage.Location = new System.Drawing.Point(4, 25);
this.myCSharpTabPage.Name = "myCSharpTabPage";
this.myCSharpTabPage.Size = new System.Drawing.Size(896, 306);
this.myCSharpTabPage.TabIndex = 2;
this.myCSharpTabPage.Text = "C# Class";
//
// myCSharpText
//
this.myCSharpText.BackColor = System.Drawing.Color.White;
this.myCSharpText.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.myCSharpText.Dock = System.Windows.Forms.DockStyle.Fill;
this.myCSharpText.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.myCSharpText.Location = new System.Drawing.Point(0, 0);
this.myCSharpText.Name = "myCSharpText";
this.myCSharpText.ReadOnly = true;
this.myCSharpText.Size = new System.Drawing.Size(896, 306);
this.myCSharpText.TabIndex = 0;
this.myCSharpText.Text = "";
this.myCSharpText.MouseEnter += new System.EventHandler(this.myCSharpText_MouseEnter);
this.myCSharpText.MouseLeave += new System.EventHandler(this.myCSharpText_MouseLeave);
//
// myErrorTabPage
//
this.myErrorTabPage.Controls.Add(this.myErrorTextBox);
this.myErrorTabPage.Location = new System.Drawing.Point(4, 25);
this.myErrorTabPage.Name = "myErrorTabPage";
this.myErrorTabPage.Size = new System.Drawing.Size(896, 306);
this.myErrorTabPage.TabIndex = 1;
this.myErrorTabPage.Text = "Error";
//
// myErrorTextBox
//
this.myErrorTextBox.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.myErrorTextBox.Dock = System.Windows.Forms.DockStyle.Fill;
this.myErrorTextBox.ForeColor = System.Drawing.Color.Red;
this.myErrorTextBox.Location = new System.Drawing.Point(0, 0);
this.myErrorTextBox.Name = "myErrorTextBox";
this.myErrorTextBox.ReadOnly = true;
this.myErrorTextBox.Size = new System.Drawing.Size(896, 306);
this.myErrorTextBox.TabIndex = 1;
this.myErrorTextBox.Text = "";
//
// myTableListTabPage
//
this.myTableListTabPage.Controls.Add(this.myTableListBox);
this.myTableListTabPage.Controls.Add(this.myTableListTopPanel);
this.myTableListTabPage.Location = new System.Drawing.Point(4, 25);
this.myTableListTabPage.Name = "myTableListTabPage";
this.myTableListTabPage.Size = new System.Drawing.Size(896, 306);
this.myTableListTabPage.TabIndex = 3;
this.myTableListTabPage.Text = "Table list";
//
// myTableListBox
//
this.myTableListBox.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.myTableListBox.Dock = System.Windows.Forms.DockStyle.Fill;
this.myTableListBox.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.myTableListBox.ItemHeight = 14;
this.myTableListBox.Location = new System.Drawing.Point(0, 31);
this.myTableListBox.Name = "myTableListBox";
this.myTableListBox.Size = new System.Drawing.Size(896, 275);
this.myTableListBox.TabIndex = 1;
this.myTableListBox.DoubleClick += new System.EventHandler(this.myTableListBox_DoubleClick);
this.myTableListBox.MouseEnter += new System.EventHandler(this.myTableListBox_MouseEnter);
this.myTableListBox.MouseLeave += new System.EventHandler(this.myTableListBox_MouseLeave);
//
// myTableListTopPanel
//
this.myTableListTopPanel.Controls.Add(this.myTableFilterBox);
this.myTableListTopPanel.Controls.Add(this.myTableFilterLabel);
this.myTableListTopPanel.Dock = System.Windows.Forms.DockStyle.Top;
this.myTableListTopPanel.Location = new System.Drawing.Point(0, 0);
this.myTableListTopPanel.Name = "myTableListTopPanel";
this.myTableListTopPanel.Size = new System.Drawing.Size(896, 31);
this.myTableListTopPanel.TabIndex = 4;
//
// myTableFilterBox
//
this.myTableFilterBox.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.myTableFilterBox.Location = new System.Drawing.Point(58, 3);
this.myTableFilterBox.Name = "myTableFilterBox";
this.myTableFilterBox.Size = new System.Drawing.Size(835, 20);
this.myTableFilterBox.TabIndex = 2;
this.myTableFilterBox.TextChanged += new System.EventHandler(this.myTableFilterBox_TextChanged);
//
// myTableFilterLabel
//
this.myTableFilterLabel.AutoSize = true;
this.myTableFilterLabel.Location = new System.Drawing.Point(3, 3);
this.myTableFilterLabel.Name = "myTableFilterLabel";
this.myTableFilterLabel.Size = new System.Drawing.Size(49, 14);
this.myTableFilterLabel.TabIndex = 3;
this.myTableFilterLabel.Text = "Filter";
//
// myPrimitivesPage
//
this.myPrimitivesPage.Controls.Add(this.myTreeView);
this.myPrimitivesPage.Location = new System.Drawing.Point(4, 25);
this.myPrimitivesPage.Name = "myPrimitivesPage";
this.myPrimitivesPage.Size = new System.Drawing.Size(896, 306);
this.myPrimitivesPage.TabIndex = 4;
this.myPrimitivesPage.Text = "Language primitives";
//
// myTreeView
//
this.myTreeView.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.myTreeView.Dock = System.Windows.Forms.DockStyle.Fill;
this.myTreeView.Location = new System.Drawing.Point(0, 0);
this.myTreeView.Name = "myTreeView";
this.myTreeView.Size = new System.Drawing.Size(896, 306);
this.myTreeView.TabIndex = 0;
//
// myConsoleTabPage
//
this.myConsoleTabPage.Controls.Add(this.myConsoleRichTextBox);
this.myConsoleTabPage.Location = new System.Drawing.Point(4, 25);
this.myConsoleTabPage.Name = "myConsoleTabPage";
this.myConsoleTabPage.Padding = new System.Windows.Forms.Padding(3);
this.myConsoleTabPage.Size = new System.Drawing.Size(896, 306);
this.myConsoleTabPage.TabIndex = 5;
this.myConsoleTabPage.Text = "Console";
this.myConsoleTabPage.UseVisualStyleBackColor = true;
//
// myConsoleRichTextBox
//
this.myConsoleRichTextBox.Dock = System.Windows.Forms.DockStyle.Fill;
this.myConsoleRichTextBox.Location = new System.Drawing.Point(3, 3);
this.myConsoleRichTextBox.Name = "myConsoleRichTextBox";
this.myConsoleRichTextBox.Size = new System.Drawing.Size(890, 300);
this.myConsoleRichTextBox.TabIndex = 0;
this.myConsoleRichTextBox.Text = "";
//
// myTimer
//
this.myTimer.Enabled = true;
this.myTimer.Interval = 150;
this.myTimer.Tick += new System.EventHandler(this.myTimer_Tick);
//
// mySplitter
//
this.mySplitter.Dock = System.Windows.Forms.DockStyle.Top;
this.mySplitter.Location = new System.Drawing.Point(0, 232);
this.mySplitter.Name = "mySplitter";
this.mySplitter.Size = new System.Drawing.Size(904, 3);
this.mySplitter.TabIndex = 3;
this.mySplitter.TabStop = false;
//
// myStatusStrip
//
this.myStatusStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.myToolStripStatusLabelTime,
this.myToolStripStatusLabelRows});
this.myStatusStrip.Location = new System.Drawing.Point(0, 567);
this.myStatusStrip.Name = "myStatusStrip";
this.myStatusStrip.Size = new System.Drawing.Size(904, 22);
this.myStatusStrip.TabIndex = 4;
//
// myToolStripStatusLabelTime
//
this.myToolStripStatusLabelTime.Name = "myToolStripStatusLabelTime";
this.myToolStripStatusLabelTime.Padding = new System.Windows.Forms.Padding(0, 0, 8, 0);
this.myToolStripStatusLabelTime.Size = new System.Drawing.Size(8, 17);
//
// myToolStripStatusLabelRows
//
this.myToolStripStatusLabelRows.Name = "myToolStripStatusLabelRows";
this.myToolStripStatusLabelRows.Size = new System.Drawing.Size(0, 17);
//
// myMenuStrip
//
this.myMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.myToolStripMenuItemFile,
this.myToolStripMenuItemQuery,
this.myToolStripMenuItemTools,
this.myToolStripMenuItemSite,
this.libraryToolStripMenuItem});
this.myMenuStrip.Location = new System.Drawing.Point(0, 0);
this.myMenuStrip.Name = "myMenuStrip";
this.myMenuStrip.Size = new System.Drawing.Size(904, 24);
this.myMenuStrip.TabIndex = 5;
this.myMenuStrip.Text = "menuStrip1";
//
// myToolStripMenuItemFile
//
this.myToolStripMenuItemFile.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.myToolStripMenuItemOpen,
this.myToolStripMenuItemSave,
this.myToolStripMenuItemSaveAs,
this.myToolStripMenuItemExit,
this.testGridToolStripMenuItem});
this.myToolStripMenuItemFile.Name = "myToolStripMenuItemFile";
this.myToolStripMenuItemFile.Size = new System.Drawing.Size(37, 20);
this.myToolStripMenuItemFile.Text = "&File";
//
// myToolStripMenuItemOpen
//
this.myToolStripMenuItemOpen.Image = global::DataStreamQueryAnalyzer.Properties.Resources.File_Open_icon16;
this.myToolStripMenuItemOpen.Name = "myToolStripMenuItemOpen";
this.myToolStripMenuItemOpen.Size = new System.Drawing.Size(123, 22);
this.myToolStripMenuItemOpen.Text = "&Open...";
this.myToolStripMenuItemOpen.Click += new System.EventHandler(this.myMenuItemOpenClick);
//
// myToolStripMenuItemSave
//
this.myToolStripMenuItemSave.Image = global::DataStreamQueryAnalyzer.Properties.Resources.Save_icon16;
this.myToolStripMenuItemSave.Name = "myToolStripMenuItemSave";
this.myToolStripMenuItemSave.Size = new System.Drawing.Size(123, 22);
this.myToolStripMenuItemSave.Text = "Save...";
this.myToolStripMenuItemSave.Click += new System.EventHandler(this.myMenuItemSaveClick);
//
// myToolStripMenuItemSaveAs
//
this.myToolStripMenuItemSaveAs.Name = "myToolStripMenuItemSaveAs";
this.myToolStripMenuItemSaveAs.Size = new System.Drawing.Size(123, 22);
this.myToolStripMenuItemSaveAs.Text = "Save As...";
this.myToolStripMenuItemSaveAs.Click += new System.EventHandler(this.myMenuItemSaveAsClick);
//
// myToolStripMenuItemExit
//
this.myToolStripMenuItemExit.Image = global::DataStreamQueryAnalyzer.Properties.Resources.Button_Turn_Off_icon16;
this.myToolStripMenuItemExit.Name = "myToolStripMenuItemExit";
this.myToolStripMenuItemExit.Size = new System.Drawing.Size(123, 22);
this.myToolStripMenuItemExit.Text = "Exit";
this.myToolStripMenuItemExit.Click += new System.EventHandler(this.myToolStripMenuItemExit_Click);
//
// testGridToolStripMenuItem
//
this.testGridToolStripMenuItem.Name = "testGridToolStripMenuItem";
this.testGridToolStripMenuItem.Size = new System.Drawing.Size(123, 22);
this.testGridToolStripMenuItem.Text = "Test Grid";
this.testGridToolStripMenuItem.Click += new System.EventHandler(this.testGridToolStripMenuItem_Click);
//
// myToolStripMenuItemQuery
//
this.myToolStripMenuItemQuery.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.myToolStripMenuItemExecute,
this.myToolStripMenuItemExecSel,
this.myToolStripMenuItemFreeze,
this.myToolStripMenuItemStep});
this.myToolStripMenuItemQuery.Name = "myToolStripMenuItemQuery";
this.myToolStripMenuItemQuery.Size = new System.Drawing.Size(51, 20);
this.myToolStripMenuItemQuery.Text = "&Query";
//
// myToolStripMenuItemExecute
//
this.myToolStripMenuItemExecute.Image = global::DataStreamQueryAnalyzer.Properties.Resources.Button_Play_icon16;
this.myToolStripMenuItemExecute.Name = "myToolStripMenuItemExecute";
this.myToolStripMenuItemExecute.ShortcutKeys = System.Windows.Forms.Keys.F11;
this.myToolStripMenuItemExecute.Size = new System.Drawing.Size(190, 22);
this.myToolStripMenuItemExecute.Text = "Execute";
this.myToolStripMenuItemExecute.Click += new System.EventHandler(this.myMenuItemExecuteQueryClick);
//
// myToolStripMenuItemExecSel
//
this.myToolStripMenuItemExecSel.Image = global::DataStreamQueryAnalyzer.Properties.Resources.Button_Blank_Blue_icon16;
this.myToolStripMenuItemExecSel.Name = "myToolStripMenuItemExecSel";
this.myToolStripMenuItemExecSel.ShortcutKeys = System.Windows.Forms.Keys.F12;
this.myToolStripMenuItemExecSel.Size = new System.Drawing.Size(190, 22);
this.myToolStripMenuItemExecSel.Text = "Execute Selection";
this.myToolStripMenuItemExecSel.Click += new System.EventHandler(this.myToolStripMenuItemExecSel_Click);
//
// myToolStripMenuItemFreeze
//
this.myToolStripMenuItemFreeze.Image = global::DataStreamQueryAnalyzer.Properties.Resources.Button_Pause_icon16;
this.myToolStripMenuItemFreeze.Name = "myToolStripMenuItemFreeze";
this.myToolStripMenuItemFreeze.Size = new System.Drawing.Size(190, 22);
this.myToolStripMenuItemFreeze.Text = "Freeze";
this.myToolStripMenuItemFreeze.Click += new System.EventHandler(this.myToolStripMenuItemFreeze_Click);
//
// myToolStripMenuItemStep
//
this.myToolStripMenuItemStep.Image = global::DataStreamQueryAnalyzer.Properties.Resources.Button_Forward_icon16;
this.myToolStripMenuItemStep.Name = "myToolStripMenuItemStep";
this.myToolStripMenuItemStep.Size = new System.Drawing.Size(190, 22);
this.myToolStripMenuItemStep.Text = "Step";
this.myToolStripMenuItemStep.Click += new System.EventHandler(this.myToolStripMenuItemStep_Click);
//
// myToolStripMenuItemTools
//
this.myToolStripMenuItemTools.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.myToolStripMenuItemLoadAss,
this.myToolStripMenuItemTest,
this.myToolStripMenuItemToolsSep,
this.myToolStripMenuItemClearConsole});
this.myToolStripMenuItemTools.Name = "myToolStripMenuItemTools";
this.myToolStripMenuItemTools.Size = new System.Drawing.Size(48, 20);
this.myToolStripMenuItemTools.Text = "&Tools";
//
// myToolStripMenuItemLoadAss
//
this.myToolStripMenuItemLoadAss.Image = global::DataStreamQueryAnalyzer.Properties.Resources.Button_Upload_icon16;
this.myToolStripMenuItemLoadAss.Name = "myToolStripMenuItemLoadAss";
this.myToolStripMenuItemLoadAss.Size = new System.Drawing.Size(154, 22);
this.myToolStripMenuItemLoadAss.Text = "Load Assembly";
this.myToolStripMenuItemLoadAss.Click += new System.EventHandler(this.myToolStripMenuItemLoadAss_Click);
//
// myToolStripMenuItemTest
//
this.myToolStripMenuItemTest.Image = global::DataStreamQueryAnalyzer.Properties.Resources.Button_Refresh_icon16;
this.myToolStripMenuItemTest.Name = "myToolStripMenuItemTest";
this.myToolStripMenuItemTest.ShortcutKeys = System.Windows.Forms.Keys.F4;
this.myToolStripMenuItemTest.Size = new System.Drawing.Size(154, 22);
this.myToolStripMenuItemTest.Text = "Test Resub";
this.myToolStripMenuItemTest.Click += new System.EventHandler(this.myToolStripMenuItemTest_Click);
//
// myToolStripMenuItemToolsSep
//
this.myToolStripMenuItemToolsSep.Name = "myToolStripMenuItemToolsSep";
this.myToolStripMenuItemToolsSep.Size = new System.Drawing.Size(151, 6);
//
// myToolStripMenuItemClearConsole
//
this.myToolStripMenuItemClearConsole.Name = "myToolStripMenuItemClearConsole";
this.myToolStripMenuItemClearConsole.Size = new System.Drawing.Size(154, 22);
this.myToolStripMenuItemClearConsole.Text = "Clear Console";
this.myToolStripMenuItemClearConsole.Click += new System.EventHandler(this.myToolStripMenuItemClearConsole_Click);
//
// myToolStripMenuItemSite
//
this.myToolStripMenuItemSite.Name = "myToolStripMenuItemSite";
this.myToolStripMenuItemSite.Size = new System.Drawing.Size(38, 20);
this.myToolStripMenuItemSite.Text = "&Site";
//
// libraryToolStripMenuItem
//
this.libraryToolStripMenuItem.Name = "libraryToolStripMenuItem";
this.libraryToolStripMenuItem.Size = new System.Drawing.Size(55, 20);
this.libraryToolStripMenuItem.Text = "Library";
this.libraryToolStripMenuItem.Click += new System.EventHandler(this.libraryToolStripMenuItem_Click);
//
// MainForm
//
this.AutoScaleBaseSize = new System.Drawing.Size(7, 13);
this.BackColor = System.Drawing.Color.Gainsboro;
this.ClientSize = new System.Drawing.Size(904, 589);
this.Controls.Add(this.mySplitter);
this.Controls.Add(this.myTabControl);
this.Controls.Add(this.myQueryTextBox);
this.Controls.Add(this.myMenuStrip);
this.Controls.Add(this.myStatusStrip);
this.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.ForeColor = System.Drawing.Color.Black;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MainMenuStrip = this.myMenuStrip;
this.Name = "MainForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
this.Text = "DataStream Query Analyzer";
this.Closed += new System.EventHandler(this.MainForm_Closed);
this.myTabControl.ResumeLayout(false);
this.myViewTabPage.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.myDataGrid)).EndInit();
this.myCSharpTabPage.ResumeLayout(false);
this.myErrorTabPage.ResumeLayout(false);
this.myTableListTabPage.ResumeLayout(false);
this.myTableListTopPanel.ResumeLayout(false);
this.myTableListTopPanel.PerformLayout();
this.myPrimitivesPage.ResumeLayout(false);
this.myConsoleTabPage.ResumeLayout(false);
this.myStatusStrip.ResumeLayout(false);
this.myStatusStrip.PerformLayout();
this.myMenuStrip.ResumeLayout(false);
this.myMenuStrip.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.TabPage myViewTabPage;
private System.Windows.Forms.TabPage myErrorTabPage;
private System.Windows.Forms.TabPage myCSharpTabPage;
private System.Windows.Forms.TabPage myTableListTabPage;
private System.Windows.Forms.RichTextBox myQueryTextBox;
private HScrollGrid myDataGrid;
private System.Windows.Forms.Timer myTimer;
private System.Windows.Forms.RichTextBox myErrorTextBox;
private System.Windows.Forms.RichTextBox myCSharpText;
private System.Windows.Forms.TabControl myTabControl;
private System.Windows.Forms.Splitter mySplitter;
private System.Windows.Forms.TabPage myPrimitivesPage;
private BCG.Utilities.XPControls.ListBoxXP myTableListBox;
private System.ComponentModel.IContainer components;
private System.Windows.Forms.TreeView myTreeView;
private System.Windows.Forms.StatusStrip myStatusStrip;
private System.Windows.Forms.ToolStripStatusLabel myToolStripStatusLabelTime;
private System.Windows.Forms.ToolStripStatusLabel myToolStripStatusLabelRows;
private System.Windows.Forms.MenuStrip myMenuStrip;
private System.Windows.Forms.ToolStripMenuItem myToolStripMenuItemFile;
private System.Windows.Forms.ToolStripMenuItem myToolStripMenuItemOpen;
private System.Windows.Forms.ToolStripMenuItem myToolStripMenuItemSave;
private System.Windows.Forms.ToolStripMenuItem myToolStripMenuItemQuery;
private System.Windows.Forms.ToolStripMenuItem myToolStripMenuItemTools;
private System.Windows.Forms.ToolStripMenuItem myToolStripMenuItemSite;
private System.Windows.Forms.ToolStripMenuItem myToolStripMenuItemSaveAs;
private System.Windows.Forms.ToolStripMenuItem myToolStripMenuItemExit;
private System.Windows.Forms.ToolStripMenuItem myToolStripMenuItemExecute;
private System.Windows.Forms.ToolStripMenuItem myToolStripMenuItemFreeze;
private System.Windows.Forms.ToolStripMenuItem myToolStripMenuItemStep;
private System.Windows.Forms.ToolStripMenuItem myToolStripMenuItemLoadAss;
private System.Windows.Forms.ToolStripMenuItem myToolStripMenuItemTest;
private System.Windows.Forms.ToolStripMenuItem myToolStripMenuItemExecSel;
private System.Windows.Forms.Label myTableFilterLabel;
private System.Windows.Forms.TextBox myTableFilterBox;
private System.Windows.Forms.TabPage myConsoleTabPage;
private System.Windows.Forms.RichTextBox myConsoleRichTextBox;
private System.Windows.Forms.ToolStripSeparator myToolStripMenuItemToolsSep;
private System.Windows.Forms.ToolStripMenuItem myToolStripMenuItemClearConsole;
private System.Windows.Forms.Panel myTableListTopPanel;
private System.Windows.Forms.ToolStripMenuItem testGridToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem libraryToolStripMenuItem;
}
}
@@ -0,0 +1,785 @@
using System;
using System.Drawing;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Windows.Forms;
using System.Text.RegularExpressions;
using System.IO;
using System.Diagnostics;
using BCG.Utilities;
// using BCG.Utilities.BlueConfiguration;
using BCG.Utilities.General;
using BCG.Evaluator.DataStreamExpression;
// using BCG.Utilities.Win32;
namespace BCG
{
public partial class MainForm : System.Windows.Forms.Form
{
private bool myChangeStyle = false;
private PubSubRoute[] myRoutes = PubSub3Config.instance.getSubRouting();
private PersistWindowState myWindowState;
private string myLastFileName;
private ViewStream myCurrentStream;
private List<ToolStripMenuItem> mySiteItems = new List<ToolStripMenuItem> ();
private string mySite = SitesCore.getMySiteName ();
private string myLastClassName = "MyView";
private ViewStream myAllTagsStream;
private PubSubConfigureForm myPubSubConForm = new PubSubConfigureForm ();
private string myKQ;
private TextWriter myConsoleOutput;
public MainForm()
{
InitializeComponent();
myKQ = ConfigurationRequester.getApplicationQualifier();
mySetText();
myWindowState = new PersistWindowState ();
myWindowState.parent = this;
myWindowState.saveState = false;
this.Load += new EventHandler (myLoad);
this.Closing += new CancelEventHandler (myClosing);
}
public string query_text
{
get { return myQueryTextBox.Text; }
set { myQueryTextBox.Text = value; }
}
private ViewStream myGetAllTagsStream ()
{
return new FilterStream(new PublishedTagsStream(), String.Format("tag~='^{0}'", PubStreamPrefixer.prefix("")));
}
private void mySetText ()
{
this.Text = "Data Stream Query Analyzer | Site: " + mySite + (string.IsNullOrEmpty (myKQ) ? string.Empty : " | Key Qualifier: " + myKQ);
myToolStripStatusLabelTime.Text = "Ready";
myToolStripStatusLabelRows.Text = string.Empty;
}
/// <summary>
/// Gets the data in the form of a multilevel IDictionary
/// </summary>
/// <returns></returns>
private IDictionary myGetLibraryData ()
{
SortedList retVal = new SortedList();
string[] primitiveNames = PrimitiveManager.instance.getPrimitiveNames ();
foreach (string pName in primitiveNames)
{
string aName = PrimitiveManager.instance.getAssemblyName (pName);
ICollection cNames = PrimitiveManager.instance.getConstructorSigns (pName);
if (!retVal.Contains (aName))
retVal.Add (aName, new SortedList ());
(retVal[aName] as IDictionary)[pName] = new ArrayList (cNames);
}
foreach (DictionaryEntry outerDe in retVal)
foreach (DictionaryEntry innerDe in (outerDe.Value as IDictionary))
(innerDe.Value as ArrayList).Sort ();
return retVal;
}
private void myLoadAssemblies ()
{
myTreeView.Nodes.Clear ();
IDictionary libraryData = myGetLibraryData ();
foreach (DictionaryEntry de in libraryData)
{
TreeNode assemblyNode = new TreeNode (de.Key as String);
foreach (DictionaryEntry innerDe in (de.Value as IDictionary))
{
TreeNode primitiveNode = new TreeNode (innerDe.Key as string);
foreach (string con in (innerDe.Value as ICollection))
primitiveNode.Nodes.Add (con);
assemblyNode.Nodes.Add (primitiveNode);
}
myTreeView.Nodes.Add (assemblyNode);
}
/*
myPrimitivesTextBox.Clear ();
ArrayList al = new ArrayList(PrimitiveManager.instance.getPrimitiveNames());
al.Sort();
foreach (string s in al)
{
myPrimitivesTextBox.Text += "\n" + s + " (from " + PrimitiveManager.instance.getAssemblyName(s) + ")\n";
foreach (string desc in PrimitiveManager.instance.getConstructorSigns(s))
myPrimitivesTextBox.Text += "\t" + desc + "\n";
}*/
}
private void myHandleTableListChange (object o)
{
IBlueRowCollection rows = (o as DataPacket).newRows;
myUpdateTableList();
}
#region Persistence Keys
public int textBoxHeight
{
get { return myQueryTextBox.Height; }
set { myQueryTextBox.Height = value; }
}
#endregion
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main(string[] argv)
{
CoreServicesInit.init();
BCG.Utilities.BlueConfiguration.ConfigurationRequester.enable_config_file_read = true;
MainForm mainForm = new MainForm();
if (argv.Length > 0)
mainForm.loadFile(argv[0]);
Application.Run(mainForm);
}
private void myTryExpression (string expStr)
{
myFreezeView (false); // force unfreeze the view
DataStreamExpression oldExp = myExp;
try
{
BCG.Evaluator.DataStreamExpression.syntax parser =
new BCG.Evaluator.DataStreamExpression.syntax();
DataStreamExpression exp = (DataStreamExpression)
parser.Parse(expStr);
if (exp == null)
throw new Exception("Syntax error. I am afraid I have no further details. Let Pedro know if you are really bothered about it.");
myDataGrid.DataSource = null;
myTabControl.SelectedIndex = 0;
myErrorTextBox.Text = "";
myDataGrid.CaptionText = "";
if (myCurrentStream != null)
myCurrentStream.onChange -= new BCG.DataStream.ChangeDelegate(myCallback);
myCurrentStream = null;
myExp = exp;
myCrono = new Crono();
myCrono.start();
(myCurrentStream = myExp.getView(new Hashtable())).onChange += new DataStream.ChangeDelegate(myCallback);
myChangeStyle = true;
//new SimpleBindableStream(myExp.getView(new Hashtable())).onChange += new DataStream.ChangeDelegate(myCallback);
/*
if (oldExp != null)
oldExp.getView(new Hashtable()).onChange -= new DataStream.ChangeDelegate(myCallback);
*/
//myQueryTextBox.Text = expStr;
}
catch (Exception exc)
{
BCG.Utilities.BlueEventLog.logEvent(exc);
myDataGrid.DataSource = null;
myTabControl.SelectedIndex = 2;
myExp = oldExp;
myErrorTextBox.Text = exc.Message + "\n";
if(exc.InnerException != null)
myErrorTextBox.Text += "Inner Exception: " + exc.InnerException.Message + "\n";
myErrorTextBox.Text += "\n" + exc.StackTrace;
myCSharpText.Text = "";
}
}
private string myExtractFromClass (TextReader r)
{
string line = r.ReadLine();
while (line != null && line.IndexOf("*Expression*") == -1)
line = r.ReadLine();
if (line == null)
throw new Exception ("Unexpected EOF");
r.ReadLine();
string result = "";
line = r.ReadLine();
while (line != null && line.IndexOf("----------------------------------------------------------------------") == -1)
{
if (line != "")
result += line.Substring(" ".Length) + "\n";
line = r.ReadLine();
}
if (line == null)
throw new Exception ("Unexpected EOF");
return result;
}
public void loadFile (string fileName)
{
try
{
TextReader r = new StreamReader(fileName);
try
{
myQueryTextBox.Text = myExtractFromClass(r);
}
finally
{
r.Close();
}
myLastFileName = fileName;
this.Text = fileName;
}
catch (Exception exc)
{
BCG.Utilities.BlueEventLog.logEvent(exc);
myDataGrid.DataSource = null;
myTabControl.SelectedIndex = 1;
myErrorTextBox.Text = exc.Message;
myErrorTextBox.Text += "\n" + exc.StackTrace;
}
}
private void myPrintCode(IBlueTableSchema schema, ICollection vars, string code)
{
myCSharpText.Text = "using System;\n\nnamespace BCG\n{";
myCSharpText.Text +="\n/*";
myCSharpText.Text +="\n ----------------------------------------------------------------------";
myCSharpText.Text +="\n *Expression*";
myCSharpText.Text +="\n ----------------------------------------------------------------------";
foreach (string line in myQueryTextBox.Text.Split('\n'))
myCSharpText.Text +="\n " + line;
myCSharpText.Text +="\n\n ----------------------------------------------------------------------";
myCSharpText.Text +="\n *Schema*";
myCSharpText.Text +="\n ----------------------------------------------------------------------";
foreach(ColumnInfo ci in schema.columnInfo)
myCSharpText.Text +="\n " + ci.colName + new string(' ', Math.Max(32 - ci.colName.Length,1) ) + ci.colType.ToString();
myCSharpText.Text +="\n*/\n";
string lastVar = null;
string variableDeclarations = "";
foreach (string var in vars)
{
variableDeclarations+= " ViewStream " + var + ";\n";
lastVar = var;
}
myLastClassName = null;
if (lastVar != null)
myLastClassName = lastVar[0].ToString().ToUpper() + lastVar.Substring(1);
else
myLastClassName = "MyView";
myCSharpText.Text +="\n\n public class " + myLastClassName + " : ViewStream \n {\n";
myCSharpText.Text += " public " + myLastClassName + "() : this(null) {}\n";
myCSharpText.Text += " public " + myLastClassName + "(ViewStreamDatabase db)\n {\n";
myCSharpText.Text += variableDeclarations;
if (lastVar != null)
myCSharpText.Text += "\n";
myCSharpText.Text += code + "\n";
if (lastVar != null)
myCSharpText.Text += " mySetRealSource(" + lastVar + ");\n";
myCSharpText.Text += " }\n";
myCSharpText.Text += " }\n";
myCSharpText.Text += "}";
}
private void myCallback(object o)
{
DataPacket dp = o as DataPacket;
myCrono.stop();
BlueEventLog.logEvent ("Received callback for " + dp.schema.tableName);
if (o == null)
{
System.Windows.Forms.MessageBox.Show (this, "Received a Null Data packet",
"Invalid Data", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
BlueEventLog.logEvent(dp.toIncrementalIDString(), BlueEventLevel.Diagnosis);
myToolStripStatusLabelTime.Text = "Last update: " + DateTime.Now.ToString ("hh:mm:ss:fff tt");
myToolStripStatusLabelRows.Text = "New = " + dp.newRows.Count + " Added = " + dp.addedRows.Count + " Deleted = " + dp.deletedRows.Count;
BlueEventLog.logEvent(Text, BlueEventLevel.Diagnosis);
int hscrollval = myChangeStyle ? 0 : myDataGrid.HorizScrollBarValue;
myDataGrid.DataSource = new SimpleBindableCollection (dp.newRows.schema, dp.newRows);
if (myChangeStyle)
{
myChangeStyle = false;
DataGridTableStyle tabStyle = new DataGridTableStyle ();
DataGridColumnStyle colStyle;
foreach (ColumnInfo ci in dp.schema.columnInfo)
{
colStyle = new DataGridTextBoxColumn ();
colStyle.MappingName = ci.colName;
colStyle.HeaderText = ci.colName;
colStyle.Width = Math.Max(ci.colName.Length * 10, 50);
if (ci.colType.Equals (typeof(DateTime)))
{
colStyle.Width = 200;
// (colStyle as DataGridTextBoxColumn).Format =
// System.Globalization.DateTimeFormatInfo.CurrentInfo.TimeSeparator;
}
tabStyle.GridColumnStyles.Add (colStyle);
}
tabStyle.HeaderFont =
new Font ("Courier New", 9, FontStyle.Bold);
tabStyle.GridLineStyle = System.Windows.Forms.DataGridLineStyle.Solid;
tabStyle.GridLineColor = Color.Black;
tabStyle.RowHeadersVisible = false;
tabStyle.MappingName = "SimpleBindableCollection";
myDataGrid.TableStyles.Clear ();
myDataGrid.TableStyles.Add (tabStyle);
}
myCrono.start();
myDataGrid.CaptionText = myCrono.time.TotalMilliseconds + " ms ";
myDataGrid.CaptionText += dp.newRows.Count.ToString () + " records";
myDataGrid.HorizScrollBarValue = hscrollval;
ArrayList varNames = new ArrayList();
string code = myExp.print(9,varNames);
myPrintCode(dp.schema ,varNames, code);
}
private Crono myCrono;
private DataStreamExpression myExp;
private void myTimer_Tick(object sender, System.EventArgs e)
{
try
{
ViewStreamDatabase.instance.doWork ();
MasterWorker.getInstance(false).doWork();
}
catch (Exception exc)
{
BCG.Utilities.BlueEventLog.logEvent(exc);
myDataGrid.DataSource = null;
//myTabControl.SelectedIndex = 1;
myTabControl.SelectedTab = myErrorTabPage;
myErrorTextBox.Text = exc.Message;
myErrorTextBox.Text += "\n" + exc.StackTrace;
}
}
class StringWrapper
{
public StringWrapper(string s)
{
myTableName = s;
}
public string tableName
{
get{return myTableName;}
}
private string myTableName;
}
private void MainForm_Closed(object sender, System.EventArgs e)
{
if (myExp != null)
myExp.getView(new Hashtable()).onChange -= new DataStream.ChangeDelegate(myCallback);
}
private void myMenuItemExecuteQueryClick(object sender, System.EventArgs e)
{
myQueryTextBox.SelectionStart = myQueryTextBox.Text.Length;
myQueryTextBox.SelectionLength = myQueryTextBox.Text.Length;
myQueryTextBox.SelectionColor = Color.Black;
myQueryTextBox.SelectionLength = 0;
myTryExpression(myQueryTextBox.Text);
}
private void myToolStripMenuItemExecSel_Click (object sender, EventArgs e)
{
int selstart = myQueryTextBox.SelectionStart;
int sellength = myQueryTextBox.SelectionLength;
myQueryTextBox.SelectionStart = 0;
myQueryTextBox.SelectionLength = myQueryTextBox.Text.Length;
myQueryTextBox.SelectionColor = Color.Black;
myQueryTextBox.SelectionStart = selstart;
myQueryTextBox.SelectionLength = sellength;
myQueryTextBox.SelectionColor = Color.Crimson;
myTryExpression (myQueryTextBox.SelectedText);
myQueryTextBox.SelectionStart = myQueryTextBox.Text.Length;
myQueryTextBox.SelectionLength = 0;
myQueryTextBox.SelectionColor = Color.Black;
}
private void myMenuItemOpenClick(object sender, System.EventArgs e)
{
OpenFileDialog od = new OpenFileDialog();
od.Filter = "C# class (*.cs)|*.cs";
if(od.ShowDialog() == DialogResult.OK)
loadFile(od.FileName);
}
private void mySave(string fileName)
{
using (TextWriter w = new StreamWriter(fileName))
w.Write(myCSharpText.Text);
myLastFileName = fileName;
this.Text = fileName;
}
private void myMenuItemSaveClick(object sender, System.EventArgs e)
{
if (myLastFileName == null)
myMenuItemSaveAsClick(sender,e);
else
mySave(myLastFileName);
}
private void myMenuItemSaveAsClick(object sender, System.EventArgs e)
{
SaveFileDialog sd = new SaveFileDialog();
if (myLastFileName != null)
sd.FileName = myLastFileName;
else
sd.FileName = myLastClassName + ".cs";
if (sd.ShowDialog() == DialogResult.OK)
mySave (sd.FileName);
}
private void myTableListBox_DoubleClick(object sender, System.EventArgs e)
{
if (myTableListBox.SelectedItem != null)
{
string tableName = myTableListBox.SelectedItem.ToString ();
myQueryTextBox.Text = myQueryTextBox.Text == "" ? tableName : myQueryTextBox.Text + "\n" + tableName;
myTryExpression (myQueryTextBox.Text);
}
}
private void myDataGrid_MouseEnter(object sender, System.EventArgs e)
{
//myDataGrid.TableStyles[0].GridLineColor = Color.LightSteelBlue;
if (myDataGrid.TableStyles.Count > 0)
myDataGrid.TableStyles[0].HeaderBackColor = Color.LightSteelBlue;
}
private void myDataGrid_MouseLeave(object sender, System.EventArgs e)
{
//myDataGrid.TableStyles[0].GridLineColor = Color.Gainsboro;
if (myDataGrid.TableStyles.Count > 0)
myDataGrid.TableStyles[0].HeaderBackColor = Color.Gainsboro;
}
private void myCSharpText_MouseEnter(object sender, System.EventArgs e)
{
myCSharpText.BackColor = Color.Gainsboro;
myCSharpText.Font = new Font (myCSharpText.Font.Name, myCSharpText.Font.Size, FontStyle.Bold);
}
private void myCSharpText_MouseLeave(object sender, System.EventArgs e)
{
myCSharpText.BackColor = Color.White;
myCSharpText.Font = new Font (myCSharpText.Font.Name, myCSharpText.Font.Size, FontStyle.Regular);
}
private void myTableListBox_MouseEnter(object sender, System.EventArgs e)
{
myTableListBox.BackColor = Color.Gainsboro;
myTableListBox.Font = new Font (myTableListBox.Font.Name, myTableListBox.Font.Size, FontStyle.Bold);
}
private void myTableListBox_MouseLeave(object sender, System.EventArgs e)
{
myTableListBox.BackColor = Color.White;
myTableListBox.Font = new Font (myTableListBox.Font.Name, myTableListBox.Font.Size, FontStyle.Regular);
}
private void myLoad (object sender, EventArgs e)
{
myFreezeView (false);
myToolStripMenuItemSite.DropDownItems.Clear ();
foreach (var name in SitesCfg.instance.siteNames)
{
ToolStripMenuItem mi = new ToolStripMenuItem (name);
mi.Click += new EventHandler (myMenuItemSiteClick);
mySiteItems.Add (mi);
mi.Enabled = true;
myToolStripMenuItemSite.DropDownItems.Add (mi);
if (name == mySite)
mi.Checked = true;
}
myConsoleRichTextBox.ReadOnly = true;
myConsoleOutput = new RichTextBoxStreamWriter (myConsoleRichTextBox);
Console.SetOut (myConsoleOutput);
Console.SetError (myConsoleOutput);
if(BCG.Utilities.Win32.WindowsAPI.SetStdHandle(-11, myConsoleRichTextBox.Handle) == 0) // set stdout
{
var ex = new Win32Exception (); // same as new Win32Exception(Marshal.GetLastWin32Error())
Console.WriteLine (ex.Message);
}
else
{
Console.WriteLine ("Set stdout worked.");
}
if(BCG.Utilities.Win32.WindowsAPI.SetStdHandle(-12, myConsoleRichTextBox.Handle) == 0) // set stderr
{
var ex = new Win32Exception (); // same as new Win32Exception(Marshal.GetLastWin32Error())
Console.WriteLine (ex.Message);
}
else
{
Console.WriteLine ("Set stderr worked.");
}
Console.WriteLine ("Redirecting console ouput to this window...");
myLoadAssemblies ();
ViewStreamDatabase.instance = new ViewStreamDatabase ();
myAllTagsStream = myGetAllTagsStream ();
myAllTagsStream.onChange += new BCG.DataStream.ChangeDelegate (myHandleTableListChange);
myTabControl.SelectedIndex = 3;
myTreeView.AfterSelect += new TreeViewEventHandler (myHandleTreeNodeSelect);
//do this lazily so we don't have to have bps, etc up to run dsqa
//_library = new LibraryForm(this);
}
private void myMenuItemSiteClick (object sender, System.EventArgs e)
{
ToolStripMenuItem mi = (ToolStripMenuItem) sender;
if (mi.Text != mySite)
{
mySite = mi.Text;
foreach (var m in mySiteItems)
m.Checked = false;
mi.Checked = true;
myAllTagsStream.onChange -= new BCG.DataStream.ChangeDelegate (myHandleTableListChange);
myTableListBox.Items.Clear ();
SitesCore.setMySiteName (mySite);
ViewStreamDatabase.instance = new ViewStreamDatabase ();
myAllTagsStream = myGetAllTagsStream ();
myAllTagsStream.onChange += new BCG.DataStream.ChangeDelegate (myHandleTableListChange);
myDataGrid.DataSource = null;
myTabControl.SelectedIndex = 3;
mySetText ();
}
}
private void myClosing (object sender, CancelEventArgs e)
{
}
private void myHandleTreeNodeSelect(object sender, TreeViewEventArgs e)
{
if (myTreeView.SelectedNode != null)
{
if (myTreeView.SelectedNode.LastNode == null)
{
string sn = myTreeView.SelectedNode.Parent.Text + "()";
myQueryTextBox.Text = myQueryTextBox.Text == "" ? sn : myQueryTextBox.Text + "\n" + sn;
}
}
}
private void myToolStripMenuItemExit_Click (object sender, EventArgs e)
{
Close ();
}
private void myToolStripMenuItemFreeze_Click (object sender, EventArgs e)
{
myFreezeView (myTimer.Enabled);
}
private void myFreezeView (bool freeze)
{
myTimer.Enabled = !freeze;
myToolStripMenuItemFreeze.Checked = freeze;
myToolStripMenuItemStep.Enabled = freeze;
}
private void myToolStripMenuItemStep_Click (object sender, EventArgs e)
{
ViewStreamDatabase.instance.doWork ();
}
private void myToolStripMenuItemLoadAss_Click (object sender, EventArgs e)
{
OpenFileDialog ofd = new OpenFileDialog ();
ofd.ShowReadOnly = true;
DialogResult dr = ofd.ShowDialog (this);
if (ofd.CheckFileExists && ofd.CheckPathExists && dr == DialogResult.OK)
{
PrimitiveManager.instance.loadAssembly (ofd.FileName);
myLoadAssemblies ();
}
}
private void myToolStripMenuItemTest_Click (object sender, EventArgs e)
{
if (myCurrentStream != null)
{
myCurrentStream.onChange -= new DataStream.ChangeDelegate (myCallback);
myCurrentStream.onChange += new DataStream.ChangeDelegate (myCallback);
}
}
private void myToolStripMenuItemClearConsole_Click (object sender, EventArgs e)
{
myConsoleRichTextBox.Clear ();
Console.WriteLine ("Redirecting console ouput to this window...");
}
private void myTableFilterBox_TextChanged(object sender, EventArgs e)
{
myUpdateTableList();
}
private void myUpdateTableList()
{
IBlueRowCollection rows = myAllTagsStream.rows;
if (rows == null)
return;
ICollection oldItems = myTableListBox.Items;
myTableListBox.BeginUpdate();
int topindex = myTableListBox.TopIndex;
string topitem = (myTableListBox.Items.Count > 0) ? myTableListBox.Items[topindex].ToString() : string.Empty;
myTableListBox.Items.Clear();
SortedList<string, bool> sl = new SortedList<string, bool>();
if (string.IsNullOrEmpty(myTableFilterBox.Text))
foreach (IBlueRow r in rows)
{
sl[r["tag"].ToString().Substring(PubStreamPrefixer.prefix("").Length)] = true;
}
else
{
Regex tableRegex = new Regex(myTableFilterBox.Text);
foreach (IBlueRow r in rows)
{
string thisTable = r["tag"].ToString().Substring(PubStreamPrefixer.prefix("").Length);
if (tableRegex.IsMatch(thisTable))
sl[thisTable] = true;
}
}
string[] list = new string[sl.Keys.Count];
sl.Keys.CopyTo(list, 0);
myTableListBox.Items.AddRange(list);
int top = sl.IndexOfKey(topitem);
if (top >= 0)
myTableListBox.TopIndex = top;
else
myTableListBox.TopIndex = Math.Min(sl.Count - 1, topindex);
myTableListBox.EndUpdate();
}
private void testGridToolStripMenuItem_Click(object sender, EventArgs e)
{
HighPerformanceTimer timer = new HighPerformanceTimer();
//while (true)
//{
// Random rnd = new Random(DateTime.Now.Millisecond);
// List<double> rand_nos = new List<double>();
// for (int i = 0; i < 10000; i++)
// rand_nos.Add(rnd.NextDouble());
// timer.start();
// rand_nos.Sort();
// timer.stop();
// BCG.Utilities.BlueEventLog.logEvent(String.Format("nrows = {0} sorting time = {1}", rand_nos.Count, timer.lastIntervalTime), BCG.Utilities.BlueEventLevel.Performance);
// System.Threading.Thread.Sleep(10);
//}
ViewStream s = new LoaderStream(@"P:\Dropbox\Data\spread_md_esoa_cme");
s = new MutableAppendStream(s, s);
//s = new MutableAppendStream(s, s);
List<IBlueRow> rows = new List<IBlueRow>();
foreach (IBlueRow r in s.rows)
rows.Add(r);
for (int i = 0; i < 100; i++)
{
timer.start();
rows.Sort(delegate(IBlueRow r1, IBlueRow r2)
{
return _sort_dicts_index(r1, r2, 5, true);
});
timer.stop();
BCG.Utilities.BlueEventLog.logEvent(String.Format("nrows = {0} sorting time = {1}", rows.Count, timer.lastIntervalTime), BCG.Utilities.BlueEventLevel.Performance);
}
}
private static int mySortDictionaries(IBlueRow r1, IBlueRow r2, string column, bool low_to_high)
{
if (r1.Contains(column) && r2.Contains(column))
return compare_send_dontcare_to_last(r1[column], r2[column], low_to_high);
else
return 0;
}
private static int _sort_dicts_index(IBlueRow r1, IBlueRow r2, int col_no, bool low_to_high)
{
//return compare_send_dontcare_to_last(r1[col_no], r2[col_no], low_to_high);
return ((IComparable)r1[col_no]).CompareTo(r2[col_no]);
}
internal static int compare_send_dontcare_to_last(object o1, object o2, bool low_to_high)
{
if (myIsDontCare(o1))
return myIsDontCare(o2) ? 0 : 1;
else
return myIsDontCare(o2) ? -1 : (low_to_high ? ((IComparable)o1).CompareTo(o2)
: ((IComparable)o2).CompareTo(o1));
}
private static bool myIsDontCare(object o)
{
return o == null || o == DBNull.Value ||
o is string && String.IsNullOrEmpty((string)o) ||
o is double && (Double.IsInfinity((double)o) || Double.IsNaN((double)o)) ||
o is float && (Single.IsInfinity((float)o) || Single.IsNaN((float)o));
}
private void _new_grid_form(object args)
{
//System.Timers.Timer t = new System.Timers.Timer();
////t.SynchronizingObject
//BCG.Utilities.BlueEventLog.logEvent(String.Format("New BTSTabularGridTestForm created on thread {0}", System.Threading.Thread.CurrentThread.ManagedThreadId),
// "Diagnosis");
//ViewStream s = args as ViewStream;
//BTSTabularGridTestForm f = new BTSTabularGridTestForm(s);
//Application.Run(f);
}
private void libraryToolStripMenuItem_Click(object sender, EventArgs e) { }
}
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,210 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.239
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace DataStreamQueryAnalyzer.Properties {
using System;
/// <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", "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() {
}
/// <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 (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DataStreamQueryAnalyzer.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;
}
}
internal static System.Drawing.Bitmap Button_Add_icon {
get {
object obj = ResourceManager.GetObject("Button_Add_icon", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap Button_Blank_Blue_icon {
get {
object obj = ResourceManager.GetObject("Button_Blank_Blue_icon", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap Button_Blank_Blue_icon16 {
get {
object obj = ResourceManager.GetObject("Button_Blank_Blue_icon16", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap Button_Close_icon {
get {
object obj = ResourceManager.GetObject("Button_Close_icon", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap Button_Forward_icon {
get {
object obj = ResourceManager.GetObject("Button_Forward_icon", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap Button_Forward_icon16 {
get {
object obj = ResourceManager.GetObject("Button_Forward_icon16", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap Button_Pause_icon {
get {
object obj = ResourceManager.GetObject("Button_Pause_icon", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap Button_Pause_icon16 {
get {
object obj = ResourceManager.GetObject("Button_Pause_icon16", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap Button_Play_icon {
get {
object obj = ResourceManager.GetObject("Button_Play_icon", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap Button_Play_icon16 {
get {
object obj = ResourceManager.GetObject("Button_Play_icon16", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap Button_Refresh_icon {
get {
object obj = ResourceManager.GetObject("Button_Refresh_icon", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap Button_Refresh_icon16 {
get {
object obj = ResourceManager.GetObject("Button_Refresh_icon16", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap Button_Reminder_icon {
get {
object obj = ResourceManager.GetObject("Button_Reminder_icon", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap Button_Turn_Off_icon {
get {
object obj = ResourceManager.GetObject("Button_Turn_Off_icon", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap Button_Turn_Off_icon16 {
get {
object obj = ResourceManager.GetObject("Button_Turn_Off_icon16", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap Button_Upload_icon {
get {
object obj = ResourceManager.GetObject("Button_Upload_icon", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap Button_Upload_icon16 {
get {
object obj = ResourceManager.GetObject("Button_Upload_icon16", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap File_Open_icon {
get {
object obj = ResourceManager.GetObject("File_Open_icon", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap File_Open_icon16 {
get {
object obj = ResourceManager.GetObject("File_Open_icon16", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap Save_icon {
get {
object obj = ResourceManager.GetObject("Save_icon", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap Save_icon16 {
get {
object obj = ResourceManager.GetObject("Save_icon16", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
}
}
@@ -0,0 +1,184 @@
<?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>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="Button_Add_icon" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Button-Add-icon.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Button_Blank_Blue_icon" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Button-Blank-Blue-icon.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Button_Blank_Blue_icon16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Button-Blank-Blue-icon16.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Button_Close_icon" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Button-Close-icon.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Button_Forward_icon" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Button-Forward-icon.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Button_Forward_icon16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Button-Forward-icon16.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Button_Pause_icon" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Button-Pause-icon.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Button_Pause_icon16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Button-Pause-icon16.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Button_Play_icon" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Button-Play-icon.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Button_Play_icon16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Button-Play-icon16.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Button_Refresh_icon" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Button-Refresh-icon.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Button_Refresh_icon16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Button-Refresh-icon16.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Button_Reminder_icon" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Button-Reminder-icon.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Button_Turn_Off_icon" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Button-Turn-Off-icon.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Button_Turn_Off_icon16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Button-Turn-Off-icon16.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Button_Upload_icon" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Button-Upload-icon.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Button_Upload_icon16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Button-Upload-icon16.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="File_Open_icon" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\File-Open-icon.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="File_Open_icon16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\File-Open-icon16.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Save_icon" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Save-icon.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Save_icon16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Save-icon16.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>
@@ -0,0 +1,113 @@
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using BCG.Utilities.BlueConfiguration;
namespace BCG
{
/// <summary>
/// Summary description for PubSubConfigureForm.
/// </summary>
internal class PubSubConfigureForm : System.Windows.Forms.Form
{
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button2;
private RouteInput myRouteInput;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
public PubSubConfigureForm()
{
InitializeComponent();
}
public void setRoutes(PubSubRoute [] routes)
{
myRouteInput.setRoutes(routes);
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(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()
{
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(PubSubConfigureForm));
this.button1 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.myRouteInput = new BCG.RouteInput();
this.SuspendLayout();
//
// button1
//
this.button1.DialogResult = System.Windows.Forms.DialogResult.OK;
this.button1.Location = new System.Drawing.Point(404, 8);
this.button1.Name = "button1";
this.button1.TabIndex = 0;
this.button1.Text = "OK";
//
// button2
//
this.button2.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.button2.Location = new System.Drawing.Point(404, 44);
this.button2.Name = "button2";
this.button2.TabIndex = 1;
this.button2.Text = "Cancel";
//
// myRouteInput
//
this.myRouteInput.Location = new System.Drawing.Point(4, 4);
this.myRouteInput.Name = "myRouteInput";
this.myRouteInput.Size = new System.Drawing.Size(392, 344);
this.myRouteInput.TabIndex = 2;
//
// PubSubConfigureForm
//
this.AutoScaleBaseSize = new System.Drawing.Size(7, 13);
this.BackColor = System.Drawing.Color.Gainsboro;
this.ClientSize = new System.Drawing.Size(486, 347);
this.Controls.Add(this.myRouteInput);
this.Controls.Add(this.button2);
this.Controls.Add(this.button1);
this.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "PubSubConfigureForm";
this.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "PuSub Configuration";
this.ResumeLayout(false);
}
#endregion
public PubSubRoute[] getRoutes()
{
return myRouteInput.getRoutes();
}
}
}
@@ -0,0 +1,199 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 1.3
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">1.3</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1">this is my long string</data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
[base64 mime encoded serialized .NET Framework object]
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
[base64 mime encoded string representing a byte array form of the .NET Framework object]
</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 forserialized 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="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>1.3</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="button1.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="button1.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="button1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="button2.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="button2.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="button2.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="myRouteInput.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="myRouteInput.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="myRouteInput.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="$this.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="$this.Language" type="System.Globalization.CultureInfo, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>(Default)</value>
</data>
<data name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="$this.Localizable" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="$this.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>4, 4</value>
</data>
<data name="$this.Name">
<value>PubSubConfigureForm</value>
</data>
<data name="$this.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</data>
<data name="$this.TrayHeight" type="System.Int32, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>80</value>
</data>
<data name="$this.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</data>
<data name="$this.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAICAAAAAAAACoCAAAFgAAACgAAAAgAAAAQAAAAAEACAAAAAAAgAQAAAAAAAAAAAAAAAEAAAAA
AAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAwMDAAMDcwADwyqYAzP//AJn//wBm//8AM///AP/M
/wDMzP8Amcz/AGbM/wAzzP8AAMz/AP+Z/wDMmf8AmZn/AGaZ/wAzmf8AAJn/AP9m/wDMZv8AmWb/AGZm
/wAzZv8AAGb/AP8z/wDMM/8AmTP/AGYz/wAzM/8AADP/AMwA/wCZAP8AZgD/ADMA/wD//8wAzP/MAJn/
zABm/8wAZv/MADP/zAAA/8wA/8zMAMzMzACZzMwAZszMADPMzAAAzMwA/5nMAMyZzACZmcwAZpnMADOZ
zAAAmcwA/2bMAMxmzACZZswAZmbMADNmzAAAZswA/zPMAMwzzACZM8wAZjPMADMzzAAAM8wA/wDMAMwA
zACZAMwAZgDMADMAzAAAAMwA//+ZAMz/mQCZ/5kAZv+ZADP/mQAA/5kA/8yZAMzMmQCZzJkAZsyZADPM
mQAAzJkA/5mZAMyZmQCZmZkAZpmZADOZmQAAmZkA/2aZAMxmmQCZZpkAZmaZADNmmQAAZpkA/zOZAMwz
mQCZM5kAZjOZADMzmQAAM5kA/wCZAMwAmQCZAJkAZgCZADMAmQAAAJkA//9mAMz/ZgCZ/2YAZv9mADP/
ZgAA/2YA/8xmAMzMZgCZzGYAZsxmADPMZgAAzGYA/5lmAMyZZgCZmWYAZplmADOZZgAAmWYA/2ZmAMxm
ZgCZZmYAZmZmADNmZgAAZmYA/zNmAMwzZgCZM2YAZjNmADMzZgAAM2YA/wBmAMwAZgCZAGYAZgBmADMA
ZgAAAGYA//8zAMz/MwCZ/zMAZv8zADP/MwAA/zMA/8wzAMzMMwCZzDMAZswzADPMMwAAzDMA/5kzAMyZ
MwCZmTMAZpkzADOZMwAAmTMA/2YzAMxmMwCZZjMAZmYzADNmMwAAZjMA/zMzAMwzMwCZMzMAZjMzADMz
MwAAMzMA/wAzAMwAMwCZADMAZgAzADMAMwAAADMAzP8AAJn/AABm/wAAM/8AAP/MAADMzAAAmcwAAGbM
AAAzzAAAAMwAAP+ZAADMmQAAmZkAAGaZAAAzmQAAAJkAAP9mAADMZgAAmWYAAGZmAAAAZgAAM2YAAP8z
AADMMwAAmTMAAGYzAAAzMwAAADMAAMwAAACZAAAAZgAAADMAAAAAAN0AAAC7AAAAqgAAAIgAAAB3AAAA
VQAAAEQAAAAiAADdAAAAuwAAAKoAAACIAAAAdwAAAFUAAABEAAAAIgAA3d3dAFVVVQB3d3cAd3d3AERE
RAAiIiIAERERAHcAAABVAAAARAAAACIAAADw+/8ApKCgAICAgAAAAP8AAP8AAAD//wD/AAAA/wD/AP//
AAD///8AAAAAAAAAAABd7wAAAO9dAABd7wAAAO9dAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAA7QAAAAAAAAAAAADtAADX19fX19fXAACy19fX19fX17IAAAAAAAAAAAAAAADXhltbW1tbAACy14Zb
W1tbW1uG19eyAO0AAAAAAAAA11tbW1tbWwAA11tbW1tbW1tbW1tbW9eyAO0AAADtANdbW1tbWwAAANdb
W1tbW1sAAABbW1tbW9eyAAAABwDXW1tbWwAAAADXW1tbW1sAAACyAAAAW1tbW9eyAADvAFtbW1sAAAAA
AIZbW1vXAABbW9cAAAAAW1tb19cABwDXW1tb1wAAAO3XW1tb1wAAW1tb17LtAAAAW1tb17LvANdbW9cA
7QAAANcAAAAAAAAAW1uGsgAAAO0AW1vXsgAAhltb1wAAAAAAAACy19fX1wBbW1vXAAAAAABbW4bXAABb
W4ayAAAAAADX14ZbW1tbAFtbW9cAAAAAAFtbW9cAAFtbhgAAAAAA11tbW1tbW1sAW1tb1wAAAAAAW1tb
1wAAW1uGAAAAANdbW1tbW1tbWwBbW1vXANcAAABbW1vXAABbW1uyAADXW1tbWwAAAAAAAFtbW9cA17IA
AFtbhtcA7wBbW9cAAABbW1sAANcAAABbW1uGAABb1wAAW1vXAO8HAFtbW7IAAABbAABbW7IAAABbW9cA
W1vXsgBbW9cABwAAAFtbW9cAAAAAAFtbW7IAAAAAAABbW1vXAFvXAAAAAAAAAFtbW9eyAAAAW1tbW9ey
AAAAAFtbW9cAANcAAAAAAAAAAFtbW1vX19cAW1tbW1vX19fXsltb17IAAAAAAAAAAAAAAFtbW1tbW1sA
11tbW1tbW1sAW1vXsgAAAAAAAAAAAO8AAABbW1tbW9cAANdbW1tbALJbW9cA7QAAAAAAAAAA7QBbAAAA
AAAAAADt7QAAAAAAW1tb1wAAAAAAAAAAAAD3AFtb1wAAAAAAAAAAAAAAAABbW1vXAAAAAAAAAAAAAADv
hltb1wAAAAAAAAAAAAAAW1tbhgDtAAAAAAAAAAAAAPcAW1tbsgAAAO0AAO0AANdbW1vXAAAAAAAAAAAA
AAAAAO0AW1tb17IAAAAAstfXW1tb1wDtAAAAAAAAAAAAAAAAAAAAW1tbW9fX19fXW1tbW9cAAAAAAAAA
AAAAAAAAAAAAAAAAW1tbW1tbW1tbW1vXAAAAAAAAAAAAAAAAAAAAAAAAAO0AAFtbW1tbW1vXAADtAAAA
AAAAAAAAAAAAAAAAAAAAAAftAAAA19cAAADtBwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAXe8AAO9dAAAA
AAAAAAAAAAAAAP8BgP/8AAA/8AAAH+AAAAfAAAADgAAAAwAAAAEAwAMAAYABgAGAAYADgAHAAwAAwAIA
AEAAAAAAAAAAAAAAAAAAAAAAgAAAAcAAAAPgAAAH8AAAD/AAAA/wAAAf8A/wH/gH4B/4AYA//AAAP/4A
AH//AAD//4AB///AA///+B//
</value>
</data>
</root>
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 660 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 777 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 770 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 759 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 866 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 840 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 829 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 797 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 699 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 316 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

@@ -0,0 +1,43 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Windows.Forms;
namespace BCG
{
class RichTextBoxStreamWriter : TextWriter
{
private RichTextBox myOutput;
public RichTextBoxStreamWriter (RichTextBox output)
{
myOutput = output;
}
public override void Write (char value)
{
//base.Write (value);
//myOutput.AppendText (value);
//myOutput.SelectionStart = myOutput.TextLength - 1;
//myOutput.ScrollToCaret ();
MethodInvoker action = delegate
{
//// this is too slow to live.
//myOutput.AppendText (value.ToString ());
//myOutput.SelectionStart = myOutput.TextLength - 1;
//myOutput.ScrollToCaret ();
};
myOutput.BeginInvoke (action);
}
public override Encoding Encoding
{
get { return Encoding.UTF8; }
}
}
}
@@ -0,0 +1,217 @@
using System;
using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Windows.Forms;
using BCG.Utilities;
namespace BCG
{
/// <summary>
/// Summary description for RouteInput.
/// </summary>
public class RouteInput : System.Windows.Forms.UserControl
{
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
// private System.Windows.Forms.DataGridTableStyle dataGridTableStyle1;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridTextBoxColumn2;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridTextBoxColumn3;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridTextBoxColumn4;
private System.Windows.Forms.DataGridView myDataGrid;
private System.Windows.Forms.DataGridViewTextBoxColumn dataGridTextBoxColumn1;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
public RouteInput()
{
// This call is required by the Windows.Forms Form Designer.
InitializeComponent();
// TODO: Add any initialization after the InitializeComponent call
}
public void setRoutes(PubSubRoute [] routes)
{
DataTable myTable = new DataTable();
DataColumn colItem = new DataColumn("tagRegExp",Type.GetType("System.String"));
myTable.Columns.Add(colItem);
colItem = new DataColumn("ip",Type.GetType("System.String"));
myTable.Columns.Add(colItem);
colItem = new DataColumn("queue",Type.GetType("System.String"));
myTable.Columns.Add(colItem);
colItem = new DataColumn("order",Type.GetType("System.Int32"));
myTable.Columns.Add(colItem);
DataRow NewRow;
int n = 1;
foreach (PubSubRoute r in PubSub3Config.instance.getRouting())
foreach (string url in r.getAllPubSubs())
{
NewRow = myTable.NewRow();
NewRow["order"] = 10 * n++;
NewRow["tagRegExp"] = r.tagRegExp;
NewRow["ip"] = new MSMQSubAddress(url).ip;
NewRow["queue"] = new MSMQSubAddress(url).simpleQueueName;
myTable.Rows.Add(NewRow);
}
myTable.AcceptChanges();
myDataGrid.DataSource = myTable;
}
public PubSubRoute[] getRoutes()
{
DataTable dt = myDataGrid.DataSource as DataTable;
dt.AcceptChanges();
dt.DefaultView.Sort = "order";
PubSubRoute [] routes =
new PubSubRoute[dt.Rows.Count];
int i = 0;
foreach (DataRowView r in dt.DefaultView)
{
Console.WriteLine(r.ToString());
BlueEventLog.logEvent(r.ToString(),BlueEventLevel.Information);
routes[i++] =
new PubSubRoute(new MSMQSubAddress(r["ip"].ToString(),r["queue"].ToString()).ToString(),
r["tagRegExp"].ToString());
}
return routes;
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Component 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.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.myDataGrid = new System.Windows.Forms.DataGrid();
// this.dataGridTableStyle1 = new System.Windows.Forms.DataGridTableStyle();
this.dataGridTextBoxColumn2 = new System.Windows.Forms.DataGridTextBoxColumn();
this.dataGridTextBoxColumn3 = new System.Windows.Forms.DataGridTextBoxColumn();
this.dataGridTextBoxColumn4 = new System.Windows.Forms.DataGridTextBoxColumn();
this.dataGridTextBoxColumn1 = new System.Windows.Forms.DataGridTextBoxColumn();
((System.ComponentModel.ISupportInitialize)(this.myDataGrid)).BeginInit();
this.SuspendLayout();
//
// label1
//
this.label1.Location = new System.Drawing.Point(0, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(0, 0);
this.label1.TabIndex = 3;
this.label1.Text = "IP";
//
// label2
//
this.label2.Location = new System.Drawing.Point(0, 0);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(0, 0);
this.label2.TabIndex = 4;
this.label2.Text = "IP";
//
// myDataGrid
//
this.myDataGrid.BackgroundColor = System.Drawing.Color.LightGoldenrodYellow;
this.myDataGrid.CaptionText = "PubSub Routes";
this.myDataGrid.DataMember = "";
this.myDataGrid.Dock = System.Windows.Forms.DockStyle.Fill;
this.myDataGrid.HeaderForeColor = System.Drawing.SystemColors.ControlText;
this.myDataGrid.Location = new System.Drawing.Point(0, 0);
this.myDataGrid.Name = "myDataGrid";
this.myDataGrid.Size = new System.Drawing.Size(392, 480);
this.myDataGrid.TabIndex = 5;
// this.myDataGrid.TableStyles.AddRange(new System.Windows.Forms.DataGridTableStyle[] {
// this.dataGridTableStyle1});
//
// dataGridTableStyle1
//
// this.dataGridTableStyle1.DataGrid = this.myDataGrid;
// this.dataGridTableStyle1.GridColumnStyles.AddRange(new System.Windows.Forms.DataGridColumnStyle[] {
// this.dataGridTextBoxColumn2,
// this.dataGridTextBoxColumn3,
// this.dataGridTextBoxColumn4,
// this.dataGridTextBoxColumn1});
// this.dataGridTableStyle1.HeaderForeColor = System.Drawing.SystemColors.ControlText;
// this.dataGridTableStyle1.MappingName = "";
//
// dataGridTextBoxColumn2
//
this.dataGridTextBoxColumn2.Format = "";
this.dataGridTextBoxColumn2.FormatInfo = null;
this.dataGridTextBoxColumn2.HeaderText = "Tag Regexp";
this.dataGridTextBoxColumn2.MappingName = "tagRegexp";
this.dataGridTextBoxColumn2.NullText = "";
this.dataGridTextBoxColumn2.Width = 112;
//
// dataGridTextBoxColumn3
//
this.dataGridTextBoxColumn3.Format = "";
this.dataGridTextBoxColumn3.FormatInfo = null;
this.dataGridTextBoxColumn3.HeaderText = "PubSub IP";
this.dataGridTextBoxColumn3.MappingName = "ip";
this.dataGridTextBoxColumn3.NullText = "";
this.dataGridTextBoxColumn3.Width = 110;
//
// dataGridTextBoxColumn4
//
this.dataGridTextBoxColumn4.Format = "";
this.dataGridTextBoxColumn4.FormatInfo = null;
this.dataGridTextBoxColumn4.HeaderText = "Queue Name";
this.dataGridTextBoxColumn4.MappingName = "queue";
this.dataGridTextBoxColumn4.NullText = "";
this.dataGridTextBoxColumn4.Width = 80;
//
// dataGridTextBoxColumn1
//
this.dataGridTextBoxColumn1.Format = "";
this.dataGridTextBoxColumn1.FormatInfo = null;
this.dataGridTextBoxColumn1.HeaderText = "Order";
this.dataGridTextBoxColumn1.MappingName = "order";
this.dataGridTextBoxColumn1.Width = 40;
//
// RouteInput
//
this.Controls.Add(this.myDataGrid);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Name = "RouteInput";
this.Size = new System.Drawing.Size(392, 480);
((System.ComponentModel.ISupportInitialize)(this.myDataGrid)).EndInit();
this.ResumeLayout(false);
}
#endregion
}
}
@@ -0,0 +1,187 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 1.3
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">1.3</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1">this is my long string</data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
[base64 mime encoded serialized .NET Framework object]
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
[base64 mime encoded string representing a byte array form of the .NET Framework object]
</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 forserialized 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="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>1.3</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="label1.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="label1.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="label1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="label2.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="label2.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="label2.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="myDataGrid.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="myDataGrid.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="myDataGrid.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="dataGridTableStyle1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="dataGridTableStyle1.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="dataGridTextBoxColumn2.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="dataGridTextBoxColumn2.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="dataGridTextBoxColumn3.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="dataGridTextBoxColumn3.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="dataGridTextBoxColumn4.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="dataGridTextBoxColumn4.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="dataGridTextBoxColumn1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="dataGridTextBoxColumn1.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="$this.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="$this.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</data>
<data name="$this.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</data>
<data name="$this.Name">
<value>RouteInput</value>
</data>
<data name="$this.Language" type="System.Globalization.CultureInfo, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>(Default)</value>
</data>
<data name="$this.Localizable" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</data>
<data name="$this.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>Private</value>
</data>
<data name="$this.TrayHeight" type="System.Int32, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>80</value>
</data>
<data name="$this.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>8, 8</value>
</data>
</root>
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings>
<!-- User application and configured property settings go here.-->
<!-- Example: <add key="settingName" value="settingValue"/> -->
<add key="parentBarItem1.Enabled" value="True" />
<add key="parentBarItem1.Visible" value="True" />
</appSettings>
</configuration>