third commit

This commit is contained in:
Wesley Hofman
2025-09-18 14:36:50 +02:00
parent 633885bab9
commit 1232ca80c6
156 changed files with 724100 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
</configSections>
<connectionStrings/>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/>
</startup>
</configuration>

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

View File

@@ -0,0 +1,35 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Maser.Feanor.Client
{
public enum ChamberStatus
{
Init,
Running,
Initializing,
AbortRequested,
Aborted,
Idle,
NoConn
}
public static class ChamberStatusExtensions
{
public static string ToText(this ChamberStatus status)
{
string result = status.ToString();
switch (status)
{
case ChamberStatus.AbortRequested:
return "Abort requested";
case ChamberStatus.NoConn:
return "No connection";
}
return result;
}
}
}

View File

@@ -0,0 +1,354 @@
namespace Maser.Feanor.Client
{
partial class FeanorClient
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FeanorClient));
this.lblStatus = new System.Windows.Forms.Label();
this.dgvChambers = new System.Windows.Forms.DataGridView();
this.dgvChambersColMIDS = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dgvChambersColNetwork = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dgvChambersColStatus = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dgvChambersColHTTP = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.timer = new System.Windows.Forms.Timer();
this.cboxShowAll = new System.Windows.Forms.CheckBox();
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip();
this.contextMenuStrip2 = new System.Windows.Forms.ContextMenuStrip();
this.panel1 = new System.Windows.Forms.Panel();
this.panel2 = new System.Windows.Forms.Panel();
this.panel3 = new System.Windows.Forms.Panel();
this.statusPercentage = new System.Windows.Forms.RichTextBox();
this.PercProgress = new System.Windows.Forms.ProgressBar();
this.errorProvider1 = new System.Windows.Forms.ErrorProvider();
this.LastStartupTimer = new System.Windows.Forms.Timer();
this.UpdateRaspberryTime = new System.Windows.Forms.Timer();
this.pnlNodesOffline = new System.Windows.Forms.Panel();
this.label2 = new System.Windows.Forms.Label();
this.btnDismiss = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.timerSaveStatusPage = new System.Windows.Forms.Timer();
((System.ComponentModel.ISupportInitialize)(this.dgvChambers)).BeginInit();
this.panel1.SuspendLayout();
this.panel2.SuspendLayout();
this.panel3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.errorProvider1)).BeginInit();
this.pnlNodesOffline.SuspendLayout();
this.SuspendLayout();
//
// lblStatus
//
this.lblStatus.AutoSize = true;
this.lblStatus.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblStatus.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
this.lblStatus.Location = new System.Drawing.Point(3, 15);
this.lblStatus.Name = "lblStatus";
this.lblStatus.Size = new System.Drawing.Size(56, 20);
this.lblStatus.TabIndex = 0;
this.lblStatus.Text = "Status";
this.lblStatus.Click += new System.EventHandler(this.lblStatus_Click);
//
// dgvChambers
//
this.dgvChambers.AllowUserToAddRows = false;
this.dgvChambers.AllowUserToDeleteRows = false;
this.dgvChambers.AllowUserToResizeColumns = false;
this.dgvChambers.AllowUserToResizeRows = false;
this.dgvChambers.BackgroundColor = System.Drawing.Color.Gray;
this.dgvChambers.BorderStyle = System.Windows.Forms.BorderStyle.None;
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.Gray;
dataGridViewCellStyle1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
dataGridViewCellStyle1.ForeColor = System.Drawing.Color.White;
dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dgvChambers.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
this.dgvChambers.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvChambers.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.dgvChambersColMIDS,
this.dgvChambersColNetwork,
this.dgvChambersColStatus,
this.dgvChambersColHTTP});
this.dgvChambers.EnableHeadersVisualStyles = false;
this.dgvChambers.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.dgvChambers.Location = new System.Drawing.Point(12, 73);
this.dgvChambers.MultiSelect = false;
this.dgvChambers.Name = "dgvChambers";
this.dgvChambers.ReadOnly = true;
this.dgvChambers.RowHeadersVisible = false;
this.dgvChambers.RowHeadersWidth = 62;
this.dgvChambers.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.dgvChambers.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dgvChambers.Size = new System.Drawing.Size(651, 414);
this.dgvChambers.TabIndex = 1;
//
// dgvChambersColMIDS
//
this.dgvChambersColMIDS.HeaderText = "MIDS";
this.dgvChambersColMIDS.MinimumWidth = 8;
this.dgvChambersColMIDS.Name = "dgvChambersColMIDS";
this.dgvChambersColMIDS.ReadOnly = true;
this.dgvChambersColMIDS.Width = 150;
//
// dgvChambersColNetwork
//
this.dgvChambersColNetwork.HeaderText = "IP";
this.dgvChambersColNetwork.MinimumWidth = 8;
this.dgvChambersColNetwork.Name = "dgvChambersColNetwork";
this.dgvChambersColNetwork.ReadOnly = true;
this.dgvChambersColNetwork.Width = 150;
//
// dgvChambersColStatus
//
this.dgvChambersColStatus.HeaderText = "Status";
this.dgvChambersColStatus.MinimumWidth = 8;
this.dgvChambersColStatus.Name = "dgvChambersColStatus";
this.dgvChambersColStatus.ReadOnly = true;
this.dgvChambersColStatus.Width = 150;
//
// dgvChambersColHTTP
//
this.dgvChambersColHTTP.HeaderText = "Last HTTP";
this.dgvChambersColHTTP.MinimumWidth = 8;
this.dgvChambersColHTTP.Name = "dgvChambersColHTTP";
this.dgvChambersColHTTP.ReadOnly = true;
this.dgvChambersColHTTP.Width = 200;
//
// timer
//
this.timer.Interval = 1000;
this.timer.Tick += new System.EventHandler(this.timer_Tick);
//
// cboxShowAll
//
this.cboxShowAll.AutoSize = true;
this.cboxShowAll.Checked = true;
this.cboxShowAll.CheckState = System.Windows.Forms.CheckState.Checked;
this.cboxShowAll.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.cboxShowAll.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
this.cboxShowAll.Location = new System.Drawing.Point(16, 14);
this.cboxShowAll.Name = "cboxShowAll";
this.cboxShowAll.Size = new System.Drawing.Size(142, 24);
this.cboxShowAll.TabIndex = 2;
this.cboxShowAll.Text = "Show all servers";
this.cboxShowAll.UseVisualStyleBackColor = true;
this.cboxShowAll.CheckedChanged += new System.EventHandler(this.cboxShowAll_CheckedChanged);
//
// contextMenuStrip1
//
this.contextMenuStrip1.Name = "contextMenuStrip1";
this.contextMenuStrip1.Size = new System.Drawing.Size(61, 4);
//
// contextMenuStrip2
//
this.contextMenuStrip2.Name = "contextMenuStrip2";
this.contextMenuStrip2.Size = new System.Drawing.Size(61, 4);
//
// panel1
//
this.panel1.BackColor = System.Drawing.Color.Gray;
this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel1.Controls.Add(this.lblStatus);
this.panel1.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
this.panel1.Location = new System.Drawing.Point(12, 12);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(233, 55);
this.panel1.TabIndex = 3;
this.panel1.Paint += new System.Windows.Forms.PaintEventHandler(this.panel1_Paint);
//
// panel2
//
this.panel2.BackColor = System.Drawing.Color.Gray;
this.panel2.Controls.Add(this.cboxShowAll);
this.panel2.Location = new System.Drawing.Point(251, 12);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(159, 55);
this.panel2.TabIndex = 4;
//
// panel3
//
this.panel3.BackColor = System.Drawing.Color.Gray;
this.panel3.Controls.Add(this.statusPercentage);
this.panel3.Controls.Add(this.PercProgress);
this.panel3.Location = new System.Drawing.Point(416, 12);
this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(247, 55);
this.panel3.TabIndex = 5;
//
// statusPercentage
//
this.statusPercentage.BackColor = System.Drawing.Color.Gray;
this.statusPercentage.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.statusPercentage.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.statusPercentage.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
this.statusPercentage.Location = new System.Drawing.Point(177, 14);
this.statusPercentage.Name = "statusPercentage";
this.statusPercentage.Size = new System.Drawing.Size(55, 36);
this.statusPercentage.TabIndex = 0;
this.statusPercentage.Text = "";
//
// PercProgress
//
this.PercProgress.Location = new System.Drawing.Point(12, 16);
this.PercProgress.Name = "PercProgress";
this.PercProgress.Size = new System.Drawing.Size(159, 23);
this.PercProgress.TabIndex = 0;
this.PercProgress.Click += new System.EventHandler(this.PercProgress_Click);
//
// errorProvider1
//
this.errorProvider1.ContainerControl = this;
//
// LastStartupTimer
//
this.LastStartupTimer.Enabled = true;
this.LastStartupTimer.Interval = 600000;
this.LastStartupTimer.Tick += new System.EventHandler(this.LastStartupTimer_Tick);
//
// UpdateRaspberryTime
//
this.UpdateRaspberryTime.Enabled = true;
this.UpdateRaspberryTime.Interval = 60000;
this.UpdateRaspberryTime.Tick += new System.EventHandler(this.UpdateRaspberryTime_Tick);
//
// pnlNodesOffline
//
this.pnlNodesOffline.BackColor = System.Drawing.Color.Silver;
this.pnlNodesOffline.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.pnlNodesOffline.Controls.Add(this.label2);
this.pnlNodesOffline.Controls.Add(this.btnDismiss);
this.pnlNodesOffline.Controls.Add(this.label1);
this.pnlNodesOffline.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
this.pnlNodesOffline.Location = new System.Drawing.Point(104, 164);
this.pnlNodesOffline.Name = "pnlNodesOffline";
this.pnlNodesOffline.Size = new System.Drawing.Size(468, 212);
this.pnlNodesOffline.TabIndex = 4;
this.pnlNodesOffline.Visible = false;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label2.ForeColor = System.Drawing.SystemColors.Highlight;
this.label2.Location = new System.Drawing.Point(4, 120);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(0, 33);
this.label2.TabIndex = 3;
//
// btnDismiss
//
this.btnDismiss.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnDismiss.ForeColor = System.Drawing.SystemColors.Highlight;
this.btnDismiss.Location = new System.Drawing.Point(167, 101);
this.btnDismiss.Name = "btnDismiss";
this.btnDismiss.Size = new System.Drawing.Size(138, 81);
this.btnDismiss.TabIndex = 2;
this.btnDismiss.Text = "Dismiss";
this.btnDismiss.UseVisualStyleBackColor = true;
this.btnDismiss.Click += new System.EventHandler(this.btnDismiss_Click);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.ForeColor = System.Drawing.SystemColors.Highlight;
this.label1.Location = new System.Drawing.Point(14, 30);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(440, 33);
this.label1.TabIndex = 1;
this.label1.Text = "Two or more nodes are offline!";
this.label1.Click += new System.EventHandler(this.label1_Click);
//
// timerSaveStatusPage
//
this.timerSaveStatusPage.Enabled = true;
this.timerSaveStatusPage.Interval = 60000;
this.timerSaveStatusPage.Tick += new System.EventHandler(this.timerSaveStatusPage_Tick);
//
// FeanorClient
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.DimGray;
this.ClientSize = new System.Drawing.Size(674, 494);
this.Controls.Add(this.pnlNodesOffline);
this.Controls.Add(this.panel3);
this.Controls.Add(this.panel2);
this.Controls.Add(this.panel1);
this.Controls.Add(this.dgvChambers);
this.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
this.HelpButton = true;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "FeanorClient";
this.Text = "Feanor - Clients";
this.TransparencyKey = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(61)))), ((int)(((byte)(76)))));
this.WindowState = System.Windows.Forms.FormWindowState.Minimized;
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FeanorClient_FormClosing);
this.Load += new System.EventHandler(this.FeanorClient_Load);
((System.ComponentModel.ISupportInitialize)(this.dgvChambers)).EndInit();
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.panel2.ResumeLayout(false);
this.panel2.PerformLayout();
this.panel3.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.errorProvider1)).EndInit();
this.pnlNodesOffline.ResumeLayout(false);
this.pnlNodesOffline.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Label lblStatus;
private System.Windows.Forms.DataGridView dgvChambers;
private System.Windows.Forms.Timer timer;
private System.Windows.Forms.CheckBox cboxShowAll;
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
private System.Windows.Forms.ContextMenuStrip contextMenuStrip2;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Panel panel3;
private System.Windows.Forms.ProgressBar PercProgress;
private System.Windows.Forms.RichTextBox statusPercentage;
private System.Windows.Forms.ErrorProvider errorProvider1;
public System.Windows.Forms.Timer LastStartupTimer;
private System.Windows.Forms.Timer UpdateRaspberryTime;
private System.Windows.Forms.DataGridViewTextBoxColumn dgvChambersColMIDS;
private System.Windows.Forms.DataGridViewTextBoxColumn dgvChambersColNetwork;
private System.Windows.Forms.DataGridViewTextBoxColumn dgvChambersColStatus;
private System.Windows.Forms.DataGridViewTextBoxColumn dgvChambersColHTTP;
private System.Windows.Forms.Panel pnlNodesOffline;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button btnDismiss;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Timer timerSaveStatusPage;
}
}

