コード例 #1
0
 public Computer(SystemBlock s, Monitor m, Clava c, Mice mi)
 {
     SB   = s;
     MON  = m;
     CL   = c;
     MICE = mi;
 }
コード例 #2
0
 public CheckSystemBlockCommand(SystemBlock systemBlock, SystemBlockComponents components, ISystemBlockHandler handler, INavigationService navigation)
 {
     this.handler     = handler;
     this.systemBlock = systemBlock;
     this.components  = components;
     this.navigation  = navigation;
 }
コード例 #3
0
            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)" : ""));
            }
コード例 #4
0
        public void Execute(object parameter)
        {
            service.Save(systemBlock);
            systemBlock = null;

            MessageBox.Show("System block was successfully added to database", "Message");
        }
コード例 #5
0
        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);
        }
コード例 #6
0
        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)
            };
        }
コード例 #7
0
        public SaveSystemBlockCommand(SystemBlock systemBlock, ISystemBlockService service)
        {
            this.service = service;

            this.systemBlock = systemBlock;
        }