コード例 #1
0
        static void Main()
        {
            //Avvio del Main
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            NavigationHelper helper = new NavigationHelper();

            helper.AgganciaHandlers();
            IGestoreImpostazione impostazioniController =
                new ImpostazioneTrasferimentoController((HomeImpostazioni)(helper.GetForm("HomeImpostazioni")));

            IGestoreBlacklist blacklistController = new BlackListController((HomeBlacklist)(helper.GetForm("HomeBlacklist")));
            InitControllers   initializer         = new InitControllers();

            initializer.Init(blacklistController, impostazioniController);
            IGestoreSincronizzazione sincroController = new GestoreSincronizzazioneController(blacklistController,
                                                                                              impostazioniController, (HomeSmartKey)helper.GetForm("HomeSmartKey"));
            LogController logController = new LogController((HomeLog)(helper.GetForm("HomeLog")));

            blacklistController.ToLog    += logController.Update;
            impostazioniController.ToLog += logController.Update;
            sincroController.ToLog       += logController.Update;

            Application.Run(helper.GetForm("HomeSmartKey"));
        }