View File

@@ -0,0 +1,313 @@
using Maser.Feanor.Biz;
using Maser.Feanor.Model;
using System;
using System.Collections.Generic;
using System.Net;
using System.Windows.Forms;
using System.IO;
using System.Text;
namespace Maser.Feanor.Client
{
public partial class FeanorClient : Form
{
private List<ClientWorker> _ClientWorkers = new List<ClientWorker>();
#warning Form laten zien in het midden van het scherm always on top als er iets fout gaat!
public FeanorClient()
{
InitializeComponent();
System.Reflection.Assembly ass = System.Reflection.Assembly.GetEntryAssembly(); // report build version
string exe = System.IO.Path.GetFullPath(ass.Location);
DateTime dt = new System.IO.FileInfo(exe).LastWriteTimeUtc;
this.Text = String.Format("Feanor - Clients" + " v{0:0000}{1:00}{2:00}", dt.Year, dt.Month, dt.Day);
}
private Server.Server _Server;
public Server.Server Server { get { return _Server; } }
public DateTime LastHTTP { get { return _LastHTTP; } }
private DateTime _LastHTTP;
private DateTime _LastDBWrite; // Used for detecting idling of server
public ChamberStatus Status { get { return _status; } }
private ChamberStatus _status;
private Chamber _Chamber;
public Chamber Chamber { get { return _Chamber; } }
private void FeanorClient_Load(object sender, EventArgs e)
{
StartWorkers();
}
private void StartWorkers()
{
Console.WriteLine("Checking if DB is online...");
lblStatus.Text = "Connecting to database...";
if (!SQLMethods.DatabaseOnline(60))
{
lblStatus.Text = "Could not connect to database...";
Console.WriteLine("Database OFFLINE");
return;
}
else
{
Console.WriteLine("Database online");
}
// Construct ClientWorkers from all active Chambers
_ClientWorkers = new List<ClientWorker>();
foreach (Chamber c in new Chambers().GetAllActive())
_ClientWorkers.Add(new ClientWorker(c));
// Initiate gv
Initialize_dgvChambers(_ClientWorkers.Count);
// Start workers
foreach (ClientWorker cw in _ClientWorkers)
cw.Start();
timer.Start();
LastStartupTimer.Start();
}
private void Initialize_dgvChambers(int rows)
{
// Initiate in dgv
// dgvChambers.DefaultCellStyle.SelectionBackColor = dgvChambers.DefaultCellStyle.BackColor;
// dgvChambers.DefaultCellStyle.SelectionForeColor = dgvChambers.DefaultCellStyle.ForeColor;
foreach (DataGridViewColumn column in dgvChambers.Columns)
{
column.SortMode = DataGridViewColumnSortMode.NotSortable;
column.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
column.HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter;
}
while (dgvChambers.Rows.Count > 0)
dgvChambers.Rows.RemoveAt(0);
dgvChambers.Rows.Add(rows);
foreach (DataGridViewRow row in dgvChambers.Rows)
{
//
}
//LastStartupTimer_Tick(null, null); // Obtain last startup of RPI
//CheckDBstatus(); // Check if SQL DB is online
UpdateRaspberryTime_Tick(null, null); // Set internal time of RPI
}
private void timer_Tick(object sender, EventArgs e)
{
lblStatus.Text = Time.Local.ToString() + " (UTC+1)"; // was lblStatus.Text = Time.UTC.ToString() +" (UTC)";
// Show ClientWorker that aren't running properly if cboxShowAll not checked
List<ClientWorker> workers;
workers = cboxShowAll.Checked ? _ClientWorkers : _ClientWorkers.FindAll(delegate (ClientWorker w) { return (w.Status != ChamberStatus.Running); });
if (workers.Count == 0)
{
dgvChambers.Visible = false;
return;
}
dgvChambers.Visible = true;
if (dgvChambers.Rows.Count != workers.Count)
{
while (dgvChambers.Rows.Count > 0)
dgvChambers.Rows.RemoveAt(0);
dgvChambers.Rows.Add(workers.Count);
}
int ConnTotal = workers.Count; // total amount of chambers
int ConnCounter = 0; // amount of chambers which are 'running'
int OfflineCounter = 0;
for (int i = 0; i < workers.Count; i++)
{
ClientWorker cw = workers[i];
dgvChambers[0, i].Value = String.Format("{0:00000}", cw.Chamber.MIDS); // MIDS ID of node
dgvChambers[1, i].Value = cw.Chamber.Network; // IP of node
dgvChambers[2, i].Value = cw.Status.ToText(); // Communication status with node
if (cw.Status.ToText() == "Running") ConnCounter++;
// Console.WriteLine(cw.Status.ToText().ToString());
if (cw.Status.ToText() == "No connection") OfflineCounter++;
if (cw.LastHTTP < new DateTime(2000, 1, 1))
dgvChambers[3, i].Value = "-";
else
dgvChambers[3, i].Value = cw.LastHTTP.ToString();
}
try
{
if (OfflineCounter > 1 ) // show panel stating that more than 2 nodes are offline!
{
pnlNodesOffline.Visible = true;
}
if (OfflineCounter <= 1) // show panel stating that more than 2 nodes are offline!
{
pnlNodesOffline.Visible = false;
}
}
catch { }
double ConnPercentageDouble = ((double)ConnCounter / (double)ConnTotal) * 100.0; // percentage 'running' nodes (double)
int ConnPercentageInt = (int)ConnPercentageDouble; // percentage 'running' nodes (int)
PercProgress.Maximum = 100;
PercProgress.Step = 1;
PercProgress.Value = ConnPercentageInt;
statusPercentage.Text = ConnPercentageInt.ToString() + "%";
}
private void FeanorClient_FormClosing(object sender, FormClosingEventArgs e)
{
// Stop workers
foreach (ClientWorker cw in _ClientWorkers)
cw.Stop();
}
private void cboxShowAll_CheckedChanged(object sender, EventArgs e)
{
timer_Tick(null, null);
}
private void LastStartupTimer_Tick(object sender, EventArgs e)
{
List<ClientWorker> workers;
workers = cboxShowAll.Checked ? _ClientWorkers : _ClientWorkers.FindAll(delegate (ClientWorker w) { return (w.Status != ChamberStatus.Running); });
for (int i = 0; i < workers.Count; i++)
{
ClientWorker cw = workers[i];
string url;
string data;
url = "http://" + cw.Chamber.Network + ":8080/" + "startuptime";
DateTime lastStartup;
try
{
using (WebClient client = new WebClient())
{
data = client.DownloadString(url);
lastStartup = Time.UnixToDatetime(int.Parse(data));
//Console.WriteLine(lastStartup.ToLocalTime());
dgvChambers[4, i].Value = lastStartup.ToLocalTime().ToString();
}
}
catch
{
// Continue with next object, ignoring exception
}
}
}
private void UpdateRaspberryTime_Tick(object sender, EventArgs e)
{
List<ClientWorker> workers;
workers = cboxShowAll.Checked ? _ClientWorkers : _ClientWorkers.FindAll(delegate (ClientWorker w) { return (w.Status != ChamberStatus.Running); });
for (int i = 0; i < workers.Count; i++) // for all chambers
{
ClientWorker cw = workers[i];
// Construct unix timestamp string
string http = "<time>,";
Int32 unixTimestamp = (Int32)(DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1))).TotalSeconds;
http += unixTimestamp.ToString();
http += ",</time>";
// Send unix timestamp string to RPI
try
{
using (WebClient client = new WebClient())
{
string URL = "http://" + cw.Chamber.Network + ":8080/";
string url = client.UploadString(URL, http);
}
}
catch
{
}
}
}
private void lblStatus_Click(object sender, EventArgs e)
{
}
private void PercProgress_Click(object sender, EventArgs e)
{
}
private void panel1_Paint(object sender, PaintEventArgs e)
{
}
private void label1_Click(object sender, EventArgs e)
{
}
private void btnDismiss_Click(object sender, EventArgs e)
{
pnlNodesOffline.Visible = false;
}
private void timerSaveStatusPage_Tick(object sender, EventArgs e)
{
List<ClientWorker> workers;
workers = cboxShowAll.Checked ? _ClientWorkers : _ClientWorkers.FindAll(delegate (ClientWorker w) { return (w.Status != ChamberStatus.Running); });
for (int i = 0; i < workers.Count; i++)
{
ClientWorker cw = workers[i];
string url;
string data;
url = "http://" + cw.Chamber.Network + ":8080/" + "status";
try
{
using (WebClient client = new WebClient())
{
data = client.DownloadString(url);
string fileName = $"Node_{cw.Chamber.MIDS}_status.html";
string outputDirectory = "\\\\silicium\\projects\\2020\\P201339\\sub1\\4. Software\\8. Nodestatus";
Directory.CreateDirectory(outputDirectory);
string filePath = Path.Combine(outputDirectory, fileName);
File.WriteAllText(filePath, data);
}
}
catch
{
// Continue with next object, ignoring exception
}
}
}
}
}

