Skip to content
This repository has been archived by the owner on Mar 20, 2023. It is now read-only.

Commit

Permalink
Minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
eried committed Mar 15, 2017
1 parent 145c1cd commit 274c27b
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions PrimeMon/FormMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,22 @@ public FormMain()
InitializeComponent();

Environment.CurrentDirectory = Path.GetDirectoryName(Process.GetCurrentProcess().MainModule.FileName);

// Detect if there is a reference app
if (File.Exists(referenceName))
buttonReference.Visible = true;
}

private void labelDragHere_DragEnter(object sender, DragEventArgs e)
{
foreach (var f in (String[])e.Data.GetData("FileName"))
{
if (Path.GetExtension(f).ToLower() == ".hpprgm")
{
e.Effect = DragDropEffects.All;
}
}
}

private void labelDragHere_DragDrop(object sender, DragEventArgs e)
{
foreach (var f in (String[]) e.Data.GetData("FileName"))
{
if (Path.GetExtension(f).ToLower() == ".hpprgm")
{
currentFile = f;
Expand All @@ -49,7 +46,6 @@ private void labelDragHere_DragDrop(object sender, DragEventArgs e)
buttonEdit.Enabled = true;
break;
}
}
}

private void fileSystemWatcherMonitor_Changed(object sender, FileSystemEventArgs e)
Expand All @@ -64,9 +60,6 @@ private void fileSystemWatcherMonitor_Changed(object sender, FileSystemEventArgs
[DllImport("user32.dll")]
static extern bool SetForegroundWindow(IntPtr hWnd);

const uint WM_KEYDOWN = 0x100, WM_KEYUP = 0x0101, WM_CHAR = 0x0102, WM_PASTE = 0x0302, WM_APPCOMMAND = 0x0319,
APPCOMMAND_PASTE = 38, WM_SYSKEYDOWN = 0x0104, WM_SYSKEYUP = 0x0105, WM_COMMAND = 0x0111;

private void checkBoxTopMost_CheckedChanged(object sender, EventArgs e)
{
TopMost = checkBoxTopMost.Checked;
Expand Down

0 comments on commit 274c27b

Please sign in to comment.