public Computer(SystemBlock s, Monitor m, Clava c, Mice mi) { SB = s; MON = m; CL = c; MICE = mi; }
public CheckSystemBlockCommand(SystemBlock systemBlock, SystemBlockComponents components, ISystemBlockHandler handler, INavigationService navigation) { this.handler = handler; this.systemBlock = systemBlock; this.components = components; this.navigation = navigation; }
public override string ToString() { var type = "########## ??? ##########"; var val = ""; if (SystemBlock != null) { type = SystemBlock.GetType().Name; //val = SystemBlock.ToString(); } else if (GraphicsBlock != null) { type = GraphicsBlock.GetType().Name; //val = GraphicsBlock.ToString(); } else if (Array != null) { type = Array.GetType().Name + " (" + Array.Length.ToString() + ")"; } else if (String != null) { type = "string"; val = "\"" + String + "\""; } var valstr = (string.IsNullOrEmpty(val) ? "" : " - " + val); return(Offset.ToString() + " - " + Length.ToString() + " - " + type + valstr + (Overlapping ? " (embedded)" : "")); }
public void Execute(object parameter) { service.Save(systemBlock); systemBlock = null; MessageBox.Show("System block was successfully added to database", "Message"); }
public bool Identify(IMediaImage imagePlugin, Partition partition) { if (imagePlugin.Info.SectorSize < 256) { return(false); } byte[] sector = imagePlugin.ReadSector(partition.Start); SystemBlock lifSb = Marshal.ByteArrayToStructureBigEndian <SystemBlock>(sector); AaruConsole.DebugWriteLine("LIF plugin", "magic 0x{0:X8} (expected 0x{1:X8})", lifSb.magic, LIF_MAGIC); return(lifSb.magic == LIF_MAGIC); }
public void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding) { Encoding = encoding ?? Encoding.GetEncoding("iso-8859-15"); information = ""; if (imagePlugin.Info.SectorSize < 256) { return; } byte[] sector = imagePlugin.ReadSector(partition.Start); SystemBlock lifSb = Marshal.ByteArrayToStructureBigEndian <SystemBlock>(sector); if (lifSb.magic != LIF_MAGIC) { return; } var sb = new StringBuilder(); sb.AppendLine("HP Logical Interchange Format"); sb.AppendFormat("Directory starts at cluster {0}", lifSb.directoryStart).AppendLine(); sb.AppendFormat("LIF identifier: {0}", lifSb.lifId).AppendLine(); sb.AppendFormat("Directory size: {0} clusters", lifSb.directorySize).AppendLine(); sb.AppendFormat("LIF version: {0}", lifSb.lifVersion).AppendLine(); // How is this related to volume size? I have only CDs to test and makes no sense there sb.AppendFormat("{0} tracks", lifSb.tracks).AppendLine(); sb.AppendFormat("{0} heads", lifSb.heads).AppendLine(); sb.AppendFormat("{0} sectors", lifSb.sectors).AppendLine(); sb.AppendFormat("Volume name: {0}", StringHandlers.CToString(lifSb.volumeLabel, Encoding)).AppendLine(); sb.AppendFormat("Volume created on {0}", DateHandlers.LifToDateTime(lifSb.creationDate)).AppendLine(); information = sb.ToString(); XmlFsType = new FileSystemType { Type = "HP Logical Interchange Format", ClusterSize = 256, Clusters = partition.Size / 256, CreationDate = DateHandlers.LifToDateTime(lifSb.creationDate), CreationDateSpecified = true, VolumeName = StringHandlers.CToString(lifSb.volumeLabel, Encoding) }; }
public SaveSystemBlockCommand(SystemBlock systemBlock, ISystemBlockService service) { this.service = service; this.systemBlock = systemBlock; }