View File

@@ -0,0 +1,223 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="dgvChambersColMIDS.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dgvChambersColNetwork.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dgvChambersColStatus.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="timer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>97, 17</value>
</metadata>
<metadata name="contextMenuStrip2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>252, 17</value>
</metadata>
<metadata name="errorProvider1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>407, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAMDUAAAEACADADwAAFgAAACgAAAAwAAAAagAAAAEACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAQAAAAMAAAAAAAEABAAAAAAAAgALAAAAAAADAA4AAAAEAQAAAAAJAAECBQAAAgcAAAEMAAAB
DQAdAwAAAAMKAAAAFwAAAhEAAAYGABEFBQAnBQEAAAEcAB4JAAAACwoAAAYcACAMAAAqDAAAOg8AAAMM
GgAaDw8AMhUAAAoTHgAKFxcAOBwAABkZGQAGFykABBcqAD0hBAAVHScABRwyAEQpCwBLKw8AOSsgADgx
JQAWLUYANzcgADk1KwBaOxsAZz0TAEI2NgArNkEARDsuACo4SQBRPiwAMDw8ADU5RgA/P0QAXEM0ACc9
YQAoQGMAb04uAGFNOgBSTEIAbVI7ACxKbgBWVEsAWVtoAEtccAB4ZkwAVV5zAD1fdwBgZmYATWR1AEhi
fQBsZ2QAX2dqAFNmeQBsbGYAi3BVAE1ohABtb28Ak3hKAFpvjAB2dnEAeHh4AIB6cQB5enoAenp6AF93
lwB4go0AZoKTAHSFkwCSiYQAX4mVAGKJlwCmknAAeI6YAHOMoAB0jaEAZ4yqAGWOqgCDk6wAm5iWAKmZ
lQCIlrEAuqKKAJqeogCMna0AqqOUAIOgrwCQo6MAvqaSAK2kngCHobwAnKanALWpmwCSqb0AuK+hAJCn
xgCnrbAAy7WXAM+zngCTq8kAuratAL+5sgDAurIAoLfPAJ+7yAC/vr4Aur/AALC/xQDTxK8AtsDFAMHB
wQDBwcIArb7SALO/zgDcyKwAw8PDAMTFxQDFxcUAxsbFAMfHxwDYy7YA2My4AMjIygDbzbYArMrXAL7K
1wDb0bwAu8vfAMLO1ADf0sAA3dLBALLO2gC6zdwA4NW6ALjP3QDe08cAxdDaANnV0ADf18gAztPhAOXb
yADQ2N0A6drRANLZ4QDm3NMA1treAOnd0QDi3NgAytroAODc3ADZ3d0A7N/aANDd7wDv4doA093wAPLj
1wDk490A9OTbANjk6wDq5+MA9erZAOno5QD06twA4+ntAPTr6wDp6/IA7OzuAPPx7QDq7/YA+vPlAOvw
9wD69esA+vXwAPX19QD39vIA9/bzAPP1+ADs9foA8PX6APb29gD39/cA8fb8APf4+ADs+PsA+Pj4APb3
/AD6+fUA8Pj9APz78wD2+fwA7fn/APH5/gD6+vkA7fr/AP77+AD2+v8A+vv8APz8+wD6/PwA/Pz8AP38
/AD6/P0A+/z9APj8/gD5/P4A+vz+APr9/QD+/f0A/P3+AP/++wD//vwA//79APb//wD3//8A///9APr/
/wD///4A/P//AP3//wD+//8A////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0
9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0
9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0
9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0
9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0
9PT09PT09PT09PT09PT09N/OzMvLy8zQ3fT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0
9L2Ya1c3IQAAACMyVmd9rdL09PT09PT09PT09PT09PT09PT09PT09PT09PT09OGjYTgHAAAAAAAAAAAA
AAAAHkJttOD09PT09PT09PT09PT09PT09PT09PT09PT0tlwNAAAAAAAAAAAAAAAAAAAAAAAAF5n09PT0
9PT09PT09PT09PT09PT09PT09OWJNQAAAAAAAAAAAAAAAAAAAAAAAAAACZD09PT09PT09PT09PT09PT0
9PT09PT023URAAAAAAAAAAAAAAAAAAAAAAAAAAAACZD09PT09PT09PT09PT09PT09PT09PTjch0AAAAA
AAAAAAAUP05UWFVRSDkTAAAACZD09PT09PT09PT09PT09PT09PT09PGACgAAAAAAAAAANnGrv+709PT0
5r6ueEYLCZD09PT09PT09PT09PT09PT09PT09KwtAAAAAAAAADR2xvT09PT09PT09PT09OKlWpH09PT0
9PT09PT09PT09PT09PT011AAAAAAAAAAPajw9PT09PT09PT09PT09PT03sf09PT09PT09PT09PT09PT0
9PT0iBAAAAAAAABFuvT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PTKSgAAAAAAACqz
9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSeFgAAAAAAGoTw9PT09PT09PT09PT0
9PT09PT09PT09PT09PT09PT09PT09PT09PRkAAAAAAAAT9T09PT09PT09PT09PT09PT09PT09PT09PT0
9PT09PT09PT09PT09Nk8AAAAAAAEk/T09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0
9LIlAAAAAAAxw/T09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09JsSAAAAAABg6fT0
9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09HsDAAAAAAF69PT09PT09PT09PT09PT0
9PT09PT09PT09PT09PT09PT09PT09PT082YAAAAAAA+d9PT09PT09PT09PT09PT09PT09PT09PT09PT0
9PT09PT09PT09PT072IAAAAAAB+q9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0
7F4AAAAAACax9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT07V8AAAAAACm19PT0
9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT072MAAAAAACKv9PT09PT09PT09PT09PT0
9PT09PT09PT09PT09PT09PT09PT09PT09GkAAAAAABuk9PT09PT09PT09PT09PT09PT09PT09PT09PT0
9PT09PT09PT09PT09HcAAAAAAAiK9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0
9JQOAAAAAABw8PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09LAkAAAAAABS2vT0
9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09NY7AAAAAAAcuPT09PT09PT09PT09PT0
9PT09PT09PT09PT09PT09PT09PT09PT09PRlAAAAAAAAefT09PT09PT09PT09PT09PT09PT09PT09PT0
9PT09PT09PT09PT09PSXGQAAAAAAQMH09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0
9PTJRwAAAAAABmrr9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0fwwAAAAAABWW
9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0z0EAAAAAAAA6pvT09PT09PT09PT0
9PT09PT09PT09PT09PT09PT09PT09PT09PT09JwoAAAAAAAAMJ/q9PT09PT09PT09PT09PT09PT09PT0
9PT09PT09PT09PT09PT09ORuBwAAAAAAACt0xPT09PT09PT09PT09PTVlaL09PT09PT09PT09PT09PT0
9PT09PTTWQAAAAAAAAAAPny38PT09PT09PTyu4NNApD09PT09PT09PT09PT09PT09PT09PT0wFMAAAAA
AAAAAAEsS2iBho6Hgm9MMwAACZD09PT09PT09PT09PT09PT09PT09PT09MJbBQAAAAAAAAAAAAAAAAAA
AAAAAAAACZD09PT09PT09PT09PT09PT09PT09PT09PTNbCcAAAAAAAAAAAAAAAAAAAAAAAAACZD09PT0
9PT09PT09PT09PT09PT09PT09PT06KBEAAAAAAAAAAAAAAAAAAAAAAAACZD09PT09PT09PT09PT09PT0
9PT09PT09PT09PTIhUMgAAAAAAAAAAAAAAAAAAAAL5r09PT09PT09PT09PT09PT09PT09PT09PT09PT0
9NGnc0kYAAAAAAAAAAAALl1+ufT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09NzFqZKMi4uN
j6G82Of09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0
9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0
9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0
9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
</value>
</data>
<metadata name="LastStartupTimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>537, 17</value>
</metadata>
<metadata name="UpdateRaspberryTime.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>681, 17</value>
</metadata>
<metadata name="timerSaveStatusPage.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>851, 17</value>
</metadata>
</root>

