public OIGODisabler() { MemoryAnalyzer.AddTrackedMemoryItem(@"Origin in-game overlay disabler panel", new WeakReference(this)); DataContext = this; LoadCommands(); InitializeComponent(); }
public ModMakerPanel() { MemoryAnalyzer.AddTrackedMemoryItem(@"ModMaker Panel", new WeakReference(this)); DataContext = this; LoadCommands(); InitializeComponent(); GetTopMods(); }
public InstallationInformation(List <GameTarget> targetsList, GameTarget selectedTarget) { MemoryAnalyzer.AddTrackedMemoryItem(@"Installation Information Panel", new WeakReference(this)); DataContext = this; InstallationTargets.AddRange(targetsList); LoadCommands(); InitializeComponent(); SelectedTarget = selectedTarget; }
/// <summary> /// This ASI Manager is a feature ported from ME3CMM and maintains synchronization with Mass Effect 3 Mod Manager's code for /// managing and installing ASIs. ASIs are useful for debugging purposes, which is why this feature is now /// part of ME3Explorer. /// </summary> public ASIManagerPanel(GameTarget preselectedTarget = null) { MemoryAnalyzer.AddTrackedMemoryItem(@"ASI Manager", new WeakReference(this)); Log.Information(@"Opening ASI Manager"); DataContext = this; Directory.CreateDirectory(ASIManager.CachedASIsFolder); LoadCommands(); InitializeComponent(); this.preselectedTarget = preselectedTarget; }
public void StartDownload(CancellationToken cancellationToken) { Task.Run(() => { if (ProgressMaximum < 100 * FileSize.MebiByte) { DownloadedStream = new MemoryStream(); MemoryAnalyzer.AddTrackedMemoryItem(@"NXM Download MemoryStream", new WeakReference(DownloadedStream)); } else { DownloadedStream = new FileStream(Path.Combine(Utilities.GetModDownloadCacheDirectory(), ModFile.FileName), FileMode.Create); MemoryAnalyzer.AddTrackedMemoryItem(@"NXM Download FileStream", new WeakReference(DownloadedStream)); } var downloadUri = DownloadLinks[0].Uri; var downloadResult = OnlineContent.DownloadToStream(downloadUri.ToString(), OnDownloadProgress, null, true, DownloadedStream, cancellationToken); if (downloadResult.errorMessage != null) { DownloadedStream?.Dispose(); if (cancellationToken.IsCancellationRequested) { // Aborted download. } else { Log.Error($@"Download failed: {downloadResult.errorMessage}"); OnModDownloadError?.Invoke(this, downloadResult.errorMessage); } // Download didn't work! Analytics.TrackEvent(@"NXM Download", new Dictionary <string, string>() { { @"Domain", domain }, { @"File", ModFile?.Name }, { @"Result", $@"Failed, {downloadResult.errorMessage}" }, }); } else { Analytics.TrackEvent(@"NXM Download", new Dictionary <string, string>() { { @"Domain", domain }, { @"File", ModFile?.Name }, { @"Result", @"Success" }, }); } Downloaded = true; OnModDownloaded?.Invoke(this, new DataEventArgs(DownloadedStream)); }); }
public MixinManager() { MemoryAnalyzer.AddTrackedMemoryItem(@"Mixin Library Panel", new WeakReference(this)); MixinHandler.LoadME3TweaksPackage(); AvailableOfficialMixins.ReplaceAll(MixinHandler.ME3TweaksPackageMixins.OrderBy(x => x.PatchName)); var backupPath = BackupService.GetGameBackupPath(MEGame.ME3); if (backupPath != null) { var dlcPath = MEDirectories.GetDLCPath(MEGame.ME3, backupPath); var headerTranslation = ModJob.GetHeadersToDLCNamesMap(MEGame.ME3); foreach (var mixin in AvailableOfficialMixins) { mixin.UIStatusChanging += MixinUIStatusChanging; if (mixin.TargetModule == ModJob.JobHeader.TESTPATCH) { if (File.Exists(ME3Directory.GetTestPatchSFARPath(backupPath))) { mixin.CanBeUsed = true; } } else if (mixin.TargetModule != ModJob.JobHeader.BASEGAME) { //DLC var resolvedPath = Path.Combine(dlcPath, headerTranslation[mixin.TargetModule]); if (Directory.Exists(resolvedPath)) { mixin.CanBeUsed = true; } } else { //BASEGAME mixin.CanBeUsed = true; } } } else { BottomLeftMessage = M3L.GetString(M3L.string_noGameBackupOfME3IsAvailableMixinsCannotBeUsedWithoutABackup); } ResetMixinsUIState(); LoadCommands(); InitializeComponent(); }
public ConflictDetectorPanel() { MemoryAnalyzer.AddTrackedMemoryItem(@"Custom DLC Conflict Detector Panel", new WeakReference(this)); LoadCommands(); InitializeComponent(); }
public BatchModLibrary() { MemoryAnalyzer.AddTrackedMemoryItem(@"Batch Mod Installer Panel", new WeakReference(this)); LoadCommands(); InitializeComponent(); }