Skip to content

Commit

Permalink
Add main toolbar. (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
brandochn authored Aug 30, 2023
1 parent 6776350 commit 2f17cc6
Show file tree
Hide file tree
Showing 6 changed files with 318 additions and 300 deletions.
14 changes: 14 additions & 0 deletions src/LightQueryProfiler.WinFormsApp/Constants.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
namespace LightQueryProfiler.WinFormsApp
{
// https://icons8.com/license
public static class Constants
{
public const string CLEAR_BMP_ENC = "iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAAAsTAAALEwEAmpwYAAAC3ElEQVR4nO2Zz2vTUBzAs3/D+T9Iuwq9THRLGtlW1g2EgqM27VbaMUvnxe2wH9pN6DrBOJm170XqRQp6EDyJetHgSQbizaMePG2gBcGm8JVkaxdr3d5LXvqm9Au5fr+fz3vf5CXfCEIvetGL/zugXD7dQGi5gfETA2PV0DTRq1oGQpJZw6zVQGgJKpV+Vwnr5fKggfFeA2OwXwZCRQDoYwUOAH0Gxpt/1MF4z2RwA19rT2pLrrKQgH149Yg6NWoJs206rTxrCTgG3lZnl6qdzP47LqlbCVL4xmGdNXIB8yYiTOxEggb+s3oPwpE0qFeXPhIL0KwMrQTtyt/PLYNfUiAzlduhERimFSCRoIV/ky9CUE7AgKTAhfD0ELGAJYFQkaWEU3i/pEAglChQwbcKInTHoUTJLkELr69tQvBi0oL3i0pJEARnTzoWEtzgm0EL0N5OXOFZ7AR3+G5I6F7DeymhdwveCwm92/AsJbjBs5DgDu9G4tPtu60T1ifGVW7wTs+IEyMALg447i0ELuC5SwADeL5nAGYD33UJoIR/my9CeCIDL1cL/CXAAXwTqLqQ57sT4OJ9PnU5t/PzX/oW0G0ASjT7zgSgPex0pl9jDuGjl+Ze2QtzkTA6zCpJCk5Mzj7vVNDNR71PUop08JomOoEfiWSeHrVabiT8Upx8rEJaxA4/PDrzmGSraSW2DwZb58ZSZaajRTv84MjMI5o+pZF4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7+HMEGOnBiQupdw5bx48NYNwKsENaTfstC4pOfCcHECtHpRwY+eeB+bDc+IdHI+zXrdA7m1jAfyxOBx9S6NugdzDzBp4qvvp0C3gyTJoBfyRfjgcY0C3QEsWzRL4PjgUI6VfIINmETwHonIEBi2CZ29EwhL6UkmZDr8vArtDEjaxKAOtgN8Thl29OHULiBrWEvgQ7AhRqVugHoqcKVSz4bf3oO58TpEiI6IAN3Xme2FbDy5FVkT3QBTgZsFX9aBtfsViRWZE98AkeLa+4YJiREkpugdGw68NDqdX+LrKFCNSr2KrGyVqFPymZ59Y6n3MsraX8fIHQ8sNkRCtj1z3QDb804+suNnF0jsvWHU/TkV7sq88kCwxROLcKPNrk7TLgq8MDmul3mAe/t5b1rSP5MbqQPJRsTtqjMQVmCW6B6eHUPWcNltfc37l7e4ly9tehsXMf4WvCCRDdk/s3QJXNG5zh41ZTiKieyAKcFHDTueSquqhcepRWRaIL6poHwn/AO+OkhtGS3wRKRI17NF+nEf66RTFyMEY2v4omnhV7g7TubOXhqoQ6/50w5YHkiWrA8mHxZ6+7/BmSsiIvSFWanNH+n4RKEiYHHvhT8yAP2FzR14pMyH230m4IpM2V2S7MlNinyox0+B/kni9sCm65dvHQgopRJmaz39BUHt8KVcUAAAAAElFTkSuQmCC";
}
}
82 changes: 41 additions & 41 deletions src/LightQueryProfiler.WinFormsApp/Presenters/MainPresenter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ private void OnResume(object? sender, EventArgs e)

private void OnSearch(object? sender, EventArgs e)
{
SearchGridValue(view.SearchValue ?? "");
SearchGridValue(view.SearchValue?.Trim() ?? "");
}

private void OnStart(object? sender, EventArgs e)
Expand Down Expand Up @@ -485,58 +485,58 @@ private void ShowButtonsByAction(string action)
switch (action.ToUpper())
{
case "START":
if (view.AuthenticationComboBox.InvokeRequired) view.AuthenticationComboBox.Invoke(() => view.AuthenticationComboBox.Enabled = false); else view.AuthenticationComboBox.Enabled = false;
if (view.PauseButton.InvokeRequired) view.PauseButton.Invoke(() => view.PauseButton.Enabled = true); else view.PauseButton.Enabled = true;
if (view.PauseButton.InvokeRequired) view.PauseButton.Invoke(() => view.PauseButton.Visible = true); else view.PauseButton.Visible = true;
if (view.ResumeButton.InvokeRequired) view.ResumeButton.Invoke(() => view.ResumeButton.Enabled = false); else view.ResumeButton.Enabled = false;
if (view.ResumeButton.InvokeRequired) view.ResumeButton.Invoke(() => view.ResumeButton.Visible = false); else view.ResumeButton.Visible = false;
if (view.ServerTexBox.InvokeRequired) view.ServerTexBox.Invoke(() => view.ServerTexBox.Enabled = false); else view.ServerTexBox.Enabled = false;
if (view.StartButton.InvokeRequired) view.StartButton.Invoke(() => view.StartButton.Enabled = false); else view.StartButton.Enabled = false;
if (view.StopButton.InvokeRequired) view.StopButton.Invoke(() => view.StopButton.Enabled = !view.StartButton.Enabled); else view.StopButton.Enabled = !view.StartButton.Enabled;
view.AuthenticationComboBox.Enabled = false;
view.PauseButton.Enabled = true;
view.PauseButton.Visible = true;
view.ResumeButton.Enabled = false;
view.ResumeButton.Visible = false;
view.ServerTexBox.Enabled = false;
view.StartButton.Enabled = false;
view.StopButton.Enabled = !view.StartButton.Enabled;
break;

case "STOP":
if (view.AuthenticationComboBox.InvokeRequired) view.AuthenticationComboBox.Invoke(() => view.AuthenticationComboBox.Enabled = true); else view.AuthenticationComboBox.Enabled = true;
if (view.PauseButton.InvokeRequired) view.PauseButton.Invoke(() => view.PauseButton.Enabled = false); else view.PauseButton.Enabled = false;
if (view.PauseButton.InvokeRequired) view.PauseButton.Invoke(() => view.PauseButton.Visible = true); else view.PauseButton.Visible = true;
if (view.ResumeButton.InvokeRequired) view.ResumeButton.Invoke(() => view.ResumeButton.Enabled = false); else view.ResumeButton.Enabled = false;
if (view.ResumeButton.InvokeRequired) view.ResumeButton.Invoke(() => view.ResumeButton.Visible = false); else view.ResumeButton.Visible = false;
if (view.ServerTexBox.InvokeRequired) view.ServerTexBox.Invoke(() => view.ServerTexBox.Enabled = true); else view.ServerTexBox.Enabled = true;
if (view.StartButton.InvokeRequired) view.StartButton.Invoke(() => view.StartButton.Enabled = true); else view.StartButton.Enabled = true;
if (view.StopButton.InvokeRequired) view.StopButton.Invoke(() => view.StopButton.Enabled = !view.StartButton.Enabled); else view.StopButton.Enabled = !view.StartButton.Enabled;
view.AuthenticationComboBox.Enabled = true;
view.PauseButton.Enabled = false;
view.PauseButton.Visible = true;
view.ResumeButton.Enabled = false;
view.ResumeButton.Visible = false;
view.ServerTexBox.Enabled = true;
view.StartButton.Enabled = true;
view.StopButton.Enabled = !view.StartButton.Enabled;
break;

case "PAUSE":
if (view.AuthenticationComboBox.InvokeRequired) view.AuthenticationComboBox.Invoke(() => view.AuthenticationComboBox.Enabled = false); else view.AuthenticationComboBox.Enabled = false;
if (view.PauseButton.InvokeRequired) view.PauseButton.Invoke(() => view.PauseButton.Enabled = false); else view.PauseButton.Enabled = false;
if (view.PauseButton.InvokeRequired) view.PauseButton.Invoke(() => view.PauseButton.Visible = false); else view.PauseButton.Visible = false;
if (view.ResumeButton.InvokeRequired) view.ResumeButton.Invoke(() => view.ResumeButton.Enabled = true); else view.ResumeButton.Enabled = true;
if (view.ResumeButton.InvokeRequired) view.ResumeButton.Invoke(() => view.ResumeButton.Visible = true); else view.ResumeButton.Visible = true;
if (view.ServerTexBox.InvokeRequired) view.ServerTexBox.Invoke(() => view.ServerTexBox.Enabled = false); else view.ServerTexBox.Enabled = false;
if (view.StartButton.InvokeRequired) view.StartButton.Invoke(() => view.StartButton.Enabled = false); else view.StartButton.Enabled = false;
if (view.StopButton.InvokeRequired) view.StopButton.Invoke(() => view.StopButton.Enabled = !view.StartButton.Enabled); else view.StopButton.Enabled = !view.StartButton.Enabled;
view.AuthenticationComboBox.Enabled = false;
view.PauseButton.Enabled = false;
view.PauseButton.Visible = false;
view.ResumeButton.Enabled = true;
view.ResumeButton.Visible = true;
view.ServerTexBox.Enabled = false;
view.StartButton.Enabled = false;
view.StopButton.Enabled = !view.StartButton.Enabled;
break;

case "RESUME":
if (view.AuthenticationComboBox.InvokeRequired) view.AuthenticationComboBox.Invoke(() => view.AuthenticationComboBox.Enabled = false); else view.AuthenticationComboBox.Enabled = false;
if (view.PauseButton.InvokeRequired) view.PauseButton.Invoke(() => view.PauseButton.Enabled = true); else view.PauseButton.Enabled = true;
if (view.PauseButton.InvokeRequired) view.PauseButton.Invoke(() => view.PauseButton.Visible = true); else view.PauseButton.Visible = true;
if (view.ResumeButton.InvokeRequired) view.ResumeButton.Invoke(() => view.ResumeButton.Enabled = false); else view.ResumeButton.Enabled = false;
if (view.ResumeButton.InvokeRequired) view.ResumeButton.Invoke(() => view.ResumeButton.Visible = false); else view.ResumeButton.Visible = false;
if (view.ServerTexBox.InvokeRequired) view.ServerTexBox.Invoke(() => view.ServerTexBox.Enabled = false); else view.ServerTexBox.Enabled = false;
if (view.StartButton.InvokeRequired) view.StartButton.Invoke(() => view.StartButton.Enabled = false); else view.StartButton.Enabled = false;
if (view.StopButton.InvokeRequired) view.StopButton.Invoke(() => view.StopButton.Enabled = !view.StartButton.Enabled); else view.StopButton.Enabled = !view.StartButton.Enabled;
view.AuthenticationComboBox.Enabled = false;
view.PauseButton.Enabled = true;
view.PauseButton.Visible = true;
view.ResumeButton.Enabled = false;
view.ResumeButton.Visible = false;
view.ServerTexBox.Enabled = false;
view.StartButton.Enabled = false;
view.StopButton.Enabled = !view.StartButton.Enabled;
break;

default:
if (view.AuthenticationComboBox.InvokeRequired) view.AuthenticationComboBox.Invoke(() => view.AuthenticationComboBox.Enabled = true); else view.AuthenticationComboBox.Enabled = true;
if (view.PauseButton.InvokeRequired) view.PauseButton.Invoke(() => view.PauseButton.Enabled = false); else view.PauseButton.Enabled = false;
if (view.PauseButton.InvokeRequired) view.PauseButton.Invoke(() => view.PauseButton.Visible = true); else view.PauseButton.Visible = true;
if (view.ResumeButton.InvokeRequired) view.ResumeButton.Invoke(() => view.ResumeButton.Enabled = false); else view.ResumeButton.Enabled = false;
if (view.ResumeButton.InvokeRequired) view.ResumeButton.Invoke(() => view.ResumeButton.Visible = false); else view.ResumeButton.Visible = false;
if (view.ServerTexBox.InvokeRequired) view.ServerTexBox.Invoke(() => view.ServerTexBox.Enabled = true); else view.ServerTexBox.Enabled = true;
if (view.StartButton.InvokeRequired) view.StartButton.Invoke(() => view.StartButton.Enabled = true); else view.StartButton.Enabled = true;
if (view.StopButton.InvokeRequired) view.StopButton.Invoke(() => view.StopButton.Enabled = !view.StartButton.Enabled); else view.StopButton.Enabled = !view.StartButton.Enabled;
view.AuthenticationComboBox.Enabled = true;
view.PauseButton.Enabled = false;
view.PauseButton.Visible = false;
view.ResumeButton.Enabled = false;
view.ResumeButton.Visible = false;
view.ServerTexBox.Enabled = true;
view.StartButton.Enabled = true;
view.StopButton.Enabled = !view.StartButton.Enabled;
break;
}
}
Expand Down
18 changes: 9 additions & 9 deletions src/LightQueryProfiler.WinFormsApp/Views/IMainView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,27 +22,27 @@ public interface IMainView

