i am my own handicap (took me quite literally >10 hours to just default add a blank line to the listbox (didn't even think of it))
This commit is contained in:
parent
5f22d25559
commit
55e3babc5b
11 changed files with 65 additions and 43 deletions
|
@ -7,6 +7,7 @@ using System.Linq;
|
|||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.Collections;
|
||||
|
||||
namespace JellyfinRPC
|
||||
{
|
||||
|
@ -81,17 +82,32 @@ namespace JellyfinRPC
|
|||
{
|
||||
try
|
||||
{
|
||||
if (!listBox1.Items.Contains((object)ConsoleManager.lineToWrite))
|
||||
|
||||
|
||||
|
||||
string last = listBox1.Items[listBox1.Items.Count - 1].ToString();
|
||||
|
||||
if (last == ConsoleManager.lineToWrite)
|
||||
{
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
listBox1.BeginInvoke((MethodInvoker)delegate
|
||||
{
|
||||
listBox1.Items.Add(ConsoleManager.lineToWrite);
|
||||
if (ConsoleManager.lineToWrite != null)
|
||||
{
|
||||
listBox1.Items.Add(ConsoleManager.lineToWrite);
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
catch (ArgumentNullException)
|
||||
catch (NullReferenceException)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -182,9 +198,10 @@ namespace JellyfinRPC
|
|||
StatusManager.WriteStatusLine("Testing Status...");
|
||||
}
|
||||
|
||||
private void checkBox1_Click(object sender, EventArgs e)
|
||||
|
||||
private void toolStripStatusLabel1_Click(object sender, EventArgs e)
|
||||
{
|
||||
listBox1.Enabled = checkBox1.Checked;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue