private void Activate_miAddTie(object sender, System.EventArgs e) { SimPe.PackedFiles.Wrapper.Supporting.FamilyTieSim fts = wrapper.CreateTie(currentsdsc); SimPe.PackedFiles.Wrapper.Supporting.FamilyTieItem fti = fts.CreateTie(lastsdsc, Data.MetaData.FamilyTieTypes.MySiblingIs); ties.AddTieToGraph(lastsdsc, 0, 0, fti.Type); if (this.cbkeep.Checked) { fts = wrapper.CreateTie(lastsdsc); fti = fts.CreateTie(currentsdsc, Data.MetaData.FamilyTieTypes.MySiblingIs); } wrapper.Changed = true; }
private void cbrel_SelectedIndexChanged(object sender, System.EventArgs e) { if (cbrel.Tag != null) { SimPe.PackedFiles.Wrapper.Supporting.FamilyTieItem fti = (SimPe.PackedFiles.Wrapper.Supporting.FamilyTieItem)cbrel.Tag; Ambertation.Windows.Forms.Graph.ImagePanel ip = (Ambertation.Windows.Forms.Graph.ImagePanel)ties.SelectedElement; fti.Type = (Data.MetaData.FamilyTieTypes)cbrel.SelectedValue; wrapper.Changed = true; Ambertation.Windows.Forms.Graph.LinkGraphic lg = ties.MainSimElement.GetChildLink(ip); if (lg != null) { lg.Text = cbrel.Text; } if (this.cbkeep.Checked) { SimPe.PackedFiles.Wrapper.Supporting.FamilyTieSim fts = wrapper.CreateTie(fti.SimDescription); fti = fts.CreateTie(currentsdsc, FamilyTieGraph.GetAntiTie(currentsdsc, fti.Type)); } } }