Skip to content

Commit

Permalink
Fix merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
stenlan committed Sep 24, 2020
2 parents 845f527 + 78f5a7b commit 1b13e29
Show file tree
Hide file tree
Showing 7 changed files with 151 additions and 26 deletions.
Binary file removed .vs/AmongUsCapture/DesignTimeBuild/.dtbcache.v2
Binary file not shown.
28 changes: 28 additions & 0 deletions AmongUsCapture/AmongUsCapture - Backup.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
<ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DebugType>none</DebugType>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Costura.Fody" Version="5.0.0-alpha0281">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="SocketIOClient" Version="2.0.2.6" />
</ItemGroup>
<PropertyGroup>
<ApplicationIcon>icon.ico</ApplicationIcon>
</PropertyGroup>
</Project>
2 changes: 2 additions & 0 deletions AmongUsCapture/ClientSocket.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ public void Connect(string url)
GameMemReader.getInstance().PlayerChanged += PlayerChangedHandler;
};


socket.ConnectAsync();
}


public void SendConnectCode(string connectCode)
{
ConnectCode = connectCode;
Expand Down
5 changes: 3 additions & 2 deletions AmongUsCapture/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,16 @@ namespace AmongUsCapture
{
static class Program
{
private static bool debugGui = true;
private static bool doConsole = false;

public static ConsoleInterface conInterface = null;
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
if(!debugGui)
if(doConsole)
{
AllocConsole(); // needs to be the first call in the program to prevent weird bugs
}
Expand Down
111 changes: 92 additions & 19 deletions AmongUsCapture/UserForm.Designer.cs

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

28 changes: 26 additions & 2 deletions AmongUsCapture/UserForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ public UserForm(ClientSocket sock)

}

private void OnLoad(object sender, EventArgs e)
{
//TestFillConsole(100);
}

private void OnChatMessageAdded(object sender, ChatMessageEventArgs e)
{
WriteLineToConsole($"[CHAT] {e.Sender}: {e.Message}");
Expand Down Expand Up @@ -100,8 +105,25 @@ private void SubmitButton_Click(object sender, EventArgs e)
if(ConnectCodeBox.TextLength == 6)
{
clientSocket.SendConnectCode(ConnectCodeBox.Text);
ConnectCodeBox.Enabled = false;
SubmitButton.Enabled = false;
//ConnectCodeBox.Enabled = false;
//SubmitButton.Enabled = false;
}
}

private void ConsoleTextBox_TextChanged(object sender, EventArgs e)
{
if (AutoScrollMenuItem.Checked)
{
ConsoleTextBox.SelectionStart = ConsoleTextBox.Text.Length;
ConsoleTextBox.ScrollToCaret();
}
}

private void TestFillConsole(int entries) //Helper test method to see if filling console works.
{
for (int i = 0; i < entries; i++)
{
WriteLineToConsole(i.ToString());
}
}

Expand All @@ -115,5 +137,7 @@ public void WriteLineToConsole(String line)
}

}


}
}
3 changes: 0 additions & 3 deletions AmongUsCapture/UserForm.resx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,4 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="ConsoleTextBox.Locked" type="System.Boolean, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e">
<value>True</value>
</metadata>
</root>

0 comments on commit 1b13e29

Please sign in to comment.