public override void InitViewer(TREInfoFile treInfoFile) { base.InitViewer(treInfoFile); var stringsFile = new StringFileReader() .Load(treInfoFile.Data); listView.BeginUpdate(); listView.Items.Clear(); foreach (var stringItem in stringsFile.Items) { var listViewItem = new ListViewItem(new string[] { stringItem.Id.ToString(), stringItem.Name, stringItem.Value }) { Tag = stringItem }; listView.Items.Add(listViewItem); } listView.EndUpdate(); }
private void openButton_Click(object sender, EventArgs e) { var node = treeView.SelectedNode; if (node == null) { return; } var item = (IFFFile.Node)node.Tag; if (item == null) { return; } try { string fileName = item.Data.ReadString(); IRepositoryTREFile repositoryTREFile; TREFile.TreInfo treInfo; if (TREInfoFile.Repository.Find(fileName, out repositoryTREFile, out treInfo)) { var treInfoFile = new TREInfoFile(TREInfoFile.Repository, repositoryTREFile.FileName, treInfo); ViewForm.Show(TREInfoFile.Repository, treInfoFile); } } catch { } }
public override void InitViewer(TREInfoFile treInfoFile) { base.InitViewer(treInfoFile); string text = Encoding.ASCII.GetString(Encoding.Convert(Encoding.UTF8, Encoding.ASCII, treInfoFile.Data)); XDocument xmlDoc = null; if (text.TrimStart().StartsWith("<")) { try { xmlDoc = XDocument.Parse(text.Trim()); } catch { } } if (xmlDoc != null) { var converter = new XmlToRtfConverter(); var rtfText = converter.Process(xmlDoc, true); richTextBox.Rtf = rtfText; } else { richTextBox.Text = text; } }
public override void InitViewer(TREInfoFile treInfoFile) { base.InitViewer(treInfoFile); string text = Encoding.ASCII.GetString(Encoding.Convert(Encoding.UTF8, Encoding.ASCII, treInfoFile.Data)); XDocument xmlDoc = null; if (text.TrimStart().StartsWith("<")) { try { xmlDoc = XDocument.Parse(text.Trim()); } catch { } } if (xmlDoc != null) { var converter = new XmlToRtfConverter(); var rtfText = converter.Process(xmlDoc, true); richTextBox.Rtf = rtfText; } else richTextBox.Text = text; }
public override void InitViewer(TREInfoFile treInfoFile) { base.InitViewer(treInfoFile); IFFFile = new IFFFileReader().Load(treInfoFile.Data); dataSizeLabel.Text = ""; RefreshTreeView(); }
public override void InitViewer(TREInfoFile treInfoFile) { base.InitViewer(treInfoFile); if (treInfoFile.FileType.DebugToString != null) { try { using (var writer = new StringWriter()) { treInfoFile.FileType.DebugToString(treInfoFile.Data, writer); richTextBox.Text = writer.ToString(); } } catch (Exception ex) { System.Diagnostics.Debug.WriteLine(ex); richTextBox.Text = string.Format("Error loading Debug Information: \r\n{0}", ex); } } }
public override void InitViewer(TREInfoFile treInfoFile) { base.InitViewer(treInfoFile); hexBox.ByteProvider = new DynamicByteProvider(treInfoFile.Data); }
public virtual void InitViewer(TREInfoFile treInfoFile) { TREInfoFile = treInfoFile; }
public override void InitViewer(TREInfoFile treInfoFile) { base.InitViewer(treInfoFile); pictureBox.Image = DDSHelper.LoadBitmap(treInfoFile.Data); }
public override void InitViewer(TREInfoFile treInfoFile) { base.InitViewer(treInfoFile); }
private void openButton_Click(object sender, EventArgs e) { var node = treeView.SelectedNode; if (node == null) return; var item = (IFFFile.Node)node.Tag; if (item == null) return; try { string fileName = item.Data.ReadString(); IRepositoryTREFile repositoryTREFile; TREFile.TreInfo treInfo; if (TREInfoFile.Repository.Find(fileName, out repositoryTREFile, out treInfo)) { var treInfoFile = new TREInfoFile(TREInfoFile.Repository, repositoryTREFile.FileName, treInfo); ViewForm.Show(TREInfoFile.Repository, treInfoFile); } } catch { } }