chore: clean compiler warnings

master
tayttt 3 days ago
parent 06cd18d7b2
commit 594dac71b0

@ -12,7 +12,6 @@ namespace Txgy.Controls
public class myListBox : System.Windows.Controls.ListBox public class myListBox : System.Windows.Controls.ListBox
{ {
private ListBoxItem _lastSelectedItem;
protected override DependencyObject GetContainerForItemOverride() protected override DependencyObject GetContainerForItemOverride()
{ {
return new myListBoxItem(); return new myListBoxItem();

@ -44,8 +44,6 @@ namespace Txgy.EWS.Client.Common.Helpers
double yDrawUnit = 1; double yDrawUnit = 1;
double drawUnit = 1; double drawUnit = 1;
Point _downPoint = new Point(0, 0); Point _downPoint = new Point(0, 0);
bool _isMoving = false;
double left = 0, top = 0;
public bool IsShowGridText = true; public bool IsShowGridText = true;
public bool IsShowGrid = true; public bool IsShowGrid = true;
public System.Windows.Media.Color BackGroundColor = System.Windows.Media.Colors.White; public System.Windows.Media.Color BackGroundColor = System.Windows.Media.Colors.White;

@ -20,7 +20,6 @@ namespace Txgy.EWS.Client.Common.Helpers
public class ReportStereogramImage : IDisposable public class ReportStereogramImage : IDisposable
{ {
string stereoImagePath; string stereoImagePath;
List<PointLineSeries3D> eventList;
public LightningChart lightChart = new LightningChart(); public LightningChart lightChart = new LightningChart();
View3D view3D = new View3D(); View3D view3D = new View3D();
@ -30,8 +29,6 @@ namespace Txgy.EWS.Client.Common.Helpers
double _sideRotationRS = 0; double _sideRotationRS = 0;
double _horizontalRotationRS = -30; double _horizontalRotationRS = -30;
double _verticalRotationRS = 30; double _verticalRotationRS = 30;
double _distanceRS = 150;
bool _clipDispaly = false;
WallXZ _topWall; WallXZ _topWall;
WallYZ _leftWall; WallYZ _leftWall;
WallYZ _rightWall; WallYZ _rightWall;
@ -41,7 +38,6 @@ namespace Txgy.EWS.Client.Common.Helpers
AxisX3D _axisXPri3D; AxisX3D _axisXPri3D;
AxisY3D _axisYPri3D; AxisY3D _axisYPri3D;
AxisZ3D _axisZPri3D; AxisZ3D _axisZPri3D;
ProjectionType _projectionTypeRS = ProjectionType.Perspective;
public double _scale = 1; public double _scale = 1;
SizeDoubleXYZ eventSize; SizeDoubleXYZ eventSize;

@ -25,7 +25,7 @@ namespace Txgy.EWS.Client.Common.Helpers
//CommonLogHelper.Debug("XML文件读取成功。"); //CommonLogHelper.Debug("XML文件读取成功。");
} }
catch (Exception ex) catch (Exception)
{ {
//CommonLogHelper.log.Error(string.Format("XML文件读取失败。{0}", ex)); //CommonLogHelper.log.Error(string.Format("XML文件读取失败。{0}", ex));
} }

@ -948,7 +948,7 @@ namespace Txgy.EWS.Client.PageModule.ViewModels
} }
} }
} }
catch (Exception ex) catch (Exception)
{ {
return 0; return 0;
//throw ex; //throw ex;

@ -193,7 +193,6 @@ namespace Txgy.EWS.Client.PageModule.ViewModels
} }
} }
private Fill _chartBackGround = new Fill(); private Fill _chartBackGround = new Fill();
private IEventAggregator _ea;
public Fill ChartBackGround public Fill ChartBackGround
{ {

@ -86,8 +86,6 @@ namespace Txgy.EWS.Client.PageModule.ViewModels
double _sideRotationRS = 0; double _sideRotationRS = 0;
double _horizontalRotationRS = -30; double _horizontalRotationRS = -30;
double _verticalRotationRS = 30; double _verticalRotationRS = 30;
double _distanceRS = 150;
bool _clipDispaly = false;
WallXZ _topWall; WallXZ _topWall;
WallYZ _leftWall; WallYZ _leftWall;
WallYZ _rightWall; WallYZ _rightWall;
@ -97,7 +95,6 @@ namespace Txgy.EWS.Client.PageModule.ViewModels
AxisX3D _axisXPri3D; AxisX3D _axisXPri3D;
AxisY3D _axisYPri3D; AxisY3D _axisYPri3D;
AxisZ3D _axisZPri3D; AxisZ3D _axisZPri3D;
ProjectionType _projectionTypeRS = ProjectionType.Perspective;
public double _scale = 1; public double _scale = 1;
SizeDoubleXYZ eventSize; SizeDoubleXYZ eventSize;
#endregion #endregion

@ -43,7 +43,6 @@ namespace Txgy.EWS.Client.PageModule.ViewModels
/// 当前采样数 /// 当前采样数
/// </summary> /// </summary>
public int CurPoints; public int CurPoints;
private DispatcherTimer _fitYTimer;
private readonly IEventAggregator _ea; private readonly IEventAggregator _ea;
private readonly ISearchMsEventBLL _searchMsEventBLL; private readonly ISearchMsEventBLL _searchMsEventBLL;
private int _selectResult = 0; private int _selectResult = 0;
@ -58,17 +57,16 @@ namespace Txgy.EWS.Client.PageModule.ViewModels
} }
int _channelCount = 60; // Channel count. int _channelCount = 60; // Channel count.
double _samplingFrequency = 500; // Sampling frequency (Hz). double _samplingFrequency = 500; // Sampling frequency (Hz).
double _xLength = 10; // X axis length.
double _previousX = 0; // Latest X value on axis. double _previousX = 0; // Latest X value on axis.
long _now; // Latest time stamp. long _now; // Latest time stamp.
long _startTicks; // Controls timing. long _startTicks = 0; // Controls timing.
long _samplesOutput; // Generated samples quantity. long _samplesOutput; // Generated samples quantity.
// Constants // Constants
const double YMin = 30000; // Minimal y-value. const double YMin = 30000; // Minimal y-value.
const double YMax = 33000; // Maximal y-value. const double YMax = 33000; // Maximal y-value.
private volatile bool _stop; // Stops thread work. private volatile bool _stop = false; // Stops thread work.
internal bool IsRunning internal bool IsRunning
{ {
get get
@ -82,7 +80,6 @@ namespace Txgy.EWS.Client.PageModule.ViewModels
/// Thread. /// Thread.
/// </summary> /// </summary>
private Thread _thread; private Thread _thread;
private Thread _threadWrite;
private delegate void ChartUpdateFromThreadHandler(double[][] samples); private delegate void ChartUpdateFromThreadHandler(double[][] samples);
@ -192,8 +189,6 @@ namespace Txgy.EWS.Client.PageModule.ViewModels
/// 文件数据位置 /// 文件数据位置
/// </summary> /// </summary>
public string FileDataPath { get; set; } = @"D:\TaySystemPath\Downloads"; public string FileDataPath { get; set; } = @"D:\TaySystemPath\Downloads";
private string _cachePath;
private int _cacheSize; private int _cacheSize;
/// <summary> /// <summary>
/// 缓存大小 /// 缓存大小
@ -265,7 +260,6 @@ namespace Txgy.EWS.Client.PageModule.ViewModels
set { gridChart = value; } set { gridChart = value; }
} }
private string _btnContrlContent = "开始"; private string _btnContrlContent = "开始";
private int channelCount;
public string BtnContrlContent public string BtnContrlContent
{ {
@ -281,7 +275,7 @@ namespace Txgy.EWS.Client.PageModule.ViewModels
SetProperty(ref _showEvents, value); SetProperty(ref _showEvents, value);
} }
} }
StationWorkModel _stationWorker; StationWorkModel _stationWorker = null;
public List<StationModel> smList; public List<StationModel> smList;
//public static readonly DependencyProperty XAxesProperty = //public static readonly DependencyProperty XAxesProperty =
@ -455,8 +449,6 @@ namespace Txgy.EWS.Client.PageModule.ViewModels
} }
private void UpdateChartData() private void UpdateChartData()
{ {
double yRange = YMax - YMin;
double[][] multiChannelData = new double[smList.Count * 3][]; double[][] multiChannelData = new double[smList.Count * 3][];
try try
{ {
@ -480,10 +472,6 @@ namespace Txgy.EWS.Client.PageModule.ViewModels
public void UpdateWavesFromTxt(string fn) public void UpdateWavesFromTxt(string fn)
{ {
string allStr; string allStr;
string sn = "";//0
int points = 0;//1
int samp = 500;//2
string startTime = "";//3;4,5,6=null
smList = new List<StationModel>(); smList = new List<StationModel>();
using (StreamReader streamReader = new StreamReader(fn)) using (StreamReader streamReader = new StreamReader(fn))
@ -495,7 +483,6 @@ namespace Txgy.EWS.Client.PageModule.ViewModels
string[] strLines = allStr.Trim().Split(new char[] { '\n' }); string[] strLines = allStr.Trim().Split(new char[] { '\n' });
List<string> strList = strLines.ToList(); List<string> strList = strLines.ToList();
int cnt = strList.Count; int cnt = strList.Count;
int num = 0;
string[] snStr = strLines[0].Trim().Split(','); string[] snStr = strLines[0].Trim().Split(',');
string tmpName = snStr[0].Substring(14, 3); string tmpName = snStr[0].Substring(14, 3);
CurPoints = int.Parse(snStr[1].Trim().Split(' ')[0]); CurPoints = int.Parse(snStr[1].Trim().Split(' ')[0]);
@ -913,8 +900,6 @@ namespace Txgy.EWS.Client.PageModule.ViewModels
} }
private void ThreadLoop() private void ThreadLoop()
{ {
int sm = 0;
while (_stop == false) while (_stop == false)
{ {
@ -941,8 +926,6 @@ namespace Txgy.EWS.Client.PageModule.ViewModels
if (sampleBundleToGenerate > 0) if (sampleBundleToGenerate > 0)
{ {
//YMax = tmps.Max(); //YMax = tmps.Max();
double yRange = YMax - YMin;
double[][] multiChannelData = new double[_channelCount][]; double[][] multiChannelData = new double[_channelCount][];
for (int channelIndex = 0; channelIndex < _channelCount; channelIndex++) for (int channelIndex = 0; channelIndex < _channelCount; channelIndex++)

@ -67,7 +67,6 @@ namespace Txgy.EWS.Client.PageModule.Views
double drawUnit = 1; double drawUnit = 1;
Point _downPoint = new Point(0, 0); Point _downPoint = new Point(0, 0);
bool _isMoving = false; bool _isMoving = false;
double left = 0, top = 0;
public bool IsShowGridText = true; public bool IsShowGridText = true;
public bool IsShowGrid = true; public bool IsShowGrid = true;
public System.Windows.Media.Color BackGroundColor = System.Windows.Media.Colors.White; public System.Windows.Media.Color BackGroundColor = System.Windows.Media.Colors.White;
@ -108,7 +107,8 @@ namespace Txgy.EWS.Client.PageModule.Views
//rpi.DrawPlanClipToDrawVisual(mes, (int)rView.canvasPlan.ActualWidth, (int)rView.canvasPlan.ActualHeight); //rpi.DrawPlanClipToDrawVisual(mes, (int)rView.canvasPlan.ActualWidth, (int)rView.canvasPlan.ActualHeight);
rpi.Draw(null, canvas.Width, canvas.Height); rpi.Draw(null, canvas.Width, canvas.Height);
//host = new VisualHost(); //host = new VisualHost();
canvas.Children.Add(rpi.host); host = rpi.host;
canvas.Children.Add(host);
baseX = GlobalConfig.ProjectConfig.WorkArea.EMin; baseX = GlobalConfig.ProjectConfig.WorkArea.EMin;
baseY = GlobalConfig.ProjectConfig.WorkArea.NMin; baseY = GlobalConfig.ProjectConfig.WorkArea.NMin;
@ -1050,8 +1050,6 @@ namespace Txgy.EWS.Client.PageModule.Views
transform.Y += position.Y - this.previousMousePoint.Y; transform.Y += position.Y - this.previousMousePoint.Y;
this.previousMousePoint = position; this.previousMousePoint = position;
} }
private ListBoxItem _lastSelectedItem;
private void myListBox_SelectionChanged(object sender, SelectionChangedEventArgs e) private void myListBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
{ {
//if (ReceivedEventListBox.SelectedItem == null && _lastSelectedItem != null) //if (ReceivedEventListBox.SelectedItem == null && _lastSelectedItem != null)

@ -65,7 +65,6 @@ namespace Txgy.EWS.Client.PageModule.Views
double drawUnit = 1; double drawUnit = 1;
Point _downPoint = new Point(0, 0); Point _downPoint = new Point(0, 0);
bool _isMoving = false; bool _isMoving = false;
double left = 0, top = 0;
public bool IsShowGridText = true; public bool IsShowGridText = true;
public bool IsShowGrid = true; public bool IsShowGrid = true;
public System.Windows.Media.Color BackGroundColor = System.Windows.Media.Colors.White; public System.Windows.Media.Color BackGroundColor = System.Windows.Media.Colors.White;
@ -104,7 +103,8 @@ namespace Txgy.EWS.Client.PageModule.Views
//rpi.DrawPlanClipToDrawVisual(mes, (int)rView.canvasPlan.ActualWidth, (int)rView.canvasPlan.ActualHeight); //rpi.DrawPlanClipToDrawVisual(mes, (int)rView.canvasPlan.ActualWidth, (int)rView.canvasPlan.ActualHeight);
rpi.Draw(null, canvas.Width, canvas.Height); rpi.Draw(null, canvas.Width, canvas.Height);
//host = new VisualHost(); //host = new VisualHost();
canvas.Children.Add(rpi.host); host = rpi.host;
canvas.Children.Add(host);
baseX = GlobalConfig.ProjectConfig.WorkArea.EMin; baseX = GlobalConfig.ProjectConfig.WorkArea.EMin;
baseY = GlobalConfig.ProjectConfig.WorkArea.NMin; baseY = GlobalConfig.ProjectConfig.WorkArea.NMin;

@ -68,7 +68,6 @@ namespace Txgy.EWS.Client.PageModule.Views
double drawUnit = 1; double drawUnit = 1;
Point _downPoint = new Point(0, 0); Point _downPoint = new Point(0, 0);
bool _isMoving = false; bool _isMoving = false;
double left = 0, top = 0;
public bool IsShowGridText = true; public bool IsShowGridText = true;
public bool IsShowGrid = true; public bool IsShowGrid = true;
public System.Windows.Media.Color BackGroundColor = System.Windows.Media.Colors.White; public System.Windows.Media.Color BackGroundColor = System.Windows.Media.Colors.White;

@ -56,7 +56,6 @@ namespace Txgy.EWS.Client.PageModule.Views
{ {
Dispatcher _dispatcher; Dispatcher _dispatcher;
private readonly IEventAggregator _ea; private readonly IEventAggregator _ea;
private readonly ISearchMsEventBLL searchMsEventBLL;
IFreeSql fsqlSqLite = FreeSqlLocalSqLite.freeLocalSqLite; IFreeSql fsqlSqLite = FreeSqlLocalSqLite.freeLocalSqLite;
//private readonly IRemoteDownloadDataBLL remoteDownloadDataBLL; //private readonly IRemoteDownloadDataBLL remoteDownloadDataBLL;
@ -83,12 +82,9 @@ namespace Txgy.EWS.Client.PageModule.Views
public double stationFontSize = 10; public double stationFontSize = 10;
double baseX = 39701000; double baseX = 39701000;
double baseY = 4352000; double baseY = 4352000;
double xDrawUnit = 1;
double yDrawUnit = 1;
double drawUnit = 1; double drawUnit = 1;
Point _downPoint = new Point(0, 0); Point _downPoint = new Point(0, 0);
bool _isMoving = false; bool _isMoving = false;
double left = 0, top = 0;
public bool IsShowGridText = true; public bool IsShowGridText = true;
public bool IsShowGrid = true; public bool IsShowGrid = true;
public System.Windows.Media.Color BackGroundColor = System.Windows.Media.Colors.White; public System.Windows.Media.Color BackGroundColor = System.Windows.Media.Colors.White;
@ -129,7 +125,8 @@ namespace Txgy.EWS.Client.PageModule.Views
height = canvas.Height; height = canvas.Height;
//rpi.DrawPlanClipToDrawVisual(mes, (int)rView.canvasPlan.ActualWidth, (int)rView.canvasPlan.ActualHeight); //rpi.DrawPlanClipToDrawVisual(mes, (int)rView.canvasPlan.ActualWidth, (int)rView.canvasPlan.ActualHeight);
rpi.DrawGier(null, width, height); rpi.DrawGier(null, width, height);
canvas.Children.Add(rpi.host); host = rpi.host;
canvas.Children.Add(host);
_handleDataGenerated = new HandleDataGeneratedDelegate(rpi.DrawGier); _handleDataGenerated = new HandleDataGeneratedDelegate(rpi.DrawGier);

@ -37,9 +37,6 @@ namespace Txgy.EWS.Client.PageModule.Views
IFreeSql fsqlTencent = FreeSqlTencent.tencentRemoteMySQL; IFreeSql fsqlTencent = FreeSqlTencent.tencentRemoteMySQL;
ReportFreqImage reportImage = new ReportFreqImage(); ReportFreqImage reportImage = new ReportFreqImage();
CultureInfo culture = new CultureInfo("zh-CN"); CultureInfo culture = new CultureInfo("zh-CN");
byte[] dayFreqBytes = null;
byte[] dayMiddleEventPlanBytes = null;
byte[] dayMiddleEventStereoBytes = null;
public string dayFreqImagePath; public string dayFreqImagePath;
public int dayFreqImageWidth = 1485; public int dayFreqImageWidth = 1485;
public int dayFreqImageHeight = 585; public int dayFreqImageHeight = 585;

@ -19,7 +19,9 @@ namespace Txgy.EWS.Client.SysModule.ViewModels
{ {
public string Title => "系统更新文件上传"; public string Title => "系统更新文件上传";
#pragma warning disable CS0067
public event Action<IDialogResult> RequestClose; public event Action<IDialogResult> RequestClose;
#pragma warning restore CS0067
public bool CanCloseDialog() => true; public bool CanCloseDialog() => true;

Loading…
Cancel
Save