Comment code that may be unused.
This commit is contained in:
@@ -34,7 +34,7 @@ using Eto.Forms;
|
||||
using Eto.Serialization.Xaml;
|
||||
using Schemas;
|
||||
|
||||
namespace apprepodbmgr.Eto
|
||||
namespace CICMMetadataEditor
|
||||
{
|
||||
public class dlgBlockMedia : Dialog
|
||||
{
|
||||
@@ -1042,7 +1042,7 @@ namespace apprepodbmgr.Eto
|
||||
}
|
||||
|
||||
protected void OnBtnEditFilesystemClicked(object sender, EventArgs e)
|
||||
{
|
||||
{/*
|
||||
if(treeFilesystems.SelectedItem == null) return;
|
||||
|
||||
filesystemIter = (FileSystemType)treeFilesystems.SelectedItem;
|
||||
@@ -1054,16 +1054,16 @@ namespace apprepodbmgr.Eto
|
||||
if(!_dlgFilesystem.Modified) return;
|
||||
|
||||
((ObservableCollection<FileSystemType>)treeFilesystems.DataStore).Remove(filesystemIter);
|
||||
((ObservableCollection<FileSystemType>)treeFilesystems.DataStore).Add(_dlgFilesystem.Metadata);
|
||||
((ObservableCollection<FileSystemType>)treeFilesystems.DataStore).Add(_dlgFilesystem.Metadata);*/
|
||||
}
|
||||
|
||||
protected void OnBtnAddFilesystemClicked(object sender, EventArgs e)
|
||||
{
|
||||
{/*
|
||||
dlgFilesystem _dlgFilesystem = new dlgFilesystem();
|
||||
_dlgFilesystem.ShowModal(this);
|
||||
|
||||
if(_dlgFilesystem.Modified)
|
||||
((ObservableCollection<FileSystemType>)treeFilesystems.DataStore).Add(_dlgFilesystem.Metadata);
|
||||
((ObservableCollection<FileSystemType>)treeFilesystems.DataStore).Add(_dlgFilesystem.Metadata);*/
|
||||
}
|
||||
|
||||
protected void OnChkDumpHardwareToggled(object sender, EventArgs e)
|
||||
|
||||
@@ -30,14 +30,13 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using apprepodbmgr.Core;
|
||||
using Eto.Threading;
|
||||
using Eto.Forms;
|
||||
using Eto.Serialization.Xaml;
|
||||
using Schemas;
|
||||
using BorderType = Schemas.BorderType;
|
||||
|
||||
namespace apprepodbmgr.Eto
|
||||
namespace CICMMetadataEditor
|
||||
{
|
||||
public class dlgMetadata : Dialog
|
||||
{
|
||||
@@ -222,7 +221,9 @@ namespace apprepodbmgr.Eto
|
||||
|
||||
void FillFilesCombos()
|
||||
{
|
||||
/* TODO
|
||||
foreach(KeyValuePair<string, DbAppFile> files in Context.Hashes) lstFilesForMedia.Add(files.Key);
|
||||
*/
|
||||
}
|
||||
|
||||
public void FillFields()
|
||||
@@ -540,7 +541,9 @@ namespace apprepodbmgr.Eto
|
||||
|
||||
protected void OnBtnAddDiscClicked(object sender, EventArgs e)
|
||||
{
|
||||
/* TODO
|
||||
Context.SelectedFile = cmbFilesForNewDisc.Text;
|
||||
*/
|
||||
tabGeneral.Visible = false;
|
||||
tabKeywords.Visible = false;
|
||||
tabBarcodes.Visible = false;
|
||||
@@ -557,16 +560,20 @@ namespace apprepodbmgr.Eto
|
||||
btnOK.Visible = false;
|
||||
btnEditDisc.Visible = false;
|
||||
btnClearDiscs.Visible = false;
|
||||
/* TODO
|
||||
Workers.Failed += OnDiscAddFailed;
|
||||
Workers.Finished += OnDiscAddFinished;
|
||||
Workers.UpdateProgress += UpdateDiscProgress1;
|
||||
Workers.UpdateProgress2 += UpdateDiscProgress2;
|
||||
Context.WorkingDisc = null;
|
||||
*/
|
||||
btnStopAddDisc.Visible = true;
|
||||
btnAddDisc.Visible = false;
|
||||
btnRemoveDisc.Visible = false;
|
||||
/* TODO
|
||||
thdDisc = new Thread(Workers.AddMedia);
|
||||
thdDisc.Start();
|
||||
*/
|
||||
}
|
||||
|
||||
protected void OnBtnStopAddDiscClicked(object sender, EventArgs e)
|
||||
@@ -627,7 +634,9 @@ namespace apprepodbmgr.Eto
|
||||
Application.Instance.Invoke(delegate
|
||||
{
|
||||
if(!stopped) MessageBox.Show(text, MessageBoxType.Error);
|
||||
/* TODO
|
||||
Context.SelectedFile = "";
|
||||
*/
|
||||
tabGeneral.Visible = true;
|
||||
tabKeywords.Visible = true;
|
||||
tabBarcodes.Visible = true;
|
||||
@@ -644,11 +653,13 @@ namespace apprepodbmgr.Eto
|
||||
btnOK.Visible = true;
|
||||
btnEditDisc.Visible = true;
|
||||
btnClearDiscs.Visible = true;
|
||||
/* TODO
|
||||
Workers.Failed -= OnDiscAddFailed;
|
||||
Workers.Finished -= OnDiscAddFinished;
|
||||
Workers.UpdateProgress -= UpdateDiscProgress1;
|
||||
Workers.UpdateProgress2 -= UpdateDiscProgress2;
|
||||
Context.WorkingDisc = null;
|
||||
*/
|
||||
btnStopAddDisc.Visible = false;
|
||||
btnAddDisc.Visible = true;
|
||||
btnRemoveDisc.Visible = true;
|
||||
@@ -660,6 +671,7 @@ namespace apprepodbmgr.Eto
|
||||
{
|
||||
Application.Instance.Invoke(delegate
|
||||
{
|
||||
/* TODO
|
||||
if(Context.WorkingDisc == null) return;
|
||||
|
||||
OpticalDiscType disc = Context.WorkingDisc;
|
||||
@@ -688,8 +700,10 @@ namespace apprepodbmgr.Eto
|
||||
if(disc.Track != null) files.AddRange(disc.Track.Select(track => track.Image.Value));
|
||||
|
||||
foreach(string file in files) lstFilesForMedia.Remove(file);
|
||||
|
||||
*/
|
||||
/* TODO
|
||||
Context.SelectedFile = "";
|
||||
*/
|
||||
tabGeneral.Visible = true;
|
||||
tabKeywords.Visible = true;
|
||||
tabBarcodes.Visible = true;
|
||||
@@ -706,11 +720,13 @@ namespace apprepodbmgr.Eto
|
||||
btnOK.Visible = true;
|
||||
btnEditDisc.Visible = true;
|
||||
btnClearDiscs.Visible = true;
|
||||
/* TODO
|
||||
Workers.Failed -= OnDiscAddFailed;
|
||||
Workers.Finished -= OnDiscAddFinished;
|
||||
Workers.UpdateProgress -= UpdateDiscProgress1;
|
||||
Workers.UpdateProgress2 -= UpdateDiscProgress2;
|
||||
Context.WorkingDisc = null;
|
||||
*/
|
||||
btnStopAddDisc.Visible = false;
|
||||
btnAddDisc.Visible = true;
|
||||
btnRemoveDisc.Visible = true;
|
||||
@@ -735,7 +751,9 @@ namespace apprepodbmgr.Eto
|
||||
|
||||
protected void OnBtnAddDiskClicked(object sender, EventArgs e)
|
||||
{
|
||||
/* TODO
|
||||
Context.SelectedFile = cmbFilesForNewDisk.Text;
|
||||
*/
|
||||
tabGeneral.Visible = false;
|
||||
tabKeywords.Visible = false;
|
||||
tabBarcodes.Visible = false;
|
||||
@@ -752,77 +770,84 @@ namespace apprepodbmgr.Eto
|
||||
btnOK.Visible = false;
|
||||
btnEditDisk.Visible = false;
|
||||
btnClearDisks.Visible = false;
|
||||
/* TODO
|
||||
Workers.Failed += OnDiskAddFailed;
|
||||
Workers.Finished += OnDiskAddFinished;
|
||||
Workers.UpdateProgress += UpdateDiskProgress1;
|
||||
Workers.UpdateProgress2 += UpdateDiskProgress2;
|
||||
Context.WorkingDisk = null;
|
||||
*/
|
||||
btnStopAddDisk.Visible = true;
|
||||
btnAddDisk.Visible = false;
|
||||
btnRemoveDisk.Visible = false;
|
||||
thdDisk = new Thread(Workers.AddMedia);
|
||||
thdDisk.Start();
|
||||
}
|
||||
/* TODO
|
||||
|
||||
protected void OnBtnStopAddDiskClicked(object sender, EventArgs e)
|
||||
{
|
||||
thdDisk?.Abort();
|
||||
stopped = true;
|
||||
OnDiskAddFailed(null);
|
||||
}
|
||||
thdDisk = new Thread(Workers.AddMedia);
|
||||
thdDisk.Start();
|
||||
*/
|
||||
}
|
||||
|
||||
void UpdateDiskProgress1(string text, string inner, long current, long maximum)
|
||||
{
|
||||
Application.Instance.Invoke(delegate
|
||||
{
|
||||
lblAddDisk1.Text = !string.IsNullOrWhiteSpace(inner) ? inner : text;
|
||||
if(maximum > 0)
|
||||
{
|
||||
if(current < int.MinValue || current > int.MaxValue || maximum < int.MinValue ||
|
||||
protected void OnBtnStopAddDiskClicked(object sender, EventArgs e)
|
||||
{
|
||||
thdDisk?.Abort();
|
||||
stopped = true;
|
||||
OnDiskAddFailed(null);
|
||||
}
|
||||
|
||||
void UpdateDiskProgress1(string text, string inner, long current, long maximum)
|
||||
{
|
||||
Application.Instance.Invoke(delegate
|
||||
{
|
||||
lblAddDisk1.Text = !string.IsNullOrWhiteSpace(inner) ? inner : text;
|
||||
if(maximum > 0)
|
||||
{
|
||||
if(current < int.MinValue || current > int.MaxValue || maximum < int.MinValue ||
|
||||
maximum > int.MaxValue)
|
||||
{
|
||||
{
|
||||
current /= 100;
|
||||
maximum /= 100;
|
||||
}
|
||||
}
|
||||
|
||||
prgAddDisk1.Indeterminate = false;
|
||||
prgAddDisk1.MinValue = 0;
|
||||
prgAddDisk1.MaxValue = (int)maximum;
|
||||
prgAddDisk1.Value = (int)current;
|
||||
}
|
||||
else prgAddDisk1.Indeterminate = true;
|
||||
});
|
||||
}
|
||||
prgAddDisk1.Indeterminate = false;
|
||||
prgAddDisk1.MinValue = 0;
|
||||
prgAddDisk1.MaxValue = (int)maximum;
|
||||
prgAddDisk1.Value = (int)current;
|
||||
}
|
||||
else prgAddDisk1.Indeterminate = true;
|
||||
});
|
||||
}
|
||||
|
||||
void UpdateDiskProgress2(string text, string inner, long current, long maximum)
|
||||
{
|
||||
Application.Instance.Invoke(delegate
|
||||
{
|
||||
lblAddDisk2.Text = !string.IsNullOrWhiteSpace(inner) ? inner : text;
|
||||
if(maximum > 0)
|
||||
{
|
||||
if(current < int.MinValue || current > int.MaxValue || maximum < int.MinValue ||
|
||||
void UpdateDiskProgress2(string text, string inner, long current, long maximum)
|
||||
{
|
||||
Application.Instance.Invoke(delegate
|
||||
{
|
||||
lblAddDisk2.Text = !string.IsNullOrWhiteSpace(inner) ? inner : text;
|
||||
if(maximum > 0)
|
||||
{
|
||||
if(current < int.MinValue || current > int.MaxValue || maximum < int.MinValue ||
|
||||
maximum > int.MaxValue)
|
||||
{
|
||||
{
|
||||
current /= 100;
|
||||
maximum /= 100;
|
||||
}
|
||||
}
|
||||
|
||||
prgAddDisk2.Indeterminate = false;
|
||||
prgAddDisk2.MinValue = 0;
|
||||
prgAddDisk2.MaxValue = (int)maximum;
|
||||
prgAddDisk2.Value = (int)current;
|
||||
}
|
||||
else prgAddDisk2.Indeterminate = true;
|
||||
});
|
||||
}
|
||||
prgAddDisk2.Indeterminate = false;
|
||||
prgAddDisk2.MinValue = 0;
|
||||
prgAddDisk2.MaxValue = (int)maximum;
|
||||
prgAddDisk2.Value = (int)current;
|
||||
}
|
||||
else prgAddDisk2.Indeterminate = true;
|
||||
});
|
||||
}
|
||||
|
||||
void OnDiskAddFailed(string text)
|
||||
{
|
||||
Application.Instance.Invoke(delegate
|
||||
{
|
||||
if(!stopped) MessageBox.Show(text, MessageBoxType.Error);
|
||||
Context.SelectedFile = "";
|
||||
void OnDiskAddFailed(string text)
|
||||
{
|
||||
Application.Instance.Invoke(delegate
|
||||
{
|
||||
if(!stopped) MessageBox.Show(text, MessageBoxType.Error);
|
||||
/* TODO
|
||||
Context.SelectedFile = "";
|
||||
*/
|
||||
tabGeneral.Visible = true;
|
||||
tabKeywords.Visible = true;
|
||||
tabBarcodes.Visible = true;
|
||||
@@ -839,11 +864,13 @@ namespace apprepodbmgr.Eto
|
||||
btnOK.Visible = true;
|
||||
btnEditDisk.Visible = true;
|
||||
btnClearDisks.Visible = true;
|
||||
/* TODO
|
||||
Workers.Failed -= OnDiskAddFailed;
|
||||
Workers.Finished -= OnDiskAddFinished;
|
||||
Workers.UpdateProgress -= UpdateDiskProgress1;
|
||||
Workers.UpdateProgress2 -= UpdateDiskProgress2;
|
||||
Context.WorkingDisk = null;
|
||||
*/
|
||||
btnStopAddDisk.Visible = false;
|
||||
btnAddDisk.Visible = true;
|
||||
btnRemoveDisk.Visible = true;
|
||||
@@ -855,10 +882,12 @@ namespace apprepodbmgr.Eto
|
||||
{
|
||||
Application.Instance.Invoke(delegate
|
||||
{
|
||||
/* TODO
|
||||
if(Context.WorkingDisk == null) return;
|
||||
|
||||
BlockMediaType disk = Context.WorkingDisk;
|
||||
|
||||
|
||||
lstDisks.Add(new DiskEntry {path = disk.Image.Value, disk = disk});
|
||||
List<string> files = new List<string> {disk.Image.Value};
|
||||
if(disk.ATA?.Identify != null) files.Add(disk.ATA.Identify.Image);
|
||||
@@ -887,8 +916,10 @@ namespace apprepodbmgr.Eto
|
||||
if(disk.USB?.Descriptors != null) files.Add(disk.USB.Descriptors.Image);
|
||||
|
||||
foreach(string file in files) lstFilesForMedia.Remove(file);
|
||||
|
||||
*/
|
||||
/* TODO
|
||||
Context.SelectedFile = "";
|
||||
*/
|
||||
tabGeneral.Visible = true;
|
||||
tabKeywords.Visible = true;
|
||||
tabBarcodes.Visible = true;
|
||||
@@ -905,11 +936,12 @@ namespace apprepodbmgr.Eto
|
||||
btnOK.Visible = true;
|
||||
btnEditDisk.Visible = true;
|
||||
btnClearDisks.Visible = true;
|
||||
/* TODO
|
||||
Workers.Failed -= OnDiskAddFailed;
|
||||
Workers.Finished -= OnDiskAddFinished;
|
||||
Workers.UpdateProgress -= UpdateDiskProgress1;
|
||||
Workers.UpdateProgress2 -= UpdateDiskProgress2;
|
||||
Context.WorkingDisk = null;
|
||||
Context.WorkingDisk = null;*/
|
||||
btnStopAddDisk.Visible = false;
|
||||
btnAddDisk.Visible = true;
|
||||
btnRemoveDisk.Visible = true;
|
||||
|
||||
@@ -34,7 +34,7 @@ using Eto.Serialization.Xaml;
|
||||
using Schemas;
|
||||
using BorderType = Schemas.BorderType;
|
||||
|
||||
namespace apprepodbmgr.Eto
|
||||
namespace CICMMetadataEditor
|
||||
{
|
||||
public class dlgOpticalDisc : Dialog
|
||||
{
|
||||
@@ -1268,7 +1268,7 @@ namespace apprepodbmgr.Eto
|
||||
}
|
||||
|
||||
protected void OnBtnEditFilesystemClicked(object sender, EventArgs e)
|
||||
{
|
||||
{/*
|
||||
if(treeFilesystems.SelectedItem == null) return;
|
||||
|
||||
filesystemIter = (FileSystemType)treeFilesystems.SelectedItem;
|
||||
@@ -1280,16 +1280,16 @@ namespace apprepodbmgr.Eto
|
||||
if(!_dlgFilesystem.Modified) return;
|
||||
|
||||
((ObservableCollection<FileSystemType>)treeFilesystems.DataStore).Remove(filesystemIter);
|
||||
((ObservableCollection<FileSystemType>)treeFilesystems.DataStore).Add(_dlgFilesystem.Metadata);
|
||||
((ObservableCollection<FileSystemType>)treeFilesystems.DataStore).Add(_dlgFilesystem.Metadata);*/
|
||||
}
|
||||
|
||||
protected void OnBtnAddFilesystemClicked(object sender, EventArgs e)
|
||||
{
|
||||
{/*
|
||||
dlgFilesystem _dlgFilesystem = new dlgFilesystem();
|
||||
_dlgFilesystem.ShowModal(this);
|
||||
|
||||
if(_dlgFilesystem.Modified)
|
||||
((ObservableCollection<FileSystemType>)treeFilesystems.DataStore).Add(_dlgFilesystem.Metadata);
|
||||
((ObservableCollection<FileSystemType>)treeFilesystems.DataStore).Add(_dlgFilesystem.Metadata);*/
|
||||
}
|
||||
|
||||
protected void OnBtnCancelTrackClicked(object sender, EventArgs e)
|
||||
|
||||
Reference in New Issue
Block a user