diff --git a/ToDo.txt b/ToDo.txt index be07ecd..43d876f 100644 --- a/ToDo.txt +++ b/ToDo.txt @@ -1,2 +1,4 @@ ProgressBar for Downloads -Icons \ No newline at end of file +Icons +List of installed and updatable apps +Run apps from UpTool \ No newline at end of file diff --git a/UpTool2/MainForm.Designer.cs b/UpTool2/MainForm.Designer.cs index 4975772..9c4ab09 100644 --- a/UpTool2/MainForm.Designer.cs +++ b/UpTool2/MainForm.Designer.cs @@ -28,6 +28,7 @@ /// private void InitializeComponent() { + this.components = new System.ComponentModel.Container(); this.sidebarPanel = new System.Windows.Forms.FlowLayoutPanel(); this.infoPanel = new System.Windows.Forms.Panel(); this.action_remove = new System.Windows.Forms.Button(); @@ -39,7 +40,8 @@ this.optionsPanel = new System.Windows.Forms.Panel(); this.searchBox = new System.Windows.Forms.TextBox(); this.controls_settings = new System.Windows.Forms.Button(); - this.button1 = new System.Windows.Forms.Button(); + this.controls_reload = new System.Windows.Forms.Button(); + this.toolTip = new System.Windows.Forms.ToolTip(this.components); this.infoPanel.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit(); this.splitContainer.Panel1.SuspendLayout(); @@ -75,7 +77,7 @@ // this.action_remove.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.action_remove.Enabled = false; - this.action_remove.Location = new System.Drawing.Point(435, 12); + this.action_remove.Location = new System.Drawing.Point(448, 5); this.action_remove.Name = "action_remove"; this.action_remove.Size = new System.Drawing.Size(23, 23); this.action_remove.TabIndex = 4; @@ -87,7 +89,7 @@ // this.action_update.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.action_update.Enabled = false; - this.action_update.Location = new System.Drawing.Point(464, 12); + this.action_update.Location = new System.Drawing.Point(475, 5); this.action_update.Name = "action_update"; this.action_update.Size = new System.Drawing.Size(23, 23); this.action_update.TabIndex = 3; @@ -99,7 +101,7 @@ // this.action_install.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.action_install.Enabled = false; - this.action_install.Location = new System.Drawing.Point(493, 12); + this.action_install.Location = new System.Drawing.Point(502, 5); this.action_install.Name = "action_install"; this.action_install.Size = new System.Drawing.Size(23, 23); this.action_install.TabIndex = 2; @@ -109,16 +111,16 @@ // // infoPanel_Description // - this.infoPanel_Description.Location = new System.Drawing.Point(3, 40); + this.infoPanel_Description.Location = new System.Drawing.Point(3, 44); this.infoPanel_Description.Name = "infoPanel_Description"; - this.infoPanel_Description.Size = new System.Drawing.Size(524, 401); + this.infoPanel_Description.Size = new System.Drawing.Size(524, 397); this.infoPanel_Description.TabIndex = 1; // // infoPanel_Title // this.infoPanel_Title.AutoSize = true; this.infoPanel_Title.Font = new System.Drawing.Font("Microsoft Sans Serif", 20.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.infoPanel_Title.Location = new System.Drawing.Point(3, 9); + this.infoPanel_Title.Location = new System.Drawing.Point(2, 1); this.infoPanel_Title.Name = "infoPanel_Title"; this.infoPanel_Title.Size = new System.Drawing.Size(0, 31); this.infoPanel_Title.TabIndex = 0; @@ -133,19 +135,22 @@ // this.splitContainer.Panel1.Controls.Add(this.sidebarPanel); this.splitContainer.Panel1.Controls.Add(this.optionsPanel); + this.splitContainer.Panel1MinSize = 160; // // splitContainer.Panel2 // this.splitContainer.Panel2.Controls.Add(this.infoPanel); + this.splitContainer.Panel2MinSize = 160; this.splitContainer.Size = new System.Drawing.Size(800, 450); this.splitContainer.SplitterDistance = 268; this.splitContainer.TabIndex = 0; + this.splitContainer.TabStop = false; // // optionsPanel // this.optionsPanel.Controls.Add(this.searchBox); this.optionsPanel.Controls.Add(this.controls_settings); - this.optionsPanel.Controls.Add(this.button1); + this.optionsPanel.Controls.Add(this.controls_reload); this.optionsPanel.Dock = System.Windows.Forms.DockStyle.Top; this.optionsPanel.Location = new System.Drawing.Point(0, 0); this.optionsPanel.Name = "optionsPanel"; @@ -171,15 +176,22 @@ this.controls_settings.UseVisualStyleBackColor = true; this.controls_settings.Click += new System.EventHandler(this.Controls_settings_Click); // - // button1 + // controls_reload // - this.button1.Location = new System.Drawing.Point(29, 5); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(23, 23); - this.button1.TabIndex = 0; - this.button1.Text = "↻"; - this.button1.UseVisualStyleBackColor = true; - this.button1.Click += new System.EventHandler(this.Button1_Click); + this.controls_reload.Location = new System.Drawing.Point(29, 5); + this.controls_reload.Name = "controls_reload"; + this.controls_reload.Size = new System.Drawing.Size(23, 23); + this.controls_reload.TabIndex = 0; + this.controls_reload.Text = "↻"; + this.controls_reload.UseVisualStyleBackColor = true; + this.controls_reload.Click += new System.EventHandler(this.Controls_reload_Click); + // + // toolTip + // + this.toolTip.AutoPopDelay = 5000; + this.toolTip.InitialDelay = 300; + this.toolTip.ReshowDelay = 100; + this.toolTip.ShowAlways = true; // // MainForm // @@ -213,11 +225,12 @@ private System.Windows.Forms.Label infoPanel_Description; private System.Windows.Forms.Panel optionsPanel; private System.Windows.Forms.Button controls_settings; - private System.Windows.Forms.Button button1; + private System.Windows.Forms.Button controls_reload; private System.Windows.Forms.Button action_install; private System.Windows.Forms.Button action_remove; private System.Windows.Forms.Button action_update; private System.Windows.Forms.TextBox searchBox; + private System.Windows.Forms.ToolTip toolTip; } } diff --git a/UpTool2/MainForm.cs b/UpTool2/MainForm.cs index a8a4d90..c13af36 100644 --- a/UpTool2/MainForm.cs +++ b/UpTool2/MainForm.cs @@ -40,11 +40,14 @@ namespace UpTool2 void reloadElements() { //remove + toolTip.RemoveAll(); action_install.Enabled = false; action_remove.Enabled = false; action_update.Enabled = false; infoPanel_Title.Text = ""; infoPanel_Description.Text = ""; + infoPanel_Title.Invalidate(); + infoPanel_Description.Invalidate(); int F = sidebarPanel.Controls.Count; for (int i = 0; i < F; i++) { @@ -52,6 +55,11 @@ namespace UpTool2 } apps.Clear(); //add + toolTip.SetToolTip(controls_settings, "Settings"); + toolTip.SetToolTip(controls_reload, "Refresh repositories"); + toolTip.SetToolTip(action_install, "Install"); + toolTip.SetToolTip(action_remove, "Remove"); + toolTip.SetToolTip(action_update, "Update"); WebClient client = new WebClient(); for (int i = 0; i < Settings.Default.Repos.Count; i++) { @@ -89,10 +97,11 @@ namespace UpTool2 }; sidebarIcon.Paint += (object sender, PaintEventArgs e) => { e.Graphics.DrawImage(icon, 0, 0, sidebarIcon.Width, sidebarIcon.Height); - Font font = new Font(FontFamily.GenericSansSerif, 10); - SizeF tmp = e.Graphics.MeasureString(name, font); - e.Graphics.DrawString(name, font, new SolidBrush(Color.Black), (sidebarIcon.Width - tmp.Width) / 2, sidebarIcon.Height - tmp.Height); + //Font font = new Font(FontFamily.GenericSansSerif, 10); + //SizeF tmp = e.Graphics.MeasureString(name, font); + //e.Graphics.DrawString(name, font, new SolidBrush(Color.Black), (sidebarIcon.Width - tmp.Width) / 2, sidebarIcon.Height - tmp.Height); }; + toolTip.SetToolTip(sidebarIcon, name); sidebarPanel.Controls.Add(sidebarIcon); } } @@ -106,7 +115,7 @@ namespace UpTool2 private void Controls_settings_Click(object sender, EventArgs e) => new SettingsForm().Show(); - private void Button1_Click(object sender, EventArgs e) => reloadElements(); + private void Controls_reload_Click(object sender, EventArgs e) => reloadElements(); private struct App : IEquatable { diff --git a/UpTool2/MainForm.resx b/UpTool2/MainForm.resx index 1af7de1..8766f29 100644 --- a/UpTool2/MainForm.resx +++ b/UpTool2/MainForm.resx @@ -117,4 +117,7 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 17, 17 + \ No newline at end of file diff --git a/UpTool2/Properties/AssemblyInfo.cs b/UpTool2/Properties/AssemblyInfo.cs index 4c7208b..1258ce2 100644 --- a/UpTool2/Properties/AssemblyInfo.cs +++ b/UpTool2/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyVersion("1.0.0.1")] +[assembly: AssemblyFileVersion("1.0.0.1")] diff --git a/UpTool2/SettingsForm.Designer.cs b/UpTool2/SettingsForm.Designer.cs index 3218286..1b1c18d 100644 --- a/UpTool2/SettingsForm.Designer.cs +++ b/UpTool2/SettingsForm.Designer.cs @@ -28,11 +28,13 @@ /// private void InitializeComponent() { + this.components = new System.ComponentModel.Container(); this.repoList = new System.Windows.Forms.ListBox(); this.minusButton = new System.Windows.Forms.Button(); this.plusButton = new System.Windows.Forms.Button(); this.repoBox = new System.Windows.Forms.TextBox(); this.okButton = new System.Windows.Forms.Button(); + this.toolTip = new System.Windows.Forms.ToolTip(this.components); this.SuspendLayout(); // // repoList @@ -81,6 +83,10 @@ this.okButton.UseVisualStyleBackColor = true; this.okButton.Click += new System.EventHandler(this.OkButton_Click); // + // toolTip + // + this.toolTip.ShowAlways = true; + // // SettingsForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -92,8 +98,13 @@ this.Controls.Add(this.minusButton); this.Controls.Add(this.repoList); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; + this.MaximizeBox = false; + this.MinimizeBox = false; this.Name = "SettingsForm"; + this.ShowIcon = false; + this.ShowInTaskbar = false; this.Text = "Settings"; + this.TopMost = true; this.ResumeLayout(false); this.PerformLayout(); @@ -106,5 +117,6 @@ private System.Windows.Forms.Button plusButton; private System.Windows.Forms.TextBox repoBox; private System.Windows.Forms.Button okButton; + private System.Windows.Forms.ToolTip toolTip; } } \ No newline at end of file diff --git a/UpTool2/SettingsForm.cs b/UpTool2/SettingsForm.cs index e29fdb8..041031e 100644 --- a/UpTool2/SettingsForm.cs +++ b/UpTool2/SettingsForm.cs @@ -17,6 +17,11 @@ namespace UpTool2 public SettingsForm() { InitializeComponent(); + toolTip.SetToolTip(repoList, "Select the repository which you want to edit"); + toolTip.SetToolTip(repoBox, "Link of the selected repository (apply with OK)"); + toolTip.SetToolTip(okButton, "Set the repositorys link"); + toolTip.SetToolTip(plusButton, "Add a new repository"); + toolTip.SetToolTip(minusButton, "Remove the selected repository"); SaveAndReload(); } diff --git a/UpTool2/SettingsForm.resx b/UpTool2/SettingsForm.resx index 1af7de1..8766f29 100644 --- a/UpTool2/SettingsForm.resx +++ b/UpTool2/SettingsForm.resx @@ -117,4 +117,7 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 17, 17 + \ No newline at end of file diff --git a/UpTool2/UpTool2.csproj b/UpTool2/UpTool2.csproj index 2cfdea0..8ed052d 100644 --- a/UpTool2/UpTool2.csproj +++ b/UpTool2/UpTool2.csproj @@ -32,6 +32,9 @@ prompt 4 + + UpTool2.Program + @@ -90,5 +93,8 @@ + + + \ No newline at end of file