diff --git a/AuthenticationExample/AuthenticationExample.csproj b/AuthenticationExample/AuthenticationExample.csproj
index e5e69b5..a59395d 100644
--- a/AuthenticationExample/AuthenticationExample.csproj
+++ b/AuthenticationExample/AuthenticationExample.csproj
@@ -89,8 +89,8 @@
..\packages\EventHook.1.4.105\lib\net45\EventHook.dll
-
- ..\packages\Finsemble.5.2.0\lib\net452\Finsemble.dll
+
+ ..\packages\Finsemble.5.3.0\lib\net452\Finsemble.dll
..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll
diff --git a/AuthenticationExample/Properties/AssemblyInfo.cs b/AuthenticationExample/Properties/AssemblyInfo.cs
index 9cdc56f..8d94662 100644
--- a/AuthenticationExample/Properties/AssemblyInfo.cs
+++ b/AuthenticationExample/Properties/AssemblyInfo.cs
@@ -51,5 +51,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("5.2.0.0")]
-[assembly: AssemblyFileVersion("5.2.0.0")]
+[assembly: AssemblyVersion("5.3.0.0")]
+[assembly: AssemblyFileVersion("5.3.0.0")]
diff --git a/AuthenticationExample/packages.config b/AuthenticationExample/packages.config
index 7cab62a..16c9458 100644
--- a/AuthenticationExample/packages.config
+++ b/AuthenticationExample/packages.config
@@ -3,8 +3,8 @@
-
-
+
+
diff --git a/MultiWindowExample/App.xaml.cs b/MultiWindowExample/App.xaml.cs
index ecb5484..be85146 100644
--- a/MultiWindowExample/App.xaml.cs
+++ b/MultiWindowExample/App.xaml.cs
@@ -1,14 +1,13 @@
-using System;
+using ChartIQ.Finsemble;
+using Microsoft.Shell;
+using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
-using System.Reflection;
+
using System.Threading;
using System.Windows;
using System.Windows.Threading;
-using ChartIQ.Finsemble;
-using Microsoft.Shell;
-
namespace MultiWindowExample
{
///
@@ -138,7 +137,7 @@ private static bool LaunchWindow(IList args)
if (window == null)
{
- Debug.Write($"Could not create window: {name}");
+ Debug.Print($"Could not create window: {name}");
}
else
{
@@ -150,7 +149,7 @@ private static bool LaunchWindow(IList args)
IIntegratable fsblWin = window as IIntegratable;
if (fsblWin == null)
{
- Debug.Write($"The window \"{name}\" is not a window that can be integrated into Finsemble.");
+ Debug.Print($"The window \"{name}\" is not a window that can be integrated into Finsemble.");
}
else
{
diff --git a/MultiWindowExample/MultiWindowExample.csproj b/MultiWindowExample/MultiWindowExample.csproj
index 17e1acb..2159dcc 100644
--- a/MultiWindowExample/MultiWindowExample.csproj
+++ b/MultiWindowExample/MultiWindowExample.csproj
@@ -49,8 +49,8 @@
..\packages\EventHook.1.4.105\lib\net45\EventHook.dll
-
- ..\packages\Finsemble.5.2.0\lib\net452\Finsemble.dll
+
+ ..\packages\Finsemble.5.3.0\lib\net452\Finsemble.dll
..\packages\log4net.2.0.8\lib\net45-full\log4net.dll
diff --git a/MultiWindowExample/Properties/AssemblyInfo.cs b/MultiWindowExample/Properties/AssemblyInfo.cs
index 5a7809a..c2230f4 100644
--- a/MultiWindowExample/Properties/AssemblyInfo.cs
+++ b/MultiWindowExample/Properties/AssemblyInfo.cs
@@ -51,5 +51,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("5.2.0.0")]
+[assembly: AssemblyVersion("5.3.0.0")]
[assembly: AssemblyFileVersion("5.2.0.0")]
diff --git a/MultiWindowExample/packages.config b/MultiWindowExample/packages.config
index 3baf63b..a2d66ee 100644
--- a/MultiWindowExample/packages.config
+++ b/MultiWindowExample/packages.config
@@ -3,7 +3,7 @@
-
+
diff --git a/WPFExample/Assets/ic_WPFLogo.png b/WPFExample/Assets/ic_WPFLogo.png
new file mode 100644
index 0000000..039888f
Binary files /dev/null and b/WPFExample/Assets/ic_WPFLogo.png differ
diff --git a/WPFExample/CustomControls/FinsembleButton.xaml b/WPFExample/CustomControls/FinsembleButton.xaml
new file mode 100644
index 0000000..d8074fe
--- /dev/null
+++ b/WPFExample/CustomControls/FinsembleButton.xaml
@@ -0,0 +1,49 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/WPFExample/CustomControls/FinsembleButton.xaml.cs b/WPFExample/CustomControls/FinsembleButton.xaml.cs
new file mode 100644
index 0000000..7b99872
--- /dev/null
+++ b/WPFExample/CustomControls/FinsembleButton.xaml.cs
@@ -0,0 +1,39 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace WPFExample.CustomControls
+{
+ ///
+ /// Interaction logic for FinsembleButton.xaml
+ ///
+ public partial class FinsembleButton : UserControl
+ {
+ public event EventHandler Click;
+
+ public string ButtonContent { get; set; }
+ public FinsembleButton()
+ {
+ InitializeComponent();
+ this.DataContext = this;
+ }
+
+ private void Button_OnClick(object sender, RoutedEventArgs e)
+ {
+ var eventHandler = this.Click;
+
+ eventHandler?.Invoke(this, e);
+ }
+ }
+}
diff --git a/WPFExample/CustomControls/FinsembleDropDown.xaml b/WPFExample/CustomControls/FinsembleDropDown.xaml
new file mode 100644
index 0000000..44504bc
--- /dev/null
+++ b/WPFExample/CustomControls/FinsembleDropDown.xaml
@@ -0,0 +1,149 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/WPFExample/CustomControls/FinsembleDropDown.xaml.cs b/WPFExample/CustomControls/FinsembleDropDown.xaml.cs
new file mode 100644
index 0000000..8b14000
--- /dev/null
+++ b/WPFExample/CustomControls/FinsembleDropDown.xaml.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace WPFExample.CustomControls
+{
+ ///
+ /// Interaction logic for FinsembleDropDown.xaml
+ ///
+ public partial class FinsembleDropDown : UserControl
+ {
+ public FinsembleDropDown()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/WPFExample/CustomControls/FinsembleInput.xaml b/WPFExample/CustomControls/FinsembleInput.xaml
new file mode 100644
index 0000000..2c70480
--- /dev/null
+++ b/WPFExample/CustomControls/FinsembleInput.xaml
@@ -0,0 +1,43 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/WPFExample/CustomControls/FinsembleInput.xaml.cs b/WPFExample/CustomControls/FinsembleInput.xaml.cs
new file mode 100644
index 0000000..2fe927d
--- /dev/null
+++ b/WPFExample/CustomControls/FinsembleInput.xaml.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace WPFExample.CustomControls
+{
+ ///
+ /// Interaction logic for FinsembleInput.xaml
+ ///
+ public partial class FinsembleInput : UserControl
+ {
+ public FinsembleInput()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/WPFExample/MainWindow.xaml b/WPFExample/MainWindow.xaml
index 3c2ac7c..d575f52 100644
--- a/WPFExample/MainWindow.xaml
+++ b/WPFExample/MainWindow.xaml
@@ -5,33 +5,71 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WPFExample"
xmlns:Finsemble="clr-namespace:ChartIQ.Finsemble;assembly=Finsemble"
+ xmlns:customControls="clr-namespace:WPFExample.CustomControls"
xmlns:Custom="http://schemas.microsoft.com/winfx/2006/xaml/presentation/ribbon" x:Class="WPFExample.MainWindow"
mc:Ignorable="d"
- Title="MainWindow" Height="350"
- Width="525" WindowStyle="None" Background="{x:Null}"
+ Title="MainWindow" Height="600"
+ Width="600" WindowStyle="None" Background="{x:Null}"
AllowsTransparency="True">
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/WPFExample/MainWindow.xaml.cs b/WPFExample/MainWindow.xaml.cs
index 457293f..3c5e272 100644
--- a/WPFExample/MainWindow.xaml.cs
+++ b/WPFExample/MainWindow.xaml.cs
@@ -22,7 +22,7 @@ public partial class MainWindow : Window
private void SpawnComponent_Click(object sender, RoutedEventArgs e)
{
- object selected = ComponentSelect.SelectedValue;
+ object selected = ComponentSelect.ItemsComboBox.SelectedValue;
if (selected != null)
{
string componentName = selected.ToString();
@@ -34,10 +34,10 @@ private void SpawnComponent_Click(object sender, RoutedEventArgs e)
FSBL.FDC3Client.fdc3.open(componentName, new JObject
{
["type"] = "fdc3.instrument",
- ["name"] = DataToSend.Text,
+ ["name"] = DataToSend.TextBox.Text,
["id"] = new JObject
{
- ["ticker"] = DataToSend.Text
+ ["ticker"] = DataToSend.TextBox.Text
}
}, (s, args) => { });
@@ -45,10 +45,10 @@ private void SpawnComponent_Click(object sender, RoutedEventArgs e)
//FSBL.FDC3Client.fdc3.raiseIntent("ViewChart", new JObject
//{
// ["type"] = "fdc3.instrument",
- // ["name"] = DataToSend.Text,
+ // ["name"] = DataToSend.TextBox.Text,
// ["id"] = new JObject
// {
- // ["ticker"] = DataToSend.Text
+ // ["ticker"] = DataToSend.TextBox.Text
// }
//}, (s, args) => { });
@@ -113,10 +113,10 @@ private void Send_Click(object sender, RoutedEventArgs e)
FSBL.FDC3Client.fdc3.broadcast(new JObject
{
["type"] = "fdc3.instrument",
- ["name"] = DataToSend.Text,
+ ["name"] = DataToSend.TextBox.Text,
["id"] = new JObject
{
- ["ticker"] = DataToSend.Text
+ ["ticker"] = DataToSend.TextBox.Text
}
});
}
@@ -126,13 +126,13 @@ private void Send_Click(object sender, RoutedEventArgs e)
FSBL.LinkerClient.Publish(new JObject
{
["dataType"] = "symbol",
- ["data"] = DataToSend.Text
+ ["data"] = DataToSend.TextBox.Text
});
}
Application.Current.Dispatcher.Invoke(async delegate //main thread
{
- DroppedData.Content = DataToSend.Text;
+ DroppedData.Content = DataToSend.TextBox.Text;
DroppedDataSource.Content = "via Text entry";
await SaveStateAsync();
});
@@ -210,7 +210,7 @@ private void Finsemble_Connected(object sender, EventArgs e)
Application.Current.Dispatcher.Invoke((Action)async delegate //main thread
{
DroppedData.Content = data.ToString();
- DataToSend.Text = data.ToString();
+ DataToSend.TextBox.Text = data.ToString();
DroppedDataSource.Content = "via Drag and Drop";
await SaveStateAsync();
});
@@ -227,13 +227,13 @@ private void Finsemble_Connected(object sender, EventArgs e)
//set state on drag so correct symbol is displayed
Application.Current.Dispatcher.Invoke(async delegate //main thread
{
- DroppedData.Content = DataToSend.Text;
+ DroppedData.Content = DataToSend.TextBox.Text;
await SaveStateAsync();
});
return new JObject
{
- ["symbol"] = DataToSend.Text,
- ["description"] = "Symbol " + DataToSend.Text
+ ["symbol"] = DataToSend.TextBox.Text,
+ ["description"] = "Symbol " + DataToSend.TextBox.Text
};
})
});
@@ -258,7 +258,7 @@ private void Finsemble_Connected(object sender, EventArgs e)
{
Application.Current.Dispatcher.Invoke(delegate //main thread
{
- ComponentSelect.Items.Add(property.Name);
+ ComponentSelect.ItemsComboBox.Items.Add(property.Name);
});
}
}
@@ -275,7 +275,7 @@ private void Finsemble_Connected(object sender, EventArgs e)
//FDC3 Usage example
Application.Current.Dispatcher.Invoke(delegate //main thread
{
- FDC3Label.Visibility = Visibility.Visible;
+ // FDC3Label.Visibility = Visibility.Visible;
});
//Context handler
@@ -286,7 +286,7 @@ private void Finsemble_Connected(object sender, EventArgs e)
{
Application.Current.Dispatcher.Invoke(async delegate //main thread
{
- DataToSend.Text = context?["id"]?["ticker"]?.ToString();
+ DataToSend.TextBox.Text = context?["id"]?["ticker"]?.ToString();
DroppedData.Content = context?["id"]?["ticker"]?.ToString();
DroppedDataSource.Content = "context shared via FDC3";
await SaveStateAsync();
@@ -300,11 +300,11 @@ private void Finsemble_Connected(object sender, EventArgs e)
EventHandler intentHandler = (s, context) =>
{
FSBL.Logger.Log(new JToken[] { "WPF FDC3 Usage Example: context received by intentHandler.", context });
- if (context["type"].ToString().Equals("fdc3.instrument"))
+ if (context["type"]!=null && context["type"].ToString().Equals("fdc3.instrument"))
{
Application.Current.Dispatcher.Invoke(async delegate //main thread
{
- DataToSend.Text = context?["id"]?["ticker"]?.ToString();
+ DataToSend.TextBox.Text = context?["id"]?["ticker"]?.ToString();
DroppedData.Content = context?["id"]?["ticker"]?.ToString();
DroppedDataSource.Content = "context shared via FDC3 intent";
await SaveStateAsync();
@@ -321,13 +321,16 @@ private void Finsemble_Connected(object sender, EventArgs e)
{
Application.Current.Dispatcher.Invoke(async delegate //main thread
{
- DataToSend.Text = response.response?["data"]?.ToString();
+ DataToSend.TextBox.Text = response.response?["data"]?.ToString();
DroppedData.Content = response.response?["data"]?.ToString();
DroppedDataSource.Content = "via Linker";
await SaveStateAsync();
});
});
}
+ FSBL.Logger.OnLog += Logger_OnLog;
+ FSBL.Logger.System.OnLog += Logger_OnLog;
+ FSBL.Logger.Perf.OnLog += Logger_OnLog;
// Logging to the Finsemble Central Console
/*
@@ -349,6 +352,14 @@ private void Finsemble_Connected(object sender, EventArgs e)
//});
}
+ private void Logger_OnLog(object sender, JObject e)
+ {
+ Application.Current.Dispatcher.Invoke(() =>
+ {
+ LogsTextBox.Text += e + "\n";
+ });
+ }
+
///
/// Example window close handler
///
@@ -388,7 +399,7 @@ private async Task SaveStateAsync()
await FSBL.WindowClient.SetComponentState(new JObject
{
["field"] = "symbol",
- ["value"] = DataToSend.Text
+ ["value"] = DataToSend.TextBox.Text
});
}
catch (ApplicationException e)
@@ -435,7 +446,7 @@ private void UpdateDisplayData()
{
Application.Current.Dispatcher.Invoke(delegate //main thread
{
- DataToSend.Text = symbolTxt;
+ DataToSend.TextBox.Text = symbolTxt;
DroppedData.Content = symbolTxt;
DroppedDataSource.Content = "via component state";
});
@@ -450,13 +461,13 @@ private void UpdateDisplayData()
symbolTxt = r.response == null ? null : r.response?["symbol"]?.ToString();
if (!string.IsNullOrEmpty(symbolTxt) && !symbolTxt.Equals("{}"))
{
- DataToSend.Text = symbolTxt;
+ DataToSend.TextBox.Text = symbolTxt;
DroppedData.Content = symbolTxt;
DroppedDataSource.Content = "via SpawnData";
}
else
{
- DataToSend.Text = "MSFT";
+ DataToSend.TextBox.Text = "MSFT";
DroppedData.Content = "MSFT";
DroppedDataSource.Content = "via default value";
}
@@ -478,7 +489,7 @@ private void Publish_Click(object sender, RoutedEventArgs e)
//set state on click
Application.Current.Dispatcher.Invoke(async delegate //main thread
{
- DroppedData.Content = DataToSend.Text;
+ DroppedData.Content = DataToSend.TextBox.Text;
await SaveStateAsync();
});
@@ -486,7 +497,7 @@ private void Publish_Click(object sender, RoutedEventArgs e)
// This is not currently supported in the .Net RouterClient implementation and will need to done in a Finsemble HTML5 service
FSBL.RouterClient.Publish("Finsemble.TestWPFPubSubSymbol", new JObject
{
- ["symbol"] = DataToSend.Text
+ ["symbol"] = DataToSend.TextBox.Text
});
}
@@ -507,7 +518,7 @@ private void Subscribe_to_pubsub()
var theData = ((JValue)pubSubData?["data"]?["symbol"])?.ToString();
if (theData != null)
{
- DataToSend.Text = theData;
+ DataToSend.TextBox.Text = theData;
DroppedData.Content = theData;
DroppedDataSource.Content = "via PubSub";
diff --git a/WPFExample/Properties/AssemblyInfo.cs b/WPFExample/Properties/AssemblyInfo.cs
index cdd53be..588e46c 100644
--- a/WPFExample/Properties/AssemblyInfo.cs
+++ b/WPFExample/Properties/AssemblyInfo.cs
@@ -50,5 +50,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("5.2.0.0")]
-[assembly: AssemblyFileVersion("5.2.0.0")]
+[assembly: AssemblyVersion("5.3.0.0")]
+[assembly: AssemblyFileVersion("5.3.0.0")]
diff --git a/WPFExample/WPFExample.csproj b/WPFExample/WPFExample.csproj
index 1dd34a6..40caa3c 100644
--- a/WPFExample/WPFExample.csproj
+++ b/WPFExample/WPFExample.csproj
@@ -89,8 +89,8 @@
..\packages\EventHook.1.4.105\lib\net45\EventHook.dll
-
- ..\packages\Finsemble.5.2.0\lib\net452\Finsemble.dll
+
+ ..\packages\Finsemble.5.3.0\lib\net452\Finsemble.dll
..\packages\log4net.2.0.8\lib\net45-full\log4net.dll
@@ -152,6 +152,18 @@
MSBuild:Compile
Designer
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
MSBuild:Compile
Designer
@@ -160,6 +172,15 @@
App.xaml
Code
+
+ FinsembleButton.xaml
+
+
+ FinsembleDropDown.xaml
+
+
+ FinsembleInput.xaml
+
MainWindow.xaml
Code
diff --git a/WPFExample/packages.config b/WPFExample/packages.config
index 3baf63b..a2d66ee 100644
--- a/WPFExample/packages.config
+++ b/WPFExample/packages.config
@@ -3,7 +3,7 @@
-
+
diff --git a/WindowlessExample/Properties/AssemblyInfo.cs b/WindowlessExample/Properties/AssemblyInfo.cs
index d354f00..1330e7a 100644
--- a/WindowlessExample/Properties/AssemblyInfo.cs
+++ b/WindowlessExample/Properties/AssemblyInfo.cs
@@ -51,5 +51,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("5.2.0.0")]
-[assembly: AssemblyFileVersion("5.2.0.0")]
+[assembly: AssemblyVersion("5.3.0.0")]
+[assembly: AssemblyFileVersion("5.3.0.0")]
diff --git a/WindowlessExample/WindowlessExample.csproj b/WindowlessExample/WindowlessExample.csproj
index b4680e0..9c50e70 100644
--- a/WindowlessExample/WindowlessExample.csproj
+++ b/WindowlessExample/WindowlessExample.csproj
@@ -89,8 +89,8 @@
..\packages\EventHook.1.4.105\lib\net45\EventHook.dll
-
- ..\packages\Finsemble.5.2.0\lib\net452\Finsemble.dll
+
+ ..\packages\Finsemble.5.3.0\lib\net452\Finsemble.dll
..\packages\log4net.2.0.8\lib\net45-full\log4net.dll
diff --git a/WindowlessExample/packages.config b/WindowlessExample/packages.config
index 3baf63b..a2d66ee 100644
--- a/WindowlessExample/packages.config
+++ b/WindowlessExample/packages.config
@@ -3,7 +3,7 @@
-
+
diff --git a/WinformExample/Controls/FinsembleInput.Designer.cs b/WinformExample/Controls/FinsembleInput.Designer.cs
new file mode 100644
index 0000000..8ffb0b4
--- /dev/null
+++ b/WinformExample/Controls/FinsembleInput.Designer.cs
@@ -0,0 +1,78 @@
+using System.Drawing;
+using System.Windows.Forms;
+
+namespace WinformExample.Controls
+{
+ partial class FinsembleInput
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Component Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.textBox1 = new System.Windows.Forms.TextBox();
+ this.panel1 = new System.Windows.Forms.Panel();
+ this.SuspendLayout();
+ //
+ // textBox1
+ //
+ this.textBox1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(23)))), ((int)(((byte)(26)))), ((int)(((byte)(32)))));
+ this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;
+ this.textBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F);
+ this.textBox1.ForeColor = System.Drawing.Color.White;
+ this.textBox1.Location = new System.Drawing.Point(0, 0);
+ this.textBox1.Name = "textBox1";
+ this.textBox1.Height = 23;
+ this.textBox1.TabIndex = 0;
+ this.textBox1.Width = Width;
+ //
+ // panel1
+ //
+ this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(61)))), ((int)(((byte)(68)))), ((int)(((byte)(85)))));
+ this.panel1.Location = new System.Drawing.Point(0, 35);
+ this.panel1.Name = "panel1";
+ this.panel1.Height = 5;
+ this.panel1.TabIndex = 2;
+
+ //
+ // FinsembleInput
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(23)))), ((int)(((byte)(26)))), ((int)(((byte)(32)))));
+ this.Controls.Add(this.panel1);
+ this.Controls.Add(this.textBox1);
+ this.Name = "FinsembleInput";
+ this.AutoSize = true;
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.TextBox textBox1;
+ private System.Windows.Forms.Panel panel1;
+ }
+}
diff --git a/WinformExample/Controls/FinsembleInput.cs b/WinformExample/Controls/FinsembleInput.cs
new file mode 100644
index 0000000..23dce98
--- /dev/null
+++ b/WinformExample/Controls/FinsembleInput.cs
@@ -0,0 +1,46 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+using ColorConverter = System.Windows.Media.ColorConverter;
+
+namespace WinformExample.Controls
+{
+ public partial class FinsembleInput : UserControl
+ {
+ public FinsembleInput()
+ {
+ InitializeComponent();
+
+ textBox1.GotFocus += TextBox1_GotFocus;
+ textBox1.LostFocus += TextBox1OnLostFocus;
+ }
+
+ private void TextBox1OnLostFocus(object sender, EventArgs e)
+ {
+ panel1.BackColor = Color.FromArgb(61, 68, 85); //#3D4455
+ }
+
+ private void TextBox1_GotFocus(object sender, EventArgs e)
+ {
+ panel1.BackColor = Color.FromArgb(3, 155, 255); //#039bff
+ }
+
+ protected override void OnResize(EventArgs e)
+ {
+ textBox1.Width = panel1.Width;
+ base.OnResize(e);
+ }
+
+ public override string Text
+ {
+ get => textBox1.Text;
+ set => textBox1.Text = value;
+ }
+ }
+}
diff --git a/WinformExample/Controls/FinsembleInput.resx b/WinformExample/Controls/FinsembleInput.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/WinformExample/Controls/FinsembleInput.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/WinformExample/Controls/RoundedButton.cs b/WinformExample/Controls/RoundedButton.cs
new file mode 100644
index 0000000..783d4b1
--- /dev/null
+++ b/WinformExample/Controls/RoundedButton.cs
@@ -0,0 +1,146 @@
+using System.Drawing;
+using System.Drawing.Drawing2D;
+using System.Drawing.Printing;
+using System.Net.Mime;
+using System.Windows.Forms;
+
+namespace WinformExample.Controls
+{
+ public class RoundedButton : Button
+ {
+ private Color _buttonColor = Color.FromArgb(34, 38, 47);
+ private Color _onHoverButtonColor = Color.FromArgb(40, 45, 56);
+ private Color _textColor = Color.White;
+ private Color _onHoverTextColor = Color.White;
+ private int _cornerRadius = 1;
+ private Margins _imageMargins = new Margins(0,0,0,0);
+
+ private bool _isHovering;
+
+
+ public RoundedButton()
+ {
+ DoubleBuffered = true;
+ MouseEnter += (sender, e) =>
+ {
+ _isHovering = true;
+ BackColor = Color.Transparent;
+ Invalidate();
+ };
+ MouseLeave += (sender, e) =>
+ {
+ _isHovering = false;
+ BackColor = Color.Transparent;
+ Invalidate();
+ };
+ }
+
+ protected override void OnPaint(PaintEventArgs e)
+ {
+ base.OnPaint(e);
+ if (Visible)
+ {
+ var rect = new RectangleF(0, 0, this.Width, this.Height);
+ using (var graphPath = GetRoundPath(rect, _cornerRadius))
+ {
+ this.Region = new Region(graphPath);
+ using (var pen = new Pen(Color.Transparent, 0))
+ {
+ pen.Alignment = PenAlignment.Inset;
+ e.Graphics.DrawPath(pen, graphPath);
+
+ var buttonColor = new SolidBrush(_isHovering ? _onHoverButtonColor : _buttonColor);
+ e.Graphics.FillPath(buttonColor, graphPath);
+
+ var stringSize = e.Graphics.MeasureString(Text, Font);
+ var stringColor = new SolidBrush(_isHovering ? _onHoverTextColor : _textColor);
+
+ e.Graphics.DrawString(Text, Font, stringColor, (Width - stringSize.Width) / 2, (Height - stringSize.Height) / 2);
+
+ if (Image != null)
+ {
+ e.Graphics.DrawImage(Image, (Width - stringSize.Width) / 2 + stringSize.Width + _imageMargins.Left, (Height - Image.Height) / 2 + _imageMargins.Top);
+ }
+ }
+ }
+ }
+ }
+
+ GraphicsPath GetRoundPath(RectangleF Rect, int radius)
+ {
+ var r2 = radius / 2f;
+ var graphPath = new GraphicsPath();
+ graphPath.AddArc(Rect.X, Rect.Y, radius, radius, 180, 90);
+ graphPath.AddLine(Rect.X + r2, Rect.Y, Rect.Width - r2, Rect.Y);
+ graphPath.AddArc(Rect.X + Rect.Width - radius, Rect.Y, radius, radius, 270, 90);
+ graphPath.AddLine(Rect.Width, Rect.Y + r2, Rect.Width, Rect.Height - r2);
+ graphPath.AddArc(Rect.X + Rect.Width - radius,
+ Rect.Y + Rect.Height - radius, radius, radius, 0, 90);
+ graphPath.AddLine(Rect.Width - r2, Rect.Height, Rect.X + r2, Rect.Height);
+ graphPath.AddArc(Rect.X, Rect.Y + Rect.Height - radius, radius, radius, 90, 90);
+ graphPath.AddLine(Rect.X, Rect.Height - r2, Rect.X, Rect.Y + r2);
+ graphPath.CloseFigure();
+ return graphPath;
+ }
+
+ public Color ButtonColor
+ {
+ get => _buttonColor;
+ set
+ {
+ _buttonColor = value;
+ Invalidate();
+ }
+ }
+
+ public int CornerRadius
+ {
+ get => _cornerRadius;
+ set
+ {
+ _cornerRadius = value;
+ Invalidate();
+ }
+ }
+
+ public Margins ImageMargins
+ {
+ get => _imageMargins;
+ set
+ {
+ _imageMargins = value;
+ Invalidate();
+ }
+ }
+
+ public Color OnHoverButtonColor
+ {
+ get => _onHoverButtonColor;
+ set
+ {
+ _onHoverButtonColor = value;
+ Invalidate();
+ }
+ }
+
+ public Color TextColor
+ {
+ get => _textColor;
+ set
+ {
+ _textColor = value;
+ Invalidate();
+ }
+ }
+
+ public Color OnHoverTextColor
+ {
+ get => _onHoverTextColor;
+ set
+ {
+ _onHoverTextColor = value;
+ Invalidate();
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/WinformExample/Controls/RoundedSelect.Designer.cs b/WinformExample/Controls/RoundedSelect.Designer.cs
new file mode 100644
index 0000000..b5beda0
--- /dev/null
+++ b/WinformExample/Controls/RoundedSelect.Designer.cs
@@ -0,0 +1,87 @@
+using System;
+using System.Drawing;
+using System.Drawing.Printing;
+using System.Windows.Forms;
+
+namespace WinformExample.Controls
+{
+ partial class RoundedSelect
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Component Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.SelectOptionsPanel = new System.Windows.Forms.FlowLayoutPanel();
+ this.SelectOpenButton = new RoundedButton();
+ this.SuspendLayout();
+ //
+ // SelectOpenButton
+ //
+ this.SelectOpenButton.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(34)))), ((int)(((byte)(38)))), ((int)(((byte)(47)))));
+ this.SelectOpenButton.Dock = System.Windows.Forms.DockStyle.Top;
+ this.SelectOpenButton.FlatAppearance.BorderSize = 0;
+ this.SelectOpenButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.SelectOpenButton.ForeColor = System.Drawing.Color.White;
+ this.SelectOpenButton.Image = global::WinformExample.Properties.Resources.chevron_arrow_down;
+ this.SelectOpenButton.ImageMargins = new Margins(45, 0, 3, 0);
+ this.SelectOpenButton.CornerRadius = 25;
+ this.SelectOpenButton.Location = new System.Drawing.Point(0, 0);
+ this.SelectOpenButton.MinimumSize = new System.Drawing.Size(50, 50);
+ this.SelectOpenButton.Name = "SelectOpenButton";
+ this.SelectOpenButton.Size = new System.Drawing.Size(150, 50);
+ this.SelectOpenButton.TabIndex = 3;
+ this.SelectOpenButton.Text = "Select";
+ this.SelectOpenButton.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
+ this.SelectOpenButton.TextImageRelation = System.Windows.Forms.TextImageRelation.TextBeforeImage;
+ this.SelectOpenButton.UseVisualStyleBackColor = false;
+ this.SelectOpenButton.Click += new System.EventHandler(this.SelectOpenButton_Click);
+ //
+ // SelectOptionsPanel
+ //
+ this.SelectOptionsPanel.AutoScroll = true;
+ this.SelectOptionsPanel.Location = new System.Drawing.Point(0, 75);
+ this.SelectOptionsPanel.MaximumSize = new System.Drawing.Size(300, 250);
+ this.SelectOptionsPanel.MinimumSize = new System.Drawing.Size(50, 0);
+ this.SelectOptionsPanel.Name = "SelectOptionsPanel";
+ this.SelectOptionsPanel.Size = new System.Drawing.Size(250, 0);
+ this.SelectOptionsPanel.Location = new Point(SelectOpenButton.Location.X, SelectOpenButton.Location.Y + SelectOpenButton.Height);
+ this.SelectOptionsPanel.TabIndex = 4;
+ //
+ // RoundedSelect
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.Controls.Add(this.SelectOptionsPanel);
+ this.Controls.Add(this.SelectOpenButton);
+ this.Name = "RoundedSelect";
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+ private System.Windows.Forms.FlowLayoutPanel SelectOptionsPanel;
+ private RoundedButton SelectOpenButton;
+ }
+}
diff --git a/WinformExample/Controls/RoundedSelect.cs b/WinformExample/Controls/RoundedSelect.cs
new file mode 100644
index 0000000..3dd0964
--- /dev/null
+++ b/WinformExample/Controls/RoundedSelect.cs
@@ -0,0 +1,101 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+using WinformExample.Properties;
+
+namespace WinformExample.Controls
+{
+ public partial class RoundedSelect : UserControl
+ {
+ private bool _isCollapsed;
+ private Timer _timer = new Timer();
+
+ private string _selectText = "Select";
+
+ public RoundedSelect()
+ {
+ InitializeComponent();
+
+ _timer.Tick += OnTimerTick;
+ }
+
+ private void OnTimerTick(object sender, EventArgs e)
+ {
+ if (_isCollapsed)
+ {
+ SelectOpenButton.Image = Resources.chevron_arrow_up;
+ SelectOptionsPanel.Height += 20;
+ if (SelectOptionsPanel.Size.Height == SelectOptionsPanel.MaximumSize.Height)
+ {
+ _timer.Stop();
+ _isCollapsed = false;
+ }
+ }
+ else
+ {
+ SelectOpenButton.Image = Resources.chevron_arrow_down;
+ SelectOptionsPanel.Height -= 20;
+ if (SelectOptionsPanel.Size.Height == SelectOptionsPanel.MinimumSize.Height)
+ {
+ _timer.Stop();
+ _isCollapsed = true;
+ }
+ }
+ }
+
+ private void SelectOpenButton_Click(object sender, EventArgs e)
+ {
+ _timer.Start();
+ }
+
+ protected override void OnTextChanged(EventArgs e)
+ {
+ base.OnTextChanged(e);
+
+ _selectText = Text;
+ SelectOpenButton.Text = _selectText;
+ }
+
+ protected override void OnPaint(PaintEventArgs e)
+ {
+ base.OnPaint(e);
+
+ SelectOpenButton.Text = _selectText;
+ }
+
+ public void AddElementToList(string elementName)
+ {
+ var btn = new RoundedButton()
+ {
+ Height = 50,
+ Width = SelectOpenButton.Width - 40,
+ Margin = new Padding(5, 0, 5, 0),
+ ForeColor = Color.White,
+ Text = elementName
+ };
+ btn.Click += Btn_Click;
+ if (SelectOptionsPanel.Controls.Count > 0)
+ {
+ btn.Top = SelectOptionsPanel.Controls[SelectOptionsPanel.Controls.Count - 1].Top + 50;
+ }
+ else
+ {
+ btn.Top = 0;
+ }
+ SelectOptionsPanel.Controls.Add(btn);
+
+ }
+
+ private void Btn_Click(object sender, EventArgs e)
+ {
+ Text = (sender as Button).Text;
+ SelectOpenButton_Click(this, null);
+ }
+ }
+}
diff --git a/WinformExample/Controls/RoundedSelect.resx b/WinformExample/Controls/RoundedSelect.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/WinformExample/Controls/RoundedSelect.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/WinformExample/FormExample.Designer.cs b/WinformExample/FormExample.Designer.cs
index 2c75951..71e4377 100644
--- a/WinformExample/FormExample.Designer.cs
+++ b/WinformExample/FormExample.Designer.cs
@@ -1,5 +1,7 @@
using ChartIQ.Finsemble;
using System;
+using System.Drawing;
+using System.Windows.Forms;
namespace WinformExample
@@ -35,213 +37,384 @@ protected override void Dispose(bool disposing)
private void InitializeComponent()
{
this.scrim = new System.Windows.Forms.Label();
- this.datasource = new System.Windows.Forms.Label();
- this.datavalue = new System.Windows.Forms.Label();
- this.input = new System.Windows.Forms.TextBox();
- this.pubsub = new System.Windows.Forms.Button();
- this.linker = new System.Windows.Forms.Button();
- this.pubLinker = new System.Windows.Forms.Button();
- this.group1 = new System.Windows.Forms.Label();
- this.group2 = new System.Windows.Forms.Label();
- this.group3 = new System.Windows.Forms.Label();
- this.group4 = new System.Windows.Forms.Label();
- this.group5 = new System.Windows.Forms.Label();
- this.group6 = new System.Windows.Forms.Label();
- this.componentList = new System.Windows.Forms.ComboBox();
- this.spawnBtn = new System.Windows.Forms.Button();
- this.groupCb = new System.Windows.Forms.CheckBox();
+ this.SendASymbolLabel = new System.Windows.Forms.Label();
+ this.label1 = new System.Windows.Forms.Label();
+ this.panel1 = new System.Windows.Forms.Panel();
+ this.DataLabel = new System.Windows.Forms.Label();
+ this.SourceLabel = new System.Windows.Forms.Label();
+ this.MessagesRichBox = new System.Windows.Forms.RichTextBox();
+ this.MessagesLabel = new System.Windows.Forms.Label();
+ this.GroupButton6 = new WinformExample.Controls.RoundedButton();
+ this.GroupButton5 = new WinformExample.Controls.RoundedButton();
+ this.GroupButton4 = new WinformExample.Controls.RoundedButton();
+ this.GroupButton3 = new WinformExample.Controls.RoundedButton();
+ this.GroupButton2 = new WinformExample.Controls.RoundedButton();
+ this.GroupButton1 = new WinformExample.Controls.RoundedButton();
+ this.DragNDropEmittingButton = new WinformExample.Controls.RoundedButton();
+ this.DockingButton = new WinformExample.Controls.RoundedButton();
+ this.AlwaysOnTopButton = new WinformExample.Controls.RoundedButton();
+ this.LinkerButton = new WinformExample.Controls.RoundedButton();
+ this.SendButton = new WinformExample.Controls.RoundedButton();
+ this.DataToSendInput = new WinformExample.Controls.FinsembleInput();
+ this.LaunchButton = new WinformExample.Controls.RoundedButton();
+ this.ComponentSelect = new WinformExample.Controls.RoundedSelect();
this.SuspendLayout();
//
// scrim
//
+ this.scrim.AccessibleName = "MainBackground";
this.scrim.AllowDrop = true;
- this.scrim.BackColor = System.Drawing.Color.Transparent;
+ this.scrim.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(23)))), ((int)(((byte)(26)))), ((int)(((byte)(32)))));
this.scrim.Dock = System.Windows.Forms.DockStyle.Fill;
- this.scrim.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.scrim.Font = new System.Drawing.Font("font-finance", 100F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.scrim.ForeColor = System.Drawing.Color.Transparent;
this.scrim.Location = new System.Drawing.Point(0, 0);
+ this.scrim.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.scrim.Name = "scrim";
- this.scrim.Size = new System.Drawing.Size(384, 393);
+ this.scrim.Size = new System.Drawing.Size(700, 700);
this.scrim.TabIndex = 4;
this.scrim.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.scrim.Visible = false;
//
- // datasource
- //
- this.datasource.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
+ // SendASymbolLabel
+ //
+ this.SendASymbolLabel.AutoSize = true;
+ this.SendASymbolLabel.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(23)))), ((int)(((byte)(26)))), ((int)(((byte)(32)))));
+ this.SendASymbolLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.SendASymbolLabel.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(3)))), ((int)(((byte)(155)))), ((int)(((byte)(255)))));
+ this.SendASymbolLabel.Location = new System.Drawing.Point(27, 295);
+ this.SendASymbolLabel.Name = "SendASymbolLabel";
+ this.SendASymbolLabel.Size = new System.Drawing.Size(134, 20);
+ this.SendASymbolLabel.TabIndex = 10;
+ this.SendASymbolLabel.Text = "Send a Symbol";
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(23)))), ((int)(((byte)(26)))), ((int)(((byte)(32)))));
+ this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.label1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(3)))), ((int)(((byte)(155)))), ((int)(((byte)(255)))));
+ this.label1.Location = new System.Drawing.Point(27, 391);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(180, 20);
+ this.label1.TabIndex = 11;
+ this.label1.Text = "Spawn a Component";
+ //
+ // panel1
+ //
+ this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
- this.datasource.Location = new System.Drawing.Point(0, 221);
- this.datasource.Name = "datasource";
- this.datasource.Size = new System.Drawing.Size(384, 29);
- this.datasource.TabIndex = 6;
- this.datasource.Text = "datasource";
- this.datasource.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+ this.panel1.BackgroundImage = global::WinformExample.Properties.Resources.winformsLogo;
+ this.panel1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
+ this.panel1.Location = new System.Drawing.Point(283, 64);
+ this.panel1.Name = "panel1";
+ this.panel1.Size = new System.Drawing.Size(145, 105);
+ this.panel1.TabIndex = 13;
//
- // datavalue
+ // DataLabel
//
- this.datavalue.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
+ this.DataLabel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.DataLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.DataLabel.ForeColor = System.Drawing.Color.White;
+ this.DataLabel.Location = new System.Drawing.Point(319, 184);
+ this.DataLabel.Name = "DataLabel";
+ this.DataLabel.Size = new System.Drawing.Size(72, 25);
+ this.DataLabel.TabIndex = 14;
+ this.DataLabel.Text = "MSFT";
+ this.DataLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+ //
+ // SourceLabel
+ //
+ this.SourceLabel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.SourceLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.SourceLabel.ForeColor = System.Drawing.Color.White;
+ this.SourceLabel.Location = new System.Drawing.Point(307, 226);
+ this.SourceLabel.Name = "SourceLabel";
+ this.SourceLabel.Size = new System.Drawing.Size(93, 20);
+ this.SourceLabel.TabIndex = 15;
+ this.SourceLabel.Text = "via PubSub";
+ this.SourceLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+ //
+ // MessagesRichBox
+ //
+ this.MessagesRichBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
- this.datavalue.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.datavalue.Location = new System.Drawing.Point(0, 185);
- this.datavalue.Name = "datavalue";
- this.datavalue.Size = new System.Drawing.Size(384, 25);
- this.datavalue.TabIndex = 7;
- this.datavalue.Text = "datavalue";
- this.datavalue.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
- this.datavalue.MouseDown += new System.Windows.Forms.MouseEventHandler(this.datavalue_MouseDown);
- //
- // input
- //
- this.input.Location = new System.Drawing.Point(4, 47);
- this.input.Name = "input";
- this.input.Size = new System.Drawing.Size(115, 20);
- this.input.TabIndex = 8;
- this.input.Text = "AAPL";
- //
- // pubsub
- //
- this.pubsub.Location = new System.Drawing.Point(4, 73);
- this.pubsub.Name = "pubsub";
- this.pubsub.Size = new System.Drawing.Size(116, 23);
- this.pubsub.TabIndex = 9;
- this.pubsub.Text = "Publish to PubSub";
- this.pubsub.UseVisualStyleBackColor = true;
- this.pubsub.Click += new System.EventHandler(this.pubsub_Click);
- //
- // linker
- //
- this.linker.Location = new System.Drawing.Point(5, 5);
- this.linker.Name = "linker";
- this.linker.Size = new System.Drawing.Size(44, 23);
- this.linker.TabIndex = 10;
- this.linker.Text = "Linker";
- this.linker.UseVisualStyleBackColor = true;
- this.linker.Click += new System.EventHandler(this.linker_Click);
- //
- // pubLinker
- //
- this.pubLinker.Location = new System.Drawing.Point(4, 102);
- this.pubLinker.Name = "pubLinker";
- this.pubLinker.Size = new System.Drawing.Size(116, 23);
- this.pubLinker.TabIndex = 11;
- this.pubLinker.Text = "Publish to Linker";
- this.pubLinker.UseVisualStyleBackColor = true;
- this.pubLinker.Click += new System.EventHandler(this.pubLinker_Click);
- //
- // group1
- //
- this.group1.AutoSize = true;
- this.group1.BackColor = System.Drawing.Color.Red;
- this.group1.Location = new System.Drawing.Point(53, 10);
- this.group1.Name = "group1";
- this.group1.Size = new System.Drawing.Size(13, 13);
- this.group1.TabIndex = 12;
- this.group1.Text = "1";
- //
- // group2
- //
- this.group2.AutoSize = true;
- this.group2.BackColor = System.Drawing.Color.Red;
- this.group2.Location = new System.Drawing.Point(72, 10);
- this.group2.Name = "group2";
- this.group2.Size = new System.Drawing.Size(13, 13);
- this.group2.TabIndex = 13;
- this.group2.Text = "2";
- //
- // group3
- //
- this.group3.AutoSize = true;
- this.group3.BackColor = System.Drawing.Color.Red;
- this.group3.Location = new System.Drawing.Point(91, 10);
- this.group3.Name = "group3";
- this.group3.Size = new System.Drawing.Size(13, 13);
- this.group3.TabIndex = 14;
- this.group3.Text = "3";
- //
- // group4
- //
- this.group4.AutoSize = true;
- this.group4.BackColor = System.Drawing.Color.Red;
- this.group4.Location = new System.Drawing.Point(110, 10);
- this.group4.Name = "group4";
- this.group4.Size = new System.Drawing.Size(13, 13);
- this.group4.TabIndex = 15;
- this.group4.Text = "4";
- //
- // group5
- //
- this.group5.AutoSize = true;
- this.group5.BackColor = System.Drawing.Color.Red;
- this.group5.Location = new System.Drawing.Point(129, 10);
- this.group5.Name = "group5";
- this.group5.Size = new System.Drawing.Size(13, 13);
- this.group5.TabIndex = 16;
- this.group5.Text = "5";
- //
- // group6
- //
- this.group6.AutoSize = true;
- this.group6.BackColor = System.Drawing.Color.Red;
- this.group6.Location = new System.Drawing.Point(148, 10);
- this.group6.Name = "group6";
- this.group6.Size = new System.Drawing.Size(13, 13);
- this.group6.TabIndex = 17;
- this.group6.Text = "6";
- //
- // componentList
- //
- this.componentList.FormattingEnabled = true;
- this.componentList.Location = new System.Drawing.Point(4, 132);
- this.componentList.Name = "componentList";
- this.componentList.Size = new System.Drawing.Size(116, 21);
- this.componentList.TabIndex = 18;
- //
- // spawnBtn
- //
- this.spawnBtn.Location = new System.Drawing.Point(4, 159);
- this.spawnBtn.Name = "spawnBtn";
- this.spawnBtn.Size = new System.Drawing.Size(116, 23);
- this.spawnBtn.TabIndex = 19;
- this.spawnBtn.Text = "Spawn";
- this.spawnBtn.UseVisualStyleBackColor = true;
- this.spawnBtn.Click += new System.EventHandler(this.spawnBtn_Click);
- //
- // groupCb
- //
- this.groupCb.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.groupCb.AutoSize = true;
- this.groupCb.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
- this.groupCb.Location = new System.Drawing.Point(317, 6);
- this.groupCb.Name = "groupCb";
- this.groupCb.Size = new System.Drawing.Size(55, 17);
- this.groupCb.TabIndex = 20;
- this.groupCb.Text = "Group";
- this.groupCb.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
- this.groupCb.UseVisualStyleBackColor = true;
- this.groupCb.CheckedChanged += new System.EventHandler(this.groupCb_CheckedChanged);
+ this.MessagesRichBox.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(23)))), ((int)(((byte)(26)))), ((int)(((byte)(32)))));
+ this.MessagesRichBox.ForeColor = System.Drawing.Color.White;
+ this.MessagesRichBox.Location = new System.Drawing.Point(20, 496);
+ this.MessagesRichBox.Name = "MessagesRichBox";
+ this.MessagesRichBox.Size = new System.Drawing.Size(660, 189);
+ this.MessagesRichBox.TabIndex = 22;
+ this.MessagesRichBox.Text = "";
+ //
+ // MessagesLabel
+ //
+ this.MessagesLabel.AutoSize = true;
+ this.MessagesLabel.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(23)))), ((int)(((byte)(26)))), ((int)(((byte)(32)))));
+ this.MessagesLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.MessagesLabel.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(3)))), ((int)(((byte)(155)))), ((int)(((byte)(255)))));
+ this.MessagesLabel.Location = new System.Drawing.Point(27, 456);
+ this.MessagesLabel.Name = "MessagesLabel";
+ this.MessagesLabel.Size = new System.Drawing.Size(94, 20);
+ this.MessagesLabel.TabIndex = 23;
+ this.MessagesLabel.Text = "Messages";
+ //
+ // GroupButton6
+ //
+ this.GroupButton6.ButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(162)))), ((int)(((byte)(0)))));
+ this.GroupButton6.CornerRadius = 15;
+ this.GroupButton6.ImageMargins = new System.Drawing.Printing.Margins(0, 0, 0, 0);
+ this.GroupButton6.Location = new System.Drawing.Point(178, 12);
+ this.GroupButton6.Name = "GroupButton6";
+ this.GroupButton6.OnHoverButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(220)))), ((int)(((byte)(59)))));
+ this.GroupButton6.OnHoverTextColor = System.Drawing.Color.Black;
+ this.GroupButton6.Size = new System.Drawing.Size(20, 30);
+ this.GroupButton6.TabIndex = 33;
+ this.GroupButton6.Text = "6";
+ this.GroupButton6.TextColor = System.Drawing.Color.White;
+ this.GroupButton6.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
+ this.GroupButton6.UseVisualStyleBackColor = true;
+ this.GroupButton6.Visible = false;
+ //
+ // GroupButton5
+ //
+ this.GroupButton5.ButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(172)))), ((int)(((byte)(255)))));
+ this.GroupButton5.CornerRadius = 15;
+ this.GroupButton5.ImageMargins = new System.Drawing.Printing.Margins(0, 0, 0, 0);
+ this.GroupButton5.Location = new System.Drawing.Point(152, 12);
+ this.GroupButton5.Name = "GroupButton5";
+ this.GroupButton5.OnHoverButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(101)))), ((int)(((byte)(228)))), ((int)(((byte)(243)))));
+ this.GroupButton5.OnHoverTextColor = System.Drawing.Color.Black;
+ this.GroupButton5.Size = new System.Drawing.Size(20, 30);
+ this.GroupButton5.TabIndex = 32;
+ this.GroupButton5.Text = "5";
+ this.GroupButton5.TextColor = System.Drawing.Color.White;
+ this.GroupButton5.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
+ this.GroupButton5.UseVisualStyleBackColor = true;
+ this.GroupButton5.Visible = false;
+ //
+ // GroupButton4
+ //
+ this.GroupButton4.ButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(254)))), ((int)(((byte)(98)))), ((int)(((byte)(98)))));
+ this.GroupButton4.CornerRadius = 15;
+ this.GroupButton4.ImageMargins = new System.Drawing.Printing.Margins(0, 0, 0, 0);
+ this.GroupButton4.Location = new System.Drawing.Point(126, 12);
+ this.GroupButton4.Name = "GroupButton4";
+ this.GroupButton4.OnHoverButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(140)))), ((int)(((byte)(140)))));
+ this.GroupButton4.OnHoverTextColor = System.Drawing.Color.Black;
+ this.GroupButton4.Size = new System.Drawing.Size(20, 30);
+ this.GroupButton4.TabIndex = 31;
+ this.GroupButton4.Text = "4";
+ this.GroupButton4.TextColor = System.Drawing.Color.White;
+ this.GroupButton4.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
+ this.GroupButton4.UseVisualStyleBackColor = true;
+ this.GroupButton4.Visible = false;
+ //
+ // GroupButton3
+ //
+ this.GroupButton3.ButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(137)))), ((int)(((byte)(216)))), ((int)(((byte)(3)))));
+ this.GroupButton3.CornerRadius = 15;
+ this.GroupButton3.ImageMargins = new System.Drawing.Printing.Margins(0, 0, 0, 0);
+ this.GroupButton3.Location = new System.Drawing.Point(100, 12);
+ this.GroupButton3.Name = "GroupButton3";
+ this.GroupButton3.OnHoverButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(189)))), ((int)(((byte)(255)))), ((int)(((byte)(55)))));
+ this.GroupButton3.OnHoverTextColor = System.Drawing.Color.Black;
+ this.GroupButton3.Size = new System.Drawing.Size(20, 30);
+ this.GroupButton3.TabIndex = 30;
+ this.GroupButton3.Text = "3";
+ this.GroupButton3.TextColor = System.Drawing.Color.White;
+ this.GroupButton3.UseVisualStyleBackColor = true;
+ this.GroupButton3.Visible = false;
+ //
+ // GroupButton2
+ //
+ this.GroupButton2.ButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(254)))), ((int)(((byte)(223)))), ((int)(((byte)(53)))));
+ this.GroupButton2.CornerRadius = 15;
+ this.GroupButton2.ImageMargins = new System.Drawing.Printing.Margins(0, 0, 0, 0);
+ this.GroupButton2.Location = new System.Drawing.Point(74, 12);
+ this.GroupButton2.Name = "GroupButton2";
+ this.GroupButton2.OnHoverButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(123)))));
+ this.GroupButton2.OnHoverTextColor = System.Drawing.Color.Black;
+ this.GroupButton2.Size = new System.Drawing.Size(20, 30);
+ this.GroupButton2.TabIndex = 29;
+ this.GroupButton2.Text = "2";
+ this.GroupButton2.TextColor = System.Drawing.Color.White;
+ this.GroupButton2.UseVisualStyleBackColor = true;
+ this.GroupButton2.Visible = false;
+ //
+ // GroupButton1
+ //
+ this.GroupButton1.ButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(124)))), ((int)(((byte)(119)))), ((int)(((byte)(174)))));
+ this.GroupButton1.CornerRadius = 15;
+ this.GroupButton1.ImageMargins = new System.Drawing.Printing.Margins(0, 0, 0, 0);
+ this.GroupButton1.Location = new System.Drawing.Point(48, 12);
+ this.GroupButton1.Name = "GroupButton1";
+ this.GroupButton1.OnHoverButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(190)))), ((int)(((byte)(185)))), ((int)(((byte)(240)))));
+ this.GroupButton1.OnHoverTextColor = System.Drawing.Color.Black;
+ this.GroupButton1.Size = new System.Drawing.Size(20, 30);
+ this.GroupButton1.TabIndex = 28;
+ this.GroupButton1.Text = "1";
+ this.GroupButton1.TextColor = System.Drawing.Color.White;
+ this.GroupButton1.UseVisualStyleBackColor = true;
+ this.GroupButton1.Visible = false;
+ //
+ // DragNDropEmittingButton
+ //
+ this.DragNDropEmittingButton.ButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(34)))), ((int)(((byte)(38)))), ((int)(((byte)(47)))));
+ this.DragNDropEmittingButton.CornerRadius = 20;
+ this.DragNDropEmittingButton.Font = new System.Drawing.Font("font-finance", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.DragNDropEmittingButton.ImageMargins = new System.Drawing.Printing.Margins(0, 0, 0, 0);
+ this.DragNDropEmittingButton.Location = new System.Drawing.Point(48, 12);
+ this.DragNDropEmittingButton.Name = "DragNDropEmittingButton";
+ this.DragNDropEmittingButton.OnHoverButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(45)))), ((int)(((byte)(56)))));
+ this.DragNDropEmittingButton.OnHoverTextColor = System.Drawing.Color.White;
+ this.DragNDropEmittingButton.Size = new System.Drawing.Size(30, 30);
+ this.DragNDropEmittingButton.TabIndex = 27;
+ this.DragNDropEmittingButton.Text = "*";
+ this.DragNDropEmittingButton.TextColor = System.Drawing.Color.White;
+ this.DragNDropEmittingButton.UseVisualStyleBackColor = true;
+ this.DragNDropEmittingButton.MouseDown += new System.Windows.Forms.MouseEventHandler(this.DragNDropEmittingButton_MouseDown);
+ //
+ // DockingButton
+ //
+ this.DockingButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.DockingButton.ButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(34)))), ((int)(((byte)(38)))), ((int)(((byte)(47)))));
+ this.DockingButton.CornerRadius = 20;
+ this.DockingButton.Font = new System.Drawing.Font("font-finance", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.DockingButton.ImageMargins = new System.Drawing.Printing.Margins(0, 0, 0, 0);
+ this.DockingButton.Location = new System.Drawing.Point(600, 12);
+ this.DockingButton.Name = "DockingButton";
+ this.DockingButton.OnHoverButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(45)))), ((int)(((byte)(56)))));
+ this.DockingButton.OnHoverTextColor = System.Drawing.Color.White;
+ this.DockingButton.Size = new System.Drawing.Size(30, 30);
+ this.DockingButton.TabIndex = 26;
+ this.DockingButton.Text = ">";
+ this.DockingButton.TextColor = System.Drawing.Color.White;
+ this.DockingButton.UseVisualStyleBackColor = true;
+ this.DockingButton.Visible = false;
+ this.DockingButton.Click += new System.EventHandler(this.DockingButton_Click);
+ //
+ // AlwaysOnTopButton
+ //
+ this.AlwaysOnTopButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.AlwaysOnTopButton.ButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(34)))), ((int)(((byte)(38)))), ((int)(((byte)(47)))));
+ this.AlwaysOnTopButton.CornerRadius = 20;
+ this.AlwaysOnTopButton.Font = new System.Drawing.Font("font-finance", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.AlwaysOnTopButton.ImageMargins = new System.Drawing.Printing.Margins(0, 0, 0, 0);
+ this.AlwaysOnTopButton.Location = new System.Drawing.Point(640, 12);
+ this.AlwaysOnTopButton.Name = "AlwaysOnTopButton";
+ this.AlwaysOnTopButton.OnHoverButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(45)))), ((int)(((byte)(56)))));
+ this.AlwaysOnTopButton.OnHoverTextColor = System.Drawing.Color.White;
+ this.AlwaysOnTopButton.Size = new System.Drawing.Size(30, 30);
+ this.AlwaysOnTopButton.TabIndex = 25;
+ this.AlwaysOnTopButton.Text = "9";
+ this.AlwaysOnTopButton.TextColor = System.Drawing.Color.White;
+ this.AlwaysOnTopButton.UseVisualStyleBackColor = true;
+ this.AlwaysOnTopButton.Click += new System.EventHandler(this.AlwaysOnTopButton_Click);
+ //
+ // LinkerButton
+ //
+ this.LinkerButton.ButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(34)))), ((int)(((byte)(38)))), ((int)(((byte)(47)))));
+ this.LinkerButton.CornerRadius = 20;
+ this.LinkerButton.Font = new System.Drawing.Font("font-finance", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.LinkerButton.ImageMargins = new System.Drawing.Printing.Margins(0, 0, 0, 0);
+ this.LinkerButton.Location = new System.Drawing.Point(12, 12);
+ this.LinkerButton.Name = "LinkerButton";
+ this.LinkerButton.OnHoverButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(45)))), ((int)(((byte)(56)))));
+ this.LinkerButton.OnHoverTextColor = System.Drawing.Color.White;
+ this.LinkerButton.Size = new System.Drawing.Size(30, 30);
+ this.LinkerButton.TabIndex = 24;
+ this.LinkerButton.Text = "1";
+ this.LinkerButton.TextColor = System.Drawing.Color.White;
+ this.LinkerButton.UseVisualStyleBackColor = true;
+ this.LinkerButton.Click += new System.EventHandler(this.LinkerButton_Click);
+ //
+ // SendButton
+ //
+ this.SendButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.SendButton.ButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(34)))), ((int)(((byte)(38)))), ((int)(((byte)(47)))));
+ this.SendButton.CornerRadius = 25;
+ this.SendButton.ImageMargins = new System.Drawing.Printing.Margins(0, 0, 0, 0);
+ this.SendButton.Location = new System.Drawing.Point(540, 286);
+ this.SendButton.Name = "SendButton";
+ this.SendButton.OnHoverButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(23)))), ((int)(((byte)(26)))), ((int)(((byte)(32)))));
+ this.SendButton.OnHoverTextColor = System.Drawing.Color.White;
+ this.SendButton.Size = new System.Drawing.Size(122, 50);
+ this.SendButton.TabIndex = 8;
+ this.SendButton.Text = "Send";
+ this.SendButton.TextColor = System.Drawing.Color.White;
+ this.SendButton.UseVisualStyleBackColor = true;
+ this.SendButton.Click += new System.EventHandler(this.SendButton_Click);
+ //
+ // DataToSendInput
+ //
+ this.DataToSendInput.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.DataToSendInput.AutoSize = true;
+ this.DataToSendInput.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(23)))), ((int)(((byte)(26)))), ((int)(((byte)(32)))));
+ this.DataToSendInput.ForeColor = System.Drawing.Color.White;
+ this.DataToSendInput.Location = new System.Drawing.Point(300, 286);
+ this.DataToSendInput.Name = "DataToSendInput";
+ this.DataToSendInput.Size = new System.Drawing.Size(600, 98);
+ this.DataToSendInput.TabIndex = 7;
+ //
+ // LaunchButton
+ //
+ this.LaunchButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.LaunchButton.ButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(34)))), ((int)(((byte)(38)))), ((int)(((byte)(47)))));
+ this.LaunchButton.CornerRadius = 25;
+ this.LaunchButton.ImageMargins = new System.Drawing.Printing.Margins(0, 0, 0, 0);
+ this.LaunchButton.Location = new System.Drawing.Point(540, 381);
+ this.LaunchButton.Name = "LaunchButton";
+ this.LaunchButton.OnHoverButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(45)))), ((int)(((byte)(56)))));
+ this.LaunchButton.OnHoverTextColor = System.Drawing.Color.White;
+ this.LaunchButton.Size = new System.Drawing.Size(122, 50);
+ this.LaunchButton.TabIndex = 5;
+ this.LaunchButton.Text = "Launch";
+ this.LaunchButton.TextColor = System.Drawing.Color.White;
+ this.LaunchButton.UseVisualStyleBackColor = true;
+ this.LaunchButton.Click += new System.EventHandler(this.LaunchButton_Click);
+ //
+ // ComponentSelect
+ //
+ this.ComponentSelect.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.ComponentSelect.AutoSize = true;
+ this.ComponentSelect.Location = new System.Drawing.Point(272, 381);
+ this.ComponentSelect.Name = "ComponentSelect";
+ this.ComponentSelect.Size = new System.Drawing.Size(253, 78);
+ this.ComponentSelect.TabIndex = 9;
//
// FormExample
//
this.AllowDrop = true;
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(384, 393);
- this.Controls.Add(this.groupCb);
- this.Controls.Add(this.spawnBtn);
- this.Controls.Add(this.componentList);
- this.Controls.Add(this.group6);
- this.Controls.Add(this.group5);
- this.Controls.Add(this.group4);
- this.Controls.Add(this.group3);
- this.Controls.Add(this.group2);
- this.Controls.Add(this.group1);
- this.Controls.Add(this.pubLinker);
- this.Controls.Add(this.linker);
- this.Controls.Add(this.pubsub);
- this.Controls.Add(this.input);
- this.Controls.Add(this.datavalue);
- this.Controls.Add(this.datasource);
+ this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(23)))), ((int)(((byte)(26)))), ((int)(((byte)(32)))));
+ this.ClientSize = new System.Drawing.Size(700, 700);
+ this.Controls.Add(this.GroupButton6);
+ this.Controls.Add(this.GroupButton5);
+ this.Controls.Add(this.GroupButton4);
+ this.Controls.Add(this.GroupButton3);
+ this.Controls.Add(this.GroupButton2);
+ this.Controls.Add(this.GroupButton1);
+ this.Controls.Add(this.DragNDropEmittingButton);
+ this.Controls.Add(this.DockingButton);
+ this.Controls.Add(this.AlwaysOnTopButton);
+ this.Controls.Add(this.LinkerButton);
+ this.Controls.Add(this.MessagesLabel);
+ this.Controls.Add(this.SourceLabel);
+ this.Controls.Add(this.DataLabel);
+ this.Controls.Add(this.panel1);
+ this.Controls.Add(this.MessagesRichBox);
+ this.Controls.Add(this.label1);
+ this.Controls.Add(this.SendASymbolLabel);
+ this.Controls.Add(this.SendButton);
+ this.Controls.Add(this.DataToSendInput);
+ this.Controls.Add(this.LaunchButton);
this.Controls.Add(this.scrim);
+ this.Controls.Add(this.ComponentSelect);
+ this.Margin = new System.Windows.Forms.Padding(4);
this.Name = "FormExample";
this.Text = "Winform Example";
this.ResumeLayout(false);
@@ -253,21 +426,27 @@ private void InitializeComponent()
#endregion
private System.Windows.Forms.Label scrim;
- private System.Windows.Forms.Label datasource;
- private System.Windows.Forms.Label datavalue;
- private System.Windows.Forms.TextBox input;
- private System.Windows.Forms.Button pubsub;
- private System.Windows.Forms.Button linker;
- private System.Windows.Forms.Button pubLinker;
- private System.Windows.Forms.Label group1;
- private System.Windows.Forms.Label group2;
- private System.Windows.Forms.Label group3;
- private System.Windows.Forms.Label group4;
- private System.Windows.Forms.Label group5;
- private System.Windows.Forms.Label group6;
- private System.Windows.Forms.ComboBox componentList;
- private System.Windows.Forms.Button spawnBtn;
- private System.Windows.Forms.CheckBox groupCb;
+ private Controls.RoundedButton LaunchButton;
+ private Controls.FinsembleInput DataToSendInput;
+ private Controls.RoundedButton SendButton;
+ private Controls.RoundedSelect ComponentSelect;
+ private System.Windows.Forms.Label SendASymbolLabel;
+ private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.Panel panel1;
+ private System.Windows.Forms.Label DataLabel;
+ private System.Windows.Forms.Label SourceLabel;
+ private System.Windows.Forms.RichTextBox MessagesRichBox;
+ private System.Windows.Forms.Label MessagesLabel;
+ private Controls.RoundedButton LinkerButton;
+ private Controls.RoundedButton AlwaysOnTopButton;
+ private Controls.RoundedButton DockingButton;
+ private Controls.RoundedButton DragNDropEmittingButton;
+ private Controls.RoundedButton GroupButton1;
+ private Controls.RoundedButton GroupButton2;
+ private Controls.RoundedButton GroupButton3;
+ private Controls.RoundedButton GroupButton4;
+ private Controls.RoundedButton GroupButton5;
+ private Controls.RoundedButton GroupButton6;
}
}
diff --git a/WinformExample/FormExample.cs b/WinformExample/FormExample.cs
index d1decd4..5bf4c3f 100644
--- a/WinformExample/FormExample.cs
+++ b/WinformExample/FormExample.cs
@@ -2,18 +2,20 @@
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
-using System.Diagnostics;
using System.Drawing;
-using System.Drawing.Text;
+using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Windows.Threading;
+using Newtonsoft.Json.Bson;
+using WinformExample.Controls;
+using Color = System.Drawing.Color;
namespace WinformExample
{
public partial class FormExample : Form
{
- private SortedDictionary LinkerGroups = new SortedDictionary();
+ private SortedDictionary LinkerGroups = new SortedDictionary();
private System.Drawing.Text.PrivateFontCollection finfont = new System.Drawing.Text.PrivateFontCollection();
public FormExample(String[] args)
@@ -23,7 +25,7 @@ public FormExample(String[] args)
#endif
InitializeComponent();
- this.input.KeyPress += new System.Windows.Forms.KeyPressEventHandler(handleKeyPresses);
+ //this.input.KeyPress += new System.Windows.Forms.KeyPressEventHandler(handleKeyPresses);
//connect to Finsemble
//Ensure that your window has been created (so that its window handle exists) before connecting to Finsemble.
@@ -33,10 +35,19 @@ public FormExample(String[] args)
// FSBL = new Finsemble(args, this.Handle);
//----
+ ArrangeComponents();
+
FSBL.Connected += FinsembleConnected;
FSBL.Connect();
}
+ private void ArrangeComponents()
+ {
+ Activate();
+ ComponentSelect.BringToFront();
+ MessagesRichBox.SendToBack();
+ }
+
//If you encounter issues with the initial window placement (due to the handling of window borders in Windows 10) SetBoundsCore can be overridden to implement custom logic
//protected override void SetBoundsCore(int x, int y, int width, int height, BoundsSpecified specified)
//{
@@ -45,62 +56,80 @@ public FormExample(String[] args)
private void FinsembleConnected(object sender, EventArgs e)
{
-
FSBL.Logger.Log(new JToken[] { "Winform example connected to Finsemble." });
System.Diagnostics.Debug.WriteLine("FSBL Ready.");
+ // Handle Window grouping
+ FSBL.RouterClient.Subscribe("Finsemble.WorkspaceService.groupUpdate", HandleWindowGrouping);
+
//setup linker channels
- FSBL.LinkerClient.GetAllChannels(handleLinkerChannelLabels);
+ FSBL.LinkerClient.GetAllChannels(HandleLinkerChannelLabels);
// Listen to Linker state change to render connected channels
- FSBL.LinkerClient.OnStateChange(handleLinkerStateChange);
-
- // Handle Window grouping
- FSBL.RouterClient.Subscribe("Finsemble.WorkspaceService.groupUpdate", handleWindowGrouping);
+ FSBL.LinkerClient.OnStateChange(HandleLinkerStateChange);
//Example for handling component state in a workspace (and hand-off to getSpawnData if no state found)
- FSBL.WindowClient.GetComponentState(new JObject { ["field"] = "symbol" }, handleGetComponentState);
+ FSBL.WindowClient.GetComponentState(new JObject { ["field"] = "symbol" }, HandleGetComponentState);
// Example for Handling PubSub data
- FSBL.RouterClient.Subscribe("Finsemble.TestWPFPubSubSymbol", handlePubSub);
+ FSBL.RouterClient.Subscribe("Finsemble.TestWPFPubSubSymbol", HandlePubSub);
- // If you passed a window handle to initiate FSBL, you have to comment the following code to disable drag and drop function
- // Example for handling Drag and Drop
finfont.AddFontFile(@"Resources\finfont.ttf");
- var font = new System.Drawing.Font(finfont.Families[0], 100);
- scrim.Font = font;
+ finfont.AddFontFile(@"Resources\font-finance.ttf");
+ var finFont = new System.Drawing.Font(finfont.Families[0], 100);
+ var fontFinance = new System.Drawing.Font(finfont.Families[1], 7);
+ Invoke(new Action(() =>
+ {
+ scrim.Font = finFont;
+
+ LinkerButton.Font = fontFinance;
+ DragNDropEmittingButton.Font = fontFinance;
+ AlwaysOnTopButton.Font = fontFinance;
+ DockingButton.Font = fontFinance;
+ }));
FSBL.DragAndDropClient.SetScrim(scrim);
FSBL.DragAndDropClient.AddReceivers(new List>>()
{
- new KeyValuePair>("symbol", handleDragAndDropReceive)
+ new KeyValuePair>("symbol", HandleDragAndDropReceive)
});
// Emitters for data that can be dragged using the drag icon.
FSBL.DragAndDropClient.SetEmitters(new List>()
{
- new KeyValuePair("symbol", handleDragAndDropEmit)
+ new KeyValuePair("symbol", HandleDragAndDropEmit)
});
// Example for LinkerClient subscribe
- FSBL.LinkerClient.Subscribe("symbol", handleLinkerData);
+ FSBL.LinkerClient.Subscribe("symbol", HandleLinkerData);
// Example for getting Spawnable component list
- FSBL.ConfigClient.GetValue(new JObject { ["field"] = "finsemble.components" }, handleComponentsList);
+ FSBL.ConfigClient.GetValue(new JObject { ["field"] = "finsemble.components" }, HandleComponentsList);
+
+ FSBL.Logger.OnLog += Logger_OnLog;
+
+ SetInitialWindowGrouping(FSBL.WindowClient.GetWindowGroups());
+
+ }
+
+ private void Logger_OnLog(object sender, JObject log)
+ {
+ MessagesRichBox.Invoke((MethodInvoker)delegate { MessagesRichBox.Text += log + "\n"; });
}
- private void handleLinkerChannelLabels(object sender, FinsembleEventArgs args)
+ private void HandleLinkerChannelLabels(object sender, FinsembleEventArgs args)
{
- this.Invoke(new Action(() => {
+ this.Invoke(new Action(() =>
+ {
if (args.error == null)
{
- Label[] groupLabels = new Label[] { group1, group2, group3, group4, group5, group6 };
+ var groupLabels = new RoundedButton[] { GroupButton1, GroupButton2, GroupButton3, GroupButton4, GroupButton5, GroupButton6 };
var allChannels = args.response as JArray;
int labelcount = 0;
foreach (JObject item in allChannels)
{
- Label theLabel = groupLabels[labelcount++];
+ var theLabel = groupLabels[labelcount++];
theLabel.Visible = false;
LinkerGroups.Add(item["name"].ToString(), theLabel);
//limit channels to ones we enough labels for
@@ -117,15 +146,18 @@ private void handleLinkerChannelLabels(object sender, FinsembleEventArgs args)
}));
}
- private void handleLinkerStateChange(Object sender, FinsembleEventArgs response)
+ private void HandleLinkerStateChange(Object sender, FinsembleEventArgs response)
{
- this.Invoke(new Action(() => {
+ this.Invoke(new Action(() =>
+ {
if (response.error != null)
{
FSBL.Logger.Error(new JToken[] { "Error when receiving linker state change data: ", response.error.ToString() });
}
else if (response.response != null)
{
+ var visiblePillsBeforeChange = LinkerGroups.Count(x => x.Value.Visible);
+
var channels = response.response["channels"] as JArray;
var allChannels = response.response["allChannels"] as JArray;
foreach (JObject obj in allChannels)
@@ -138,83 +170,142 @@ private void handleLinkerStateChange(Object sender, FinsembleEventArgs response)
{
LinkerGroups[channel.Value.ToString()].Visible = true;
}
+
+ var visiblePillsAfterChange = LinkerGroups.Count(x => x.Value.Visible);
+ AlignAllLinkerPills();
+ DragNDropEmittingButton.Location = new Point(DragNDropEmittingButton.Location.X + CalculateDragNDropLeftMarginShift(visiblePillsBeforeChange, visiblePillsAfterChange), DragNDropEmittingButton.Location.Y);
}
}));
}
- private void handleWindowGrouping(object s, FinsembleEventArgs res)
+ private void AlignAllLinkerPills()
{
- this.Invoke(new Action(() => {
+ var initialX = GroupButton1.Location.X;
+ var counter = 0;
+
+ foreach (var visiblePill in LinkerGroups.Where(x => x.Value.Visible))
+ {
+ visiblePill.Value.Location = new Point(initialX + (counter * (GroupButton1.Width)), visiblePill.Value.Location.Y);
+ ++counter;
+ }
+ }
+
+ private int CalculateDragNDropLeftMarginShift(int visiblePillsBeforeShift, int visiblePillsAfterShift)
+ {
+ return (visiblePillsAfterShift - visiblePillsBeforeShift) * (GroupButton1.Width + 5);
+ }
+
+ private void HandleWindowGrouping(object s, FinsembleEventArgs res)
+ {
+ this.Invoke(new Action(() =>
+ {
if (res.error != null)
{
return;
}
- else
+
+ var groupData = res.response["data"]["groupData"] as JObject;
+ var thisWindowGroups = new JObject();
+
+ foreach (var obj in groupData)
{
- JObject groupData = res.response["data"]["groupData"] as JObject;
- String currentWindowName = FSBL.WindowClient.GetWindowIdentifier()["windowName"].ToString();
- JObject thisWindowGroups = new JObject();
- thisWindowGroups.Add("dockingGroup", "");
- thisWindowGroups.Add("snappingGroup", "");
- thisWindowGroups.Add("topRight", false);
-
- foreach (var obj in groupData)
- {
- string windowgroupid = obj.Key;
- JObject windowgroup = groupData[windowgroupid] as JObject;
- JArray windownames = windowgroup["windowNames"] as JArray;
+ var windowgroupid = obj.Key;
+ var windowgroup = groupData[windowgroupid] as JObject;
+ var windownames = windowgroup["windowNames"] as JArray;
- bool windowingroup = false;
- for (int i = 0; i < windownames.Count; i++)
- {
- string windowname = windownames[i].ToString();
- if (windowname == currentWindowName)
- {
- windowingroup = true;
- }
- }
+ thisWindowGroups = FormWindowGroupsTo(windowgroup, windownames);
+ }
- if (windowingroup)
- {
- bool isMovable = (bool)windowgroup["isMovable"];
- if (isMovable)
- {
- thisWindowGroups["dockingGroup"] = windowgroupid;
- if (windowgroup["topRightWindow"].ToString() == currentWindowName)
- {
- thisWindowGroups["topRight"] = true;
- }
- }
- else
- {
- thisWindowGroups["snappingGroup"] = windowgroupid;
- }
- }
- }
+ UpdateViewDueToWindowGroups(thisWindowGroups);
+ }));
+ }
- if (thisWindowGroups["dockingGroup"].ToString() != "")
- {
- // docked
- groupCb.Checked = true;
- }
- else if (thisWindowGroups["snappingGroup"].ToString() != "")
- {
- // Snapped
- groupCb.Enabled = true;
- }
- else
+ private void SetInitialWindowGrouping(JArray groupdWindowBelongsTo)
+ {
+ this.Invoke(new Action(() =>
+ {
+ var thisWindowGroups = new JObject();
+
+ foreach (var group in groupdWindowBelongsTo)
+ {
+ var windowNames = group["windowNames"] as JArray;
+ thisWindowGroups = FormWindowGroupsTo(group, windowNames);
+ }
+
+ UpdateViewDueToWindowGroups(thisWindowGroups);
+ }));
+ }
+
+ private JObject FormWindowGroupsTo(JToken group, JArray windowNames)
+ {
+ var thisWindowGroups = new JObject
+ {
+ ["dockingGroup"] = "",
+ ["snappingGroup"] = "",
+ ["topRight"] = false
+ };
+
+ var currentWindowName = FSBL.WindowClient.GetWindowIdentifier()["windowName"].ToString();
+
+ var windowingGroup = false;
+ for (int i = 0; i < windowNames.Count; i++)
+ {
+ var windowName = windowNames[i].ToString();
+ if (windowName == currentWindowName)
+ {
+ windowingGroup = true;
+ }
+ }
+
+ if (windowingGroup)
+ {
+ var isMovable = (bool)group["isMovable"];
+ if (isMovable)
+ {
+ thisWindowGroups["dockingGroup"] = group;
+ if (group["topRightWindow"].ToString() == currentWindowName)
{
- // unsnapped/undocked
- groupCb.Checked = false;
- groupCb.Enabled = false;
+ thisWindowGroups["topRight"] = true;
}
}
- }));
+ else
+ {
+ thisWindowGroups["snappingGroup"] = group;
+ }
+ }
+
+ return thisWindowGroups;
+ }
+
+ private void UpdateViewDueToWindowGroups(JObject thisWindowGroups)
+ {
+ if (!string.IsNullOrEmpty(thisWindowGroups?["dockingGroup"]?.ToString()))
+ {
+ // docked
+ DockingButton.Text = "@";
+ DockingButton.ButtonColor = Color.FromArgb(3, 155, 255);
+ DockingButton.OnHoverButtonColor = Color.FromArgb(3, 155, 255);
+ DockingButton.Visible = true;
+ }
+ else if (!string.IsNullOrEmpty(thisWindowGroups?["snappingGroup"]?.ToString()))
+ {
+ // Snapped
+ DockingButton.Text = ">";
+ DockingButton.ButtonColor = Color.FromArgb(34, 38, 47);
+ DockingButton.OnHoverButtonColor = Color.FromArgb(40, 45, 56);
+ DockingButton.Visible = true;
+ }
+ else
+ {
+ // unsnapped/undocked
+ DockingButton.Visible = false;
+ }
}
- private void handleGetComponentState(object s, FinsembleEventArgs state)
+ private void HandleGetComponentState(object s, FinsembleEventArgs state)
{
- this.Invoke(new Action(() => {
+ this.Invoke(new Action(() =>
+ {
if (state.response != null)
{
// Example for restoring state
@@ -226,28 +317,30 @@ private void handleGetComponentState(object s, FinsembleEventArgs state)
var symbolTxt = symbol?.ToString();
if (!string.IsNullOrEmpty(symbolTxt))
{
- datavalue.Text = symbolTxt;
- input.Text = symbolTxt;
- datasource.Text = "via component state";
+ DataLabel.Text = symbolTxt;
+ DataToSendInput.Text = symbolTxt;
+ SourceLabel.Text = "via component state";
}
}
- } else
+ }
+ else
{
// Example for Handling Spawn data
- FSBL.WindowClient.getSpawnData(handleSpawnData);
+ FSBL.WindowClient.GetSpawnData(HandleSpawnData);
}
}
else
{
// Example for Handling Spawn data
- FSBL.WindowClient.getSpawnData(handleSpawnData);
+ FSBL.WindowClient.GetSpawnData(HandleSpawnData);
}
}));
}
- private void handleSpawnData(Object sender, FinsembleEventArgs res)
+ private void HandleSpawnData(Object sender, FinsembleEventArgs res)
{
- this.Invoke(new Action(async () => {
+ this.Invoke(new Action(async () =>
+ {
var receivedData = (JObject)res.response;
if (res.error != null)
{
@@ -258,18 +351,19 @@ private void handleSpawnData(Object sender, FinsembleEventArgs res)
JToken value = receivedData.GetValue("spawndata");
if (value != null)
{
- datavalue.Text = value.ToString();
- input.Text = value.ToString();
- datasource.Text = "via Spawndata";
- await SaveStateAsync();
+ DataLabel.Text = value.ToString();
+ DataToSendInput.Text = value.ToString();
+ SourceLabel.Text = "via Spawndata";
+ await SaveStateAsync();
}
}
}));
}
- private void handlePubSub(object sender, FinsembleEventArgs state)
+ private void HandlePubSub(object sender, FinsembleEventArgs state)
{
- this.Invoke(new Action(async () => {
+ this.Invoke(new Action(async () =>
+ {
try
{
if (state.error != null)
@@ -282,10 +376,10 @@ private void handlePubSub(object sender, FinsembleEventArgs state)
var theData = ((JValue)pubSubData?["data"]?["symbol"])?.ToString();
if (theData != null)
{
- datavalue.Text = theData;
- input.Text = theData;
- datasource.Text = "via PubSub";
- await SaveStateAsync();
+ DataLabel.Text = theData;
+ DataToSendInput.Text = theData;
+ SourceLabel.Text = "via PubSub";
+ await SaveStateAsync();
}
}
}
@@ -296,9 +390,10 @@ private void handlePubSub(object sender, FinsembleEventArgs state)
}));
}
- private void handleDragAndDropReceive(object sender, FinsembleEventArgs args)
+ private void HandleDragAndDropReceive(object sender, FinsembleEventArgs args)
{
- this.Invoke(new Action(async () => {
+ this.Invoke(new Action(async () =>
+ {
if (args.error != null)
{
FSBL.Logger.Error(new JToken[] { "Error when receiving drag and drop data: ", args.error.ToString() });
@@ -312,28 +407,29 @@ private void handleDragAndDropReceive(object sender, FinsembleEventArgs args)
if (data.HasValues)
{
data = data?["symbol"];
- datavalue.Text = data.ToString();
- input.Text = data.ToString();
- datasource.Text = "via Drag and Drop";
- await SaveStateAsync();
+ DataLabel.Text = data.ToString();
+ DataToSendInput.Text = data.ToString();
+ SourceLabel.Text = "via Drag and Drop";
+ await SaveStateAsync();
}
}
}
}));
}
- private JObject handleDragAndDropEmit()
+ private JObject HandleDragAndDropEmit()
{
return new JObject
{
- ["symbol"] = datavalue.Text,
- ["description"] = "Symbol " + datavalue.Text
+ ["symbol"] = DataToSendInput.Text,
+ ["description"] = "Symbol " + DataToSendInput.Text
};
}
- private void handleLinkerData(object sender, FinsembleEventArgs response)
+ private void HandleLinkerData(object sender, FinsembleEventArgs response)
{
- this.Invoke(new Action(async () => {
+ this.Invoke(new Action(async () =>
+ {
if (response.error != null)
{
FSBL.Logger.Error(new JToken[] { "Error when receiving linker data: ", response.error.ToString() });
@@ -341,17 +437,18 @@ private void handleLinkerData(object sender, FinsembleEventArgs response)
else if (response.response != null)
{
string value = response.response?["data"]?.ToString();
- datavalue.Text = value;
- datasource.Text = "via Linker";
- input.Text = value;
- await SaveStateAsync();
+ DataLabel.Text = value;
+ SourceLabel.Text = "via Linker";
+ DataToSendInput.Text = value;
+ await SaveStateAsync();
}
}));
}
- private void handleComponentsList(Object sender, FinsembleEventArgs response)
+ private void HandleComponentsList(Object sender, FinsembleEventArgs response)
{
- this.Invoke(new Action(() => {
+ this.Invoke(new Action(() =>
+ {
if (response.error != null)
{
FSBL.Logger.Error(new JToken[] { "Error when receiving spawnable component list: ", response.error.ToString() });
@@ -364,7 +461,13 @@ private void handleComponentsList(Object sender, FinsembleEventArgs response)
object value = components?[property.Name]?["foreign"]?["components"]?["App Launcher"]?["launchableByUser"];
if ((value != null) && bool.Parse(value.ToString()))
{
- componentList.Items.Add(property.Name);
+ // componentList.Items.Add(property.Name);
+ // (Controls.Find("SpawnSelect", true).FirstOrDefault() as RoundedSelect).AddElementToList(property.Name);
+
+ Dispatcher.CurrentDispatcher.Invoke(() =>
+ {
+ ComponentSelect.AddElementToList(property.Name);
+ });
}
}
}
@@ -375,10 +478,11 @@ private void handleKeyPresses(object sender, System.Windows.Forms.KeyPressEventA
{
if (e.KeyChar == (char)Keys.Return)
{
- this.Invoke(new Action(async () => {
- datavalue.Text = input.Text;
- datasource.Text = "via Text input";
- await SaveStateAsync();
+ this.Invoke(new Action(async () =>
+ {
+ DataLabel.Text = DataToSendInput.Text;
+ SourceLabel.Text = "via Text input";
+ await SaveStateAsync();
}));
e.Handled = true;
}
@@ -390,63 +494,98 @@ private async Task SaveStateAsync()
await FSBL.WindowClient.SetComponentState(new JObject
{
["field"] = "symbol",
- ["value"] = datavalue.Text
+ //["value"] = datavalue.Text
});
}
- // Example for publishing to RouterClient
- private void pubsub_Click(object sender, EventArgs e)
+ private void LaunchButton_Click(object sender, EventArgs e)
{
- FSBL.RouterClient.Publish("Finsemble.TestWPFPubSubSymbol", new JObject
- {
- ["symbol"] = input.Text
- });
- }
+ object selected = ComponentSelect.Text;
+ if (selected == null) return;
- // Example for starting a drag
- private void datavalue_MouseDown(object sender, MouseEventArgs e)
- {
- FSBL.DragAndDropClient.DragStartWithData(sender);
+ var componentName = selected.ToString();
+ FSBL.LauncherClient.Spawn(componentName, new JObject { ["addToWorkspace"] = true }, (s, a) => { });
}
- private void linker_Click(object sender, EventArgs e)
+ private void LinkerButton_Click(object sender, EventArgs e)
{
- FSBL.LinkerClient.ShowLinkerWindow(linker.Location.X, linker.Location.Y + linker.Height);
+ FSBL.LinkerClient.OpenLinkerWindow();
}
- // Example for Publishing to LinkerClient
- private void pubLinker_Click(object sender, EventArgs e)
+ private async void AlwaysOnTopButton_Click(object sender, EventArgs e)
{
- FSBL.LinkerClient.Publish(new JObject
+ var newAlwaysOnTop = !(await FSBL.WindowClient.IsAlwaysOnTop())["data"].ToObject();
+ FSBL.WindowClient.SetAlwaysOnTop(newAlwaysOnTop);
+
+ if (newAlwaysOnTop)
{
- ["dataType"] = "symbol",
- ["data"] = input.Text
- });
+ AlwaysOnTopButton.ButtonColor = Color.FromArgb(3, 155, 255);
+ AlwaysOnTopButton.OnHoverButtonColor = Color.FromArgb(3, 155, 255);
+ }
+ else
+ {
+ AlwaysOnTopButton.ButtonColor = Color.FromArgb(34, 38, 47);
+ AlwaysOnTopButton.OnHoverButtonColor = Color.FromArgb(40, 45, 56);
+ }
}
- private void spawnBtn_Click(object sender, EventArgs e)
+ private void DockingButton_Click(object sender, EventArgs e)
{
- object selected = componentList.SelectedItem;
- if (selected != null)
+ var currentWindowName = FSBL.WindowClient.GetWindowIdentifier()["windowName"].ToString();
+ if (DockingButton.Text == ">")
{
- string componentName = selected.ToString();
- FSBL.LauncherClient.Spawn(componentName, new JObject { ["addToWorkspace"] = true }, (s, a) => { });
+ FSBL.RouterClient.Transmit("DockingService.formGroup", new JObject { ["windowName"] = currentWindowName });
+
+
+ }
+ else
+ {
+ FSBL.RouterClient.Query("DockingService.leaveGroup", new JObject { ["name"] = currentWindowName }, delegate (object s, FinsembleEventArgs res) { });
}
}
- private void groupCb_CheckedChanged(object sender, EventArgs e)
+ private void SendButton_Click(object sender, EventArgs e)
{
- String currentWindowName = FSBL.WindowClient.windowIdentifier["windowName"].ToString();
- if (groupCb.Checked)
+ if (FSBL.FDC3Client is object)
{
- FSBL.RouterClient.Transmit("DockingService.formGroup", new JObject { ["windowName"] = currentWindowName });
+ //FDC3 Usage example
+ //Broadcast
+ FSBL.FDC3Client.fdc3.broadcast(new JObject
+ {
+ ["type"] = "fdc3.instrument",
+ ["name"] = DataToSendInput.Text,
+ ["id"] = new JObject
+ {
+ ["ticker"] = DataToSendInput.Text
+ }
+ });
}
else
{
- FSBL.RouterClient.Query("DockingService.leaveGroup", new JObject { ["name"] = currentWindowName }, delegate (object s, FinsembleEventArgs res) {
- groupCb.Enabled = false;
+ // Use Default Linker
+ FSBL.LinkerClient.Publish(new JObject
+ {
+ ["dataType"] = "symbol",
+ ["data"] = DataToSendInput.Text
});
}
+
+ // Invoke(new Action(() => //main thread
+ // {
+ // DroppedData.Content = DataToSendInput.Text;
+ // DroppedDataSource.Content = "via Text entry";
+ // await SaveStateAsync();
+ // });
+ }
+
+ private void DragNDropEmittingButton_MouseDown(object sender, MouseEventArgs e)
+ {
+ FSBL.DragAndDropClient.DragStartWithData(sender);
+ }
+
+ private void DragNDropEmittingButton_Click(object sender, EventArgs e)
+ {
+
}
}
}
diff --git a/WinformExample/Properties/AssemblyInfo.cs b/WinformExample/Properties/AssemblyInfo.cs
index 3d8f11d..b990f9a 100644
--- a/WinformExample/Properties/AssemblyInfo.cs
+++ b/WinformExample/Properties/AssemblyInfo.cs
@@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("5.2.0.0")]
+[assembly: AssemblyVersion("5.3.0.0")]
[assembly: AssemblyFileVersion("5.0.0.0")]
diff --git a/WinformExample/Properties/Resources.Designer.cs b/WinformExample/Properties/Resources.Designer.cs
index 6f968bf..9f0c142 100644
--- a/WinformExample/Properties/Resources.Designer.cs
+++ b/WinformExample/Properties/Resources.Designer.cs
@@ -60,6 +60,26 @@ internal Resources() {
}
}
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap chevron_arrow_down {
+ get {
+ object obj = ResourceManager.GetObject("chevron-arrow-down", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap chevron_arrow_up {
+ get {
+ object obj = ResourceManager.GetObject("chevron-arrow-up", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
///
/// Looks up a localized resource of type System.Byte[].
///
@@ -79,5 +99,15 @@ internal static byte[] font_finance {
return ((byte[])(obj));
}
}
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap winformsLogo {
+ get {
+ object obj = ResourceManager.GetObject("winformsLogo", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
}
}
diff --git a/WinformExample/Properties/Resources.resx b/WinformExample/Properties/Resources.resx
index 4db3030..76e2370 100644
--- a/WinformExample/Properties/Resources.resx
+++ b/WinformExample/Properties/Resources.resx
@@ -121,7 +121,17 @@
..\Resources\finfont.ttf;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ ..\Resources\icons\chevron-arrow-up.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ ..\Resources\icons\chevron-arrow-down.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
..\Resources\font-finance.ttf;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ ..\Resources\icons\winformsLogo.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
diff --git a/WinformExample/Resources/icons/chevron-arrow-down.png b/WinformExample/Resources/icons/chevron-arrow-down.png
new file mode 100644
index 0000000..d696b7d
Binary files /dev/null and b/WinformExample/Resources/icons/chevron-arrow-down.png differ
diff --git a/WinformExample/Resources/icons/chevron-arrow-up.png b/WinformExample/Resources/icons/chevron-arrow-up.png
new file mode 100644
index 0000000..4d363dc
Binary files /dev/null and b/WinformExample/Resources/icons/chevron-arrow-up.png differ
diff --git a/WinformExample/Resources/icons/winformsLogo.jpg b/WinformExample/Resources/icons/winformsLogo.jpg
new file mode 100644
index 0000000..0b65c0d
Binary files /dev/null and b/WinformExample/Resources/icons/winformsLogo.jpg differ
diff --git a/WinformExample/WinformExample.csproj b/WinformExample/WinformExample.csproj
index 7da97c9..f0fe066 100644
--- a/WinformExample/WinformExample.csproj
+++ b/WinformExample/WinformExample.csproj
@@ -48,8 +48,8 @@
..\packages\EventHook.1.4.105\lib\net45\EventHook.dll
-
- ..\packages\Finsemble.5.2.0\lib\net452\Finsemble.dll
+
+ ..\packages\Finsemble.5.3.0\lib\net452\Finsemble.dll
..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll
@@ -63,6 +63,7 @@
..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll
+
..\packages\Nito.AsyncEx.4.0.1\lib\net45\Nito.AsyncEx.dll
@@ -86,6 +87,7 @@
+
@@ -95,12 +97,29 @@
+
..\packages\WebSocket4Net.0.15.2\lib\net45\WebSocket4Net.dll
+
+
+ UserControl
+
+
+ FinsembleInput.cs
+
+
+ Component
+
+
+ UserControl
+
+
+ RoundedSelect.cs
+
Form
@@ -110,6 +129,12 @@
+
+ FinsembleInput.cs
+
+
+ RoundedSelect.cs
+
FormExample.cs
@@ -134,7 +159,9 @@
Settings.settings
True
-
+
+ Always
+
Always
@@ -142,6 +169,17 @@
+
+
+ Always
+
+
+ Always
+
+
+ Always
+
+
diff --git a/WinformExample/app.manifest b/WinformExample/app.manifest
index 48bfddf..46b405b 100644
--- a/WinformExample/app.manifest
+++ b/WinformExample/app.manifest
@@ -1,6 +1,6 @@
-
+
diff --git a/WinformExample/packages.config b/WinformExample/packages.config
index 09cac20..c0436f9 100644
--- a/WinformExample/packages.config
+++ b/WinformExample/packages.config
@@ -3,7 +3,7 @@
-
+
diff --git a/WinformMultiWindowExample/Properties/AssemblyInfo.cs b/WinformMultiWindowExample/Properties/AssemblyInfo.cs
index 04cbf1a..d2bfdc2 100644
--- a/WinformMultiWindowExample/Properties/AssemblyInfo.cs
+++ b/WinformMultiWindowExample/Properties/AssemblyInfo.cs
@@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("5.2.0.0")]
-[assembly: AssemblyFileVersion("5.2.0.0")]
+[assembly: AssemblyVersion("5.3.0.0")]
+[assembly: AssemblyFileVersion("5.3.0.0")]
diff --git a/WinformMultiWindowExample/WinformMultiWindowExample.csproj b/WinformMultiWindowExample/WinformMultiWindowExample.csproj
index 9c88a6c..d99fa2b 100644
--- a/WinformMultiWindowExample/WinformMultiWindowExample.csproj
+++ b/WinformMultiWindowExample/WinformMultiWindowExample.csproj
@@ -48,8 +48,8 @@
..\packages\EventHook.1.4.105\lib\net45\EventHook.dll
-
- ..\packages\Finsemble.5.2.0\lib\net452\Finsemble.dll
+
+ ..\packages\Finsemble.5.3.0\lib\net452\Finsemble.dll
..\packages\log4net.2.0.8\lib\net45-full\log4net.dll
diff --git a/WinformMultiWindowExample/app.manifest b/WinformMultiWindowExample/app.manifest
index ff38f9b..b087522 100644
--- a/WinformMultiWindowExample/app.manifest
+++ b/WinformMultiWindowExample/app.manifest
@@ -1,6 +1,6 @@
-
+
diff --git a/WinformMultiWindowExample/packages.config b/WinformMultiWindowExample/packages.config
index 3baf63b..a2d66ee 100644
--- a/WinformMultiWindowExample/packages.config
+++ b/WinformMultiWindowExample/packages.config
@@ -3,7 +3,7 @@
-
+
diff --git a/winformExample.json b/winformExample.json
index 38e9d3c..c1bae81 100644
--- a/winformExample.json
+++ b/winformExample.json
@@ -10,8 +10,8 @@
"arguments": "",
"top": 100,
"left": 100,
- "height": 400,
- "width": 400,
+ "height": 500,
+ "width": 600,
"minHeight": 300,
"minWidth": 300,
"autoShow": true,