Beispiel #1
0
        public Form1(FTPReleaseSideFactory leftSide, LocalTempSideFactory rightSide)
        {
            if (leftSide == null)
            {
                throw new ArgumentNullException(nameof(leftSide));
            }
            if (rightSide == null)
            {
                throw new ArgumentNullException(nameof(rightSide));
            }

            InitializeComponent();
            this.menuStripManager = new MenuStripManager(this.menuStrip1);
            this.leftSide         = leftSide;
            this.rightSide        = rightSide;


            IEnumerable <IPlugin> plugins = ObtainPlugins();

            LoadMenuStrip(plugins, this.menuStripManager);
        }
Beispiel #2
0
        static void Main()
        {
            var all = new PluginLoader().ObtainPlugins();

            IFileSystemService systemService = GetLocalFTPFileSystemService();
            var man     = new SiteManifestManager(systemService);
            var siteman = new LocalSiteManager(systemService, new ItemLocation("", ""));

            FTPReleaseSideFactory factory = new FTPReleaseSideFactory(man, siteman);

            DEBUG_ResetSettings();

            //TODO: Versions and upgrade
            if (Settings.Default.IsFirstRun)
            {
                PerformFirstRun();
            }
            else
            {
                Initialise();
            }

            if (Program.releaseManager == null)
            {
                throw new InvalidOperationException("releaseManager is invalid.");
            }

            LocalTempSideFactory f = new LocalTempSideFactory(Program.releaseManager);

            Settings.Default.IsFirstRun = false;
            Settings.Default.Save();

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1(factory, f));
        }