TimeTable/TimeTable/view/RowEdit.Designer.cs

197 lines
6.5 KiB
C#

using Microsoft.IdentityModel.Tokens;
using System.Windows.Forms;
using TimeTable.controll;
using TimeTable.model;
namespace TimeTable.view {
partial class RowEdit {
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
Main main;
/// <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() {
uidTxt = new Label();
startTxt = new Label();
EndTxt = new Label();
textTxt = new Label();
uidLbl = new Label();
startDatePicker = new DateTimePicker();
endDatePicker = new DateTimePicker();
textBox = new TextBox();
btnSave = new Button();
btnCancel = new Button();
SuspendLayout();
//
// uidTxt
//
uidTxt.AutoSize = true;
uidTxt.Location = new Point(12, 20);
uidTxt.Name = "uidTxt";
uidTxt.Size = new Size(34, 20);
uidTxt.TabIndex = 0;
uidTxt.Text = "UID";
//
// startTxt
//
startTxt.AutoSize = true;
startTxt.Location = new Point(12, 54);
startTxt.Name = "startTxt";
startTxt.Size = new Size(40, 20);
startTxt.TabIndex = 1;
startTxt.Text = "Start";
//
// EndTxt
//
EndTxt.AutoSize = true;
EndTxt.Location = new Point(12, 88);
EndTxt.Name = "EndTxt";
EndTxt.Size = new Size(34, 20);
EndTxt.TabIndex = 2;
EndTxt.Text = "End";
//
// textTxt
//
textTxt.AutoSize = true;
textTxt.Location = new Point(12, 126);
textTxt.Name = "textTxt";
textTxt.Size = new Size(36, 20);
textTxt.TabIndex = 3;
textTxt.Text = "Text";
//
// uidText
//
uidLbl.AutoSize = true;
uidLbl.Location = new Point(71, 20);
uidLbl.Name = "uidText";
uidLbl.Size = new Size(34, 20);
uidLbl.TabIndex = 4;
uidLbl.Text = "UID";
//
// startDatePicker
//
startDatePicker.CustomFormat = "dd-mm-yyyy HH:mm:ss";
startDatePicker.Format = DateTimePickerFormat.Custom;
startDatePicker.ShowUpDown = true;
startDatePicker.Location = new Point(71, 49);
startDatePicker.Name = "startDatePicker";
startDatePicker.Size = new Size(230, 27);
startDatePicker.TabIndex = 5;
//
// endDatePicker
//
endDatePicker.CustomFormat = "dd-mm-yyyy HH:mm:ss";
endDatePicker.Format = DateTimePickerFormat.Custom;
endDatePicker.ShowUpDown = true;
endDatePicker.Location = new Point(71, 88);
endDatePicker.Name = "endDatePicker";
endDatePicker.Size = new Size(230, 27);
endDatePicker.TabIndex = 6;
//
// textBox
//
textBox.Location = new Point(71, 126);
textBox.Name = "textBox";
textBox.Size = new Size(230, 27);
textBox.TabIndex = 7;
//
// btnSave
//
btnSave.Location = new Point(98, 173);
btnSave.Name = "btnSave";
btnSave.Size = new Size(101, 30);
btnSave.TabIndex = 8;
btnSave.Text = "Save";
btnSave.UseVisualStyleBackColor = true;
btnSave.Click += btnSaveCmd;
//
// btnCancel
//
btnCancel.Location = new Point(212, 173);
btnCancel.Name = "btnCancel";
btnCancel.Size = new Size(101, 30);
btnCancel.TabIndex = 9;
btnCancel.Text = "Cancel";
btnCancel.UseVisualStyleBackColor = true;
btnCancel.Click += btnCancelCmd;
//
// RowEdit
//
AutoScaleDimensions = new SizeF(8F, 20F);
AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(325, 215);
Controls.Add(btnCancel);
Controls.Add(btnSave);
Controls.Add(textBox);
Controls.Add(endDatePicker);
Controls.Add(startDatePicker);
Controls.Add(uidLbl);
Controls.Add(textTxt);
Controls.Add(EndTxt);
Controls.Add(startTxt);
Controls.Add(uidTxt);
FormBorderStyle = FormBorderStyle.FixedSingle;
Name = "RowEdit";
Text = "RowEdit";
ResumeLayout(false);
PerformLayout();
}
private void btnCancelCmd(object sender, EventArgs e) {
this.Close();
}
private void btnSaveCmd(object sender, EventArgs e) {
string cmd = SqliteTimeTableCommands.UpdateCmd(uidLbl.Text, startDatePicker.Value, endDatePicker.Value, textBox.Text);
main.executeSql(cmd);
}
#endregion
public void Data(string uid, string start, string end, string text, Main mainView) {
main = mainView;
uidLbl.Text = uid;
if (!start.IsNullOrEmpty()) {
startDatePicker.Text = start;
}
if (!end.IsNullOrEmpty()) {
endDatePicker.Text = end;
}
if (!text.IsNullOrEmpty()) {
textBox.Text = text;
}
}
private Label uidTxt;
private Label startTxt;
private Label EndTxt;
private Label textTxt;
private Label uidLbl;
private DateTimePicker startDatePicker;
private DateTimePicker endDatePicker;
private TextBox textBox;
private Button btnSave;
private Button btnCancel;
}
}