View File

@@ -0,0 +1,168 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Threading;
using Maser.Feanor.Model;
using Maser.Feanor.Biz;
using Maser.Feanor.Server;
using System.Net;
namespace Maser.Feanor.Client
{
public class ClientWorker
{
public ClientWorker(Chamber Chamber)
{
_Chamber = Chamber;
ThreadPool.SetMaxThreads(1000, 1000);
_thread = null;
_status = ChamberStatus.Init;
try
{
_Server = Servers.GetInstanceByChamber(_Chamber);
}
catch (Exception ex)
{
string s = "class ClientWorker->Servers.GetInstanceByChamber() (chamber: " + _Chamber.ToString() + ")\n Exception: " + ex.Message;
throw new Exception(s);
}
}
private Thread _thread;
public ChamberStatus Status { get { return _status; } }
private ChamberStatus _status;
private Boolean _isKicking;
public DateTime LastKick { get { return _lastKick; } }
private DateTime _lastKick;
public DateTime LastHTTP { get { return _LastHTTP; } }
private DateTime _LastHTTP;
private DateTime _LastDBWrite; // Used for detecting idling of server
Int32 _KickIntervalms = 60000; // Normal interval for contenttoclient request --> 1 minute
Int32 interval = 5000; // Interval for first contenttoclient request --> 5 seconds
private Server.Server _Server;
public Server.Server Server { get { return _Server; } }
private Chamber _Chamber;
public Chamber Chamber { get { return _Chamber; } }
public bool IsRunning
{
get
{
return (_thread != null) && _thread.IsAlive && _isKicking;
}
}
public bool Start()
{
if (!IsRunning)
{
_status = ChamberStatus.Initializing;
_thread = new Thread(new ThreadStart(ThreadFunction));
_thread.Start();
return true;
}
return false;
}
public bool Stop()
{
DateTime OnStop = DateTime.Now;
_status = ChamberStatus.AbortRequested;
// De-set _isStarted and wait max 10 seconds for result.
while ((_isKicking) && (OnStop.AddSeconds(10) > DateTime.Now))
Thread.Sleep(100);
if (_isKicking)
{
_thread.Abort();
_isKicking = false;
return _thread.Join(2000);
}
return !_isKicking;
}
private void ThreadFunction()
{
// Send the time of the Feanor client to the server on startup
try
{
if (!_Server.WriteDatetime(Time.UTC) || !_Server.WriteSensors())
_status = ChamberStatus.NoConn;
}
catch { _status = ChamberStatus.NoConn; }
Results resultBiz = new Results();
_lastKick = DateTime.Now;
while (_status != ChamberStatus.AbortRequested && ((Thread.CurrentThread.ThreadState & System.Threading.ThreadState.AbortRequested) == 0))
{
// Try to read from server every _lastKick milliseconds
if (DateTime.Now > _lastKick.AddMilliseconds(interval)) // was: _KickIntervalms is het /contenttoclient interval! (nu 1 min!)
{
interval = _KickIntervalms;
_lastKick = DateTime.Now;
if (_Server.Read())
{
_LastHTTP = DateTime.Now;
_status = ChamberStatus.Running;
if (_Server.Results.Count > 0)
{
if(_Server.Chamber.Humidity == true)
{
resultBiz.Add(_Server.Results); // stuurt de resultaten naar de SQL DB (Results)
}
else
{
resultBiz.AddOudeHal(_Server.Results); // stuurt de resultaten naar de SQL DB (Results)
}
_LastDBWrite = DateTime.Now;
}
if (DateTime.Now > _LastDBWrite.AddSeconds(_Chamber.Interval * 2))
_status = ChamberStatus.Idle;
}
else
_status = ChamberStatus.NoConn;
}
// It might be interesting to periodically update the calibration and sensor lists in the server.
// It might be interesting to periodically update the calibration and sensor lists in the server.
// _Server.SetSensorsAndCalibrations();
_isKicking = true;
Thread.Sleep(250);
}
_isKicking = false;
_status = ChamberStatus.Aborted;
}
}
}

