예제 #1
0
 public KBWindow(LogoManager logo, Utility utility, OsdForm osd)
 {
     InitializeComponent();
     this._logo    = logo;
     this._utility = utility;
     this._osd     = osd;
     SetInterface();
 }
예제 #2
0
 public InstallPresenter(IInstallView view, FOGameInfo game, InstallHandler installHandler, LogoManager logoManager, string scriptPath, string tempPath)
 {
     this.view = view;
     this.game = game;
     this.scriptPath = scriptPath;
     this.installHandler = installHandler;
     this.logoManager = logoManager;
     this.tempPath = tempPath;
 }
        public Dictionary <string, object> GetLogoImage()
        {
            LogoManager logoManager            = new LogoManager();
            Guid        guid                   = new Guid();
            Dictionary <string, object> result = new Dictionary <string, object>();

            if (logoManager.Exists(UserContext.AssociationNumber, UserContext.UserID))
            {
                result.Add("FileSaveName", Path.Combine(ConfigurationManager.AppSettings[Const.LOGO_IMAGE_URL], string.Format("{0}_{1}.png?{2}", UserContext.UserID, UserContext.AssociationNumber, Guid.NewGuid())));
            }
            else
            {
                result.Add("FileSaveName", string.Empty);
            }

            return(result);
        }
        public Dictionary <string, object> RemoveCustomLogo()
        {
            LogoManager logoManager = new LogoManager();

            Dictionary <string, object> result = new Dictionary <string, object>();

            if (logoManager.Exists(UserContext.AssociationNumber, UserContext.UserID))
            {
                logoManager.Delete(UserContext.AssociationNumber, UserContext.UserID);
                result.Add("Status", "OK");
            }
            else
            {
                result.Add("Status", "NOT EXISTS");
            }

            return(result);
        }
예제 #5
0
        void bw_DoWork(object sender, DoWorkEventArgs e)
        {
            JsonFetcher jsonFetch = new JsonFetcher(new NLogWrapper("FOQuery"));
            FOJsonDeserializer jsonDeserialize = new FOJsonDeserializer();

            this.view.UpdateStatusBar("Downloading data...");

            var jsonNode = jsonFetch.DownloadJson(this.settings.InstallUrl);
            this.installHandler = new InstallHandler(jsonDeserialize.GetInstallData(jsonNode), settings.Games, settings.Dependencies);
            this.logger.Debug("Installhandler initialized.");
            this.logoManager = new LogoManager(this.settings.Paths.Logos, this.settings.LogoUrl);
            this.logger.Debug("Logos initialized.");
            this.serverManager = new ServerManager(
                new FOServerJson(settings.ConfigUrl, settings.StatusUrl, settings.CombinedUrl, new NLogWrapper("FOQuery")),
                this.installHandler);
            this.logger.Debug("Servermanager initialized.");
            this.VerifyInstalledGames();
            this.logger.Debug("Verified installed games.");
            this.view.UpdateStatusBar("Updating game list...");
            this.UpdateGameList();
            this.logger.Debug("Games updated.");
        }