private void btnClientPath_Click(object sender, EventArgs e) { DialogResult result = AppContextManager.AskPath(new ClientFolderBrowserDialogSettings { Description = Resources.SelectClientFolder }); if (result == DialogResult.OK) { LaunchManager.SetClientIcon(); this.ShowOrFocus(); } }
private void btnGamePath_Click(object sender, EventArgs e) { DialogResult result = AppContextManager.AskPath(new GameFolderBrowserDialogSettings { Description = string.Format(Resources.SelectExecutableFolderFormat, AppContextManager.Context.Value.Executable.Name) }); if (result == DialogResult.OK) { LaunchManager.SetClientIcon(); this.ShowOrFocus(); } }
static AppContextManager() { FullPath = Path.GetFullPath(SettingsManager.XmlSettings.Launcher.Files.AppInfo); Logger = LogManager.CreateLogger("AppContextManager"); Context = Bindable.Variable(DefaultAppInfo); Context.HasChanged += delegate(IBindable <AppInfo> bindable) { if (bindable.Value != null && bindable.Value != DefaultAppInfo) { Logger.Debug("Context changed. Trying to set client icon."); LaunchManager.SetClientIcon(); } }; }