visual improvements, new ToDos

This commit is contained in:
CreepyCrafter24 2019-09-09 19:18:33 +02:00
parent 6032a9f03c
commit 617bdb82de
9 changed files with 77 additions and 24 deletions

View File

@ -1,2 +1,4 @@
ProgressBar for Downloads ProgressBar for Downloads
Icons Icons
List of installed and updatable apps
Run apps from UpTool

View File

@ -28,6 +28,7 @@
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
this.components = new System.ComponentModel.Container();
this.sidebarPanel = new System.Windows.Forms.FlowLayoutPanel(); this.sidebarPanel = new System.Windows.Forms.FlowLayoutPanel();
this.infoPanel = new System.Windows.Forms.Panel(); this.infoPanel = new System.Windows.Forms.Panel();
this.action_remove = new System.Windows.Forms.Button(); this.action_remove = new System.Windows.Forms.Button();
@ -39,7 +40,8 @@
this.optionsPanel = new System.Windows.Forms.Panel(); this.optionsPanel = new System.Windows.Forms.Panel();
this.searchBox = new System.Windows.Forms.TextBox(); this.searchBox = new System.Windows.Forms.TextBox();
this.controls_settings = new System.Windows.Forms.Button(); 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(); this.infoPanel.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit();
this.splitContainer.Panel1.SuspendLayout(); 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.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.action_remove.Enabled = false; 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.Name = "action_remove";
this.action_remove.Size = new System.Drawing.Size(23, 23); this.action_remove.Size = new System.Drawing.Size(23, 23);
this.action_remove.TabIndex = 4; 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.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.action_update.Enabled = false; 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.Name = "action_update";
this.action_update.Size = new System.Drawing.Size(23, 23); this.action_update.Size = new System.Drawing.Size(23, 23);
this.action_update.TabIndex = 3; 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.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.action_install.Enabled = false; 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.Name = "action_install";
this.action_install.Size = new System.Drawing.Size(23, 23); this.action_install.Size = new System.Drawing.Size(23, 23);
this.action_install.TabIndex = 2; this.action_install.TabIndex = 2;
@ -109,16 +111,16 @@
// //
// infoPanel_Description // 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.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; this.infoPanel_Description.TabIndex = 1;
// //
// infoPanel_Title // infoPanel_Title
// //
this.infoPanel_Title.AutoSize = true; 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.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.Name = "infoPanel_Title";
this.infoPanel_Title.Size = new System.Drawing.Size(0, 31); this.infoPanel_Title.Size = new System.Drawing.Size(0, 31);
this.infoPanel_Title.TabIndex = 0; this.infoPanel_Title.TabIndex = 0;
@ -133,19 +135,22 @@
// //
this.splitContainer.Panel1.Controls.Add(this.sidebarPanel); this.splitContainer.Panel1.Controls.Add(this.sidebarPanel);
this.splitContainer.Panel1.Controls.Add(this.optionsPanel); this.splitContainer.Panel1.Controls.Add(this.optionsPanel);
this.splitContainer.Panel1MinSize = 160;
// //
// splitContainer.Panel2 // splitContainer.Panel2
// //
this.splitContainer.Panel2.Controls.Add(this.infoPanel); this.splitContainer.Panel2.Controls.Add(this.infoPanel);
this.splitContainer.Panel2MinSize = 160;
this.splitContainer.Size = new System.Drawing.Size(800, 450); this.splitContainer.Size = new System.Drawing.Size(800, 450);
this.splitContainer.SplitterDistance = 268; this.splitContainer.SplitterDistance = 268;
this.splitContainer.TabIndex = 0; this.splitContainer.TabIndex = 0;
this.splitContainer.TabStop = false;
// //
// optionsPanel // optionsPanel
// //
this.optionsPanel.Controls.Add(this.searchBox); this.optionsPanel.Controls.Add(this.searchBox);
this.optionsPanel.Controls.Add(this.controls_settings); 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.Dock = System.Windows.Forms.DockStyle.Top;
this.optionsPanel.Location = new System.Drawing.Point(0, 0); this.optionsPanel.Location = new System.Drawing.Point(0, 0);
this.optionsPanel.Name = "optionsPanel"; this.optionsPanel.Name = "optionsPanel";
@ -171,15 +176,22 @@
this.controls_settings.UseVisualStyleBackColor = true; this.controls_settings.UseVisualStyleBackColor = true;
this.controls_settings.Click += new System.EventHandler(this.Controls_settings_Click); this.controls_settings.Click += new System.EventHandler(this.Controls_settings_Click);
// //
// button1 // controls_reload
// //
this.button1.Location = new System.Drawing.Point(29, 5); this.controls_reload.Location = new System.Drawing.Point(29, 5);
this.button1.Name = "button1"; this.controls_reload.Name = "controls_reload";
this.button1.Size = new System.Drawing.Size(23, 23); this.controls_reload.Size = new System.Drawing.Size(23, 23);
this.button1.TabIndex = 0; this.controls_reload.TabIndex = 0;
this.button1.Text = "↻"; this.controls_reload.Text = "↻";
this.button1.UseVisualStyleBackColor = true; this.controls_reload.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.Button1_Click); 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 // MainForm
// //
@ -213,11 +225,12 @@
private System.Windows.Forms.Label infoPanel_Description; private System.Windows.Forms.Label infoPanel_Description;
private System.Windows.Forms.Panel optionsPanel; private System.Windows.Forms.Panel optionsPanel;
private System.Windows.Forms.Button controls_settings; 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_install;
private System.Windows.Forms.Button action_remove; private System.Windows.Forms.Button action_remove;
private System.Windows.Forms.Button action_update; private System.Windows.Forms.Button action_update;
private System.Windows.Forms.TextBox searchBox; private System.Windows.Forms.TextBox searchBox;
private System.Windows.Forms.ToolTip toolTip;
} }
} }

