Exemplo n.º 1
0
        public Devices()
        {
            int index = 0;

            while (index < 8)
            {
                mDevices[index] = new TapeDevice(index);
                index++;
            }

            while (index < 16)
            {
                mDevices[index] = new DiskDevice(index);
                index++;
            }

            mDevices[CardReaderUnitCode] = new CardReaderDevice(CardReaderUnitCode);
            mDevices[17] = new CardWriterDevice(17);
            mDevices[18] = new PrinterDevice(18);
            Teletype     = new TeletypeDevice(19);
            mDevices[19] = Teletype;
            mDevices[20] = new PaperTapeDevice(20);

            foreach (MixDevice device in mDevices)
            {
                device.ReportingEvent += Device_Reporting;
            }
        }
Exemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        internal DataSetReport[] ToArray()
        {
            IEnumerable <DataSetReport> results = from cont in Continent.AsEnumerable()
                                                  join coun in Country.AsEnumerable()
                                                  on cont.ContinentID equals coun.ContinentID
                                                  join cl in CountryLanguage.AsEnumerable()
                                                  on coun.CountryID equals cl.CountryID
                                                  join lang in Language.AsEnumerable()
                                                  on cl.LanguageID equals lang.LanguageID
                                                  join cu in CountryCardProcessorUrls.AsEnumerable()
                                                  on coun.CountryID equals cu.CountryID
                                                  join cpu in CardProcessorUrl
                                                  on cu.CardProcessorUrlID equals cpu.CardProcessorUrlID
                                                  join cp in CountryPhone.AsEnumerable()
                                                  on coun.CountryID equals cp.CountryID
                                                  join cpp in CardProcessorPhone.AsEnumerable()
                                                  on cp.CardProcessingPhoneID equals cpp.CardProcessorPhoneID
                                                  join cctd in CountryCardTypeDevice.AsEnumerable()
                                                  on coun.CountryID equals cctd.CountryID
                                                  join ct in CardType.AsEnumerable()
                                                  on cctd.CardTypeID equals ct.CardTypeID
                                                  join crd in CardReaderDevice.AsEnumerable()
                                                  on cctd.CardReaderDeviceID equals crd.CardReaderDeviceID
                                                  select new DataSetReport
            {
                ContinentName = cont.Name,
                CountryName   = coun.Name,
                LanguageName  = lang.Name,
                URLName       = cpu.Name,
                URLValue      = cpu.Value,
                PhoneName     = cpp.Name,
                PhoneValue    = cpp.Value,
                CardTypeName  = ct.Name,
                DeviceName    = crd.Name
            };

            return(results.ToArray());
        }