Code cleanup.

This commit is contained in:
2025-06-10 19:17:44 -04:00
parent 758ed01e06
commit 5bcb7a2b04
7 changed files with 0 additions and 22 deletions

View File

@@ -36,7 +36,6 @@ namespace PortfolioManager.ViewModels
private NVPDictionary nvpDictionary = null;
private String selectedParameter = null;
private String pathFileName;
private String initialPath;
private ModelPerformanceSeries modelPerformanceSeries = null;
private ModelStatistics modelStatistics = null;
private bool showAsGainLoss = true;
@@ -449,7 +448,6 @@ namespace PortfolioManager.ViewModels
try
{
if (!CMSessionManager.IsValidSessionFile(pathFileName)) return false;
initialPath = Path.GetDirectoryName(pathFileName);
sessionParams = CMSessionManager.RestoreSession(pathFileName);
if (null == sessionParams) { MxMessageBox.Show(GetTopLevelWindow(), String.Format("Unable to open {0}", pathFileName)); pathFileName = null; return false; }
modelStatistics = CMMomentumBacktest.GetModelStatistics(sessionParams);

View File

@@ -39,7 +39,6 @@ namespace PortfolioManager.ViewModels
private CMTPositionModel selectedPosition = null;
private CMTParams configuration = null;
private String pathFileName = null;
private String initialPath = null;
private CMTSessionParams sessionParams;
private NVPDictionary nvpDictionary = null;
private ObservableCollection<String> nvpDictionaryKeys = null;
@@ -463,7 +462,6 @@ namespace PortfolioManager.ViewModels
try
{
if (!CMTSessionManager.IsValidSessionFile(pathFileName)) return false;
initialPath = Path.GetDirectoryName(pathFileName);
sessionParams = CMTSessionManager.RestoreSession(pathFileName);
if (null == sessionParams)
{

View File

@@ -1,10 +1,5 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.ComponentModel;
using Avalonia.Controls;
using Avalonia.Controls.ApplicationLifetimes;
using Avalonia.Input;
using System.Threading.Tasks;
namespace PortfolioManager.ViewModels

View File

@@ -2,19 +2,14 @@ using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Configuration;
using System.IO;
using System.Linq;
using System.Reactive.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
using Avalonia.Controls;
using Avalonia.Input;
using Avalonia.Labs.Input;
using Avalonia.Media;
using Avalonia.Platform.Storage;
using Avalonia.Threading;
using CommunityToolkit.Mvvm.Input;
using Eremex.AvaloniaUI.Controls;
using MarketData;
@@ -36,7 +31,6 @@ namespace PortfolioManager.ViewModels
{
private ObservableCollection<MGSHMomentumCandidate> momentumCandidates = new ObservableCollection<MGSHMomentumCandidate>();
private MGSHSessionParams sessionParams;
private String initialPath = null;
private MGSHPositionModelCollection positions = null;
private ModelPerformanceSeries modelPerformanceSeries = null;
private ModelStatistics modelStatistics = null;
@@ -350,7 +344,6 @@ namespace PortfolioManager.ViewModels
try
{
if (!MGSHSessionManager.IsValidSessionFile(pathFileName)) return false;
initialPath = Path.GetDirectoryName(pathFileName);
sessionParams = MGSHSessionManager.RestoreSession(pathFileName);
if (null == sessionParams)
{

View File

@@ -2,13 +2,10 @@
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Collections.Specialized;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Avalonia.Threading;
using MarketData.Cache;
using MarketData.DataAccess;
using MarketData.Utils;
using PortfolioManager.Command;
namespace PortfolioManager.ViewModels

View File

@@ -4,7 +4,6 @@ using System.Diagnostics;
using Avalonia.Controls;
using Avalonia.Controls.ApplicationLifetimes;
using Axiom.Utils;
using Eremex.AvaloniaUI.Controls;
namespace PortfolioManager.ViewModels
{

View File

@@ -35,7 +35,6 @@ namespace PortfolioManager.ViewModels
private NVPDictionary nvpDictionary = null;
private String selectedParameter = null;
private String pathFileName;
private String initialPath;
private ModelPerformanceSeries modelPerformanceSeries = null;
private ModelStatistics modelStatistics = null;
private MGConfiguration configuration = null;
@@ -455,7 +454,6 @@ namespace PortfolioManager.ViewModels
pathFileName = null;
return false;
}
initialPath = Path.GetDirectoryName(pathFileName);
sessionParams = MGSessionManager.RestoreSession(pathFileName);
if (null == sessionParams)
{