View File

@ -40,11 +40,14 @@ namespace UpTool2
void reloadElements() void reloadElements()
{ {
//remove //remove
toolTip.RemoveAll();
action_install.Enabled = false; action_install.Enabled = false;
action_remove.Enabled = false; action_remove.Enabled = false;
action_update.Enabled = false; action_update.Enabled = false;
infoPanel_Title.Text = ""; infoPanel_Title.Text = "";
infoPanel_Description.Text = ""; infoPanel_Description.Text = "";
infoPanel_Title.Invalidate();
infoPanel_Description.Invalidate();
int F = sidebarPanel.Controls.Count; int F = sidebarPanel.Controls.Count;
for (int i = 0; i < F; i++) for (int i = 0; i < F; i++)
{ {
@ -52,6 +55,11 @@ namespace UpTool2
} }
apps.Clear(); apps.Clear();
//add //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(); WebClient client = new WebClient();
for (int i = 0; i < Settings.Default.Repos.Count; i++) for (int i = 0; i < Settings.Default.Repos.Count; i++)
{ {
@ -89,10 +97,11 @@ namespace UpTool2
}; };
sidebarIcon.Paint += (object sender, PaintEventArgs e) => { sidebarIcon.Paint += (object sender, PaintEventArgs e) => {
e.Graphics.DrawImage(icon, 0, 0, sidebarIcon.Width, sidebarIcon.Height); e.Graphics.DrawImage(icon, 0, 0, sidebarIcon.Width, sidebarIcon.Height);
Font font = new Font(FontFamily.GenericSansSerif, 10); //Font font = new Font(FontFamily.GenericSansSerif, 10);
SizeF tmp = e.Graphics.MeasureString(name, font); //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); //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); sidebarPanel.Controls.Add(sidebarIcon);
} }
} }
@ -106,7 +115,7 @@ namespace UpTool2
private void Controls_settings_Click(object sender, EventArgs e) => new SettingsForm().Show(); 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<App> private struct App : IEquatable<App>
{ {

View File

@ -117,4 +117,7 @@
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root> </root>

View File

@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyVersion("1.0.0.1")]
[assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.1")]

View File

@ -28,11 +28,13 @@
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
this.components = new System.ComponentModel.Container();
this.repoList = new System.Windows.Forms.ListBox(); this.repoList = new System.Windows.Forms.ListBox();
this.minusButton = new System.Windows.Forms.Button(); this.minusButton = new System.Windows.Forms.Button();
this.plusButton = new System.Windows.Forms.Button(); this.plusButton = new System.Windows.Forms.Button();
this.repoBox = new System.Windows.Forms.TextBox(); this.repoBox = new System.Windows.Forms.TextBox();
this.okButton = new System.Windows.Forms.Button(); this.okButton = new System.Windows.Forms.Button();
this.toolTip = new System.Windows.Forms.ToolTip(this.components);
this.SuspendLayout(); this.SuspendLayout();
// //
// repoList // repoList
@ -81,6 +83,10 @@
this.okButton.UseVisualStyleBackColor = true; this.okButton.UseVisualStyleBackColor = true;
this.okButton.Click += new System.EventHandler(this.OkButton_Click); this.okButton.Click += new System.EventHandler(this.OkButton_Click);
// //
// toolTip
//
this.toolTip.ShowAlways = true;
//
// SettingsForm // SettingsForm
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@ -92,8 +98,13 @@
this.Controls.Add(this.minusButton); this.Controls.Add(this.minusButton);
this.Controls.Add(this.repoList); this.Controls.Add(this.repoList);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "SettingsForm"; this.Name = "SettingsForm";
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.Text = "Settings"; this.Text = "Settings";
this.TopMost = true;
this.ResumeLayout(false); this.ResumeLayout(false);
this.PerformLayout(); this.PerformLayout();
@ -106,5 +117,6 @@
private System.Windows.Forms.Button plusButton; private System.Windows.Forms.Button plusButton;
private System.Windows.Forms.TextBox repoBox; private System.Windows.Forms.TextBox repoBox;
private System.Windows.Forms.Button okButton; private System.Windows.Forms.Button okButton;
private System.Windows.Forms.ToolTip toolTip;
} }
} }

View File

@ -17,6 +17,11 @@ namespace UpTool2
public SettingsForm() public SettingsForm()
{ {
InitializeComponent(); 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(); SaveAndReload();
} }

View File

@ -117,4 +117,7 @@
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root> </root>

View File

@ -32,6 +32,9 @@
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<PropertyGroup>
<StartupObject>UpTool2.Program</StartupObject>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
@ -90,5 +93,8 @@
<ItemGroup> <ItemGroup>
<None Include="App.config" /> <None Include="App.config" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project> </Project>