public WriteObject ( object value ) : void | ||
value | object | |
Результат | void |
public void Write(PssgBinaryWriter writer) { writer.Write(this.Id); writer.Write(size); writer.Write(attributeSize); if (Attributes != null) { foreach (PssgAttribute attr in Attributes) { attr.Write(writer); } } if (this.IsDataNode) { writer.WriteObject(data); } else { foreach (PssgNode node in ChildNodes) { node.Write(writer); } } }
private void exportNodeDataToolStripMenuItem_Click(object sender, EventArgs e) { SaveFileDialog dialog = new SaveFileDialog(); dialog.Filter = "Bin files|*.bin|All files|*.*"; dialog.Title = "Select the byte data save location and file name"; dialog.DefaultExt = "bin"; dialog.FileName = "nodeData.bin"; if (dialog.ShowDialog() == DialogResult.OK) { try { PssgNode node = ((PssgNode)treeView.SelectedNode.Tag); using (PssgBinaryWriter writer = new PssgBinaryWriter(new BigEndianBitConverter(), File.Open(dialog.FileName, FileMode.Create))) { writer.WriteObject(node.Value); } } catch (Exception ex) { MessageBox.Show("Could not export data!" + Environment.NewLine + Environment.NewLine + ex.Message, "Export Failed", MessageBoxButtons.OK, MessageBoxIcon.Error); } } }
public void Write(PssgBinaryWriter writer) { writer.Write(this.Id); writer.Write(this.size); writer.WriteObject(this.data); }
public void Write(PssgBinaryWriter writer) { writer.Write(this.Id); writer.Write(size); writer.Write(attributeSize); if (Attributes != null) { foreach (PssgAttribute attr in Attributes) { attr.Write(writer); } } if (this.IsDataNode) { writer.WriteObject(data); } else { foreach (PssgNode node in ChildNodes) { node.Write(writer); } } }
public void Write(PssgBinaryWriter writer) { writer.Write(this.Id); writer.Write(this.size); writer.WriteObject(this.data); }