Commit 6738ecac authored by jumarma's avatar jumarma
Browse files

Posledni upravy

parent e1ddae53
No related merge requests found
Showing with 288 additions and 117 deletions
+288 -117
File deleted
File added
No preview for this file type
......@@ -62,8 +62,7 @@
this.chart1.ChartAreas.Add(chartArea1);
legend1.Name = "Legend1";
this.chart1.Legends.Add(legend1);
this.chart1.Location = new System.Drawing.Point(1296, 293);
this.chart1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.chart1.Location = new System.Drawing.Point(972, 238);
this.chart1.Name = "chart1";
series1.ChartArea = "ChartArea1";
series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Spline;
......@@ -71,7 +70,7 @@
series1.Legend = "Legend1";
series1.Name = "Nozzle temperature";
this.chart1.Series.Add(series1);
this.chart1.Size = new System.Drawing.Size(1092, 630);
this.chart1.Size = new System.Drawing.Size(819, 512);
this.chart1.TabIndex = 0;
this.chart1.Text = "chart1";
//
......@@ -86,22 +85,20 @@
this.lblPrinterName.AutoSize = true;
this.lblPrinterName.Font = new System.Drawing.Font("Microsoft Sans Serif", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.lblPrinterName.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
this.lblPrinterName.Location = new System.Drawing.Point(81, 293);
this.lblPrinterName.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblPrinterName.Location = new System.Drawing.Point(61, 238);
this.lblPrinterName.Name = "lblPrinterName";
this.lblPrinterName.Size = new System.Drawing.Size(266, 46);
this.lblPrinterName.Size = new System.Drawing.Size(228, 37);
this.lblPrinterName.TabIndex = 5;
this.lblPrinterName.Text = "PrinterName:";
this.lblPrinterName.Text = "Printer Name:";
//
// lblType
//
this.lblType.AutoSize = true;
this.lblType.Font = new System.Drawing.Font("Microsoft Sans Serif", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.lblType.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
this.lblType.Location = new System.Drawing.Point(81, 373);
this.lblType.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblType.Location = new System.Drawing.Point(61, 303);
this.lblType.Name = "lblType";
this.lblType.Size = new System.Drawing.Size(124, 46);
this.lblType.Size = new System.Drawing.Size(101, 37);
this.lblType.TabIndex = 6;
this.lblType.Text = "Type:";
//
......@@ -110,10 +107,9 @@
this.lblNozzle.AutoSize = true;
this.lblNozzle.Font = new System.Drawing.Font("Microsoft Sans Serif", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.lblNozzle.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
this.lblNozzle.Location = new System.Drawing.Point(81, 457);
this.lblNozzle.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblNozzle.Location = new System.Drawing.Point(61, 371);
this.lblNozzle.Name = "lblNozzle";
this.lblNozzle.Size = new System.Drawing.Size(161, 46);
this.lblNozzle.Size = new System.Drawing.Size(131, 37);
this.lblNozzle.TabIndex = 7;
this.lblNozzle.Text = "Nozzle:";
//
......@@ -122,10 +118,9 @@
this.lblBed.AutoSize = true;
this.lblBed.Font = new System.Drawing.Font("Microsoft Sans Serif", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.lblBed.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
this.lblBed.Location = new System.Drawing.Point(81, 530);
this.lblBed.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblBed.Location = new System.Drawing.Point(61, 431);
this.lblBed.Name = "lblBed";
this.lblBed.Size = new System.Drawing.Size(106, 46);
this.lblBed.Size = new System.Drawing.Size(86, 37);
this.lblBed.TabIndex = 8;
this.lblBed.Text = "Bed:";
//
......@@ -140,8 +135,8 @@
this.uploadToolStripMenuItem1});
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Padding = new System.Windows.Forms.Padding(5, 2, 0, 2);
this.menuStrip1.Size = new System.Drawing.Size(1924, 89);
this.menuStrip1.Padding = new System.Windows.Forms.Padding(4, 2, 0, 2);
this.menuStrip1.Size = new System.Drawing.Size(1904, 73);
this.menuStrip1.TabIndex = 9;
this.menuStrip1.Text = "menuStrip1";
//
......@@ -152,7 +147,7 @@
this.dToolStripMenuItem.Margin = new System.Windows.Forms.Padding(540, 0, 0, 0);
this.dToolStripMenuItem.Name = "dToolStripMenuItem";
this.dToolStripMenuItem.Padding = new System.Windows.Forms.Padding(40, 0, 40, 0);
this.dToolStripMenuItem.Size = new System.Drawing.Size(408, 85);
this.dToolStripMenuItem.Size = new System.Drawing.Size(342, 69);
this.dToolStripMenuItem.Text = "Dashboard";
//
// uploadToolStripMenuItem
......@@ -160,7 +155,7 @@
this.uploadToolStripMenuItem.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
this.uploadToolStripMenuItem.Name = "uploadToolStripMenuItem";
this.uploadToolStripMenuItem.Padding = new System.Windows.Forms.Padding(40, 0, 40, 0);
this.uploadToolStripMenuItem.Size = new System.Drawing.Size(311, 85);
this.uploadToolStripMenuItem.Size = new System.Drawing.Size(265, 69);
this.uploadToolStripMenuItem.Text = "Upload";
this.uploadToolStripMenuItem.Click += new System.EventHandler(this.uploadClick);
//
......@@ -169,7 +164,7 @@
this.uploadToolStripMenuItem1.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
this.uploadToolStripMenuItem1.Name = "uploadToolStripMenuItem1";
this.uploadToolStripMenuItem1.Padding = new System.Windows.Forms.Padding(40, 0, 40, 0);
this.uploadToolStripMenuItem1.Size = new System.Drawing.Size(331, 85);
this.uploadToolStripMenuItem1.Size = new System.Drawing.Size(282, 69);
this.uploadToolStripMenuItem1.Text = "Settings";
this.uploadToolStripMenuItem1.Click += new System.EventHandler(this.clickSettings);
//
......@@ -178,10 +173,9 @@
this.button1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(250)))), ((int)(((byte)(195)))), ((int)(((byte)(0)))));
this.button1.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.button1.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
this.button1.Location = new System.Drawing.Point(2041, 1067);
this.button1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.button1.Location = new System.Drawing.Point(1531, 867);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(127, 55);
this.button1.Size = new System.Drawing.Size(95, 45);
this.button1.TabIndex = 10;
this.button1.Text = "Pause";
this.button1.UseVisualStyleBackColor = false;
......@@ -191,10 +185,9 @@
this.button2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(234)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
this.button2.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.button2.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
this.button2.Location = new System.Drawing.Point(2256, 1067);
this.button2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.button2.Location = new System.Drawing.Point(1692, 867);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(132, 55);
this.button2.Size = new System.Drawing.Size(99, 45);
this.button2.TabIndex = 11;
this.button2.Text = "Stop";
this.button2.UseVisualStyleBackColor = false;
......@@ -205,10 +198,9 @@
this.label1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(9)))), ((int)(((byte)(169)))), ((int)(((byte)(35)))));
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 27.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.label1.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
this.label1.Location = new System.Drawing.Point(1067, 150);
this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label1.Location = new System.Drawing.Point(824, 121);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(488, 54);
this.label1.Size = new System.Drawing.Size(393, 42);
this.label1.TabIndex = 12;
this.label1.Text = "Printer Status: Ready";
this.label1.TextAlign = System.Drawing.ContentAlignment.TopCenter;
......@@ -218,23 +210,20 @@
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.label2.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
this.label2.Location = new System.Drawing.Point(403, 293);
this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label2.Location = new System.Drawing.Point(285, 238);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(182, 46);
this.label2.Size = new System.Drawing.Size(148, 37);
this.label2.TabIndex = 13;
this.label2.Text = "Průšička";
this.label2.Click += new System.EventHandler(this.label2_Click);
//
// label3
//
this.label3.AutoSize = true;
this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.label3.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
this.label3.Location = new System.Drawing.Point(403, 373);
this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label3.Location = new System.Drawing.Point(168, 303);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(286, 46);
this.label3.Size = new System.Drawing.Size(235, 37);
this.label3.TabIndex = 14;
this.label3.Text = "Original Prusa";
//
......@@ -243,10 +232,9 @@
this.lblNozzleTemp.AutoSize = true;
this.lblNozzleTemp.Font = new System.Drawing.Font("Microsoft Sans Serif", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.lblNozzleTemp.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
this.lblNozzleTemp.Location = new System.Drawing.Point(403, 457);
this.lblNozzleTemp.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblNozzleTemp.Location = new System.Drawing.Point(198, 371);
this.lblNozzleTemp.Name = "lblNozzleTemp";
this.lblNozzleTemp.Size = new System.Drawing.Size(136, 46);
this.lblNozzleTemp.Size = new System.Drawing.Size(108, 37);
this.lblNozzleTemp.TabIndex = 15;
this.lblNozzleTemp.Text = "154°C";
//
......@@ -255,46 +243,43 @@
this.lblBedTemp.AutoSize = true;
this.lblBedTemp.Font = new System.Drawing.Font("Microsoft Sans Serif", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.lblBedTemp.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
this.lblBedTemp.Location = new System.Drawing.Point(403, 530);
this.lblBedTemp.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblBedTemp.Location = new System.Drawing.Point(153, 431);
this.lblBedTemp.Name = "lblBedTemp";
this.lblBedTemp.Size = new System.Drawing.Size(113, 46);
this.lblBedTemp.Size = new System.Drawing.Size(91, 37);
this.lblBedTemp.TabIndex = 16;
this.lblBedTemp.Text = "69°C";
//
// panel1
//
this.panel1.Controls.Add(this.label1);
this.panel1.Controls.Add(this.lblPrinterName);
this.panel1.Controls.Add(this.button1);
this.panel1.Controls.Add(this.button2);
this.panel1.Controls.Add(this.lblBedTemp);
this.panel1.Controls.Add(this.label2);
this.panel1.Controls.Add(this.lblNozzleTemp);
this.panel1.Controls.Add(this.label3);
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.panel1.Margin = new System.Windows.Forms.Padding(2);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(2557, 1328);
this.panel1.Size = new System.Drawing.Size(1920, 1080);
this.panel1.TabIndex = 18;
this.panel1.Visible = false;
this.panel1.Paint += new System.Windows.Forms.PaintEventHandler(this.panel1_Paint);
//
// DashboardWindow
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(43)))), ((int)(((byte)(57)))));
this.ClientSize = new System.Drawing.Size(1924, 1055);
this.ClientSize = new System.Drawing.Size(1904, 1041);
this.Controls.Add(this.panel1);
this.Controls.Add(this.label1);
this.Controls.Add(this.lblBed);
this.Controls.Add(this.lblPrinterName);
this.Controls.Add(this.lblNozzle);
this.Controls.Add(this.lblBedTemp);
this.Controls.Add(this.lblType);
this.Controls.Add(this.lblNozzleTemp);
this.Controls.Add(this.label2);
this.Controls.Add(this.label3);
this.Controls.Add(this.chart1);
this.Controls.Add(this.menuStrip1);
this.Controls.Add(this.panel1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MainMenuStrip = this.menuStrip1;
this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.Name = "DashboardWindow";
this.Text = "Triaxial ";
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
......@@ -304,7 +289,6 @@
this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout();
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
......
......@@ -16,6 +16,11 @@ namespace ProjektUPG
{
InitializeComponent();
CreateChart();
GraphNozzleTemp();
GraphBedTemp();
label2.Text = printerInfo.GetPrinterName();
lblNozzleTemp.Text = "0°C";
lblBedTemp.Text = "0°C";
}
public void CreateChart()
......@@ -80,10 +85,11 @@ namespace ProjektUPG
private void uploadClick(object sender, EventArgs e)
{
panel1.Visible = true;
UploadWindow window = new UploadWindow
{
TopLevel = false, TopMost = true, FormBorderStyle = FormBorderStyle.None
UploadWindow window = new UploadWindow()
{
TopLevel = false, TopMost = true,
};
window.FormBorderStyle = FormBorderStyle.None;
panel1.Controls.Add(window);
window.Show();
}
......@@ -91,12 +97,12 @@ namespace ProjektUPG
private void clickSettings(object sender, EventArgs e)
{
panel1.Visible = true;
SettingsWindow window = new SettingsWindow
SettingsWindow window = new SettingsWindow()
{
TopLevel = false,
TopMost = true,
FormBorderStyle = FormBorderStyle.None
};
window.FormBorderStyle = FormBorderStyle.None;
panel1.Controls.Add(window);
window.Show();
}
......@@ -110,15 +116,5 @@ namespace ProjektUPG
{
timer1.Enabled = false;
}
private void panel1_Paint(object sender, PaintEventArgs e)
{
}
private void label2_Click(object sender, EventArgs e)
{
}
}
}
......@@ -111,5 +111,25 @@ namespace ProjektUPG
{
return Progress;
}
public string GetPrinterName()
{
return PrinterName;
}
public string GetPrintSpeed()
{
return PrintingSpeed;
}
public string GetZHeight()
{
return ZAxisHeight;
}
public string GetPrintMaterial()
{
return Material;
}
}
}
......@@ -13,7 +13,7 @@ namespace ProjektUPG
private void clickDashboard(object sender, EventArgs e)
{
panel1.Visible = true;
DashboardWindow window = new DashboardWindow
DashboardWindow window = new DashboardWindow()
{
TopLevel = false,
TopMost = true,
......@@ -26,7 +26,7 @@ namespace ProjektUPG
private void uploadClick(object sender, EventArgs e)
{
panel1.Visible = true;
UploadWindow window = new UploadWindow
UploadWindow window = new UploadWindow()
{
TopLevel = false,
TopMost = true,
......
......@@ -53,11 +53,17 @@
this.button2 = new System.Windows.Forms.Button();
this.button3 = new System.Windows.Forms.Button();
this.panel1 = new System.Windows.Forms.Panel();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.label1 = new System.Windows.Forms.Label();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.label12 = new System.Windows.Forms.Label();
this.label13 = new System.Windows.Forms.Label();
this.label14 = new System.Windows.Forms.Label();
this.label15 = new System.Windows.Forms.Label();
this.label16 = new System.Windows.Forms.Label();
this.label17 = new System.Windows.Forms.Label();
this.label18 = new System.Windows.Forms.Label();
this.menuStrip1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.chart1)).BeginInit();
this.panel1.SuspendLayout();
this.SuspendLayout();
//
// menuStrip1
......@@ -137,6 +143,7 @@
this.label4.Size = new System.Drawing.Size(101, 37);
this.label4.TabIndex = 14;
this.label4.Text = "Type:";
this.label4.Click += new System.EventHandler(this.label4_Click);
//
// label5
//
......@@ -227,13 +234,13 @@
this.chart1.ChartAreas.Add(chartArea1);
legend1.Name = "Legend1";
this.chart1.Legends.Add(legend1);
this.chart1.Location = new System.Drawing.Point(1009, 236);
this.chart1.Location = new System.Drawing.Point(963, 236);
this.chart1.Name = "chart1";
series1.ChartArea = "ChartArea1";
series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line;
series1.Color = System.Drawing.Color.Red;
series1.Legend = "Legend1";
series1.Name = "Nozzle temperature";
series1.Name = "Bed temperature";
this.chart1.Series.Add(series1);
this.chart1.Size = new System.Drawing.Size(819, 512);
this.chart1.TabIndex = 23;
......@@ -243,7 +250,7 @@
//
this.button1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(9)))), ((int)(((byte)(169)))), ((int)(((byte)(35)))));
this.button1.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F, System.Drawing.FontStyle.Bold);
this.button1.Location = new System.Drawing.Point(1209, 872);
this.button1.Location = new System.Drawing.Point(1409, 803);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(97, 53);
this.button1.TabIndex = 24;
......@@ -254,7 +261,7 @@
//
this.button2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(250)))), ((int)(((byte)(195)))), ((int)(((byte)(0)))));
this.button2.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F, System.Drawing.FontStyle.Bold);
this.button2.Location = new System.Drawing.Point(1411, 872);
this.button2.Location = new System.Drawing.Point(1546, 803);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(107, 53);
this.button2.TabIndex = 25;
......@@ -266,7 +273,7 @@
this.button3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(234)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
this.button3.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F, System.Drawing.FontStyle.Bold);
this.button3.ForeColor = System.Drawing.Color.Black;
this.button3.Location = new System.Drawing.Point(1636, 872);
this.button3.Location = new System.Drawing.Point(1686, 803);
this.button3.Name = "button3";
this.button3.Size = new System.Drawing.Size(106, 53);
this.button3.TabIndex = 26;
......@@ -275,55 +282,141 @@
//
// panel1
//
this.panel1.Controls.Add(this.label1);
this.panel1.Controls.Add(this.button3);
this.panel1.Controls.Add(this.chart1);
this.panel1.Controls.Add(this.button2);
this.panel1.Controls.Add(this.button1);
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Margin = new System.Windows.Forms.Padding(2);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(1918, 1079);
this.panel1.Size = new System.Drawing.Size(1920, 1080);
this.panel1.TabIndex = 27;
this.panel1.Visible = false;
//
// timer1
//
this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
//
// label1
//
this.label1.AutoSize = true;
this.label1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(9)))), ((int)(((byte)(169)))), ((int)(((byte)(35)))));
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 27.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.label1.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
this.label1.Location = new System.Drawing.Point(802, 124);
this.label1.Location = new System.Drawing.Point(827, 112);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(393, 42);
this.label1.TabIndex = 27;
this.label1.Text = "Printer Status: Ready";
this.label1.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// timer1
//
this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
//
// label12
//
this.label12.AutoSize = true;
this.label12.Font = new System.Drawing.Font("Microsoft Sans Serif", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.label12.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
this.label12.Location = new System.Drawing.Point(272, 398);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(101, 37);
this.label12.TabIndex = 15;
this.label12.Text = "100%";
//
// label13
//
this.label13.AutoSize = true;
this.label13.Font = new System.Drawing.Font("Microsoft Sans Serif", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.label13.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
this.label13.Location = new System.Drawing.Point(221, 474);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(81, 37);
this.label13.TabIndex = 16;
this.label13.Text = "PLA";
//
// label14
//
this.label14.AutoSize = true;
this.label14.Font = new System.Drawing.Font("Microsoft Sans Serif", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.label14.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
this.label14.Location = new System.Drawing.Point(301, 236);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(106, 37);
this.label14.TabIndex = 13;
this.label14.Text = "Prusa";
this.label14.Click += new System.EventHandler(this.label3_Click);
//
// label15
//
this.label15.AutoSize = true;
this.label15.Font = new System.Drawing.Font("Microsoft Sans Serif", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.label15.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
this.label15.Location = new System.Drawing.Point(174, 316);
this.label15.Name = "label15";
this.label15.Size = new System.Drawing.Size(235, 37);
this.label15.TabIndex = 14;
this.label15.Text = "Original Prusa";
this.label15.Click += new System.EventHandler(this.label4_Click);
//
// label16
//
this.label16.AutoSize = true;
this.label16.Font = new System.Drawing.Font("Microsoft Sans Serif", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.label16.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
this.label16.Location = new System.Drawing.Point(397, 713);
this.label16.Name = "label16";
this.label16.Size = new System.Drawing.Size(72, 37);
this.label16.TabIndex = 22;
this.label16.Text = "0°C";
//
// label17
//
this.label17.AutoSize = true;
this.label17.Font = new System.Drawing.Font("Microsoft Sans Serif", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.label17.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
this.label17.Location = new System.Drawing.Point(352, 793);
this.label17.Name = "label17";
this.label17.Size = new System.Drawing.Size(72, 37);
this.label17.TabIndex = 20;
this.label17.Text = "0°C";
//
// label18
//
this.label18.AutoSize = true;
this.label18.Font = new System.Drawing.Font("Microsoft Sans Serif", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.label18.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
this.label18.Location = new System.Drawing.Point(287, 879);
this.label18.Name = "label18";
this.label18.Size = new System.Drawing.Size(36, 37);
this.label18.TabIndex = 21;
this.label18.Text = "0";
//
// UploadWindow
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(43)))), ((int)(((byte)(57)))));
this.ClientSize = new System.Drawing.Size(1904, 1041);
this.Controls.Add(this.button1);
this.Controls.Add(this.button2);
this.Controls.Add(this.button3);
this.Controls.Add(this.panel1);
this.Controls.Add(this.label1);
this.Controls.Add(this.chart1);
this.Controls.Add(this.label16);
this.Controls.Add(this.label11);
this.Controls.Add(this.label18);
this.Controls.Add(this.label10);
this.Controls.Add(this.label17);
this.Controls.Add(this.label9);
this.Controls.Add(this.label8);
this.Controls.Add(this.progressBar1);
this.Controls.Add(this.label7);
this.Controls.Add(this.label13);
this.Controls.Add(this.label6);
this.Controls.Add(this.label12);
this.Controls.Add(this.label5);
this.Controls.Add(this.label15);
this.Controls.Add(this.label4);
this.Controls.Add(this.label14);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.menuStrip1);
this.Controls.Add(this.panel1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Margin = new System.Windows.Forms.Padding(2);
......@@ -335,8 +428,6 @@
this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.chart1)).EndInit();
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
......@@ -366,5 +457,12 @@
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Timer timer1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.Label label15;
private System.Windows.Forms.Label label16;
private System.Windows.Forms.Label label17;
private System.Windows.Forms.Label label18;
}
}
\ No newline at end of file
......@@ -10,27 +10,68 @@ namespace ProjektUPG
public partial class UploadWindow : Form
{
private readonly PrinterInfo printerInfo = new PrinterInfo();
private readonly DashboardWindow dashboardWindow = new DashboardWindow();
private readonly List<double> yValues = new List<double>();
private readonly List<double> yValues2 = new List<double>();
public UploadWindow()
{
InitializeComponent();
chart1.Series.Add("Bed temperature");
chart1.Series.Add("Nozzle temperature");
chart1.Series[1].ChartType = SeriesChartType.Line;
chart1.Series[1].Color = Color.Blue;
GraphNozzleTemp();
GraphBedTemp();
}
public void UpdateChart()
{
chart1.ChartAreas[0].AxisY.Maximum = 300;
chart1.Series[0].Points.Clear();
chart1.Series[1].Points.Clear();
for (int i = 0; i < yValues.Count; i++)
{
double y = yValues[i];
chart1.Series[0].Points.AddXY(i + 1, y);
}
for (int i = 0; i < yValues2.Count; i++)
{
double y = yValues2[i];
chart1.Series[1].Points.AddXY(i + 1, y);
}
}
public void GraphNozzleTemp()
{
if (double.TryParse(printerInfo.GetNozzleTemperature(), out double value))
{
yValues2.Add(value);
UpdateChart();
}
}
public void GraphBedTemp()
{
if (double.TryParse(printerInfo.GetBedTemperature(), out double value))
{
yValues.Add(value);
UpdateChart();
}
}
private void clickSettings(object sender, EventArgs e)
{
panel1.Visible = true;
SettingsWindow window = new SettingsWindow
SettingsWindow window = new SettingsWindow()
{
TopLevel = false,
TopMost = true,
FormBorderStyle = FormBorderStyle.None
};
window.FormBorderStyle = FormBorderStyle.None;
panel1.Controls.Add(window);
window.Show();
}
......@@ -38,16 +79,26 @@ namespace ProjektUPG
private void clickDashboard(object sender, EventArgs e)
{
panel1.Visible = true;
DashboardWindow window = new DashboardWindow
DashboardWindow window = new DashboardWindow()
{
TopLevel = false,
TopMost = true,
FormBorderStyle = FormBorderStyle.None
};
window.FormBorderStyle = FormBorderStyle.None;
panel1.Controls.Add(window);
window.Show();
}
private void UpdateTexts()
{
label14.Text = printerInfo.GetPrinterName();
label12.Text = printerInfo.GetPrintSpeed() + "%";
label13.Text = printerInfo.GetPrintMaterial();
label16.Text = printerInfo.GetNozzleTemperature() + "°C";
label17.Text = printerInfo.GetBedTemperature() + "°C";
label18.Text = printerInfo.GetZHeight() + "mm";
}
private async void timer1_Tick(object sender, EventArgs e)
{
await printerInfo.GetProgress();
......@@ -55,14 +106,14 @@ namespace ProjektUPG
progressBar1.Value = (int)(progress * 100);
await printerInfo.GetStats();
dashboardWindow.UpdateTexts();
dashboardWindow.GraphNozzleTemp();
dashboardWindow.GraphBedTemp();
GraphNozzleTemp();
GraphBedTemp();
UpdateTexts();
}
private void UploadWindow_Load(object sender, EventArgs e)
{
timer1.Enabled = false;
timer1.Enabled = true;
}
private void UploadWindow_FormClosing(object sender, FormClosingEventArgs e)
......@@ -74,5 +125,10 @@ namespace ProjektUPG
{
}
private void label4_Click(object sender, EventArgs e)
{
}
}
}
......@@ -80,10 +80,10 @@
this.jmenotiskarnyzadavani.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(43)))), ((int)(((byte)(57)))));
this.jmenotiskarnyzadavani.Font = new System.Drawing.Font("Microsoft Sans Serif", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.jmenotiskarnyzadavani.ForeColor = System.Drawing.SystemColors.Control;
this.jmenotiskarnyzadavani.Location = new System.Drawing.Point(609, 190);
this.jmenotiskarnyzadavani.Location = new System.Drawing.Point(766, 210);
this.jmenotiskarnyzadavani.Name = "jmenotiskarnyzadavani";
this.jmenotiskarnyzadavani.Size = new System.Drawing.Size(400, 40);
this.jmenotiskarnyzadavani.TabIndex = 3;
this.jmenotiskarnyzadavani.TabIndex = 1;
//
// ipadresazadani
//
......@@ -91,7 +91,7 @@
this.ipadresazadani.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(43)))), ((int)(((byte)(57)))));
this.ipadresazadani.Font = new System.Drawing.Font("Microsoft Sans Serif", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.ipadresazadani.ForeColor = System.Drawing.SystemColors.Control;
this.ipadresazadani.Location = new System.Drawing.Point(609, 354);
this.ipadresazadani.Location = new System.Drawing.Point(766, 374);
this.ipadresazadani.Name = "ipadresazadani";
this.ipadresazadani.Size = new System.Drawing.Size(400, 40);
this.ipadresazadani.TabIndex = 2;
......@@ -102,10 +102,10 @@
this.apikliczadavani.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(43)))), ((int)(((byte)(57)))));
this.apikliczadavani.Font = new System.Drawing.Font("Microsoft Sans Serif", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.apikliczadavani.ForeColor = System.Drawing.SystemColors.Control;
this.apikliczadavani.Location = new System.Drawing.Point(609, 529);
this.apikliczadavani.Location = new System.Drawing.Point(766, 549);
this.apikliczadavani.Name = "apikliczadavani";
this.apikliczadavani.Size = new System.Drawing.Size(400, 40);
this.apikliczadavani.TabIndex = 1;
this.apikliczadavani.TabIndex = 3;
//
// pouzit
//
......@@ -113,10 +113,10 @@
this.pouzit.BackColor = System.Drawing.Color.Green;
this.pouzit.Font = new System.Drawing.Font("Microsoft Sans Serif", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.pouzit.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
this.pouzit.Location = new System.Drawing.Point(586, 662);
this.pouzit.Location = new System.Drawing.Point(739, 664);
this.pouzit.Name = "pouzit";
this.pouzit.Size = new System.Drawing.Size(459, 50);
this.pouzit.TabIndex = 0;
this.pouzit.TabIndex = 4;
this.pouzit.Text = "Use";
this.pouzit.UseVisualStyleBackColor = false;
this.pouzit.Click += new System.EventHandler(this.pouzit_Click);
......@@ -127,7 +127,7 @@
this.label4.AutoSize = true;
this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.label4.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
this.label4.Location = new System.Drawing.Point(644, 115);
this.label4.Location = new System.Drawing.Point(801, 135);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(332, 33);
this.label4.TabIndex = 8;
......@@ -140,7 +140,7 @@
this.label5.AutoSize = true;
this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.label5.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
this.label5.Location = new System.Drawing.Point(673, 278);
this.label5.Location = new System.Drawing.Point(830, 298);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(261, 33);
this.label5.TabIndex = 9;
......@@ -152,7 +152,7 @@
this.label6.AutoSize = true;
this.label6.Font = new System.Drawing.Font("Microsoft Sans Serif", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
this.label6.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
this.label6.Location = new System.Drawing.Point(688, 441);
this.label6.Location = new System.Drawing.Point(845, 461);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(234, 33);
this.label6.TabIndex = 10;
......
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
fe00a71d061b4819381f1ce5d8d7e66662e91a81
671108abd240d26505b9e9be5620f7d31282efbf
......@@ -82,3 +82,20 @@ C:\Users\Filip\Documents\push\projekt-upg\ProjektUPG\obj\Debug\ProjektUPG.csproj
C:\Users\Filip\Documents\push\projekt-upg\ProjektUPG\obj\Debug\ProjektUPG.csproj.CopyComplete
C:\Users\Filip\Documents\push\projekt-upg\ProjektUPG\obj\Debug\ProjektUPG.exe
C:\Users\Filip\Documents\push\projekt-upg\ProjektUPG\obj\Debug\ProjektUPG.pdb
C:\Users\matej\source\projekt-upg\ProjektUPG\bin\Debug\ProjektUPG.exe.config
C:\Users\matej\source\projekt-upg\ProjektUPG\bin\Debug\ProjektUPG.exe
C:\Users\matej\source\projekt-upg\ProjektUPG\bin\Debug\ProjektUPG.pdb
C:\Users\matej\source\projekt-upg\ProjektUPG\bin\Debug\Newtonsoft.Json.dll
C:\Users\matej\source\projekt-upg\ProjektUPG\bin\Debug\Newtonsoft.Json.xml
C:\Users\matej\source\projekt-upg\ProjektUPG\obj\Debug\ProjektUPG.csproj.AssemblyReference.cache
C:\Users\matej\source\projekt-upg\ProjektUPG\obj\Debug\ProjektUPG.csproj.SuggestedBindingRedirects.cache
C:\Users\matej\source\projekt-upg\ProjektUPG\obj\Debug\ProjektUPG.DashboardWindow.resources
C:\Users\matej\source\projekt-upg\ProjektUPG\obj\Debug\ProjektUPG.WizardWindow.resources
C:\Users\matej\source\projekt-upg\ProjektUPG\obj\Debug\ProjektUPG.Properties.Resources.resources
C:\Users\matej\source\projekt-upg\ProjektUPG\obj\Debug\ProjektUPG.SettingsWindow.resources
C:\Users\matej\source\projekt-upg\ProjektUPG\obj\Debug\ProjektUPG.UploadWindow.resources
C:\Users\matej\source\projekt-upg\ProjektUPG\obj\Debug\ProjektUPG.csproj.GenerateResource.cache
C:\Users\matej\source\projekt-upg\ProjektUPG\obj\Debug\ProjektUPG.csproj.CoreCompileInputs.cache
C:\Users\matej\source\projekt-upg\ProjektUPG\obj\Debug\ProjektUPG.csproj.CopyComplete
C:\Users\matej\source\projekt-upg\ProjektUPG\obj\Debug\ProjektUPG.exe
C:\Users\matej\source\projekt-upg\ProjektUPG\obj\Debug\ProjektUPG.pdb
No preview for this file type
No preview for this file type
No preview for this file type
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment