public void UpdateView(AllInflictStatuses statuses, PatcherLib.Datatypes.Context context) { ourContext = context; offsetListBox.SelectedIndexChanged -= offsetListBox_SelectedIndexChanged; offsetListBox.DataSource = statuses.InflictStatuses; offsetListBox.SelectedIndexChanged += offsetListBox_SelectedIndexChanged; offsetListBox.SelectedIndex = 0; PatchUtility.CheckDuplicates <InflictStatus>(statuses.InflictStatuses); offsetListBox.SetChangedColors <InflictStatus>(); //inflictStatusEditor.InflictStatus = offsetListBox.SelectedItem as InflictStatus; inflictStatusEditor.SetInflictStatus(offsetListBox.SelectedItem as InflictStatus, context); }
private void itemAttributeEditor_DataChanged( object sender, EventArgs e ) { offsetListBox.BeginUpdate(); int top = offsetListBox.TopIndex; PatchUtility.CheckDuplicates<ItemAttributes>((ItemAttributes[])offsetListBox.DataSource); CurrencyManager cm = (CurrencyManager)BindingContext[offsetListBox.DataSource]; cm.Refresh(); offsetListBox.TopIndex = top; offsetListBox.EndUpdate(); //offsetListBox.SetChangedColor(); offsetListBox.SetChangedColors<ItemAttributes>(); }
public void UpdateView(AllItemAttributes attributes, Context context) { if (ourContext != context) { ourContext = context; ClipBoardAttributes = null; offsetListBox.ContextMenu.MenuItems[1].Enabled = false; } offsetListBox.SelectedIndexChanged -= offsetListBox_SelectedIndexChanged; offsetListBox.DataSource = attributes.ItemAttributes; offsetListBox.SelectedIndexChanged += offsetListBox_SelectedIndexChanged; offsetListBox.SelectedIndex = 0; PatchUtility.CheckDuplicates <ItemAttributes>(attributes.ItemAttributes); offsetListBox.SetChangedColors <ItemAttributes>(); //itemAttributeEditor.ItemAttributes = offsetListBox.SelectedItem as ItemAttributes; itemAttributeEditor.SetItemAttributes(offsetListBox.SelectedItem as ItemAttributes, context); }
public void UpdateListBox() { PatchUtility.CheckDuplicates <ItemAttributes>((ItemAttributes[])offsetListBox.DataSource); offsetListBox.SetChangedColors <ItemAttributes>(); offsetListBox.Invalidate(); }
public void UpdateListBox() { PatchUtility.CheckDuplicates <InflictStatus>((InflictStatus[])offsetListBox.DataSource); offsetListBox.SetChangedColors <InflictStatus>(); offsetListBox.Invalidate(); }