Exemplo n.º 1
0
        private void convertBtn_Click(object sender, EventArgs e)
        {
            XMLFileReader reader = new XMLFileReader(fileLocationBox.Text, fileDestinationBox.Text, outputNameBox.Text);

            reader.DataLog     = convertDataLog;
            reader.StatusBar   = convertStatusBar;
            convertBtn.Enabled = false;
            reader.convert();
        }
        static void Main(string[] args)
        {
            Database.SetInitializer(new MigrateDatabaseToLatestVersion
                                    <SupermarketContext, Configuration>());

            ClientMySQL.MySQLReader.MoveData();
            ExcelReader.ExtractReportNames();
            MongoDbWriter.Write();
            SQLiteReader.MoveData();

            PDFFileCreator.CreateTable("sampleForTest.pdf");
            XMLFIleCreator.CreateXMLFile("salesForTest.xml");

            ExcelWriter.CreateExcelTable();
            XMLFileReader.ParseXML("../../Vendor-Expenses.xml");
        }
Exemplo n.º 3
0
        public void BaseRoleXMLFileRead_existingFile_FileContent()
        {
            ISecureFilerReader fileReader = new XMLFileReader();

            Assert.NotEmpty(fileReader.RoleBasedFileRead(filePath, ApplicationRoles.admin));
        }
Exemplo n.º 4
0
        private BaseModule InitializeModule(BaseModule configuration)
        {
            BaseModule module = null;

            switch (configuration.GetType().Name)
            {
            // ADD MODULE CONSTRUCTORS HERE
            case "Database":
                module = new Database(SharedData, (Database)configuration);
                break;

            case "DataLoader":
                module = new DataLoader(SharedData, (DataLoader)configuration);
                break;

            case "XsltWriter":
                module = new XsltWriter(SharedData, (XsltWriter)configuration);
                break;

            case "ExcelWriter":
                module = new ExcelWriter(SharedData, (ExcelWriter)configuration);
                break;

            case "EmailPoster":
                module = new EmailPoster(SharedData, (EmailPoster)configuration);
                break;

            case "Printer":
                module = new Printer(SharedData, (Printer)configuration);
                break;

            case "LanCleaner":
                module = new LanCleaner(SharedData, (LanCleaner)configuration);
                break;

            case "LanPoster":
                module = new LanPoster(SharedData, (LanPoster)configuration);
                break;

            case "LanCollector":
                module = new LanCollector(SharedData, (LanCollector)configuration);
                break;

            case "XMLFileReader":
                module = new XMLFileReader(SharedData, (XMLFileReader)configuration);
                break;

            case "ExcelReader":
                module = new ExcelReader(SharedData, (ExcelReader)configuration);
                break;

            case "RestService":
                module = new RestService(SharedData, (RestService)configuration);
                break;

            default:
                throw new Exception("The configured module '" + configuration.Name + "' type '" + configuration.GetType().Name + "' is unknown.");
            }

            return(module);
        }
Exemplo n.º 5
0
        public void CryptedXMLFileRead_existingFile_FileContent()
        {
            ICryptedFileReader fileReader = new XMLFileReader();

            Assert.NotEmpty(fileReader.ReadCryptedFile(filePath, CrypTingAlgorithm.reverse));
        }
Exemplo n.º 6
0
        public void XMLFileRead_existingFile_FileContent()
        {
            IXMLFileReader fileReader = new XMLFileReader();

            Assert.NotEmpty(fileReader.readXMLFile(filePath));
        }