Skip to content
This repository has been archived by the owner on Apr 5, 2024. It is now read-only.

Commit

Permalink
exp0: UI changes + add search
Browse files Browse the repository at this point in the history
  • Loading branch information
vlOd committed May 25, 2023
1 parent d0e0851 commit a4f1516
Show file tree
Hide file tree
Showing 49 changed files with 710 additions and 2,991 deletions.
10 changes: 10 additions & 0 deletions Pinto/Assets.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Pinto/Assets.resx
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@
<data name="ENDCALL_ENABLED" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\Assets\ENDCALL_ENABLED.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="GPLV3" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>resources\assets\gplv3.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="HISTORY_DISABLED" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\Assets\HISTORY_DISABLED.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
Expand Down
38 changes: 38 additions & 0 deletions Pinto/Controls/Loader.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

54 changes: 54 additions & 0 deletions Pinto/Controls/Loader.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Imaging;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace PintoNS.Controls
{
public partial class Loader : UserControl
{
public const int WIDTH = 122;
public const int HEIGHT = 107;
private Bitmap loadingGIF = Logo.LOADING.Clone(
new Rectangle(0, 0, Logo.LOADING.Width, Logo.LOADING.Height), PixelFormat.DontCare);

public Loader()
{
InitializeComponent();
OnSizeChanged(EventArgs.Empty);
ImageAnimator.Animate(loadingGIF, drawFrame);
}

private void drawFrame(object sender, EventArgs e)
{
Invalidate();
}

protected override void OnPaint(PaintEventArgs e)
{
ImageAnimator.UpdateFrames(loadingGIF);
Graphics g = e.Graphics;
g.DrawImage(Logo.LOGO_FRAME, 0, 0, WIDTH, HEIGHT);
g.DrawImage(loadingGIF, 13, 11);
g.Flush();
g.Dispose();
}

protected override void OnSizeChanged(EventArgs e)
{
AutoSize = false;
Size = new Size(WIDTH, HEIGHT);
MinimumSize = new Size(WIDTH, HEIGHT);
MaximumSize = new Size(WIDTH, HEIGHT);
SetBounds(0, 0, WIDTH, HEIGHT, BoundsSpecified.Size);
SetBoundsCore(0, 0, WIDTH, HEIGHT, BoundsSpecified.Size);
base.OnSizeChanged(e);
}
}
}
11 changes: 11 additions & 0 deletions Pinto/Controls/TextBoxWithPlaceholderSupport.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Linq;
using System.Text;
Expand All @@ -17,6 +18,9 @@ public class TextBoxWithPlaceholderSupport : TextBox
public string PlaceholderText { get { return placeholderText; } set { placeholderText = value; } }
public Color TextForeColor { get { return textForeColor; } set { textForeColor = value; } }
public Color PlaceholderTextForeColor { get { return placeholderTextForeColor; } set { placeholderTextForeColor = value; } }
[Browsable(true)]
[EditorBrowsable(EditorBrowsableState.Always)]
public event EventHandler TextChanged2;

public void ChangeTextDisplayed()
{
Expand Down Expand Up @@ -57,5 +61,12 @@ protected override void OnLostFocus(EventArgs e)
isFocused = false;
ChangeTextDisplayed();
}

protected override void OnTextChanged(EventArgs e)
{
if (isFocused)
TextChanged2.Invoke(this, e);
base.OnTextChanged(e);
}
}
}
113 changes: 62 additions & 51 deletions Pinto/Forms/AboutForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 8 additions & 6 deletions Pinto/Forms/AboutForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,23 @@ public partial class AboutForm : Form
public AboutForm()
{
InitializeComponent();
Icon = Logo.LOGO2;
}

private void AboutForm_Load(object sender, EventArgs e)
{
lVersion.Text = $"Version {Program.VERSION}";
lVersion.Text = $"Version {Program.VERSION_STRING}";
}

private void pictureBox1_Click(object sender, EventArgs e)
protected override void OnPaintBackground(PaintEventArgs e)
{

Graphics g = e.Graphics;
g.Clear(Color.White);
g.DrawRectangle(new Pen(Color.DeepSkyBlue, 2.5f), 0, 0, Width - 1, Height - 1);
}

private void label1_Click(object sender, EventArgs e)
private void AboutForm_Deactivate(object sender, EventArgs e)
{

Close();
}
}
}
Loading

0 comments on commit a4f1516

Please sign in to comment.