event EventHandler OnSearch;

ComboBox AuthenticationComboBox { get; }
ToolStripComboBox AuthenticationComboBox { get; }
IList<AuthenticationMode> AuthenticationModes { set; }
string? Password { get; set; }
TextBox PasswordTextBox { get; }
Button PauseButton { get; }
ToolStripTextBox PasswordTextBox { get; }
ToolStripButton PauseButton { get; }
DataGridViewColumn[] ProfilerColumns { set; }
ListView ProfilerDetails { get; }
DataGridView ProfilerGridView { get; }
Button ResumeButton { get; }
ToolStripButton ResumeButton { get; }
object? SelectedAuthenticationMode { get; set; }
string? Server { get; set; }
TextBox ServerTexBox { get; }
ToolStripTextBox ServerTexBox { get; }
string SessionName { get; }
string? SqlTextArea { get; set; }
Button StartButton { get; }
ToolStripButton StartButton { get; }
StatusStrip StatusBar { get; }
Button StopButton { get; }
ToolStripButton StopButton { get; }
string? User { get; set; }
TextBox UserTextBox { get; }
ToolStripTextBox UserTextBox { get; }
string? SearchValue { get; set; }
Button SearchButton { get; }
ToolStripButton SearchButton { get; }


void Show();
Expand Down
Loading

0 comments on commit 2f17cc6

Please sign in to comment.