From ad2f8040d8620dc63e8f6ffd1995c2f77a36ab1b Mon Sep 17 00:00:00 2001 From: feyris-tan <4116042+feyris-tan@users.noreply.github.com> Date: Mon, 12 Jan 2026 22:51:27 +0100 Subject: [PATCH] Made first wizard page appear. --- .gitignore | 5 + Voile.Sqlite/Class1.cs | 16 ++ Voile.Sqlite/Voile.SQLite.csproj | 14 ++ Voile.slnx | 2 + Voile/DockContents/DockTaskList.Designer.cs | 110 ++++++---- Voile/DockContents/DockTaskList.cs | 34 ++- Voile/DockContents/DockTaskList.resx | 3 + Voile/FirstRunWizard.Designer.cs | 186 ++++++++++++++++ Voile/FirstRunWizard.cs | 37 ++++ Voile/FirstRunWizard.resx | 138 ++++++++++++ Voile/Form1.Designer.cs | 231 ++++++++++---------- Voile/Form1.cs | 97 ++++---- Voile/Program.cs | 2 +- Voile/Properties/Resources.Designer.cs | 72 ++++-- Voile/Properties/Resources.resx | 12 + Voile/Resources/hourglass.png | Bin 0 -> 744 bytes Voile/Resources/hourglass_go.png | Bin 0 -> 866 bytes Voile/Resources/hourglass_link.png | Bin 0 -> 871 bytes Voile/Resources/technlgy.bmp | Bin 0 -> 21718 bytes Voile/Tasks/StartupInitializeDatabase.cs | 43 ++++ Voile/Voile.csproj | 5 + Voile/Voile.csproj.user | 3 + Voile/VoileContext.cs | 51 +++++ Voile/VoileRunnable.cs | 13 ++ Voile/VoileTask.cs | 27 +++ 25 files changed, 873 insertions(+), 228 deletions(-) create mode 100644 Voile.Sqlite/Class1.cs create mode 100644 Voile.Sqlite/Voile.SQLite.csproj create mode 100644 Voile/FirstRunWizard.Designer.cs create mode 100644 Voile/FirstRunWizard.cs create mode 100644 Voile/FirstRunWizard.resx create mode 100644 Voile/Resources/hourglass.png create mode 100644 Voile/Resources/hourglass_go.png create mode 100644 Voile/Resources/hourglass_link.png create mode 100644 Voile/Resources/technlgy.bmp create mode 100644 Voile/Tasks/StartupInitializeDatabase.cs create mode 100644 Voile/VoileContext.cs create mode 100644 Voile/VoileRunnable.cs create mode 100644 Voile/VoileTask.cs diff --git a/.gitignore b/.gitignore index 4613fd3..c4721f7 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,8 @@ /Voile/bin/Debug/net8.0-windows /Voile/obj/Debug/net8.0-windows /Voile/obj +/.vs/Voile.slnx/v17 +/.vs/Voile/CopilotIndices/17.14.1431.25910 +/Voile.Sqlite/bin/Debug/net8.0 +/Voile.Sqlite/obj/Debug/net8.0 +/Voile.Sqlite/obj diff --git a/Voile.Sqlite/Class1.cs b/Voile.Sqlite/Class1.cs new file mode 100644 index 0000000..5fc054e --- /dev/null +++ b/Voile.Sqlite/Class1.cs @@ -0,0 +1,16 @@ +//using Microsoft.Data.Sqlite; + +namespace Voile.Sqlite +{ + public class Class1 + { + public void Run() + { + /*SqliteConnectionStringBuilder scsb = new SqliteConnectionStringBuilder(); + scsb.DataSource = "blyat.db"; + SqliteConnection sc = new SqliteConnection(scsb.ConnectionString); + sc.Open();*/ + + } + } +} diff --git a/Voile.Sqlite/Voile.SQLite.csproj b/Voile.Sqlite/Voile.SQLite.csproj new file mode 100644 index 0000000..aa499ab --- /dev/null +++ b/Voile.Sqlite/Voile.SQLite.csproj @@ -0,0 +1,14 @@ + + + + net8.0 + enable + enable + + + + + + + + diff --git a/Voile.slnx b/Voile.slnx index eb5e5ce..443eaeb 100644 --- a/Voile.slnx +++ b/Voile.slnx @@ -1,3 +1,5 @@ + + diff --git a/Voile/DockContents/DockTaskList.Designer.cs b/Voile/DockContents/DockTaskList.Designer.cs index f0c6654..a366207 100644 --- a/Voile/DockContents/DockTaskList.Designer.cs +++ b/Voile/DockContents/DockTaskList.Designer.cs @@ -20,54 +20,68 @@ base.Dispose(disposing); } - #region Windows Form Designer generated code + #region Windows Form Designer generated code - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - listView1 = new ListView(); - toolStrip1 = new ToolStrip(); - SuspendLayout(); - // - // listView1 - // - listView1.Dock = DockStyle.Fill; - listView1.GridLines = true; - listView1.Location = new Point(0, 0); - listView1.MultiSelect = false; - listView1.Name = "listView1"; - listView1.Size = new Size(800, 450); - listView1.TabIndex = 0; - listView1.UseCompatibleStateImageBehavior = false; - listView1.View = View.Details; - // - // toolStrip1 - // - toolStrip1.Location = new Point(0, 0); - toolStrip1.Name = "toolStrip1"; - toolStrip1.Size = new Size(800, 25); - toolStrip1.TabIndex = 1; - toolStrip1.Text = "toolStrip1"; - // - // DockTaskList - // - AutoScaleDimensions = new SizeF(7F, 15F); - AutoScaleMode = AutoScaleMode.Font; - ClientSize = new Size(800, 450); - Controls.Add(toolStrip1); - Controls.Add(listView1); - Name = "DockTaskList"; - Text = "DockTaskList"; - ResumeLayout(false); - PerformLayout(); - } + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + components = new System.ComponentModel.Container(); + listView1 = new ListView(); + columnHeader1 = new ColumnHeader(); + imageList1 = new ImageList(components); + toolStrip1 = new ToolStrip(); + SuspendLayout(); + // + // listView1 + // + listView1.Columns.AddRange(new ColumnHeader[] { columnHeader1 }); + listView1.Dock = DockStyle.Fill; + listView1.GridLines = true; + listView1.Location = new Point(0, 0); + listView1.MultiSelect = false; + listView1.Name = "listView1"; + listView1.Size = new Size(800, 450); + listView1.SmallImageList = imageList1; + listView1.TabIndex = 0; + listView1.UseCompatibleStateImageBehavior = false; + listView1.View = View.Details; + listView1.SelectedIndexChanged += listView1_SelectedIndexChanged; + // + // imageList1 + // + imageList1.ColorDepth = ColorDepth.Depth32Bit; + imageList1.ImageSize = new Size(16, 16); + imageList1.TransparentColor = Color.Transparent; + // + // toolStrip1 + // + toolStrip1.Location = new Point(0, 0); + toolStrip1.Name = "toolStrip1"; + toolStrip1.Size = new Size(800, 25); + toolStrip1.TabIndex = 1; + toolStrip1.Text = "toolStrip1"; + // + // DockTaskList + // + AutoScaleDimensions = new SizeF(7F, 15F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(800, 450); + Controls.Add(toolStrip1); + Controls.Add(listView1); + Name = "DockTaskList"; + Text = "DockTaskList"; + Resize += DockTaskList_Resize; + ResumeLayout(false); + PerformLayout(); + } - #endregion - - private ListView listView1; - private ToolStrip toolStrip1; - } + #endregion + private ImageList imageList1; + private ToolStrip toolStrip1; + internal ListView listView1; + private ColumnHeader columnHeader1; + } } \ No newline at end of file diff --git a/Voile/DockContents/DockTaskList.cs b/Voile/DockContents/DockTaskList.cs index da5a6af..61e56a1 100644 --- a/Voile/DockContents/DockTaskList.cs +++ b/Voile/DockContents/DockTaskList.cs @@ -11,11 +11,31 @@ using WeifenLuo.WinFormsUI.Docking; namespace Voile.DockContents { - public partial class DockTaskList : DockContent - { - public DockTaskList() - { - InitializeComponent(); - } - } + public partial class DockTaskList : DockContent + { + public DockTaskList() + { + InitializeComponent(); + imageList1.Images.Add(Voile.Properties.Resources.hourglass); + imageList1.Images.Add(Voile.Properties.Resources.hourglass_go); + imageList1.Images.Add(Voile.Properties.Resources.hourglass_link); + } + + private void listView1_SelectedIndexChanged(object sender, EventArgs e) + { + + } + + private void DockTaskList_Resize(object sender, EventArgs e) + { + listView1.Columns[0].Width = listView1.Width; + } + + internal VoileTask AddTask(string name, VoileRunnable runnable = null) + { + VoileTask vt = new VoileTask(name, runnable); + listView1.Items.Add(vt); + return vt; + } + } } diff --git a/Voile/DockContents/DockTaskList.resx b/Voile/DockContents/DockTaskList.resx index ebe2cea..0305ee4 100644 --- a/Voile/DockContents/DockTaskList.resx +++ b/Voile/DockContents/DockTaskList.resx @@ -117,6 +117,9 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 122, 17 + 17, 17 diff --git a/Voile/FirstRunWizard.Designer.cs b/Voile/FirstRunWizard.Designer.cs new file mode 100644 index 0000000..b7ff3f8 --- /dev/null +++ b/Voile/FirstRunWizard.Designer.cs @@ -0,0 +1,186 @@ +namespace Voile +{ + partial class FirstRunWizard + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FirstRunWizard)); + pictureBox1 = new PictureBox(); + tabControl1 = new TabControl(); + tabPage1 = new TabPage(); + label2 = new Label(); + label1 = new Label(); + radioButton2 = new RadioButton(); + radioButton1 = new RadioButton(); + tabPage2 = new TabPage(); + button1 = new Button(); + button2 = new Button(); + ((System.ComponentModel.ISupportInitialize)pictureBox1).BeginInit(); + tabControl1.SuspendLayout(); + tabPage1.SuspendLayout(); + SuspendLayout(); + // + // pictureBox1 + // + pictureBox1.Image = Properties.Resources.technlgy; + pictureBox1.Location = new Point(12, 12); + pictureBox1.Name = "pictureBox1"; + pictureBox1.Size = new Size(120, 90); + pictureBox1.SizeMode = PictureBoxSizeMode.Zoom; + pictureBox1.TabIndex = 0; + pictureBox1.TabStop = false; + // + // tabControl1 + // + tabControl1.Controls.Add(tabPage1); + tabControl1.Controls.Add(tabPage2); + tabControl1.Location = new Point(138, 12); + tabControl1.Name = "tabControl1"; + tabControl1.SelectedIndex = 0; + tabControl1.Size = new Size(356, 412); + tabControl1.TabIndex = 1; + // + // tabPage1 + // + tabPage1.Controls.Add(label2); + tabPage1.Controls.Add(label1); + tabPage1.Controls.Add(radioButton2); + tabPage1.Controls.Add(radioButton1); + tabPage1.Location = new Point(4, 24); + tabPage1.Name = "tabPage1"; + tabPage1.Padding = new Padding(3); + tabPage1.Size = new Size(348, 384); + tabPage1.TabIndex = 0; + tabPage1.Text = "Welcome!"; + tabPage1.UseVisualStyleBackColor = true; + // + // label2 + // + label2.AutoSize = true; + label2.Location = new Point(6, 3); + label2.Name = "label2"; + label2.Size = new Size(328, 240); + label2.TabIndex = 3; + label2.Text = resources.GetString("label2.Text"); + // + // label1 + // + label1.AutoSize = true; + label1.Location = new Point(6, 308); + label1.Name = "label1"; + label1.Size = new Size(202, 15); + label1.TabIndex = 2; + label1.Text = "(You can change these options later!)"; + // + // radioButton2 + // + radioButton2.AutoSize = true; + radioButton2.Location = new Point(6, 271); + radioButton2.Name = "radioButton2"; + radioButton2.Size = new Size(299, 34); + radioButton2.TabIndex = 1; + radioButton2.TabStop = true; + radioButton2.Text = "I’m an expert. Let me choose my own database and \r\nstorage options."; + radioButton2.UseVisualStyleBackColor = true; + // + // radioButton1 + // + radioButton1.AutoSize = true; + radioButton1.Checked = true; + radioButton1.Location = new Point(6, 246); + radioButton1.Name = "radioButton1"; + radioButton1.Size = new Size(298, 19); + radioButton1.TabIndex = 0; + radioButton1.TabStop = true; + radioButton1.Text = "I’m a beginner. Set things up for me automatically. "; + radioButton1.UseVisualStyleBackColor = true; + // + // tabPage2 + // + tabPage2.Location = new Point(4, 24); + tabPage2.Name = "tabPage2"; + tabPage2.Padding = new Padding(3); + tabPage2.Size = new Size(348, 384); + tabPage2.TabIndex = 1; + tabPage2.Text = "tabPage2"; + tabPage2.UseVisualStyleBackColor = true; + // + // button1 + // + button1.Location = new Point(419, 430); + button1.Name = "button1"; + button1.Size = new Size(75, 23); + button1.TabIndex = 2; + button1.Text = "Next >"; + button1.UseVisualStyleBackColor = true; + // + // button2 + // + button2.Enabled = false; + button2.Location = new Point(338, 430); + button2.Name = "button2"; + button2.Size = new Size(75, 23); + button2.TabIndex = 3; + button2.Text = "< Back"; + button2.UseVisualStyleBackColor = true; + // + // FirstRunWizard + // + AutoScaleDimensions = new SizeF(7F, 15F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(502, 465); + Controls.Add(button2); + Controls.Add(button1); + Controls.Add(tabControl1); + Controls.Add(pictureBox1); + FormBorderStyle = FormBorderStyle.FixedSingle; + MaximizeBox = false; + MinimizeBox = false; + Name = "FirstRunWizard"; + ShowIcon = false; + Text = "Voile - First Run Wizard"; + ((System.ComponentModel.ISupportInitialize)pictureBox1).EndInit(); + tabControl1.ResumeLayout(false); + tabPage1.ResumeLayout(false); + tabPage1.PerformLayout(); + ResumeLayout(false); + } + + #endregion + + private PictureBox pictureBox1; + private TabControl tabControl1; + private TabPage tabPage1; + private TabPage tabPage2; + private Button button1; + private Button button2; + private RadioButton radioButton1; + private RadioButton radioButton2; + private Label label1; + private Label label2; + } +} \ No newline at end of file diff --git a/Voile/FirstRunWizard.cs b/Voile/FirstRunWizard.cs new file mode 100644 index 0000000..9c190dc --- /dev/null +++ b/Voile/FirstRunWizard.cs @@ -0,0 +1,37 @@ +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 Voile +{ + public partial class FirstRunWizard : Form + { + public FirstRunWizard() + { + InitializeComponent(); + DisplayTabPage(0); + } + + private TabPage[] allPages; + public void DisplayTabPage(int target) + { + if (allPages == null) + { + allPages = new TabPage[tabControl1.TabPages.Count]; + for (int i = 0; i < tabControl1.TabPages.Count; i++) + { + allPages[i] = tabControl1.TabPages[i]; + } + } + + tabControl1.TabPages.Clear(); + tabControl1.TabPages.Add(allPages[target]); + } + } +} diff --git a/Voile/FirstRunWizard.resx b/Voile/FirstRunWizard.resx new file mode 100644 index 0000000..55878d3 --- /dev/null +++ b/Voile/FirstRunWizard.resx @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Welcome to Voile! + +It looks like you're starting Voile for the first time. +Voile helps you catalogue and analyze your Transport Stream +(TS) recordings in a clear and organized way. + +To store information about and manage your recordings +efficiently, Voile uses a database. If you also want Voile +to extract and save embedded files from your streams, +it can use a simple storage folder for that too. + +No need to worry about the technical details. +If you're not familiar with databases, Voile can set everything +up automatically so you can start using the app right away. + +How would you like to continue? + + \ No newline at end of file diff --git a/Voile/Form1.Designer.cs b/Voile/Form1.Designer.cs index eee0ac4..ed6da1d 100644 --- a/Voile/Form1.Designer.cs +++ b/Voile/Form1.Designer.cs @@ -20,124 +20,125 @@ base.Dispose(disposing); } - #region Windows Form Designer generated code + #region Windows Form Designer generated code - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1)); - menuStrip1 = new MenuStrip(); - fileToolStripMenuItem = new ToolStripMenuItem(); - stopAllAndExitToolStripMenuItem = new ToolStripMenuItem(); - toolStrip1 = new ToolStrip(); - toolStripButton1 = new ToolStripButton(); - toolStripButton2 = new ToolStripButton(); - statusStrip1 = new StatusStrip(); - dockPanel1 = new WeifenLuo.WinFormsUI.Docking.DockPanel(); - vS2003Theme1 = new WeifenLuo.WinFormsUI.Docking.VS2003Theme(); - menuStrip1.SuspendLayout(); - toolStrip1.SuspendLayout(); - SuspendLayout(); - // - // menuStrip1 - // - menuStrip1.Items.AddRange(new ToolStripItem[] { fileToolStripMenuItem }); - menuStrip1.Location = new Point(0, 0); - menuStrip1.Name = "menuStrip1"; - menuStrip1.Size = new Size(800, 24); - menuStrip1.TabIndex = 1; - menuStrip1.Text = "menuStrip1"; - // - // fileToolStripMenuItem - // - fileToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { stopAllAndExitToolStripMenuItem }); - fileToolStripMenuItem.Name = "fileToolStripMenuItem"; - fileToolStripMenuItem.Size = new Size(37, 20); - fileToolStripMenuItem.Text = "File"; - // - // stopAllAndExitToolStripMenuItem - // - stopAllAndExitToolStripMenuItem.Name = "stopAllAndExitToolStripMenuItem"; - stopAllAndExitToolStripMenuItem.Size = new Size(180, 22); - stopAllAndExitToolStripMenuItem.Text = "Stop all and Exit"; - stopAllAndExitToolStripMenuItem.Click += stopAllAndExitToolStripMenuItem_Click; - // - // toolStrip1 - // - toolStrip1.Items.AddRange(new ToolStripItem[] { toolStripButton1, toolStripButton2 }); - toolStrip1.Location = new Point(0, 24); - toolStrip1.Name = "toolStrip1"; - toolStrip1.Size = new Size(800, 54); - toolStrip1.TabIndex = 2; - toolStrip1.Text = "toolStrip1"; - // - // toolStripButton1 - // - toolStripButton1.Image = Properties.Resources.inetwiz_100_1_32x32x4; - toolStripButton1.ImageScaling = ToolStripItemImageScaling.None; - toolStripButton1.ImageTransparentColor = Color.Magenta; - toolStripButton1.Name = "toolStripButton1"; - toolStripButton1.Size = new Size(153, 51); - toolStripButton1.Text = "Quick Connect to TCP Port"; - toolStripButton1.TextAlign = ContentAlignment.BottomCenter; - toolStripButton1.TextImageRelation = TextImageRelation.ImageAboveText; - // - // toolStripButton2 - // - toolStripButton2.Image = Properties.Resources.URLPKR_141_1_32x32x4; - toolStripButton2.ImageScaling = ToolStripItemImageScaling.None; - toolStripButton2.ImageTransparentColor = Color.Magenta; - toolStripButton2.Name = "toolStripButton2"; - toolStripButton2.Size = new Size(111, 51); - toolStripButton2.Text = "Quick Open TS File"; - toolStripButton2.TextAlign = ContentAlignment.BottomCenter; - toolStripButton2.TextImageRelation = TextImageRelation.ImageAboveText; - // - // statusStrip1 - // - statusStrip1.Location = new Point(0, 428); - statusStrip1.Name = "statusStrip1"; - statusStrip1.Size = new Size(800, 22); - statusStrip1.TabIndex = 3; - statusStrip1.Text = "statusStrip1"; - // - // dockPanel1 - // - dockPanel1.Dock = DockStyle.Fill; - dockPanel1.DockRightPortion = 0.3D; - dockPanel1.Location = new Point(0, 78); - dockPanel1.Name = "dockPanel1"; - dockPanel1.Size = new Size(800, 350); - dockPanel1.TabIndex = 5; - // - // Form1 - // - AutoScaleDimensions = new SizeF(7F, 15F); - AutoScaleMode = AutoScaleMode.Font; - ClientSize = new Size(800, 450); - Controls.Add(dockPanel1); - Controls.Add(statusStrip1); - Controls.Add(toolStrip1); - Controls.Add(menuStrip1); - Icon = (Icon)resources.GetObject("$this.Icon"); - IsMdiContainer = true; - MainMenuStrip = menuStrip1; - Name = "Form1"; - Text = "Voile"; - menuStrip1.ResumeLayout(false); - menuStrip1.PerformLayout(); - toolStrip1.ResumeLayout(false); - toolStrip1.PerformLayout(); - ResumeLayout(false); - PerformLayout(); - } + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1)); + menuStrip1 = new MenuStrip(); + fileToolStripMenuItem = new ToolStripMenuItem(); + stopAllAndExitToolStripMenuItem = new ToolStripMenuItem(); + toolStrip1 = new ToolStrip(); + toolStripButton1 = new ToolStripButton(); + toolStripButton2 = new ToolStripButton(); + statusStrip1 = new StatusStrip(); + dockPanel1 = new WeifenLuo.WinFormsUI.Docking.DockPanel(); + vS2003Theme1 = new WeifenLuo.WinFormsUI.Docking.VS2003Theme(); + menuStrip1.SuspendLayout(); + toolStrip1.SuspendLayout(); + SuspendLayout(); + // + // menuStrip1 + // + menuStrip1.Items.AddRange(new ToolStripItem[] { fileToolStripMenuItem }); + menuStrip1.Location = new Point(0, 0); + menuStrip1.Name = "menuStrip1"; + menuStrip1.Size = new Size(800, 24); + menuStrip1.TabIndex = 1; + menuStrip1.Text = "menuStrip1"; + // + // fileToolStripMenuItem + // + fileToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { stopAllAndExitToolStripMenuItem }); + fileToolStripMenuItem.Name = "fileToolStripMenuItem"; + fileToolStripMenuItem.Size = new Size(37, 20); + fileToolStripMenuItem.Text = "File"; + // + // stopAllAndExitToolStripMenuItem + // + stopAllAndExitToolStripMenuItem.Name = "stopAllAndExitToolStripMenuItem"; + stopAllAndExitToolStripMenuItem.Size = new Size(158, 22); + stopAllAndExitToolStripMenuItem.Text = "Stop all and Exit"; + stopAllAndExitToolStripMenuItem.Click += stopAllAndExitToolStripMenuItem_Click; + // + // toolStrip1 + // + toolStrip1.Items.AddRange(new ToolStripItem[] { toolStripButton1, toolStripButton2 }); + toolStrip1.Location = new Point(0, 24); + toolStrip1.Name = "toolStrip1"; + toolStrip1.Size = new Size(800, 54); + toolStrip1.TabIndex = 2; + toolStrip1.Text = "toolStrip1"; + // + // toolStripButton1 + // + toolStripButton1.Image = Properties.Resources.inetwiz_100_1_32x32x4; + toolStripButton1.ImageScaling = ToolStripItemImageScaling.None; + toolStripButton1.ImageTransparentColor = Color.Magenta; + toolStripButton1.Name = "toolStripButton1"; + toolStripButton1.Size = new Size(152, 51); + toolStripButton1.Text = "Quick Connect to TCP Port"; + toolStripButton1.TextAlign = ContentAlignment.BottomCenter; + toolStripButton1.TextImageRelation = TextImageRelation.ImageAboveText; + // + // toolStripButton2 + // + toolStripButton2.Image = Properties.Resources.URLPKR_141_1_32x32x4; + toolStripButton2.ImageScaling = ToolStripItemImageScaling.None; + toolStripButton2.ImageTransparentColor = Color.Magenta; + toolStripButton2.Name = "toolStripButton2"; + toolStripButton2.Size = new Size(110, 51); + toolStripButton2.Text = "Quick Open TS File"; + toolStripButton2.TextAlign = ContentAlignment.BottomCenter; + toolStripButton2.TextImageRelation = TextImageRelation.ImageAboveText; + // + // statusStrip1 + // + statusStrip1.Location = new Point(0, 428); + statusStrip1.Name = "statusStrip1"; + statusStrip1.Size = new Size(800, 22); + statusStrip1.TabIndex = 3; + statusStrip1.Text = "statusStrip1"; + // + // dockPanel1 + // + dockPanel1.Dock = DockStyle.Fill; + dockPanel1.DockRightPortion = 0.3D; + dockPanel1.Location = new Point(0, 78); + dockPanel1.Name = "dockPanel1"; + dockPanel1.Size = new Size(800, 350); + dockPanel1.TabIndex = 5; + // + // Form1 + // + AutoScaleDimensions = new SizeF(7F, 15F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(800, 450); + Controls.Add(dockPanel1); + Controls.Add(statusStrip1); + Controls.Add(toolStrip1); + Controls.Add(menuStrip1); + Icon = (Icon)resources.GetObject("$this.Icon"); + IsMdiContainer = true; + MainMenuStrip = menuStrip1; + Name = "Form1"; + Text = "Voile"; + Shown += Form1_Shown; + menuStrip1.ResumeLayout(false); + menuStrip1.PerformLayout(); + toolStrip1.ResumeLayout(false); + toolStrip1.PerformLayout(); + ResumeLayout(false); + PerformLayout(); + } - #endregion + #endregion - private MenuStrip menuStrip1; + private MenuStrip menuStrip1; private ToolStrip toolStrip1; private StatusStrip statusStrip1; private WeifenLuo.WinFormsUI.Docking.DockPanel dockPanel1; diff --git a/Voile/Form1.cs b/Voile/Form1.cs index 3ae2f64..cb84f43 100644 --- a/Voile/Form1.cs +++ b/Voile/Form1.cs @@ -1,55 +1,70 @@ using Voile.DockContents; +using Voile.Tasks; using WeifenLuo.WinFormsUI.Docking; namespace Voile { - public partial class Form1 : Form - { - private static readonly log4net.ILog logger = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + public partial class Form1 : Form + { + private static readonly log4net.ILog logger = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - public Form1() - { - InitializeComponent(); - dockPanel1.Theme = vS2003Theme1; - logger.Info("Main Form initalized."); + public Form1() + { + InitializeComponent(); + dockPanel1.Theme = vS2003Theme1; + logger.Info("Main Form initalized."); - DockLog = new DockContents.DockLog(); - SetDockDefault(DockLog, "Log"); - DockLog.Show(dockPanel1, DockState.DockBottom); - DockLog.InitalizeLogging(); - logger.Info("Attached dockable Logger."); + DockLog = new DockContents.DockLog(); + SetDockDefault(DockLog, "Log"); + DockLog.Show(dockPanel1, DockState.DockBottom); + DockLog.InitalizeLogging(); + logger.Info("Attached dockable Logger."); - DockTaskList = new DockContents.DockTaskList(); - SetDockDefault(DockTaskList, "Tasks"); - DockTaskList.Show(DockLog.Pane, DockAlignment.Right, 0.5); + DockTaskList = new DockContents.DockTaskList(); + SetDockDefault(DockTaskList, "Tasks"); + DockTaskList.Show(DockLog.Pane, DockAlignment.Right, 0.5); - DockWorldView = new DockContents.DockWorldView(); - SetDockDefault(DockWorldView, "Database"); - DockWorldView.Show(dockPanel1, DockState.DockLeft); - } + DockWorldView = new DockContents.DockWorldView(); + SetDockDefault(DockWorldView, "Database"); + DockWorldView.Show(dockPanel1, DockState.DockLeft); - private void SetDockDefault(DockContent dock, string text) - { - dock.Text = text; - dock.CloseButtonVisible = false; - dock.FormClosing += new FormClosingEventHandler(defaultDock_FormClosing); - } + } - private void defaultDock_FormClosing(object? sender, FormClosingEventArgs e) - { - if (e.CloseReason == CloseReason.UserClosing) - { - e.Cancel = true; - } - } + private void SetDockDefault(DockContent dock, string text) + { + dock.Text = text; + dock.CloseButtonVisible = false; + dock.FormClosing += new FormClosingEventHandler(defaultDock_FormClosing); + } - private void stopAllAndExitToolStripMenuItem_Click(object sender, EventArgs e) - { - this.Close(); - } + private void defaultDock_FormClosing(object? sender, FormClosingEventArgs e) + { + if (e.CloseReason == CloseReason.UserClosing) + { + e.Cancel = true; + } + } - public DockLog DockLog { get; private set; } - public DockTaskList DockTaskList { get; private set; } - public DockWorldView DockWorldView { get; private set; } - } + private void stopAllAndExitToolStripMenuItem_Click(object sender, EventArgs e) + { + this.Close(); + } + + public DockLog DockLog { get; private set; } + public DockTaskList DockTaskList { get; private set; } + public DockWorldView DockWorldView { get; private set; } + + + private void Form1_Shown(object sender, EventArgs e) + { + VoileTask task = DockTaskList.AddTask("Initialize Database engine"); + task.ImageIndex = 1; + + StartupInitializeDatabase initializeDatabase = new StartupInitializeDatabase(); + initializeDatabase.Form1 = this; + initializeDatabase.Run(); + + DockTaskList.listView1.Items.Remove(task); + } + } } diff --git a/Voile/Program.cs b/Voile/Program.cs index 58af3f6..623455d 100644 --- a/Voile/Program.cs +++ b/Voile/Program.cs @@ -22,7 +22,7 @@ namespace Voile Cursor hand = new Cursor(new MemoryStream(Voile.Properties.Resources.H_POINT)); form1.Cursor = hand; - logger.Debug("Okay, let's rock."); + logger.Debug("Main window showing."); Application.Run(form1); } } diff --git a/Voile/Properties/Resources.Designer.cs b/Voile/Properties/Resources.Designer.cs index 64589f8..3a403f7 100644 --- a/Voile/Properties/Resources.Designer.cs +++ b/Voile/Properties/Resources.Designer.cs @@ -1,10 +1,10 @@ //------------------------------------------------------------------------------ // -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 +// Dieser Code wurde von einem Tool generiert. +// Laufzeitversion:4.0.30319.42000 // -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn +// der Code erneut generiert wird. // //------------------------------------------------------------------------------ @@ -13,13 +13,13 @@ namespace Voile.Properties { /// - /// A strongly-typed resource class, for looking up localized strings, etc. + /// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. /// - // 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", "18.0.0.0")] + // Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert + // -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert. + // Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen + // mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Resources { @@ -33,7 +33,7 @@ namespace Voile.Properties { } /// - /// Returns the cached ResourceManager instance used by this class. + /// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Resources.ResourceManager ResourceManager { @@ -47,8 +47,8 @@ namespace Voile.Properties { } /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. + /// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle + /// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Globalization.CultureInfo Culture { @@ -61,7 +61,7 @@ namespace Voile.Properties { } /// - /// Looks up a localized resource of type System.Byte[]. + /// Sucht eine lokalisierte Ressource vom Typ System.Byte[]. /// internal static byte[] H_POINT { get { @@ -71,7 +71,37 @@ namespace Voile.Properties { } /// - /// Looks up a localized resource of type System.Drawing.Bitmap. + /// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap hourglass { + get { + object obj = ResourceManager.GetObject("hourglass", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap hourglass_go { + get { + object obj = ResourceManager.GetObject("hourglass_go", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap hourglass_link { + get { + object obj = ResourceManager.GetObject("hourglass_link", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap inetwiz_100_1_32x32x4 { get { @@ -81,7 +111,17 @@ namespace Voile.Properties { } /// - /// Looks up a localized resource of type System.Drawing.Bitmap. + /// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap technlgy { + get { + object obj = ResourceManager.GetObject("technlgy", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap URLPKR_141_1_32x32x4 { get { diff --git a/Voile/Properties/Resources.resx b/Voile/Properties/Resources.resx index 9c721bf..3d643ce 100644 --- a/Voile/Properties/Resources.resx +++ b/Voile/Properties/Resources.resx @@ -118,6 +118,15 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + ..\Resources\hourglass.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\hourglass_go.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\hourglass_link.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\H_POINT.CUR;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Mauszeiger @@ -125,6 +134,9 @@ ..\Resources\inetwiz_100_1_32x32x4.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\technlgy.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\URLPKR_141_1_32x32x4.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a diff --git a/Voile/Resources/hourglass.png b/Voile/Resources/hourglass.png new file mode 100644 index 0000000000000000000000000000000000000000..57b03ce7a61aa3b47d20235987a1c1918c5cb535 GIT binary pat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hourglass_link.png b/Voile/Resources/hourglass_link.png new file mode 100644 index 0000000000000000000000000000000000000000..ecc59b0abe2c63a263c3c1ff9cf35a88575c129a GIT binary patch literal 871 zcmV-t1DO1YP)Oo{xzq%%#lJ z5=G}XEzwPzy2?K1rp|e`oX6$dN zltkh~-UIZBZXYRxZq~-QYh>l)iwarDxtQF*vrYh5G%RYEnClY5JS4-4wgPLq8mvxK z!!lBaMO7h8?{h)6i7{C#0Ff68Io}nOfN%(=YoARV3zo;qD9W)kT!MuG8RoikK(=N; z-;fM#Sprm9A&ej|XR@c3qzmy4yd(3t&J+~WfX^9Kxxz! zG^7TgRGJQHU6->%KtFvmhuvfI2Uy#-Vein6eVZNYJ3ldH-ovPI7lyS1kgEr1*Q`R? zY3M!D_nA=^gtVHEi8Kf_cjZ{n9>Wsi6An4-_d)_JR(B{ABo)fTmUZ-K9;t zMSdi=VcIxk!ky#mC{!9}BptIZzlZ-298*8EGN>_HF>2U`tlOyi+sr=&jYG@Beb6Pn+cQYO>;Z4va(TGS&7uN3?!HLEeNFw-^9d3lJ2FYrETzdyr-_N zu4f$K+CfWe6R~K|m6jquKOYv01tdvgU|<00uXB<3Di8Y4UykS=K@iLgo6XK-!quuJ zWshzh^3Gleg+gd_I*7&T@bmKnhr@wHB7s04U}|4B+a44Y)JaPc5)!sp4Lv&Nxott%>8@eLTCi{FI?6}==t*pq~-F{WAaCLNC3HGVWd@FPD zq(c$MaTcf9ri;loV1lg_xQnkyN6}ZjpZYkLwzRd3l!?{&qI&_1tDkGFZdBYGg1$ z?=#W6FtnUPsQX)wJZ+9l|QiX;)Xk{jz; z+o7#X-K0~sVcb#ONu%`?A?_F1Jy#5~LEaYXx8DDw|C2CDRW+zZ+Rr9_I2qY z5p?n7f9%)C01se`k-zm1=aYxShhO58**Nks9|}naD#oh%nqvue6s7U6?%qm==_GgU zZfDS*VX%V05&4nlHZN%0N`@ZP^`CI&();Jt!~J^f|X$GG8W_23Ia6zfxVIVTj`U8Gcj@ zK^Q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&b3OXbK7S* zLq4IJ*anTra;y0)_N=g-d^__)zDP?7u-jS#xB^)1zZ>Jbt~vrV12fmzoH5eGuS{eE z4t)JazntZj{Vd9_PBHEau{FL8*PSNcORc}(y2NKU%JNQ5n`G-zwCHH%)CTT-%j-u{ zYJSRT2;m2zm$SCLZD`l^{Vrl}xYkm;;IpjA(uAsNeszWO+_x&hPJGEP@9_IKSog&z zAOB{1?c=rkTamf+-Pg1J{^Hn5Mg|QXH)gehl5D(6vk&Wu4J*O9;P3SN}~o9EARTVfS}8?WXI7Yr8p*&Sx&^%D!j;o0`uC!f6d z^poueA4gkF-s?ZnfOwTIt-QMM-TNne4=8W7`{SbOCt5{kz=5y#-9BGf=G!eZUweLH zfgc-!=+-AE+uNV7OUw5Nii%kAsy#909 zJ~(!jbRO>hkF{v~Hy{0Si^k}#QTx#^F0tO_fJr2NF|fy?@bUOrkC=#SS#|P`c7QdXK6+bT0HuJUz9s1l!fHjRVj zui>UrmuKgJ^;^JQ-U6v(GDT?&tshk2rxRg1=7-5Z>lCavYL#hN+R SlzqVpGb_`}cP;_maPV){8deDa literal 0 HcmV?d00001 diff --git a/Voile/Tasks/StartupInitializeDatabase.cs b/Voile/Tasks/StartupInitializeDatabase.cs new file mode 100644 index 0000000..5fc1eed --- /dev/null +++ b/Voile/Tasks/StartupInitializeDatabase.cs @@ -0,0 +1,43 @@ +using skyscraper5.Skyscraper; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Voile.Tasks +{ + internal class StartupInitializeDatabase : VoileRunnable + { + public Form1 Form1 { get; internal set; } + private Ini ini; + public void Run() + { + if (IsFirstRun()) + { + FirstRunWizard frw = new FirstRunWizard(); + DialogResult dr = frw.ShowDialog(Form1); + } + } + + private bool IsFirstRun() + { + VoileContext voileContext = VoileContext.GetContext(); + FileInfo fileInfo = voileContext.GetVoileIniFile(); + if (!fileInfo.Exists) + { + voileContext.Ini = new Ini(); + ini = voileContext.Ini; + return true; + } + + voileContext.Ini = new Ini(fileInfo.FullName); + + bool firstRunComplete = ini.ReadValue("voile", "firstRunComplete", false); + if (!firstRunComplete) + return true; + + return false; + } + } +} diff --git a/Voile/Voile.csproj b/Voile/Voile.csproj index 34b8f0e..8848544 100644 --- a/Voile/Voile.csproj +++ b/Voile/Voile.csproj @@ -19,6 +19,11 @@ + + + + + True diff --git a/Voile/Voile.csproj.user b/Voile/Voile.csproj.user index e0f7126..fedff3d 100644 --- a/Voile/Voile.csproj.user +++ b/Voile/Voile.csproj.user @@ -13,6 +13,9 @@ Form + + Form + Form diff --git a/Voile/VoileContext.cs b/Voile/VoileContext.cs new file mode 100644 index 0000000..95a3953 --- /dev/null +++ b/Voile/VoileContext.cs @@ -0,0 +1,51 @@ +using skyscraper5.Skyscraper; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; + +namespace Voile +{ + internal class VoileContext + { + private static VoileContext _instance; + + public static VoileContext GetContext() + { + if (_instance == null) + { + _instance = new VoileContext(); + } + return _instance; + } + + private DirectoryInfo voileDirectory; + public DirectoryInfo GetVoileDirectory() + { + if (voileDirectory == null) + { + Type type = typeof(VoileContext); + Assembly assembly = type.Assembly; + FileInfo fi = new FileInfo(assembly.Location); + voileDirectory = fi.Directory; + } + return voileDirectory; + } + + private FileInfo voileIniFile; + public FileInfo GetVoileIniFile() + { + if (voileIniFile == null) + { + DirectoryInfo directoryInfo = GetVoileDirectory(); + string path = Path.Combine(directoryInfo.FullName, "voile.ini"); + voileIniFile = new FileInfo(path); + } + return voileIniFile; + } + + public Ini Ini { get; set; } + } +} diff --git a/Voile/VoileRunnable.cs b/Voile/VoileRunnable.cs new file mode 100644 index 0000000..c5c8109 --- /dev/null +++ b/Voile/VoileRunnable.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Voile +{ + internal interface VoileRunnable + { + void Run(); + } +} diff --git a/Voile/VoileTask.cs b/Voile/VoileTask.cs new file mode 100644 index 0000000..bb81114 --- /dev/null +++ b/Voile/VoileTask.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Voile +{ + internal class VoileTask : ListViewItem + { + public VoileTask(string name, VoileRunnable runnable = null) + { + this.Name = name; + this.Text = name; + this.Guid = Guid.NewGuid(); + this.ImageIndex = 0; + this.Runnable = runnable; + } + + public string Name { get; private set; } + + public Guid Guid { get; private set; } + + + public VoileRunnable Runnable { get; private set; } + } +}