View File

@@ -0,0 +1,206 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{750F6283-ED36-4BA6-89C3-943E8A858E41}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Maser.Feanor.Client</RootNamespace>
<AssemblyName>FeanorClient</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<TargetFrameworkProfile />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<LangVersion>8.0</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<LangVersion>8.0</LangVersion>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>C.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup>
<NoWin32Manifest>true</NoWin32Manifest>
</PropertyGroup>
<ItemGroup>
<Reference Include="HarfBuzzSharp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
<HintPath>..\packages\HarfBuzzSharp.7.3.0.3\lib\net462\HarfBuzzSharp.dll</HintPath>
</Reference>
<Reference Include="LiveCharts, Version=0.9.7.0, Culture=neutral, PublicKeyToken=0bc1f845d1ebb8df, processorArchitecture=MSIL">
<HintPath>..\packages\LiveCharts.0.9.7\lib\net45\LiveCharts.dll</HintPath>
</Reference>
<Reference Include="LiveCharts.WinForms, Version=0.9.7.1, Culture=neutral, PublicKeyToken=0bc1f845d1ebb8df, processorArchitecture=MSIL">
<HintPath>..\packages\LiveCharts.WinForms.0.9.7.1\lib\net45\LiveCharts.WinForms.dll</HintPath>
</Reference>
<Reference Include="LiveCharts.Wpf, Version=0.9.7.0, Culture=neutral, PublicKeyToken=0bc1f845d1ebb8df, processorArchitecture=MSIL">
<HintPath>..\packages\LiveCharts.Wpf.0.9.7\lib\net45\LiveCharts.Wpf.dll</HintPath>
</Reference>
<Reference Include="Maser.Email">
<HintPath>\\silicium\software\MASER software\Source\LMS10\DLL\Maser.Email.dll</HintPath>
</Reference>
<Reference Include="OpenTK, Version=3.1.0.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL">
<HintPath>..\packages\OpenTK.3.1.0\lib\net20\OpenTK.dll</HintPath>
</Reference>
<Reference Include="OpenTK.GLControl, Version=3.1.0.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL">
<HintPath>..\packages\OpenTK.GLControl.3.1.0\lib\net20\OpenTK.GLControl.dll</HintPath>
</Reference>
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="ScottPlot, Version=5.0.53.0, Culture=neutral, PublicKeyToken=86698dc10387c39e, processorArchitecture=MSIL">
<HintPath>..\packages\ScottPlot.5.0.53\lib\net462\ScottPlot.dll</HintPath>
</Reference>
<Reference Include="ScottPlot.WinForms, Version=5.0.53.0, Culture=neutral, PublicKeyToken=86698dc10387c39e, processorArchitecture=MSIL">
<HintPath>..\packages\ScottPlot.WinForms.5.0.53\lib\net462\ScottPlot.WinForms.dll</HintPath>
</Reference>
<Reference Include="SkiaSharp, Version=2.88.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
<HintPath>..\packages\SkiaSharp.2.88.9\lib\net462\SkiaSharp.dll</HintPath>
</Reference>
<Reference Include="SkiaSharp.HarfBuzz, Version=2.88.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
<HintPath>..\packages\SkiaSharp.HarfBuzz.2.88.9\lib\net462\SkiaSharp.HarfBuzz.dll</HintPath>
</Reference>
<Reference Include="SkiaSharp.Views.Desktop.Common, Version=2.88.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
<HintPath>..\packages\SkiaSharp.Views.Desktop.Common.2.88.9\lib\net462\SkiaSharp.Views.Desktop.Common.dll</HintPath>
</Reference>
<Reference Include="SkiaSharp.Views.WindowsForms, Version=2.88.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
<HintPath>..\packages\SkiaSharp.Views.WindowsForms.2.88.9\lib\net462\SkiaSharp.Views.WindowsForms.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
</Reference>
<Reference Include="System.Core" />
<Reference Include="System.Drawing.Common, Version=4.0.0.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Drawing.Common.4.7.3\lib\net461\System.Drawing.Common.dll</HintPath>
</Reference>
<Reference Include="System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll</HintPath>
</Reference>
<Reference Include="System.Numerics" />
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.5.3\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll</HintPath>
</Reference>
<Reference Include="System.Xaml" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="WindowsBase" />
<Reference Include="WindowsFormsIntegration" />
</ItemGroup>
<ItemGroup>
<Compile Include="ChamberStatus.cs" />
<Compile Include="Client.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Client.Designer.cs">
<DependentUpon>Client.cs</DependentUpon>
</Compile>
<Compile Include="ClientWorker.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Client.resx">
<DependentUpon>Client.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="OpenTK.dll.config" />
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<Content Include="C.ico" />
<Content Include="Carc.ico" />
<Content Include="M.ico" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Maser.Feanor.Biz\Maser.Feanor.Biz.csproj">
<Project>{316710e0-2143-44cd-8779-a833a2987174}</Project>
<Name>Maser.Feanor.Biz</Name>
</ProjectReference>
<ProjectReference Include="..\Maser.Feanor\Maser.Feanor.Model.csproj">
<Project>{f96ec5eb-647c-405e-934f-08df688f55f8}</Project>
<Name>Maser.Feanor.Model</Name>
</ProjectReference>
<ProjectReference Include="..\Server\Server.csproj">
<Project>{ce8fb8af-6b3a-42d2-9808-e94790707e91}</Project>
<Name>Server</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\HarfBuzzSharp.NativeAssets.macOS.7.3.0.3\build\net462\HarfBuzzSharp.NativeAssets.macOS.targets" Condition="Exists('..\packages\HarfBuzzSharp.NativeAssets.macOS.7.3.0.3\build\net462\HarfBuzzSharp.NativeAssets.macOS.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\HarfBuzzSharp.NativeAssets.macOS.7.3.0.3\build\net462\HarfBuzzSharp.NativeAssets.macOS.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\HarfBuzzSharp.NativeAssets.macOS.7.3.0.3\build\net462\HarfBuzzSharp.NativeAssets.macOS.targets'))" />
<Error Condition="!Exists('..\packages\HarfBuzzSharp.NativeAssets.Win32.7.3.0.3\build\net462\HarfBuzzSharp.NativeAssets.Win32.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\HarfBuzzSharp.NativeAssets.Win32.7.3.0.3\build\net462\HarfBuzzSharp.NativeAssets.Win32.targets'))" />
<Error Condition="!Exists('..\packages\SkiaSharp.NativeAssets.macOS.2.88.9\build\net462\SkiaSharp.NativeAssets.macOS.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\SkiaSharp.NativeAssets.macOS.2.88.9\build\net462\SkiaSharp.NativeAssets.macOS.targets'))" />
<Error Condition="!Exists('..\packages\SkiaSharp.NativeAssets.Win32.2.88.9\build\net462\SkiaSharp.NativeAssets.Win32.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\SkiaSharp.NativeAssets.Win32.2.88.9\build\net462\SkiaSharp.NativeAssets.Win32.targets'))" />
<Error Condition="!Exists('..\packages\HarfBuzzSharp.NativeAssets.Linux.7.3.0.3\build\net462\HarfBuzzSharp.NativeAssets.Linux.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\HarfBuzzSharp.NativeAssets.Linux.7.3.0.3\build\net462\HarfBuzzSharp.NativeAssets.Linux.targets'))" />
<Error Condition="!Exists('..\packages\SkiaSharp.NativeAssets.Linux.NoDependencies.2.88.9\build\net462\SkiaSharp.NativeAssets.Linux.NoDependencies.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\SkiaSharp.NativeAssets.Linux.NoDependencies.2.88.9\build\net462\SkiaSharp.NativeAssets.Linux.NoDependencies.targets'))" />
</Target>
<Import Project="..\packages\HarfBuzzSharp.NativeAssets.Win32.7.3.0.3\build\net462\HarfBuzzSharp.NativeAssets.Win32.targets" Condition="Exists('..\packages\HarfBuzzSharp.NativeAssets.Win32.7.3.0.3\build\net462\HarfBuzzSharp.NativeAssets.Win32.targets')" />
<Import Project="..\packages\SkiaSharp.NativeAssets.macOS.2.88.9\build\net462\SkiaSharp.NativeAssets.macOS.targets" Condition="Exists('..\packages\SkiaSharp.NativeAssets.macOS.2.88.9\build\net462\SkiaSharp.NativeAssets.macOS.targets')" />
<Import Project="..\packages\SkiaSharp.NativeAssets.Win32.2.88.9\build\net462\SkiaSharp.NativeAssets.Win32.targets" Condition="Exists('..\packages\SkiaSharp.NativeAssets.Win32.2.88.9\build\net462\SkiaSharp.NativeAssets.Win32.targets')" />
<Import Project="..\packages\HarfBuzzSharp.NativeAssets.Linux.7.3.0.3\build\net462\HarfBuzzSharp.NativeAssets.Linux.targets" Condition="Exists('..\packages\HarfBuzzSharp.NativeAssets.Linux.7.3.0.3\build\net462\HarfBuzzSharp.NativeAssets.Linux.targets')" />
<Import Project="..\packages\SkiaSharp.NativeAssets.Linux.NoDependencies.2.88.9\build\net462\SkiaSharp.NativeAssets.Linux.NoDependencies.targets" Condition="Exists('..\packages\SkiaSharp.NativeAssets.Linux.NoDependencies.2.88.9\build\net462\SkiaSharp.NativeAssets.Linux.NoDependencies.targets')" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

