private void SRNItemsADelete(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e) { if (Tag == null) { return; } if (lb_srn_a.SelectedIndex < 0) { return; } try { lb_srn_a.Tag = true; SimPe.Plugin.ShapeRefNode srn = (SimPe.Plugin.ShapeRefNode)Tag; ShapeRefNodeItem_A a = (ShapeRefNodeItem_A)lb_srn_a.Items[lb_srn_a.SelectedIndex]; srn.ItemsA = (ShapeRefNodeItem_A[])Helper.Delete(srn.ItemsA, a); lb_srn_a.Items.Remove(a); srn.Changed = true; } catch (Exception ex) { Helper.ExceptionMessage("", ex); } finally { lb_srn_a.Tag = null; } }
private void SRNChangedItemsA(object sender, System.EventArgs e) { if (lb_srn_a.Tag != null) { return; } if (this.lb_srn_a.SelectedIndex < 0) { return; } try { lb_srn_a.Tag = true; ShapeRefNodeItem_A a = (ShapeRefNodeItem_A)lb_srn_a.Items[lb_srn_a.SelectedIndex]; a.Unknown1 = Convert.ToUInt16(tb_srn_a_1.Text, 16); a.Unknown2 = (int)Convert.ToUInt32(tb_srn_a_2.Text, 16); lb_srn_a.Items[lb_srn_a.SelectedIndex] = a; SimPe.Plugin.ShapeRefNode srn = (SimPe.Plugin.ShapeRefNode)Tag; srn.Changed = true; } catch (Exception) { //Helper.ExceptionMessage("", ex); } finally { lb_srn_a.Tag = null; } }
private void SRNItemsAAdd(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e) { if (Tag == null) { return; } try { lb_srn_a.Tag = true; SimPe.Plugin.ShapeRefNode srn = (SimPe.Plugin.ShapeRefNode)Tag; ShapeRefNodeItem_A a = new ShapeRefNodeItem_A(); tb_srn_a_1.Text = "0x" + Helper.HexString(a.Unknown1); tb_srn_a_2.Text = "0x" + Helper.HexString((uint)a.Unknown2); srn.ItemsA = (ShapeRefNodeItem_A[])Helper.Add(srn.ItemsA, a); lb_srn_a.Items.Add(a); srn.Changed = true; } catch (Exception ex) { Helper.ExceptionMessage("", ex); } finally { lb_srn_a.Tag = null; } }
private void SRNSelectA(object sender, System.EventArgs e) { if (lb_srn_a.Tag != null) { return; } if (this.lb_srn_a.SelectedIndex < 0) { return; } try { lb_srn_a.Tag = true; ShapeRefNodeItem_A a = (ShapeRefNodeItem_A)lb_srn_a.Items[lb_srn_a.SelectedIndex]; tb_srn_a_1.Text = "0x" + Helper.HexString(a.Unknown1); tb_srn_a_2.Text = "0x" + Helper.HexString((uint)a.Unknown2); SimPe.Plugin.ShapeRefNode srn = (SimPe.Plugin.ShapeRefNode)Tag; srn.Changed = true; } catch (Exception) { //Helper.ExceptionMessage("", ex); } finally { lb_srn_a.Tag = null; } }