public void InitTlkManager(ME1Package pcc, BioTlkFileSet tlkSet, TalkFiles tlks = null) { packages = new List<ME1Package>(); tlkFileSets = new List<BioTlkFileSet>(); selectedTlks = tlks ?? new TalkFiles(); packages.Add(pcc); refreshFileBox(); fileBox.SelectedIndex = 0; Application.DoEvents(); for (int i = 0; i < tlkFileSets.Count; i++) { if (tlkFileSets[i].index == tlkSet.index) { bioTlkSetBox.SelectedIndex = i; Application.DoEvents(); tlkFileBox.SelectedIndex = tlkSet.selectedTLK; break; } } TalkFile tlk = tlkSet.talkFiles[tlkSet.selectedTLK]; if (!selectedTlks.tlkList.Contains(tlk)) { selectedTlks.tlkList.Add(tlk); } foreach (TalkFile tlkFile in selectedTlks.tlkList) { selectedTlkFilesBox.Items.Add(Path.GetFileName(pcc.FileName) + " -> " + tlkFile.BioTlkSetName + tlkFile.Name); } }
public void InitTlkManager(PCCObject pcc, BioTlkFileSet tlkSet, TalkFiles tlks = null) { packages = new List <PCCObject>(); tlkFileSets = new List <BioTlkFileSet>(); selectedTlks = tlks ?? new TalkFiles(); packages.Add(pcc); refreshFileBox(); fileBox.SelectedIndex = 0; Application.DoEvents(); for (int i = 0; i < tlkFileSets.Count; i++) { if (tlkFileSets[i].index == tlkSet.index) { bioTlkSetBox.SelectedIndex = i; Application.DoEvents(); tlkFileBox.SelectedIndex = tlkSet.selectedTLK; break; } } TalkFile tlk = tlkSet.talkFiles[tlkSet.selectedTLK]; if (!selectedTlks.tlkList.Contains(tlk)) { selectedTlks.tlkList.Add(tlk); } foreach (TalkFile tlkFile in selectedTlks.tlkList) { selectedTlkFilesBox.Items.Add(Path.GetFileName(pcc.fullname) + " -> " + tlkFile.BioTlkSetName + tlkFile.Name); } }
public SequenceEditor() { InitializeComponent(); graphEditor.BackColor = Color.FromArgb(167, 167, 167); zoomController = new ZoomController(graphEditor); talkFiles = new TalkFiles(); talkFiles.LoadGlobalTlk(); if (SText.fontcollection == null) { SText.fontcollection = LoadFont("KismetFont.ttf", 8); } SObj.talkfiles = talkFiles; if (File.Exists(ME1Directory.cookedPath + @"\SequenceViews\SequenceEditorOptions.JSON")) { Dictionary <string, object> options = JsonConvert.DeserializeObject <Dictionary <string, object> >(File.ReadAllText(ME1Directory.cookedPath + @"\SequenceViews\SequenceEditorOptions.JSON")); if (options.ContainsKey("AutoSave")) { autoSaveViewToolStripMenuItem.Checked = (bool)options["AutoSave"]; } if (options.ContainsKey("OutputNumbers")) { showOutputNumbersToolStripMenuItem.Checked = (bool)options["OutputNumbers"]; } if (options.ContainsKey("GlobalSeqRefView")) { useGlobalSequenceRefSavesToolStripMenuItem.Checked = (bool)options["GlobalSeqRefView"]; } SObj.OutputNumbers = showOutputNumbersToolStripMenuItem.Checked; } }
private void manageTLKSetToolStripMenuItem_Click(object sender, EventArgs e) { TlkManager tm = new TlkManager(); tm.InitTlkManager(pcc, tlkFileSet, tlkFiles); tlkFiles = tm.selectedTlks; tlkFile = tlkFiles; tm.Show(); }
public void InitTlkManager(TalkFiles tlks) { packages = new List<ME1Package>(); tlkFileSets = new List<BioTlkFileSet>(); selectedTlks = tlks; foreach (TalkFile tlkFile in selectedTlks.tlkList) { selectedTlkFilesBox.Items.Add(Path.GetFileName(tlkFile.pcc.FileName) + " -> " + tlkFile.BioTlkSetName + tlkFile.Name); } }
public void InitTlkManager(TalkFiles tlks) { packages = new List <PCCObject>(); tlkFileSets = new List <BioTlkFileSet>(); selectedTlks = tlks; foreach (TalkFile tlkFile in selectedTlks.tlkList) { selectedTlkFilesBox.Items.Add(Path.GetFileName(tlkFile.pcc.fullname) + " -> " + tlkFile.BioTlkSetName + tlkFile.Name); } }
public void InitBioTlkFileSet() { tlkFileSet = new BioTlkFileSet(pcc); tlkFiles = new TalkFiles(); tlkFile = tlkFileSet; }
private void manageTLKSetToolStripMenuItem_Click(object sender, EventArgs e) { TlkManager tm = new TlkManager(); tm.InitTlkManager(pcc as ME1Package, tlkFileSet, tlkFiles); tlkFiles = tm.selectedTlks; tlkFile = tlkFiles; tm.Show(); }
public void InitBioTlkFileSet() { tlkFileSet = new BioTlkFileSet(pcc as ME1Package); tlkFiles = new TalkFiles(); tlkFile = tlkFileSet; }