Ejemplo n.º 1
0
        private void Save()
        {
            var settings = _serializedSettings.targetObject as MetaBuddySettings;
            var config   = settings.ToConfig();

            ConfigSerialization.Save(config, ConfigModel.DefaultConfigFilename);
        }
Ejemplo n.º 2
0
        static void Main()
        {
            var config  = new ConfigSerialization().Model;
            var youtube = new YoutubeHandler(config);

            var model = new ConsoleModel();

            model.Setup(config, youtube);

            var view       = new ConsoleView();
            var controller = new ConsoleController(model, view);

            view.OnReady();
        }
Ejemplo n.º 3
0
        private static bool TryLoadConfig(out ConfigModel config)
        {
            try
            {
                config = ConfigSerialization.Load(ConfigModel.DefaultConfigFilename);
                return(config != null);
            }
            catch (FileNotFoundException)
            {
            }

            config = null;
            return(false);
        }
Ejemplo n.º 4
0
        static void Main()
        {
            /**
             * Application tools
             */
            var config  = new ConfigSerialization().Model;
            var youtube = new YoutubeHandler(config);
            var trimmer = new Trimmer(config);

            /**
             * MVC
             */
            var model      = new ConsoleModel();
            var view       = new ConsoleView();
            var controller = new ConsoleController(model, view);

            model.Setup(config, youtube, trimmer);
            view.OnReady();
        }