mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-06 05:05:42 +13:00
Refresh custom uploader listbox name
This commit is contained in:
parent
3403384f22
commit
0ece165227
2 changed files with 14 additions and 0 deletions
|
@ -582,6 +582,16 @@ public static void RefreshItems(this ComboBox cb)
|
||||||
typeof(ComboBox).InvokeMember("RefreshItems", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.InvokeMethod, null, cb, new object[] { });
|
typeof(ComboBox).InvokeMember("RefreshItems", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.InvokeMethod, null, cb, new object[] { });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void RefreshSelectedItem(this ListBox lb)
|
||||||
|
{
|
||||||
|
int index = lb.SelectedIndex;
|
||||||
|
|
||||||
|
if (index > -1)
|
||||||
|
{
|
||||||
|
lb.Items[index] = lb.Items[index];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static void ShowError(this Exception e)
|
public static void ShowError(this Exception e)
|
||||||
{
|
{
|
||||||
MessageBox.Show(e.ToString(), "ShareX - " + Resources.Error, MessageBoxButtons.OK, MessageBoxIcon.Error);
|
MessageBox.Show(e.ToString(), "ShareX - " + Resources.Error, MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
|
|
|
@ -3295,6 +3295,8 @@ private void txtCustomUploaderName_TextChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
CustomUploaderItem uploader = CustomUploaderGetSelected();
|
CustomUploaderItem uploader = CustomUploaderGetSelected();
|
||||||
if (uploader != null) uploader.Name = txtCustomUploaderName.Text;
|
if (uploader != null) uploader.Name = txtCustomUploaderName.Text;
|
||||||
|
|
||||||
|
lbCustomUploaderList.RefreshSelectedItem();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void cbCustomUploaderRequestType_SelectedIndexChanged(object sender, EventArgs e)
|
private void cbCustomUploaderRequestType_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
|
@ -3309,6 +3311,8 @@ private void txtCustomUploaderRequestURL_TextChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
CustomUploaderItem uploader = CustomUploaderGetSelected();
|
CustomUploaderItem uploader = CustomUploaderGetSelected();
|
||||||
if (uploader != null) uploader.RequestURL = txtCustomUploaderRequestURL.Text;
|
if (uploader != null) uploader.RequestURL = txtCustomUploaderRequestURL.Text;
|
||||||
|
|
||||||
|
lbCustomUploaderList.RefreshSelectedItem();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void txtCustomUploaderFileForm_TextChanged(object sender, EventArgs e)
|
private void txtCustomUploaderFileForm_TextChanged(object sender, EventArgs e)
|
||||||
|
|
Loading…
Reference in a new issue