View File

@@ -0,0 +1,25 @@
<configuration>
<dllmap os="linux" dll="opengl32.dll" target="libGL.so.1"/>
<dllmap os="linux" dll="glu32.dll" target="libGLU.so.1"/>
<dllmap os="linux" dll="openal32.dll" target="libopenal.so.1"/>
<dllmap os="linux" dll="alut.dll" target="libalut.so.0"/>
<dllmap os="linux" dll="opencl.dll" target="libOpenCL.so"/>
<dllmap os="linux" dll="libX11" target="libX11.so.6"/>
<dllmap os="linux" dll="libXi" target="libXi.so.6"/>
<dllmap os="linux" dll="SDL2.dll" target="libSDL2-2.0.so.0"/>
<dllmap os="osx" dll="opengl32.dll" target="/System/Library/Frameworks/OpenGL.framework/OpenGL"/>
<dllmap os="osx" dll="openal32.dll" target="/System/Library/Frameworks/OpenAL.framework/OpenAL" />
<dllmap os="osx" dll="alut.dll" target="/System/Library/Frameworks/OpenAL.framework/OpenAL" />
<dllmap os="osx" dll="libGLES.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" />
<dllmap os="osx" dll="libGLESv1_CM.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" />
<dllmap os="osx" dll="libGLESv2.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" />
<dllmap os="osx" dll="opencl.dll" target="/System/Library/Frameworks/OpenCL.framework/OpenCL"/>
<dllmap os="osx" dll="SDL2.dll" target="libSDL2.dylib"/>
<!-- XQuartz compatibility (X11 on Mac) -->
<dllmap os="osx" dll="libGL.so.1" target="/usr/X11/lib/libGL.dylib"/>
<dllmap os="osx" dll="libX11" target="/usr/X11/lib/libX11.dylib"/>
<dllmap os="osx" dll="libXcursor.so.1" target="/usr/X11/lib/libXcursor.dylib"/>
<dllmap os="osx" dll="libXi" target="/usr/X11/lib/libXi.dylib"/>
<dllmap os="osx" dll="libXinerama" target="/usr/X11/lib/libXinerama.dylib"/>
<dllmap os="osx" dll="libXrandr.so.2" target="/usr/X11/lib/libXrandr.dylib"/>
</configuration>

