Skip to content
This repository has been archived by the owner on Feb 23, 2020. It is now read-only.

Commit

Permalink
Update WindowMain.xaml.cs
Browse files Browse the repository at this point in the history
Fixed
- Autosave logs
-Reconnect Button not disconnecting first
-"Send as" Text not clearing after sending
  • Loading branch information
jeanluc162 committed Feb 16, 2020
1 parent 75a64d0 commit 3a8e2c8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions OmegleSpyWPF/WindowMain.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ private void Disconnect()
if (ChkbxActivateAutosave.IsChecked == true)
{
if (TxtbxAutosaveMinLength.Text.Length == 0) TxtbxAutosaveMinLength.Text = "0";
if (TxtbxInterveneText.Text.Split(new string[] { "\r\n" }, System.StringSplitOptions.RemoveEmptyEntries).Length >= System.Convert.ToInt32(TxtbxAutosaveMinLength.Text) || System.Convert.ToInt32(TxtbxAutosaveMinLength.Text) == 0)
if (TxtbxChat.Text.Split(new string[] { "\r\n" }, System.StringSplitOptions.RemoveEmptyEntries).Length >= System.Convert.ToInt32(TxtbxAutosaveMinLength.Text))
{
SaveLog();
}
Expand All @@ -176,7 +176,8 @@ private void Connect()

private void BtnReconnect_Click(object sender, RoutedEventArgs e)
{
Connect();
Disconnect();
if(ChkbxActivateAutoReconnect.IsChecked == false) Connect();
}

private void BtnSaveLog_Click(object sender, RoutedEventArgs e)
Expand Down Expand Up @@ -206,6 +207,7 @@ private void InterveneText()
{
if (CmbbxInterveneAs.SelectedIndex == 0) SendMessage(TxtbxInterveneText.Text.Trim(), MessageIssuer.Stranger1, true);
else if (CmbbxInterveneAs.SelectedIndex == 1) SendMessage(TxtbxInterveneText.Text.Trim(), MessageIssuer.Stranger2, true);
TxtbxInterveneText.Text = "";
}
}

Expand Down

0 comments on commit 3a8e2c8

Please sign in to comment.