Inheritance: ITalkFile
示例#1
0
        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); 
            }
        }
示例#2
0
        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);
            }
        }
示例#3
0
        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;
            }
        }
示例#4
0
        private void manageTLKSetToolStripMenuItem_Click(object sender, EventArgs e)
        {
            TlkManager tm = new TlkManager();

            tm.InitTlkManager(pcc, tlkFileSet, tlkFiles);
            tlkFiles = tm.selectedTlks;
            tlkFile  = tlkFiles;
            tm.Show();
        }
示例#5
0
 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);
     }
 }
示例#6
0
        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);
            }
        }
示例#7
0
 public void InitBioTlkFileSet()
 {
     tlkFileSet = new BioTlkFileSet(pcc);
     tlkFiles   = new TalkFiles();
     tlkFile    = tlkFileSet;
 }
示例#8
0
 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();
 }
示例#9
0
 public void InitBioTlkFileSet()
 {
     tlkFileSet = new BioTlkFileSet(pcc as ME1Package);
     tlkFiles = new TalkFiles();
     tlkFile = tlkFileSet;
 }
示例#10
0
 public void InitBioTlkFileSet()
 {
     tlkFileSet = new BioTlkFileSet(pcc as ME1Package);
     tlkFiles   = new TalkFiles();
     tlkFile    = tlkFileSet;
 }