Skip to content

Commit

Permalink
Automatic List Updating/Programs not being detected fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Codeusa committed Jan 12, 2014
1 parent 50f98de commit 48af9e1
Show file tree
Hide file tree
Showing 3 changed files with 367 additions and 57 deletions.
56 changes: 35 additions & 21 deletions Borderless.Designer.cs

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

43 changes: 37 additions & 6 deletions Borderless.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public partial class Borderless : Form
#region Delegates

public delegate bool WindowEnumCallback(int hwnd, int lparam);

#endregion

private const int SW_HIDE = 0x00;
Expand Down Expand Up @@ -101,11 +101,11 @@ public Borderless()
PopulateList();
ListenForGameLaunch();

/*AppDomain.CurrentDomain.FirstChanceException += (sender, args) =>
AppDomain.CurrentDomain.FirstChanceException += (sender, args) =>
{
MessageBox.Show(args.Exception.Message, "FirstChanceException");
throw args.Exception;
};*/
};
}


Expand Down Expand Up @@ -137,9 +137,19 @@ private void bw_DoWork(object sender, DoWorkEventArgs e)
IntPtr handle;
var breakLoop = false;
var windowText = "";

while (true)
{

{
processList.Invoke((MethodInvoker)delegate
{
//Code to modify control will go here
processList.DataSource = null;
processList.Items.Clear();
processDataList.Clear();
PopulateList();
});


Favorites.List.ForEach(wndName =>
{
handle = FindWindowHandle(wndName, formHandle);
Expand All @@ -159,14 +169,16 @@ private void bw_DoWork(object sender, DoWorkEventArgs e)
}

Thread.Sleep(1000);


}
}

private void bw_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
{
if (!IsDisposed)
{
// handle

}
}

Expand Down Expand Up @@ -203,6 +215,7 @@ private void PopulateList() //Adds active windows to the processDataList

private void RemoveBorder(String procName) //actually make it frameless
{

var Procs = Process.GetProcesses();
foreach (var proc in Procs)
{
Expand Down Expand Up @@ -263,6 +276,14 @@ private void refreshList_Click(object sender, EventArgs e) //handles refresh but
PopulateList();
}

private void refreshProcessList()
{
processList.DataSource = null;
processList.Items.Clear();
processDataList.Clear();
PopulateList();
}

private void processList_SelectedIndexChanged(object sender, EventArgs e)
{
if (e == null) throw new ArgumentNullException("e");
Expand Down Expand Up @@ -320,5 +341,15 @@ private void sendGameName(object sender, EventArgs e)
}
}

private void button3_Click(object sender, EventArgs e)
{
GotoSite("https://github.com/Codeusa/Borderless-Gaming/issues");
}

private void donateButton_Click(object sender, EventArgs e)
{
GotoSite("https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=TWHNPSC7HRNR2");
}

}
}
Loading

0 comments on commit 48af9e1

Please sign in to comment.