/// <summary> /// Gets an instance of a <see cref="Messager"/> to use to talk to the running instance of the client. /// </summary> /// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param> /// <param name="p_gmdGameModeInfo">The descriptor of the game mode for which mods are being managed.</param> /// <returns>An instance of a <see cref="Messager"/> to use to talk to the running instance of the client, /// or <c>null</c> if no valid <see cref="Messager"/> could be created.</returns> public static IMessager GetMessager(EnvironmentInfo p_eifEnvironmentInfo, IGameModeDescriptor p_gmdGameModeInfo) { if (m_cchMessagerChannel == null) { System.Collections.IDictionary properties = new System.Collections.Hashtable(); properties["exclusiveAddressUse"] = false; m_cchMessagerChannel = new IpcClientChannel(); ChannelServices.RegisterChannel(m_cchMessagerChannel, true); } else throw new InvalidOperationException("The IPC Channel has already been created as a CLIENT."); string strMessagerUri = String.Format("ipc://{0}-{1}IpcServer/{1}Listener", p_eifEnvironmentInfo.Settings.ModManagerName, p_gmdGameModeInfo.ModeId); IMessager msgMessager = null; try { Trace.TraceInformation(String.Format("Getting listener on: {0}", strMessagerUri)); msgMessager = (IMessager)Activator.GetObject(typeof(IMessager), strMessagerUri); //Just because a messager has been returned, dosn't mean it exists. //All you've really done at this point is create an object wrapper of type "Messager" which has the same methods, properties etc... //You wont know if you've got a real object, until you invoke something, hence the post (Power on self test) method. msgMessager.Post(); } catch (RemotingException e) { Trace.TraceError("Could not get Messager: {0}", strMessagerUri); TraceUtil.TraceException(e); return null; } return new MessagerClient(msgMessager); }
/// <summary> /// The default constructor. /// </summary> /// <param name="p_lstGameModes">The list of avaliable game modes.</param> /// <param name="p_setSettings">The application settings.</param> public GameModeSelectionForm(IList <IGameModeDescriptor> p_lstGameModes, ISettings p_setSettings) { Settings = p_setSettings; InitializeComponent(); glvGameMode.MinimumSize = lblPrompt.Size; Icon = Properties.Resources.DefaultIcon; List <IGameModeDescriptor> lstSortedModes = new List <IGameModeDescriptor>(p_lstGameModes); lstSortedModes.Sort((x, y) => x.Name.CompareTo(y.Name)); foreach (IGameModeDescriptor gmdInfo in lstSortedModes) { GameModeListViewItem gliGameModeItem = new GameModeListViewItem(gmdInfo); glvGameMode.Controls.Add(gliGameModeItem); } GameModeListViewItem gliRescan = new GameModeListViewItem(new RescanGameModeDescriptor()); glvGameMode.Controls.Add(gliRescan); IGameModeDescriptor gmdDefault = p_lstGameModes.Find(x => x.ModeId.Equals(p_setSettings.RememberedGameMode)); if (gmdDefault != null) { glvGameMode.SelectedGameMode = gmdDefault; } else { glvGameMode.SelectedItem = glvGameMode.Items[0]; } cbxRemember.Checked = Settings.RememberGameMode; }
/// <summary> /// Gets an instance of a <see cref="Messager"/> to use to talk to the running instance of the client. /// </summary> /// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param> /// <param name="p_gmdGameModeInfo">The descriptor of the game mode for which mods are being managed.</param> /// <returns>An instance of a <see cref="Messager"/> to use to talk to the running instance of the client, /// or <c>null</c> if no valid <see cref="Messager"/> could be created.</returns> public static IMessager GetMessager(EnvironmentInfo p_eifEnvironmentInfo, IGameModeDescriptor p_gmdGameModeInfo) { if (m_cchMessagerChannel == null) { System.Collections.IDictionary properties = new System.Collections.Hashtable(); properties["exclusiveAddressUse"] = false; m_cchMessagerChannel = new IpcClientChannel(); ChannelServices.RegisterChannel(m_cchMessagerChannel, true); } else { throw new InvalidOperationException("The IPC Channel has already been created as a CLIENT."); } string strMessagerUri = String.Format("ipc://{0}-{1}IpcServer/{1}Listener", CommonData.ModManagerName, p_gmdGameModeInfo.ModeId); IMessager msgMessager = null; try { Trace.TraceInformation(String.Format("Getting listener on: {0}", strMessagerUri)); msgMessager = (IMessager)Activator.GetObject(typeof(IMessager), strMessagerUri); //Just because a messager has been returned, dosn't mean it exists. //All you've really done at this point is create an object wrapper of type "Messager" which has the same methods, properties etc... //You wont know if you've got a real object, until you invoke something, hence the post (Power on self test) method. msgMessager.Post(); } catch (RemotingException e) { Trace.TraceError("Could not get Messager: {0}", strMessagerUri); TraceUtil.TraceException(e); return(null); } return(new MessagerClient(msgMessager)); }
/// <summary> /// A simple constructor that initializes the object with the given dependencies. /// </summary> /// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param> /// <param name="p_gmdGameModeInfo">The descriptor of the current game mode.</param> public VirtualDirectoriesControlVM(IEnvironmentInfo p_eifEnvironmentInfo, IGameModeDescriptor p_gmdGameModeInfo, IVirtualModActivator p_ivaVirtualActivator) { EnvironmentInfo = p_eifEnvironmentInfo; GameModeDescriptor = p_gmdGameModeInfo; VirtualActivator = p_ivaVirtualActivator; Errors = new ErrorContainer(); m_booUseAdditionalChecks = true; }
/// <summary> /// A simple constructor that initializes the object with the given dependencies. /// </summary> /// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param> /// <param name="p_gmdGameModeInfo">The descriptor of the current game mode.</param> /// <param name="p_booUseAdditionalChecks">Whether to use additional checks to validate the folders.</param> public SetupDirectoriesControlVM(IEnvironmentInfo p_eifEnvironmentInfo, IGameModeDescriptor p_gmdGameModeInfo, bool p_booUseAdditionalChecks) { EnvironmentInfo = p_eifEnvironmentInfo; GameModeDescriptor = p_gmdGameModeInfo; m_booRequiredTool = GameModeDescriptor.OrderedRequiredToolFileNames != null; m_booUseAdditionalChecks = p_booUseAdditionalChecks; Errors = new ErrorContainer(); }
/// <summary> /// A simple constructor that initializes the object with the given dependencies. /// </summary> /// <param name="p_gmdGameModeInfo">The descriptor for the game mode whose install path is to be found.</param> public GameModeListViewItem(IGameModeDescriptor p_gmdGameModeInfo) : base(p_gmdGameModeInfo) { InitializeComponent(); TabStop = false; lblGameModeName.Text = GameMode.Name; lblGameModeName.ForeColor = GameMode.ModeTheme.PrimaryColour; if (GameMode.ModeTheme.Icon != null) pbxGameLogo.Image = new Icon(GameMode.ModeTheme.Icon, 32, 32).ToBitmap(); }
/// <summary> /// Raises the <see cref="FileSearcher.FileFound"/> event. /// </summary> /// <remarks> /// This determines the game mode whose file has been found, and raises the <see cref="PathFound"/> /// event as required. /// </remarks> /// <param name="e">The <see cref="EventArgs{String}"/> describing the event arguments.</param> protected override void OnFileFound(EventArgs <string> e) { base.OnFileFound(e); string strFileName = Path.GetFileName(e.Argument); if (m_dicGameModesByFile.ContainsKey(strFileName)) { IGameModeDescriptor gmdGameMode = m_dicGameModesByFile[strFileName]; string strPath = Path.GetDirectoryName(e.Argument); FoundCandidate(gmdGameMode, strPath); } }
/// <summary> /// A simple constructor that initializes the object with the given dependencies. /// </summary> /// <param name="p_gmdGameModeInfo">The descriptor for the game mode whose install path is to be found.</param> public GameModeListViewItem(IGameModeDescriptor p_gmdGameModeInfo) : base(p_gmdGameModeInfo) { InitializeComponent(); TabStop = false; lblGameModeName.Text = GameMode.Name; lblGameModeName.ForeColor = GameMode.ModeTheme.PrimaryColour; if (GameMode.ModeTheme.Icon != null) { pbxGameLogo.Image = new Icon(GameMode.ModeTheme.Icon, 32, 32).ToBitmap(); } }
/// <summary> /// A simple constructor that initializes the object with the given dependencies. /// </summary> /// <param name="p_gmdGameModeInfo">The descriptor for the game modewhose install path is to be found.</param> /// <param name="p_gdtDetector">The discoverer to use to find the game installation path.</param> public GameModeSearchListViewItem(IGameModeDescriptor p_gmdGameModeInfo, GameDiscoverer p_gdtDetector) : base(p_gmdGameModeInfo) { Discoverer = p_gdtDetector; InitializeComponent(); AutoSize = true; AutoSizeMode = AutoSizeMode.GrowAndShrink; SetVisiblePanel(pnlSearching); p_gdtDetector.PropertyChanged += new PropertyChangedEventHandler(Detector_PropertyChanged); p_gdtDetector.PathFound += new EventHandler<GameModeDiscoveredEventArgs>(Detector_PathFound); p_gdtDetector.TaskEnded += new EventHandler<TaskEndedEventArgs>(Detector_TaskEnded); lblGameModeName.Text = GameMode.Name; lblGameModeName.ForeColor = GameMode.ModeTheme.PrimaryColour; pbxGameLogo.Image = new Icon(GameMode.ModeTheme.Icon, 96, 96).ToBitmap(); }
/// <summary> /// A simple constructor that initializes the object with the given dependencies. /// </summary> /// <param name="p_gmdGameModeInfo">The descriptor for the game modewhose install path is to be found.</param> /// <param name="p_gdtDetector">The discoverer to use to find the game installation path.</param> public GameModeSearchListViewItem(IGameModeDescriptor p_gmdGameModeInfo, GameDiscoverer p_gdtDetector) : base(p_gmdGameModeInfo) { Discoverer = p_gdtDetector; InitializeComponent(); AutoSize = true; AutoSizeMode = AutoSizeMode.GrowAndShrink; SetVisiblePanel(pnlSearching); p_gdtDetector.PropertyChanged += new PropertyChangedEventHandler(Detector_PropertyChanged); p_gdtDetector.PathFound += new EventHandler <GameModeDiscoveredEventArgs>(Detector_PathFound); p_gdtDetector.TaskEnded += new EventHandler <TaskEndedEventArgs>(Detector_TaskEnded); lblGameModeName.Text = GameMode.Name; lblGameModeName.ForeColor = GameMode.ModeTheme.PrimaryColour; pbxGameLogo.Image = new Icon(GameMode.ModeTheme.Icon, 96, 96).ToBitmap(); }
/// <summary> /// Starts up the IPC listner channel to wait for message from other instances. /// </summary> /// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param> /// <param name="p_gmdGameModeInfo">The descriptor of the game mode for which mods are being managed.</param> /// <param name="p_mmgModManager">The mod manager to use to manage mods.</param> /// <param name="p_frmMainForm">The main application form.</param> public static IMessager InitializeListener(EnvironmentInfo p_eifEnvironmentInfo, IGameModeDescriptor p_gmdGameModeInfo, ModManager p_mmgModManager, MainForm p_frmMainForm) { if (m_schMessagerChannel != null) throw new InvalidOperationException("The IPC Channel has already been created as a SERVER."); string strUri = String.Format("{0}-{1}IpcServer", p_eifEnvironmentInfo.Settings.ModManagerName, p_gmdGameModeInfo.ModeId); m_schMessagerChannel = new IpcServerChannel(strUri); ChannelServices.RegisterChannel(m_schMessagerChannel, true); MessagerServer msgMessager = new MessagerServer(p_mmgModManager, p_frmMainForm); string strEndpoint = String.Format("{0}Listener", p_gmdGameModeInfo.ModeId); RemotingServices.Marshal(msgMessager, strEndpoint, typeof(IMessager)); strUri += "/" + strEndpoint; string strTraceInfo = String.Format("Setting up listener on {0} at {1}", strUri, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")); Trace.TraceInformation(strTraceInfo); return msgMessager; }
/// <summary> /// Adds the given path as an installation path candidate for the specified game. /// </summary> /// <param name="gmdGameMode">The game mode for which to set an installation path candidate.</param> /// <param name="p_strInstallationPath">The installation path candidate.</param> protected void FoundCandidate(IGameModeDescriptor gmdGameMode, string p_strInstallationPath) { if (!m_dicCandidatePathsByGame.ContainsKey(gmdGameMode.ModeId)) { return; } string strCleanPath = FileUtil.NormalizePath(p_strInstallationPath); if (m_dicFoundPathsByGame[gmdGameMode.ModeId].Contains(strCleanPath, StringComparer.OrdinalIgnoreCase)) { return; } m_dicCandidatePathsByGame[gmdGameMode.ModeId].Enqueue(strCleanPath); m_dicFoundPathsByGame[gmdGameMode.ModeId].Add(strCleanPath); if (m_dicCandidatePathsByGame[gmdGameMode.ModeId].Count == 1) { OnPathFound(gmdGameMode, p_strInstallationPath); } }
/// <summary> /// Adds the given path as an installation path candidate for the specified game. /// </summary> /// <param name="gameMode">The game mode for which to set an installation path candidate.</param> /// <param name="installationPath">The installation path candidate.</param> protected void FoundCandidate(IGameModeDescriptor gameMode, string installationPath) { if (!_candidatePathsByGame.ContainsKey(gameMode.ModeId)) { return; } var strCleanPath = FileUtil.NormalizePath(installationPath); if (_foundPathsByGame[gameMode.ModeId].Contains(strCleanPath, StringComparer.OrdinalIgnoreCase)) { return; } _candidatePathsByGame[gameMode.ModeId].Enqueue(strCleanPath); _foundPathsByGame[gameMode.ModeId].Add(strCleanPath); if (_candidatePathsByGame[gameMode.ModeId].Count == 1) { OnPathFound(gameMode, installationPath); } }
/// <summary> /// A simple consturctor that initializes the object with the given values. /// </summary> /// <param name="p_eifEnvironmentInfo">The application's environement info.</param> public DragonAge2GameModeFactory(IEnvironmentInfo p_eifEnvironmentInfo) { EnvironmentInfo = p_eifEnvironmentInfo; m_gmdGameModeDescriptor = new DragonAge2GameModeDescriptor(p_eifEnvironmentInfo); }
/// <summary> /// A simple constructor that initializes the object with the given values. /// </summary> /// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param> /// <param name="p_gmdGameModeInfo">The descriptor for the game mode being set up.</param> public DragonAgeSetupVM(IEnvironmentInfo p_eifEnvironmentInfo, IGameModeDescriptor p_gmdGameModeInfo) :base(p_eifEnvironmentInfo, p_gmdGameModeInfo) { }
/// <summary> /// A simple consturctor that initializes the object with the given values. /// </summary> /// <param name="p_eifEnvironmentInfo">The application's environement info.</param> public StarboundGameModeFactory(IEnvironmentInfo p_eifEnvironmentInfo) { EnvironmentInfo = p_eifEnvironmentInfo; m_gmdGameModeDescriptor = new StarboundGameModeDescriptor(p_eifEnvironmentInfo); }
/// <summary> /// A simple consturctor that initializes the object with the given values. /// </summary> /// <param name="p_eifEnvironmentInfo">The application's environement info.</param> public Fallout3GameModeFactory(IEnvironmentInfo p_eifEnvironmentInfo) : base(p_eifEnvironmentInfo) { m_gmdGameModeDescriptor = new Fallout3GameModeDescriptor(p_eifEnvironmentInfo); }
/// <summary> /// A simple consturctor that initializes the object with the given values. /// </summary> /// <param name="p_eifEnvironmentInfo">The application's environement info.</param> public MorrowindGameModeFactory(IEnvironmentInfo p_eifEnvironmentInfo) : base(p_eifEnvironmentInfo) { m_gmdGameModeDescriptor = new MorrowindGameModeDescriptor(p_eifEnvironmentInfo); }
/// <summary> /// A simple constructor that initializes the object with the given values. /// </summary> /// <param name="p_gmdGameMode">The game mode whose install info in described by the object.</param> /// <param name="p_strGameInstallPath">The install path of the game.</param> public GameInstallData(IGameModeDescriptor p_gmdGameMode, string p_strGameInstallPath) { GameMode = p_gmdGameMode; GameInstallPath = p_strGameInstallPath; }
/// <summary> /// A simple constructor that initializes the object with the given values. /// </summary> /// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param> /// <param name="p_gmdGameModeInfo">The descriptor for the game mode being set up.</param> public SubnauticaBelowZeroSetupVM(IEnvironmentInfo p_eifEnvironmentInfo, IGameModeDescriptor p_gmdGameModeInfo) : base(p_eifEnvironmentInfo, p_gmdGameModeInfo) { }
/// <summary> /// A simple constructor that initializes the object with the given values. /// </summary> /// <param name="p_eifEnvironmentInfo">The application's environment info.</param> public GameModeBase(IEnvironmentInfo p_eifEnvironmentInfo) { EnvironmentInfo = p_eifEnvironmentInfo; m_gmdGameModeInfo = CreateGameModeDescriptor(); GameModeEnvironmentInfo = new GameModeInfo(this, p_eifEnvironmentInfo); }
/// <summary> /// Starts up the IPC listner channel to wait for message from other instances. /// </summary> /// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param> /// <param name="p_gmdGameModeInfo">The descriptor of the game mode for which mods are being managed.</param> /// <param name="p_mmgModManager">The mod manager to use to manage mods.</param> /// <param name="p_frmMainForm">The main application form.</param> public static IMessager InitializeListener(EnvironmentInfo p_eifEnvironmentInfo, IGameModeDescriptor p_gmdGameModeInfo, ModManager p_mmgModManager, MainForm p_frmMainForm) { if (m_schMessagerChannel != null) { throw new InvalidOperationException("The IPC Channel has already been created as a SERVER."); } string strUri = String.Format("{0}-{1}IpcServer", CommonData.ModManagerName, p_gmdGameModeInfo.ModeId); m_schMessagerChannel = new IpcServerChannel(strUri); ChannelServices.RegisterChannel(m_schMessagerChannel, true); MessagerServer msgMessager = new MessagerServer(p_mmgModManager, p_frmMainForm); string strEndpoint = String.Format("{0}Listener", p_gmdGameModeInfo.ModeId); RemotingServices.Marshal(msgMessager, strEndpoint, typeof(IMessager)); strUri += "/" + strEndpoint; string strTraceInfo = String.Format("Setting up listener on {0} at {1}", strUri, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")); Trace.TraceInformation(strTraceInfo); return(msgMessager); }
/// <summary> /// A simple consturctor that initializes the object with the given values. /// </summary> /// <param name="p_eifEnvironmentInfo">The application's environement info.</param> public Cyberpunk2077GameModeFactory(IEnvironmentInfo p_eifEnvironmentInfo) { EnvironmentInfo = p_eifEnvironmentInfo; m_gmdGameModeDescriptor = new Cyberpunk2077GameModeDescriptor(p_eifEnvironmentInfo); }
/// <summary> /// A simple constructor that initializes the object with the given values. /// </summary> /// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param> /// <param name="p_gmdGameModeInfo">The descriptor for the game mode being set up.</param> public SetupBaseVM(IEnvironmentInfo p_eifEnvironmentInfo, IGameModeDescriptor p_gmdGameModeInfo) { EnvironmentInfo = p_eifEnvironmentInfo; GameModeDescriptor = p_gmdGameModeInfo; RequiredDirectoriesControlVM = new RequiredDirectoriesControlVM(p_eifEnvironmentInfo, p_gmdGameModeInfo, true); }
/// <summary> /// Raises the <see cref="PathFound"/> event. /// </summary> /// <param name="p_gmdGameMode">The game mode which has been resolved.</param> /// <param name="p_strFoundPath">The installaiton path that was found.</param> protected void OnGameResolved(IGameModeDescriptor p_gmdGameMode, string p_strFoundPath) { m_dicCandidatePathsByGame.Remove(p_gmdGameMode.ModeId); OnGameResolved(new GameModeDiscoveredEventArgs(p_gmdGameMode, p_strFoundPath)); }
/// <summary> /// A simple constructor that initializes the object with the given values. /// </summary> /// <param name="p_gmdGameModeInfo">The game mode info for the game for which an installation path has been found.</param> /// <param name="p_strInstallationPath">The installation path that was found.</param> public GameModeDiscoveredEventArgs(IGameModeDescriptor p_gmdGameModeInfo, string p_strInstallationPath) { GameMode = p_gmdGameModeInfo; InstallationPath = p_strInstallationPath; }
/// <summary> /// A simple constructor that initializes the object with the given dependencies. /// </summary> /// <param name="p_gmdGameModeInfo">The descriptor for the game mode to display in the item.</param> public GameModeListViewItemBase(IGameModeDescriptor p_gmdGameModeInfo) : this() { GameMode = p_gmdGameModeInfo; }
/// <summary> /// A simple consturctor that initializes the object with the given values. /// </summary> /// <param name="p_eifEnvironmentInfo">The application's environement info.</param> public DarkSouls2GameModeFactory(IEnvironmentInfo p_eifEnvironmentInfo) { EnvironmentInfo = p_eifEnvironmentInfo; m_gmdGameModeDescriptor = new DarkSouls2GameModeDescriptor(p_eifEnvironmentInfo); }
/// <summary> /// A simple consturctor that initializes the object with the given values. /// </summary> /// <param name="p_eifEnvironmentInfo">The application's environement info.</param> public GrimrockGameModeFactory(IEnvironmentInfo p_eifEnvironmentInfo) { EnvironmentInfo = p_eifEnvironmentInfo; m_gmdGameModeDescriptor = new GrimrockGameModeDescriptor(p_eifEnvironmentInfo); }
/// <summary> /// Raises the <see cref="PathFound"/> event. /// </summary> /// <param name="p_gmdGameMode">The game mode for which a path was found.</param> /// <param name="p_strFoundPath">The installaiton path that was found.</param> protected void OnPathFound(IGameModeDescriptor p_gmdGameMode, string p_strFoundPath) { OnPathFound(new GameModeDiscoveredEventArgs(p_gmdGameMode, p_strFoundPath)); }
/// <summary> /// A simple consturctor that initializes the object with the given values. /// </summary> /// <param name="p_eifEnvironmentInfo">The application's environement info.</param> public MorrowindGameModeFactory(IEnvironmentInfo p_eifEnvironmentInfo) : base(p_eifEnvironmentInfo) { m_gmdGameModeDescriptor = new MorrowindGameModeDescriptor(p_eifEnvironmentInfo); }
/// <summary> /// Raises the <see cref="PathFound"/> event. /// </summary> /// <param name="p_gmdGameMode">The game mode which has been resolved.</param> /// <param name="p_strFoundPath">The installaiton path that was found.</param> protected void OnGameResolved(IGameModeDescriptor p_gmdGameMode, string p_strFoundPath) { m_dicCandidatePathsByGame.Remove(p_gmdGameMode.ModeId); OnGameResolved(new GameModeDiscoveredEventArgs(p_gmdGameMode, p_strFoundPath)); }
/// <summary> /// A simple consturctor that initializes the object with the given values. /// </summary> /// <param name="p_eifEnvironmentInfo">The application's environement info.</param> public OblivionGameModeFactory(IEnvironmentInfo p_eifEnvironmentInfo) : base(p_eifEnvironmentInfo) { m_gmdGameModeDescriptor = new OblivionGameModeDescriptor(p_eifEnvironmentInfo); }
/// <summary> /// Raises the <see cref="PathFound"/> event. /// </summary> /// <param name="p_gmdGameMode">The game mode for which a path was found.</param> /// <param name="p_strFoundPath">The installaiton path that was found.</param> protected void OnPathFound(IGameModeDescriptor p_gmdGameMode, string p_strFoundPath) { OnPathFound(new GameModeDiscoveredEventArgs(p_gmdGameMode, p_strFoundPath)); }
/// <summary> /// A simple consturctor that initializes the object with the given values. /// </summary> /// <param name="p_eifEnvironmentInfo">The application's environement info.</param> public XRebirthGameModeFactory(IEnvironmentInfo p_eifEnvironmentInfo) { EnvironmentInfo = p_eifEnvironmentInfo; m_gmdGameModeDescriptor = new XRebirthGameModeDescriptor(p_eifEnvironmentInfo); }
/// <summary> /// A simple constructor that initializes the object with the given values. /// </summary> /// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param> /// <param name="p_gmdGameModeInfo">The descriptor for the game mode being set up.</param> public WarThunderSetupVM(IEnvironmentInfo p_eifEnvironmentInfo, IGameModeDescriptor p_gmdGameModeInfo) :base(p_eifEnvironmentInfo, p_gmdGameModeInfo) { }
/// <summary> /// A simple consturctor that initializes the object with the given values. /// </summary> /// <param name="p_eifEnvironmentInfo">The application's environement info.</param> public MountAndBlade2BannerlordGameModeFactory(IEnvironmentInfo p_eifEnvironmentInfo) { EnvironmentInfo = p_eifEnvironmentInfo; m_gmdGameModeDescriptor = new MountAndBlade2BannerlordGameModeDescriptor(p_eifEnvironmentInfo); }
/// <summary> /// A simple constructor that initializes the object with the given values. /// </summary> /// <param name="p_gmdGameMode">The game mode whose install info in described by the object.</param> /// <param name="p_strGameInstallPath">The install path of the game.</param> public GameInstallData(IGameModeDescriptor p_gmdGameMode, string p_strGameInstallPath) { GameMode = p_gmdGameMode; GameInstallPath = p_strGameInstallPath; }
/// <summary> /// A simple consturctor that initializes the object with the given values. /// </summary> /// <param name="p_eifEnvironmentInfo">The application's environement info.</param> public SkyrimSEGameModeFactory(IEnvironmentInfo p_eifEnvironmentInfo) : base(p_eifEnvironmentInfo) { m_gmdGameModeDescriptor = new SkyrimSEGameModeDescriptor(p_eifEnvironmentInfo); }
/// <summary> /// A simple consturctor that initializes the object with the given values. /// </summary> /// <param name="p_eifEnvironmentInfo">The application's environement info.</param> public NoMansSkyGameModeFactory(IEnvironmentInfo p_eifEnvironmentInfo) { EnvironmentInfo = p_eifEnvironmentInfo; m_gmdGameModeDescriptor = new NoMansSkyGameModeDescriptor(p_eifEnvironmentInfo); }
/// <summary> /// A simple constructor that initializes the object with the given values. /// </summary> /// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param> /// <param name="p_gmdGameModeInfo">The descriptor for the game mode being set up.</param> public DarkSouls2SetupVM(IEnvironmentInfo p_eifEnvironmentInfo, IGameModeDescriptor p_gmdGameModeInfo) : base(p_eifEnvironmentInfo, p_gmdGameModeInfo) { }
/// <summary> /// A simple constructor that initializes the object with the given values. /// </summary> /// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param> /// <param name="p_gmdGameModeInfo">The descriptor for the game mode being set up.</param> public StarboundSetupVM(IEnvironmentInfo p_eifEnvironmentInfo, IGameModeDescriptor p_gmdGameModeInfo) :base(p_eifEnvironmentInfo, p_gmdGameModeInfo) { }
/// <summary> /// A simple consturctor that initializes the object with the given values. /// </summary> /// <param name="p_eifEnvironmentInfo">The application's environement info.</param> /// <param name="p_gmdGameModeInfo">The descriptor of the game mode that this factory builds.</param> public DlcScanner(IEnvironmentInfo p_eifEnvironmentInfo, IGameModeDescriptor p_gmdGameModeInfo) { EnvironmentInfo = p_eifEnvironmentInfo; GameModeDescriptor = p_gmdGameModeInfo; ConfirmAction = delegate { return(DialogResult.Cancel); }; }
/// <summary> /// A simple consturctor that initializes the object with the given values. /// </summary> /// <param name="p_eifEnvironmentInfo">The application's environement info.</param> public Fallout3GameModeFactory(IEnvironmentInfo p_eifEnvironmentInfo) : base(p_eifEnvironmentInfo) { m_gmdGameModeDescriptor = new Fallout3GameModeDescriptor(p_eifEnvironmentInfo); }
/// <summary> /// A simple constructor that initializes the object with the given values. /// </summary> /// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param> /// <param name="p_gmdGameModeInfo">The descriptor for the game mode being set up.</param> public Witcher3SetupVM(IEnvironmentInfo p_eifEnvironmentInfo, IGameModeDescriptor p_gmdGameModeInfo) :base(p_eifEnvironmentInfo, p_gmdGameModeInfo) { }
/// <summary> /// A simple constructor that initializes the object with the given values. /// </summary> /// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param> /// <param name="p_gmdGameModeInfo">The descriptor for the game mode being set up.</param> public GrimrockSetupVM(IEnvironmentInfo p_eifEnvironmentInfo, IGameModeDescriptor p_gmdGameModeInfo) :base(p_eifEnvironmentInfo, p_gmdGameModeInfo) { }
/// <summary> /// A simple constructor that initializes the object with the given values. /// </summary> /// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param> /// <param name="p_gmdGameModeInfo">The descriptor for the game mode being set up.</param> public XRebirthSetupVM(IEnvironmentInfo p_eifEnvironmentInfo, IGameModeDescriptor p_gmdGameModeInfo) :base(p_eifEnvironmentInfo, p_gmdGameModeInfo) { }
/// <summary> /// A simple consturctor that initializes the object with the given values. /// </summary> /// <param name="p_eifEnvironmentInfo">The application's environement info.</param> public SkyrimGameModeFactory(IEnvironmentInfo p_eifEnvironmentInfo) : base(p_eifEnvironmentInfo) { m_gmdGameModeDescriptor = new SkyrimGameModeDescriptor(p_eifEnvironmentInfo); }
/// <summary> /// A simple consturctor that initializes the object with the given values. /// </summary> /// <param name="p_eifEnvironmentInfo">The application's environement info.</param> public DarkSoulsGameModeFactory(IEnvironmentInfo p_eifEnvironmentInfo) { EnvironmentInfo = p_eifEnvironmentInfo; m_gmdGameModeDescriptor = new DarkSoulsGameModeDescriptor(p_eifEnvironmentInfo); }
/// <summary> /// A simple constructor that initializes the object with the given values. /// </summary> /// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param> /// <param name="p_gmdGameModeInfo">The descriptor for the game mode being set up.</param> public StardewValleySetupVM(IEnvironmentInfo p_eifEnvironmentInfo, IGameModeDescriptor p_gmdGameModeInfo) : base(p_eifEnvironmentInfo, p_gmdGameModeInfo) { }
/// <summary> /// A simple consturctor that initializes the object with the given values. /// </summary> /// <param name="p_eifEnvironmentInfo">The application's environement info.</param> public Witcher3GameModeFactory(IEnvironmentInfo p_eifEnvironmentInfo) { EnvironmentInfo = p_eifEnvironmentInfo; m_gmdGameModeDescriptor = new Witcher3GameModeDescriptor(p_eifEnvironmentInfo); }
/// <summary> /// A simple consturctor that initializes the object with the given values. /// </summary> /// <param name="p_eifEnvironmentInfo">The application's environement info.</param> public WoTGameModeFactory(IEnvironmentInfo p_eifEnvironmentInfo) { EnvironmentInfo = p_eifEnvironmentInfo; m_gmdGameModeDescriptor = new WoTGameModeDescriptor(p_eifEnvironmentInfo); }
/// <summary> /// A simple constructor that initializes the object with the given values. /// </summary> /// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param> /// <param name="p_gmdGameModeInfo">The descriptor for the game mode being set up.</param> public MountAndBlade2BannerlordSetupVM(IEnvironmentInfo p_eifEnvironmentInfo, IGameModeDescriptor p_gmdGameModeInfo) : base(p_eifEnvironmentInfo, p_gmdGameModeInfo) { }
/// <summary> /// A simple constructor that initializes the object with the given values. /// </summary> /// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param> /// <param name="p_gmdGameModeInfo">The descriptor for the game mode being set up.</param> public SetupBaseVM(IEnvironmentInfo p_eifEnvironmentInfo, IGameModeDescriptor p_gmdGameModeInfo) { EnvironmentInfo = p_eifEnvironmentInfo; GameModeDescriptor = p_gmdGameModeInfo; RequiredDirectoriesControlVM = new RequiredDirectoriesControlVM(p_eifEnvironmentInfo, p_gmdGameModeInfo, true); }
/// <summary> /// A simple constructor that initializes the object with the given values. /// </summary> /// <param name="p_eifEnvironmentInfo">The application's environment info.</param> public StateOfDecayGameModeFactory(IEnvironmentInfo p_eifEnvironmentInfo) { EnvironmentInfo = p_eifEnvironmentInfo; m_gmdGameModeDescriptor = new StateOfDecayGameModeDescriptor(p_eifEnvironmentInfo); }
/// <summary> /// Adds the given path as an installation path candidate for the specified game. /// </summary> /// <param name="gmdGameMode">The game mode for which to set an installation path candidate.</param> /// <param name="p_strInstallationPath">The installation path candidate.</param> protected void FoundCandidate(IGameModeDescriptor gmdGameMode, string p_strInstallationPath) { if (!m_dicCandidatePathsByGame.ContainsKey(gmdGameMode.ModeId)) return; string strCleanPath = FileUtil.NormalizePath(p_strInstallationPath); if (m_dicFoundPathsByGame[gmdGameMode.ModeId].Contains(strCleanPath, StringComparer.OrdinalIgnoreCase)) return; m_dicCandidatePathsByGame[gmdGameMode.ModeId].Enqueue(strCleanPath); m_dicFoundPathsByGame[gmdGameMode.ModeId].Add(strCleanPath); if (m_dicCandidatePathsByGame[gmdGameMode.ModeId].Count == 1) OnPathFound(gmdGameMode, p_strInstallationPath); }
/// <summary> /// A simple constructor that initializes the object with the given values. /// </summary> /// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param> /// <param name="p_gmdGameModeInfo">The descriptor for the game mode being set up.</param> public DarkSouls2SetupVM(IEnvironmentInfo p_eifEnvironmentInfo, IGameModeDescriptor p_gmdGameModeInfo) :base(p_eifEnvironmentInfo, p_gmdGameModeInfo) { }
/// <summary> /// A simple consturctor that initializes the object with the given values. /// </summary> /// <param name="p_eifEnvironmentInfo">The application's environement info.</param> public WarThunderGameModeFactory(IEnvironmentInfo p_eifEnvironmentInfo) { EnvironmentInfo = p_eifEnvironmentInfo; m_gmdGameModeDescriptor = new WarThunderGameModeDescriptor(p_eifEnvironmentInfo); }
/// <summary> /// A simple constructor that initializes the object with the given dependencies. /// </summary> /// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param> /// <param name="p_gmdGameModeInfo">The descriptor of the current game mode.</param> /// <param name="p_booUseAdditionalChecks">Whether to use additional checks to validate the folders.</param> public RequiredDirectoriesControlVM(IEnvironmentInfo p_eifEnvironmentInfo, IGameModeDescriptor p_gmdGameModeInfo, bool p_booUseAdditionalChecks) { EnvironmentInfo = p_eifEnvironmentInfo; GameModeDescriptor = p_gmdGameModeInfo; m_booRequiredTool = GameModeDescriptor.OrderedRequiredToolFileNames != null; Errors = new ErrorContainer(); m_booUseAdditionalChecks = p_booUseAdditionalChecks; }
/// <summary> /// A simple constructor that initializes the object with the given values. /// </summary> /// <param name="p_eifEnvironmentInfo">The application's environment info.</param> public GameModeBase(IEnvironmentInfo p_eifEnvironmentInfo) { EnvironmentInfo = p_eifEnvironmentInfo; m_gmdGameModeInfo = CreateGameModeDescriptor(); GameModeEnvironmentInfo = new GameModeInfo(this, p_eifEnvironmentInfo); }