mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Use oxyplot for chart drawing.
This commit is contained in:
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -22,3 +22,6 @@
|
|||||||
[submodule "Aaru.Helpers"]
|
[submodule "Aaru.Helpers"]
|
||||||
path = Aaru.Helpers
|
path = Aaru.Helpers
|
||||||
url = https://github.com/aaru-dps/Aaru.Helpers
|
url = https://github.com/aaru-dps/Aaru.Helpers
|
||||||
|
[submodule "oxyplot-avalonia"]
|
||||||
|
path = oxyplot-avalonia
|
||||||
|
url = https://github.com/oxyplot/oxyplot-avalonia.git
|
||||||
|
|||||||
583
.idea/.idea.Aaru/.idea/contentModel.xml
generated
583
.idea/.idea.Aaru/.idea/contentModel.xml
generated
File diff suppressed because it is too large
Load Diff
@@ -33,6 +33,7 @@
|
|||||||
<ProjectReference Include="..\Aaru.Core\Aaru.Core.csproj" />
|
<ProjectReference Include="..\Aaru.Core\Aaru.Core.csproj" />
|
||||||
<ProjectReference Include="..\Aaru.Devices\Aaru.Devices.csproj" />
|
<ProjectReference Include="..\Aaru.Devices\Aaru.Devices.csproj" />
|
||||||
<ProjectReference Include="..\Aaru.Checksums\Aaru.Checksums.csproj" />
|
<ProjectReference Include="..\Aaru.Checksums\Aaru.Checksums.csproj" />
|
||||||
|
<ProjectReference Include="..\oxyplot-avalonia\Source\OxyPlot.Avalonia\OxyPlot.Avalonia.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<EmbeddedResource Include="Assets\Logos\Media\AIT1.png" />
|
<EmbeddedResource Include="Assets\Logos\Media\AIT1.png" />
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
<StyleInclude Source="avares://Avalonia.Themes.Default/DefaultTheme.xaml" />
|
<StyleInclude Source="avares://Avalonia.Themes.Default/DefaultTheme.xaml" />
|
||||||
<StyleInclude Source="avares://Avalonia.Themes.Default/Accents/BaseLight.xaml" />
|
<StyleInclude Source="avares://Avalonia.Themes.Default/Accents/BaseLight.xaml" />
|
||||||
<StyleInclude Source="avares://Avalonia.Controls.DataGrid/Themes/Default.xaml" />
|
<StyleInclude Source="avares://Avalonia.Controls.DataGrid/Themes/Default.xaml" />
|
||||||
|
<StyleInclude Source="resm:OxyPlot.Avalonia.Themes.Default.xaml?assembly=OxyPlot.Avalonia"/>
|
||||||
</Application.Styles>
|
</Application.Styles>
|
||||||
<NativeMenu.Menu>
|
<NativeMenu.Menu>
|
||||||
<NativeMenu>
|
<NativeMenu>
|
||||||
|
|||||||
@@ -6,9 +6,11 @@ using Aaru.Core.Devices.Scanning;
|
|||||||
using Aaru.Core.Media.Info;
|
using Aaru.Core.Media.Info;
|
||||||
using Aaru.Devices;
|
using Aaru.Devices;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Media;
|
||||||
using Avalonia.Threading;
|
using Avalonia.Threading;
|
||||||
using MessageBox.Avalonia;
|
using MessageBox.Avalonia;
|
||||||
using MessageBox.Avalonia.Enums;
|
using MessageBox.Avalonia.Enums;
|
||||||
|
using OxyPlot;
|
||||||
using ReactiveUI;
|
using ReactiveUI;
|
||||||
using DeviceInfo = Aaru.Core.Devices.Info.DeviceInfo;
|
using DeviceInfo = Aaru.Core.Devices.Info.DeviceInfo;
|
||||||
|
|
||||||
@@ -19,37 +21,44 @@ namespace Aaru.Gui.ViewModels.Windows
|
|||||||
readonly Window _view;
|
readonly Window _view;
|
||||||
string _a;
|
string _a;
|
||||||
string _avgSpeed;
|
string _avgSpeed;
|
||||||
|
Color _axesColor;
|
||||||
string _b;
|
string _b;
|
||||||
|
ulong _blocks;
|
||||||
ulong _blocks;
|
ulong _blocksToRead;
|
||||||
ulong _blocksToRead;
|
string _c;
|
||||||
string _c;
|
bool _closeVisible;
|
||||||
bool _closeVisible;
|
string _d;
|
||||||
string _d;
|
string _devicePath;
|
||||||
string _devicePath;
|
string _e;
|
||||||
string _e;
|
string _f;
|
||||||
string _f;
|
Color _lineColor;
|
||||||
ScanResults _localResults;
|
ScanResults _localResults;
|
||||||
string _maxSpeed;
|
string _maxSpeed;
|
||||||
string _minSpeed;
|
double _maxX;
|
||||||
bool _progress1Visible;
|
double _maxY;
|
||||||
string _progress2Indeterminate;
|
string _minSpeed;
|
||||||
string _progress2MaxValue;
|
double _minX;
|
||||||
string _progress2Text;
|
double _minY;
|
||||||
string _progress2Value;
|
bool _progress1Visible;
|
||||||
string _progress2Visible;
|
string _progress2Indeterminate;
|
||||||
bool _progressIndeterminate;
|
string _progress2MaxValue;
|
||||||
double _progressMaxValue;
|
string _progress2Text;
|
||||||
string _progressText;
|
string _progress2Value;
|
||||||
double _progressValue;
|
string _progress2Visible;
|
||||||
bool _progressVisible;
|
bool _progressIndeterminate;
|
||||||
bool _resultsVisible;
|
double _progressMaxValue;
|
||||||
MediaScan _scanner;
|
string _progressText;
|
||||||
bool _startVisible;
|
double _progressValue;
|
||||||
string _stopEnabled;
|
bool _progressVisible;
|
||||||
bool _stopVisible;
|
bool _resultsVisible;
|
||||||
string _totalTime;
|
MediaScan _scanner;
|
||||||
string _unreadableSectors;
|
bool _startVisible;
|
||||||
|
double _stepsX;
|
||||||
|
double _stepsY;
|
||||||
|
string _stopEnabled;
|
||||||
|
bool _stopVisible;
|
||||||
|
string _totalTime;
|
||||||
|
string _unreadableSectors;
|
||||||
|
|
||||||
public MediaScanViewModel(string devicePath, DeviceInfo deviceInfo, Window view, ScsiInfo scsiInfo = null)
|
public MediaScanViewModel(string devicePath, DeviceInfo deviceInfo, Window view, ScsiInfo scsiInfo = null)
|
||||||
{
|
{
|
||||||
@@ -62,30 +71,27 @@ namespace Aaru.Gui.ViewModels.Windows
|
|||||||
StartVisible = true;
|
StartVisible = true;
|
||||||
CloseVisible = true;
|
CloseVisible = true;
|
||||||
BlockMapList = new ObservableCollection<(ulong block, double duration)>();
|
BlockMapList = new ObservableCollection<(ulong block, double duration)>();
|
||||||
|
ChartPoints = new ObservableCollection<DataPoint>();
|
||||||
/*
|
StepsX = double.NaN;
|
||||||
lineChart.AbsoluteMargins = true;
|
StepsY = double.NaN;
|
||||||
lineChart.MarginX = 5;
|
AxesColor = Colors.Black;
|
||||||
lineChart.MarginY = 5;
|
LineColor = Colors.Yellow;
|
||||||
lineChart.DrawAxes = true;
|
}
|
||||||
lineChart.AxesColor = Colors.Black;
|
|
||||||
lineChart.ColorX = Colors.Gray;
|
public Color AxesColor
|
||||||
lineChart.ColorY = Colors.Gray;
|
{
|
||||||
lineChart.BackgroundColor = Color.FromRgb(0x2974c1);
|
get => _axesColor;
|
||||||
lineChart.LineColor = Colors.Yellow;
|
set => this.RaiseAndSetIfChanged(ref _axesColor, value);
|
||||||
*/
|
}
|
||||||
|
|
||||||
|
public Color LineColor
|
||||||
|
{
|
||||||
|
get => _lineColor;
|
||||||
|
set => this.RaiseAndSetIfChanged(ref _lineColor, value);
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
static readonly Color LightGreen = Color.FromRgb(0x00FF00);
|
|
||||||
static readonly Color Green = Color.FromRgb(0x006400);
|
|
||||||
static readonly Color DarkGreen = Color.FromRgb(0x003200);
|
|
||||||
static readonly Color Yellow = Color.FromRgb(0xFFA500);
|
|
||||||
static readonly Color Orange = Color.FromRgb(0xFF4500);
|
|
||||||
static readonly Color Red = Color.FromRgb(0x800000);
|
|
||||||
static Color LightRed = Color.FromRgb(0xFF0000);
|
|
||||||
*/
|
|
||||||
|
|
||||||
public ObservableCollection<(ulong block, double duration)> BlockMapList { get; }
|
public ObservableCollection<(ulong block, double duration)> BlockMapList { get; }
|
||||||
|
public ObservableCollection<DataPoint> ChartPoints { get; }
|
||||||
|
|
||||||
public ulong Blocks
|
public ulong Blocks
|
||||||
{
|
{
|
||||||
@@ -225,6 +231,42 @@ namespace Aaru.Gui.ViewModels.Windows
|
|||||||
set => this.RaiseAndSetIfChanged(ref _resultsVisible, value);
|
set => this.RaiseAndSetIfChanged(ref _resultsVisible, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public double MaxY
|
||||||
|
{
|
||||||
|
get => _maxY;
|
||||||
|
set => this.RaiseAndSetIfChanged(ref _maxY, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public double MaxX
|
||||||
|
{
|
||||||
|
get => _maxX;
|
||||||
|
set => this.RaiseAndSetIfChanged(ref _maxX, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public double MinY
|
||||||
|
{
|
||||||
|
get => _minY;
|
||||||
|
set => this.RaiseAndSetIfChanged(ref _minY, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public double MinX
|
||||||
|
{
|
||||||
|
get => _minX;
|
||||||
|
set => this.RaiseAndSetIfChanged(ref _minX, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public double StepsY
|
||||||
|
{
|
||||||
|
get => _stepsY;
|
||||||
|
set => this.RaiseAndSetIfChanged(ref _stepsY, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public double StepsX
|
||||||
|
{
|
||||||
|
get => _stepsX;
|
||||||
|
set => this.RaiseAndSetIfChanged(ref _stepsX, value);
|
||||||
|
}
|
||||||
|
|
||||||
public string Title { get; }
|
public string Title { get; }
|
||||||
|
|
||||||
public ReactiveCommand<Unit, Unit> StartCommand { get; }
|
public ReactiveCommand<Unit, Unit> StartCommand { get; }
|
||||||
@@ -242,6 +284,7 @@ namespace Aaru.Gui.ViewModels.Windows
|
|||||||
CloseVisible = false;
|
CloseVisible = false;
|
||||||
ProgressVisible = true;
|
ProgressVisible = true;
|
||||||
ResultsVisible = true;
|
ResultsVisible = true;
|
||||||
|
ChartPoints.Clear();
|
||||||
new Thread(DoWork).Start();
|
new Thread(DoWork).Start();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -330,25 +373,25 @@ namespace Aaru.Gui.ViewModels.Windows
|
|||||||
WorkFinished();
|
WorkFinished();
|
||||||
}
|
}
|
||||||
|
|
||||||
async void ScanSpeed(ulong sector, double currentspeed) => await Dispatcher.UIThread.InvokeAsync(() =>
|
async void ScanSpeed(ulong sector, double currentSpeed) => await Dispatcher.UIThread.InvokeAsync(() =>
|
||||||
{
|
{
|
||||||
/* TODO: Chart
|
if(ChartPoints.Count == 0)
|
||||||
if(currentspeed > lineChart.MaxY)
|
ChartPoints.Add(new DataPoint(0, currentSpeed));
|
||||||
lineChart.MaxY = (float)(currentspeed + (currentspeed / 10));
|
|
||||||
|
|
||||||
lineChart.Values.Add(new PointF(sector, (float)currentspeed));
|
ChartPoints.Add(new DataPoint(sector, currentSpeed));
|
||||||
*/
|
|
||||||
|
if(currentSpeed > MaxY)
|
||||||
|
MaxY = currentSpeed + (currentSpeed / 10d);
|
||||||
});
|
});
|
||||||
|
|
||||||
async void InitBlockMap(ulong blocks, ulong blocksize, ulong blockstoread, ushort currentProfile) =>
|
async void InitBlockMap(ulong blocks, ulong blockSize, ulong blocksToRead, ushort currentProfile) =>
|
||||||
await Dispatcher.UIThread.InvokeAsync(() =>
|
await Dispatcher.UIThread.InvokeAsync(() =>
|
||||||
{
|
{
|
||||||
Blocks = blocks / blockstoread;
|
Blocks = blocks / blocksToRead;
|
||||||
_blocksToRead = blockstoread;
|
_blocksToRead = blocksToRead;
|
||||||
|
|
||||||
/* TODO: Chart
|
MinX = 0;
|
||||||
lineChart.MinX = 0;
|
MinY = 0;
|
||||||
lineChart.MinY = 0;
|
|
||||||
|
|
||||||
switch(currentProfile)
|
switch(currentProfile)
|
||||||
{
|
{
|
||||||
@@ -360,17 +403,17 @@ namespace Aaru.Gui.ViewModels.Windows
|
|||||||
case 0x0021:
|
case 0x0021:
|
||||||
case 0x0022:
|
case 0x0022:
|
||||||
if(blocks <= 360000)
|
if(blocks <= 360000)
|
||||||
lineChart.MaxX = 360000;
|
MaxX = 360000;
|
||||||
else if(blocks <= 405000)
|
else if(blocks <= 405000)
|
||||||
lineChart.MaxX = 405000;
|
MaxX = 405000;
|
||||||
else if(blocks <= 445500)
|
else if(blocks <= 445500)
|
||||||
lineChart.MaxX = 445500;
|
MaxX = 445500;
|
||||||
else
|
else
|
||||||
lineChart.MaxX = blocks;
|
MaxX = blocks;
|
||||||
|
|
||||||
lineChart.StepsX = lineChart.MaxX / 10f;
|
StepsX = MaxX / 10;
|
||||||
lineChart.StepsY = 150 * 4;
|
StepsY = 150 * 4;
|
||||||
lineChart.MaxY = lineChart.StepsY * 12.5f;
|
MaxY = StepsY * 12.5;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 0x0010: // DVD SL
|
case 0x0010: // DVD SL
|
||||||
@@ -381,10 +424,10 @@ namespace Aaru.Gui.ViewModels.Windows
|
|||||||
case 0x0018:
|
case 0x0018:
|
||||||
case 0x001A:
|
case 0x001A:
|
||||||
case 0x001B:
|
case 0x001B:
|
||||||
lineChart.MaxX = 2298496;
|
MaxX = 2298496;
|
||||||
lineChart.StepsX = lineChart.MaxX / 10f;
|
StepsX = MaxX / 10;
|
||||||
lineChart.StepsY = 1352.5f;
|
StepsY = 1352.5;
|
||||||
lineChart.MaxY = lineChart.StepsY * 26;
|
MaxY = StepsY * 26;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 0x0015: // DVD DL
|
case 0x0015: // DVD DL
|
||||||
@@ -392,10 +435,10 @@ namespace Aaru.Gui.ViewModels.Windows
|
|||||||
case 0x0017:
|
case 0x0017:
|
||||||
case 0x002A:
|
case 0x002A:
|
||||||
case 0x002B:
|
case 0x002B:
|
||||||
lineChart.MaxX = 4173824;
|
MaxX = 4173824;
|
||||||
lineChart.StepsX = lineChart.MaxX / 10f;
|
StepsX = MaxX / 10;
|
||||||
lineChart.StepsY = 1352.5f;
|
StepsY = 1352.5;
|
||||||
lineChart.MaxY = lineChart.StepsY * 26;
|
MaxY = StepsY * 26;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 0x0041:
|
case 0x0041:
|
||||||
@@ -403,19 +446,19 @@ namespace Aaru.Gui.ViewModels.Windows
|
|||||||
case 0x0043:
|
case 0x0043:
|
||||||
case 0x0040: // BD
|
case 0x0040: // BD
|
||||||
if(blocks <= 12219392)
|
if(blocks <= 12219392)
|
||||||
lineChart.MaxX = 12219392;
|
MaxX = 12219392;
|
||||||
else if(blocks <= 24438784)
|
else if(blocks <= 24438784)
|
||||||
lineChart.MaxX = 24438784;
|
MaxX = 24438784;
|
||||||
else if(blocks <= 48878592)
|
else if(blocks <= 48878592)
|
||||||
lineChart.MaxX = 48878592;
|
MaxX = 48878592;
|
||||||
else if(blocks <= 62500864)
|
else if(blocks <= 62500864)
|
||||||
lineChart.MaxX = 62500864;
|
MaxX = 62500864;
|
||||||
else
|
else
|
||||||
lineChart.MaxX = blocks;
|
MaxX = blocks;
|
||||||
|
|
||||||
lineChart.StepsX = lineChart.MaxX / 10f;
|
StepsX = MaxX / 10;
|
||||||
lineChart.StepsY = 4394.5f;
|
StepsY = 4394.5;
|
||||||
lineChart.MaxY = lineChart.StepsY * 18;
|
MaxY = StepsY * 18;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 0x0050: // HD DVD
|
case 0x0050: // HD DVD
|
||||||
@@ -425,26 +468,25 @@ namespace Aaru.Gui.ViewModels.Windows
|
|||||||
case 0x0058:
|
case 0x0058:
|
||||||
case 0x005A:
|
case 0x005A:
|
||||||
if(blocks <= 7361599)
|
if(blocks <= 7361599)
|
||||||
lineChart.MaxX = 7361599;
|
MaxX = 7361599;
|
||||||
else if(blocks <= 16305407)
|
else if(blocks <= 16305407)
|
||||||
lineChart.MaxX = 16305407;
|
MaxX = 16305407;
|
||||||
else
|
else
|
||||||
lineChart.MaxX = blocks;
|
MaxX = blocks;
|
||||||
|
|
||||||
lineChart.StepsX = lineChart.MaxX / 10f;
|
StepsX = MaxX / 10;
|
||||||
lineChart.StepsY = 4394.5f;
|
StepsY = 4394.5;
|
||||||
lineChart.MaxY = lineChart.StepsY * 8;
|
MaxY = StepsY * 8;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
lineChart.MaxX = blocks;
|
MaxX = blocks;
|
||||||
lineChart.StepsX = lineChart.MaxX / 10f;
|
StepsX = MaxX / 10;
|
||||||
lineChart.StepsY = 625f;
|
StepsY = 625;
|
||||||
lineChart.MaxY = lineChart.StepsY;
|
MaxY = StepsY;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
});
|
});
|
||||||
|
|
||||||
async void WorkFinished() => await Dispatcher.UIThread.InvokeAsync(() =>
|
async void WorkFinished() => await Dispatcher.UIThread.InvokeAsync(() =>
|
||||||
@@ -501,9 +543,6 @@ namespace Aaru.Gui.ViewModels.Windows
|
|||||||
_localResults.Errored += _blocksToRead;
|
_localResults.Errored += _blocksToRead;
|
||||||
UnreadableSectors = $"{_localResults.Errored} sectors could not be read.";
|
UnreadableSectors = $"{_localResults.Errored} sectors could not be read.";
|
||||||
BlockMapList.Add((sector / _blocksToRead, double.NaN));
|
BlockMapList.Add((sector / _blocksToRead, double.NaN));
|
||||||
/* TODO: Blockmap
|
|
||||||
blockMap.ColoredSectors.Add(new ColoredBlock(sector, LightGreen));
|
|
||||||
*/
|
|
||||||
});
|
});
|
||||||
|
|
||||||
async void OnScanTime(ulong sector, double duration) => await Dispatcher.UIThread.InvokeAsync(() =>
|
async void OnScanTime(ulong sector, double duration) => await Dispatcher.UIThread.InvokeAsync(() =>
|
||||||
@@ -511,51 +550,21 @@ namespace Aaru.Gui.ViewModels.Windows
|
|||||||
BlockMapList.Add((sector / _blocksToRead, duration));
|
BlockMapList.Add((sector / _blocksToRead, duration));
|
||||||
|
|
||||||
if(duration < 3)
|
if(duration < 3)
|
||||||
{
|
|
||||||
_localResults.A += _blocksToRead;
|
_localResults.A += _blocksToRead;
|
||||||
/* TODO: Blockmap
|
|
||||||
blockMap.ColoredSectors.Add(new ColoredBlock(sector, LightGreen));
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
else if(duration >= 3 &&
|
else if(duration >= 3 &&
|
||||||
duration < 10)
|
duration < 10)
|
||||||
{
|
|
||||||
_localResults.B += _blocksToRead;
|
_localResults.B += _blocksToRead;
|
||||||
/* TODO: Blockmap
|
|
||||||
blockMap.ColoredSectors.Add(new ColoredBlock(sector, Green));
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
else if(duration >= 10 &&
|
else if(duration >= 10 &&
|
||||||
duration < 50)
|
duration < 50)
|
||||||
{
|
|
||||||
_localResults.C += _blocksToRead;
|
_localResults.C += _blocksToRead;
|
||||||
/* TODO: Blockmap
|
|
||||||
blockMap.ColoredSectors.Add(new ColoredBlock(sector, DarkGreen));
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
else if(duration >= 50 &&
|
else if(duration >= 50 &&
|
||||||
duration < 150)
|
duration < 150)
|
||||||
{
|
|
||||||
_localResults.D += _blocksToRead;
|
_localResults.D += _blocksToRead;
|
||||||
/* TODO: Blockmap
|
|
||||||
blockMap.ColoredSectors.Add(new ColoredBlock(sector, Yellow));
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
else if(duration >= 150 &&
|
else if(duration >= 150 &&
|
||||||
duration < 500)
|
duration < 500)
|
||||||
{
|
|
||||||
_localResults.E += _blocksToRead;
|
_localResults.E += _blocksToRead;
|
||||||
/* TODO: Blockmap
|
|
||||||
blockMap.ColoredSectors.Add(new ColoredBlock(sector, Orange));
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
else if(duration >= 500)
|
else if(duration >= 500)
|
||||||
{
|
|
||||||
_localResults.F += _blocksToRead;
|
_localResults.F += _blocksToRead;
|
||||||
/* TODO: Blockmap
|
|
||||||
blockMap.ColoredSectors.Add(new ColoredBlock(sector, Red));
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
||||||
A = $"{_localResults.A} sectors took less than 3 ms.";
|
A = $"{_localResults.A} sectors took less than 3 ms.";
|
||||||
B = $"{_localResults.B} sectors took less than 10 ms but more than 3 ms.";
|
B = $"{_localResults.B} sectors took less than 10 ms but more than 3 ms.";
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:windows="clr-namespace:Aaru.Gui.ViewModels.Windows" xmlns:controls="clr-namespace:Aaru.Gui.Controls"
|
xmlns:windows="clr-namespace:Aaru.Gui.ViewModels.Windows" xmlns:controls="clr-namespace:Aaru.Gui.Controls"
|
||||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" x:Class="Aaru.Gui.Views.Windows.MediaScan"
|
xmlns:avalonia="http://oxyplot.org/avalonia" mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||||
Icon="/Assets/aaru-logo.png" Title="{Binding Title}">
|
x:Class="Aaru.Gui.Views.Windows.MediaScan" Icon="/Assets/aaru-logo.png" Title="{Binding Title}">
|
||||||
<Design.DataContext>
|
<Design.DataContext>
|
||||||
<windows:MediaScanViewModel />
|
<windows:MediaScanViewModel />
|
||||||
</Design.DataContext>
|
</Design.DataContext>
|
||||||
@@ -33,7 +33,21 @@
|
|||||||
<TabItem.Header>
|
<TabItem.Header>
|
||||||
<TextBlock Text="Chart" />
|
<TextBlock Text="Chart" />
|
||||||
</TabItem.Header>
|
</TabItem.Header>
|
||||||
<!-- TODO: Chart -->
|
<avalonia:Plot Height="300" PlotMargins="50 0 0 0" PlotAreaBorderColor="#999999"
|
||||||
|
PlotAreaBackground="#2974c1">
|
||||||
|
<avalonia:Plot.Series>
|
||||||
|
<avalonia:LineSeries DataFieldX="Index" DataFieldY="Value" Items="{Binding Path=ChartPoints}"
|
||||||
|
Color="{Binding LineColor}" />
|
||||||
|
</avalonia:Plot.Series>
|
||||||
|
<avalonia:Plot.Axes>
|
||||||
|
<avalonia:LinearAxis Position="Left" Maximum="{Binding MaxY}" Minimum="{Binding MinY}"
|
||||||
|
MajorStep="{Binding StepsY}" Title="Speed" Unit="Kb/s"
|
||||||
|
AxislineColor="{Binding AxesColor}" />
|
||||||
|
<avalonia:LinearAxis Position="Bottom" Maximum="{Binding MaxX}" Minimum="{Binding MinX}"
|
||||||
|
MajorStep="{Binding StepsX}" Title="Block"
|
||||||
|
AxislineColor="{Binding AxesColor}" />
|
||||||
|
</avalonia:Plot.Axes>
|
||||||
|
</avalonia:Plot>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
</TabControl>
|
</TabControl>
|
||||||
<StackPanel Orientation="Vertical" IsVisible="{Binding ProgressVisible}">
|
<StackPanel Orientation="Vertical" IsVisible="{Binding ProgressVisible}">
|
||||||
|
|||||||
10
Aaru.sln
10
Aaru.sln
@@ -36,6 +36,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Aaru.Dto", "Aaru.Dto\Aaru.D
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aaru.Gui", "Aaru.Gui\Aaru.Gui.csproj", "{18C4C44D-2562-4B6D-8181-32D7EA067D96}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aaru.Gui", "Aaru.Gui\Aaru.Gui.csproj", "{18C4C44D-2562-4B6D-8181-32D7EA067D96}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OxyPlot.Avalonia", "oxyplot-avalonia\Source\OxyPlot.Avalonia\OxyPlot.Avalonia.csproj", "{FF61D39C-BBA1-4FB7-AAC5-AD2D30418F4C}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
@@ -180,6 +182,14 @@ Global
|
|||||||
{18C4C44D-2562-4B6D-8181-32D7EA067D96}.Release|Any CPU.Build.0 = Release|Any CPU
|
{18C4C44D-2562-4B6D-8181-32D7EA067D96}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{18C4C44D-2562-4B6D-8181-32D7EA067D96}.Release|x86.ActiveCfg = Release|Any CPU
|
{18C4C44D-2562-4B6D-8181-32D7EA067D96}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
{18C4C44D-2562-4B6D-8181-32D7EA067D96}.Release|x86.Build.0 = Release|Any CPU
|
{18C4C44D-2562-4B6D-8181-32D7EA067D96}.Release|x86.Build.0 = Release|Any CPU
|
||||||
|
{FF61D39C-BBA1-4FB7-AAC5-AD2D30418F4C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{FF61D39C-BBA1-4FB7-AAC5-AD2D30418F4C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{FF61D39C-BBA1-4FB7-AAC5-AD2D30418F4C}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||||
|
{FF61D39C-BBA1-4FB7-AAC5-AD2D30418F4C}.Debug|x86.Build.0 = Debug|Any CPU
|
||||||
|
{FF61D39C-BBA1-4FB7-AAC5-AD2D30418F4C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{FF61D39C-BBA1-4FB7-AAC5-AD2D30418F4C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{FF61D39C-BBA1-4FB7-AAC5-AD2D30418F4C}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
|
{FF61D39C-BBA1-4FB7-AAC5-AD2D30418F4C}.Release|x86.Build.0 = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
|||||||
1
oxyplot-avalonia
Submodule
1
oxyplot-avalonia
Submodule
Submodule oxyplot-avalonia added at cedccb8b71
Reference in New Issue
Block a user