Initial work creating configuration UI
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
181
Tidstagning/ConfigUI.Designer.cs
generated
Normal file
181
Tidstagning/ConfigUI.Designer.cs
generated
Normal file
@ -0,0 +1,181 @@
|
||||
|
||||
namespace Tidstagning
|
||||
{
|
||||
partial class ConfigUI
|
||||
{
|
||||
/// <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.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ConfigUI));
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.checkBox1 = new System.Windows.Forms.CheckBox();
|
||||
this.folderBrowserOutput = new System.Windows.Forms.FolderBrowserDialog();
|
||||
this.buttonFolderOutput = new System.Windows.Forms.Button();
|
||||
this.folderBrowserInput = new System.Windows.Forms.FolderBrowserDialog();
|
||||
this.buttonFolderInput = new System.Windows.Forms.Button();
|
||||
this.textPathInput = new System.Windows.Forms.TextBox();
|
||||
this.textPathOutput = new System.Windows.Forms.TextBox();
|
||||
this.buttonSave = new System.Windows.Forms.Button();
|
||||
this.buttonCancel = new System.Windows.Forms.Button();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(4, 12);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(131, 13);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "Select folder for input files.";
|
||||
//
|
||||
// checkBox1
|
||||
//
|
||||
this.checkBox1.AutoSize = true;
|
||||
this.checkBox1.Location = new System.Drawing.Point(7, 98);
|
||||
this.checkBox1.Name = "checkBox1";
|
||||
this.checkBox1.Size = new System.Drawing.Size(95, 17);
|
||||
this.checkBox1.TabIndex = 2;
|
||||
this.checkBox1.Text = "Enable Relay?";
|
||||
this.checkBox1.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// folderBrowserOutput
|
||||
//
|
||||
this.folderBrowserOutput.Description = "Pick output folder";
|
||||
//
|
||||
// buttonFolderOutput
|
||||
//
|
||||
this.buttonFolderOutput.Location = new System.Drawing.Point(314, 72);
|
||||
this.buttonFolderOutput.Name = "buttonFolderOutput";
|
||||
this.buttonFolderOutput.Size = new System.Drawing.Size(75, 23);
|
||||
this.buttonFolderOutput.TabIndex = 3;
|
||||
this.buttonFolderOutput.Text = "Pick output folder";
|
||||
this.buttonFolderOutput.UseVisualStyleBackColor = true;
|
||||
this.buttonFolderOutput.Click += new System.EventHandler(this.buttonFolderOutput_Click);
|
||||
//
|
||||
// folderBrowserInput
|
||||
//
|
||||
this.folderBrowserInput.Description = "Pick input folder";
|
||||
//
|
||||
// buttonFolderInput
|
||||
//
|
||||
this.buttonFolderInput.Location = new System.Drawing.Point(314, 28);
|
||||
this.buttonFolderInput.Name = "buttonFolderInput";
|
||||
this.buttonFolderInput.Size = new System.Drawing.Size(75, 23);
|
||||
this.buttonFolderInput.TabIndex = 4;
|
||||
this.buttonFolderInput.Text = "Pick input folder";
|
||||
this.buttonFolderInput.UseVisualStyleBackColor = true;
|
||||
this.buttonFolderInput.Click += new System.EventHandler(this.buttonFolderInput_Click);
|
||||
//
|
||||
// textPathInput
|
||||
//
|
||||
this.textPathInput.Location = new System.Drawing.Point(7, 28);
|
||||
this.textPathInput.Name = "textPathInput";
|
||||
this.textPathInput.Size = new System.Drawing.Size(301, 20);
|
||||
this.textPathInput.TabIndex = 5;
|
||||
//
|
||||
// textPathOutput
|
||||
//
|
||||
this.textPathOutput.Location = new System.Drawing.Point(7, 72);
|
||||
this.textPathOutput.Name = "textPathOutput";
|
||||
this.textPathOutput.Size = new System.Drawing.Size(301, 20);
|
||||
this.textPathOutput.TabIndex = 6;
|
||||
//
|
||||
// buttonSave
|
||||
//
|
||||
this.buttonSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.buttonSave.Location = new System.Drawing.Point(318, 280);
|
||||
this.buttonSave.Name = "buttonSave";
|
||||
this.buttonSave.Size = new System.Drawing.Size(75, 23);
|
||||
this.buttonSave.TabIndex = 7;
|
||||
this.buttonSave.Text = "Save";
|
||||
this.buttonSave.UseVisualStyleBackColor = true;
|
||||
this.buttonSave.Click += new System.EventHandler(this.buttonSave_Click);
|
||||
//
|
||||
// buttonCancel
|
||||
//
|
||||
this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.buttonCancel.Location = new System.Drawing.Point(13, 280);
|
||||
this.buttonCancel.Name = "buttonCancel";
|
||||
this.buttonCancel.Size = new System.Drawing.Size(75, 23);
|
||||
this.buttonCancel.TabIndex = 8;
|
||||
this.buttonCancel.Text = "Cancel";
|
||||
this.buttonCancel.UseVisualStyleBackColor = true;
|
||||
this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(4, 56);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(138, 13);
|
||||
this.label2.TabIndex = 9;
|
||||
this.label2.Text = "Select folder for output files.";
|
||||
//
|
||||
// ConfigUI
|
||||
//
|
||||
this.AcceptButton = this.buttonSave;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.CancelButton = this.buttonCancel;
|
||||
this.ClientSize = new System.Drawing.Size(405, 315);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.buttonCancel);
|
||||
this.Controls.Add(this.buttonSave);
|
||||
this.Controls.Add(this.textPathOutput);
|
||||
this.Controls.Add(this.textPathInput);
|
||||
this.Controls.Add(this.buttonFolderInput);
|
||||
this.Controls.Add(this.buttonFolderOutput);
|
||||
this.Controls.Add(this.checkBox1);
|
||||
this.Controls.Add(this.label1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "ConfigUI";
|
||||
this.Text = "Configuration";
|
||||
this.TopMost = true;
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.CheckBox checkBox1;
|
||||
private System.Windows.Forms.FolderBrowserDialog folderBrowserOutput;
|
||||
private System.Windows.Forms.Button buttonFolderOutput;
|
||||
private System.Windows.Forms.FolderBrowserDialog folderBrowserInput;
|
||||
private System.Windows.Forms.Button buttonFolderInput;
|
||||
private System.Windows.Forms.TextBox textPathInput;
|
||||
private System.Windows.Forms.TextBox textPathOutput;
|
||||
private System.Windows.Forms.Button buttonSave;
|
||||
private System.Windows.Forms.Button buttonCancel;
|
||||
private System.Windows.Forms.Label label2;
|
||||
}
|
||||
}
|
43
Tidstagning/ConfigUI.cs
Normal file
43
Tidstagning/ConfigUI.cs
Normal file
@ -0,0 +1,43 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Tidstagning
|
||||
{
|
||||
public partial class ConfigUI : Form
|
||||
{
|
||||
public ConfigUI()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void buttonFolderInput_Click(object sender, EventArgs e)
|
||||
{
|
||||
folderBrowserInput.ShowDialog();
|
||||
textPathInput.Text = folderBrowserInput.SelectedPath;
|
||||
}
|
||||
|
||||
private void buttonFolderOutput_Click(object sender, EventArgs e)
|
||||
{
|
||||
folderBrowserOutput.ShowDialog();
|
||||
textPathOutput.Text = folderBrowserOutput.SelectedPath;
|
||||
}
|
||||
|
||||
private void buttonCancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void buttonSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
Properties.Settings.Default.Save();
|
||||
this.Close();
|
||||
}
|
||||
}
|
||||
}
|
1883
Tidstagning/ConfigUI.resx
Normal file
1883
Tidstagning/ConfigUI.resx
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
||||
namespace Tidstagning
|
||||
{
|
||||
partial class Form1
|
||||
partial class MainUI
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
@ -29,9 +29,9 @@
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainUI));
|
||||
this.btnTest = new System.Windows.Forms.Button();
|
||||
this.button1 = new System.Windows.Forms.Button();
|
||||
this.buttonHelp = new System.Windows.Forms.Button();
|
||||
this.txtDebug = new System.Windows.Forms.TextBox();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.textStartProcedure = new System.Windows.Forms.TextBox();
|
||||
@ -51,6 +51,7 @@
|
||||
this.comboComport = new System.Windows.Forms.ComboBox();
|
||||
this.lblClock = new System.Windows.Forms.Label();
|
||||
this.Clock = new System.Windows.Forms.Timer(this.components);
|
||||
this.buttonConfig = new System.Windows.Forms.Button();
|
||||
this.panel1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.grid)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.entryBindingSource)).BeginInit();
|
||||
@ -69,15 +70,15 @@
|
||||
this.btnTest.UseVisualStyleBackColor = true;
|
||||
this.btnTest.Click += new System.EventHandler(this.btnTest_Click);
|
||||
//
|
||||
// button1
|
||||
// buttonHelp
|
||||
//
|
||||
this.button1.Location = new System.Drawing.Point(3, 100);
|
||||
this.button1.Name = "button1";
|
||||
this.button1.Size = new System.Drawing.Size(75, 23);
|
||||
this.button1.TabIndex = 14;
|
||||
this.button1.Text = "Hjælp mm.";
|
||||
this.button1.UseVisualStyleBackColor = true;
|
||||
this.button1.Click += new System.EventHandler(this.button1_Click);
|
||||
this.buttonHelp.Location = new System.Drawing.Point(3, 100);
|
||||
this.buttonHelp.Name = "buttonHelp";
|
||||
this.buttonHelp.Size = new System.Drawing.Size(75, 23);
|
||||
this.buttonHelp.TabIndex = 14;
|
||||
this.buttonHelp.Text = "Hjælp mm.";
|
||||
this.buttonHelp.UseVisualStyleBackColor = true;
|
||||
this.buttonHelp.Click += new System.EventHandler(this.buttonHelp_Click);
|
||||
//
|
||||
// txtDebug
|
||||
//
|
||||
@ -250,7 +251,8 @@
|
||||
this.flowLayoutPanel1.Controls.Add(this.comboSoundTime);
|
||||
this.flowLayoutPanel1.Controls.Add(this.label1);
|
||||
this.flowLayoutPanel1.Controls.Add(this.comboComport);
|
||||
this.flowLayoutPanel1.Controls.Add(this.button1);
|
||||
this.flowLayoutPanel1.Controls.Add(this.buttonHelp);
|
||||
this.flowLayoutPanel1.Controls.Add(this.buttonConfig);
|
||||
this.flowLayoutPanel1.Location = new System.Drawing.Point(3, 551);
|
||||
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
|
||||
this.flowLayoutPanel1.Size = new System.Drawing.Size(194, 125);
|
||||
@ -313,7 +315,17 @@
|
||||
this.Clock.Enabled = true;
|
||||
this.Clock.Tick += new System.EventHandler(this.Clock_Tick);
|
||||
//
|
||||
// Form1
|
||||
// buttonConfig
|
||||
//
|
||||
this.buttonConfig.Location = new System.Drawing.Point(84, 100);
|
||||
this.buttonConfig.Name = "buttonConfig";
|
||||
this.buttonConfig.Size = new System.Drawing.Size(90, 23);
|
||||
this.buttonConfig.TabIndex = 29;
|
||||
this.buttonConfig.Text = "Konfiguration";
|
||||
this.buttonConfig.UseVisualStyleBackColor = true;
|
||||
this.buttonConfig.Click += new System.EventHandler(this.buttonConfig_Click);
|
||||
//
|
||||
// MainUI
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
@ -323,7 +335,7 @@
|
||||
this.Controls.Add(this.txtLog);
|
||||
this.DoubleBuffered = true;
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Name = "Form1";
|
||||
this.Name = "MainUI";
|
||||
this.Text = "Tidstagning";
|
||||
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
|
||||
this.Load += new System.EventHandler(this.Form1_Load);
|
||||
@ -343,7 +355,7 @@
|
||||
|
||||
private System.Windows.Forms.BindingSource entryBindingSource;
|
||||
private System.Windows.Forms.Button btnTest;
|
||||
private System.Windows.Forms.Button button1;
|
||||
private System.Windows.Forms.Button buttonHelp;
|
||||
private System.Windows.Forms.TextBox txtDebug;
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private System.Windows.Forms.Button btnStart;
|
||||
@ -362,6 +374,7 @@
|
||||
private System.Windows.Forms.ComboBox comboComport;
|
||||
private System.Windows.Forms.Label lblClock;
|
||||
private System.Windows.Forms.TextBox textStartProcedure;
|
||||
private System.Windows.Forms.Button buttonConfig;
|
||||
}
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ using System.Windows.Forms;
|
||||
|
||||
namespace Tidstagning
|
||||
{
|
||||
public partial class Form1 : Form
|
||||
public partial class MainUI : Form
|
||||
{
|
||||
delegate void SetTextCallback(string text);
|
||||
BindingList<Entry> entries = new BindingList<Entry>
|
||||
@ -15,7 +15,7 @@ namespace Tidstagning
|
||||
Relay horn;
|
||||
Procedure startprocedure = new Procedure();
|
||||
|
||||
public Form1()
|
||||
public MainUI()
|
||||
{
|
||||
InitializeComponent();
|
||||
System.IO.StreamReader deltager_handle = new System.IO.StreamReader(Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + "/Tidstagning/" + "Deltager.txt");
|
||||
@ -144,7 +144,7 @@ namespace Tidstagning
|
||||
startprocedure.Clear();
|
||||
}
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
private void buttonHelp_Click(object sender, EventArgs e)
|
||||
{
|
||||
AboutBox aboutbox = new AboutBox();
|
||||
aboutbox.Show();
|
||||
@ -229,5 +229,13 @@ namespace Tidstagning
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void buttonConfig_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.flowLayoutPanel1.Enabled = false;
|
||||
ConfigUI configui = new ConfigUI();
|
||||
configui.ShowDialog();
|
||||
this.flowLayoutPanel1.Enabled = true;
|
||||
}
|
||||
}
|
||||
}
|
@ -13,7 +13,7 @@ namespace Tidstagning
|
||||
{
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new Form1());
|
||||
Application.Run(new MainUI());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7,9 +7,9 @@ namespace Tidstagning
|
||||
|
||||
System.IO.StreamWriter filehandle;
|
||||
System.IO.StreamWriter filehandle2;
|
||||
Tidstagning.Form1 parentForm;
|
||||
Tidstagning.MainUI parentForm;
|
||||
string racenumber;
|
||||
public ResultList(string filename, Tidstagning.Form1 log_object)
|
||||
public ResultList(string filename, Tidstagning.MainUI log_object)
|
||||
{
|
||||
filename = MakeSafeFilename(filename, '_');
|
||||
filehandle = new System.IO.StreamWriter(Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + "/Tidstagning/" + filename + "_" + DateTime.Now.ToString(" dd-MM-yyyy HH-mm-ss") + ".txt");
|
||||
|
@ -79,6 +79,8 @@
|
||||
<PropertyGroup />
|
||||
<PropertyGroup />
|
||||
<ItemGroup>
|
||||
<Reference Include="PresentationCore" />
|
||||
<Reference Include="PresentationFramework" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
@ -86,6 +88,9 @@
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xaml" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="WindowsBase" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="AboutBox.cs">
|
||||
@ -94,12 +99,18 @@
|
||||
<Compile Include="AboutBox.Designer.cs">
|
||||
<DependentUpon>AboutBox.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Entry.cs" />
|
||||
<Compile Include="Form1.cs">
|
||||
<Compile Include="ConfigUI.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Form1.Designer.cs">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
<Compile Include="ConfigUI.Designer.cs">
|
||||
<DependentUpon>ConfigUI.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Entry.cs" />
|
||||
<Compile Include="MainUI.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="MainUI.Designer.cs">
|
||||
<DependentUpon>MainUI.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Procedure.cs" />
|
||||
<Compile Include="Program.cs" />
|
||||
@ -110,8 +121,11 @@
|
||||
<EmbeddedResource Include="AboutBox.resx">
|
||||
<DependentUpon>AboutBox.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Form1.resx">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
<EmbeddedResource Include="ConfigUI.resx">
|
||||
<DependentUpon>ConfigUI.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="MainUI.resx">
|
||||
<DependentUpon>MainUI.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
|
@ -9,7 +9,7 @@
|
||||
<ErrorReportUrlHistory />
|
||||
<FallbackCulture>en-US</FallbackCulture>
|
||||
<VerifyUploadedFiles>false</VerifyUploadedFiles>
|
||||
<ProjectView>ShowAllFiles</ProjectView>
|
||||
<ProjectView>ProjectFiles</ProjectView>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<EnableSecurityDebugging>false</EnableSecurityDebugging>
|
||||
|
Reference in New Issue
Block a user