View File

@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Maser.Feanor.Client
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new FeanorClient());
}
}
}

View File

@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("FeanorClient")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("FeanorClient")]
[assembly: AssemblyCopyright("Copyright © 2016")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("750f6283-ed36-4ba6-89c3-943e8a858e41")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// 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("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@@ -0,0 +1,63 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Maser.Feanor.Client.Properties {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Maser.Feanor.Client.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
}
}

View File

@@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@@ -0,0 +1,26 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Maser.Feanor.Client.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.10.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
}
}

View File

@@ -0,0 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles />
<Settings />
</SettingsFile>

View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="HarfBuzzSharp" version="7.3.0.3" targetFramework="net472" />
<package id="HarfBuzzSharp.NativeAssets.Linux" version="7.3.0.3" targetFramework="net472" />
<package id="HarfBuzzSharp.NativeAssets.macOS" version="7.3.0.3" targetFramework="net472" />
<package id="HarfBuzzSharp.NativeAssets.Win32" version="7.3.0.3" targetFramework="net472" />
<package id="LiveCharts" version="0.9.7" targetFramework="net472" />
<package id="LiveCharts.WinForms" version="0.9.7.1" targetFramework="net472" />
<package id="LiveCharts.Wpf" version="0.9.7" targetFramework="net472" />
<package id="OpenTK" version="3.1.0" targetFramework="net472" />
<package id="OpenTK.GLControl" version="3.1.0" targetFramework="net472" />
<package id="ScottPlot" version="5.0.53" targetFramework="net472" />
<package id="ScottPlot.WinForms" version="5.0.53" targetFramework="net472" />
<package id="SkiaSharp" version="2.88.9" targetFramework="net472" />
<package id="SkiaSharp.HarfBuzz" version="2.88.9" targetFramework="net472" />
<package id="SkiaSharp.NativeAssets.Linux.NoDependencies" version="2.88.9" targetFramework="net472" />
<package id="SkiaSharp.NativeAssets.macOS" version="2.88.9" targetFramework="net472" />
<package id="SkiaSharp.NativeAssets.Win32" version="2.88.9" targetFramework="net472" />
<package id="SkiaSharp.Views.Desktop.Common" version="2.88.9" targetFramework="net472" />
<package id="SkiaSharp.Views.WindowsForms" version="2.88.9" targetFramework="net472" />
<package id="System.Buffers" version="4.5.1" targetFramework="net472" />
<package id="System.Drawing.Common" version="4.7.3" targetFramework="net472" />
<package id="System.Memory" version="4.5.5" targetFramework="net472" />
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net472" />
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.3" targetFramework="net472" />
<package id="System.ValueTuple" version="4.5.0" targetFramework="net472" />
</packages>