Comment code that may be unused.

This commit is contained in:
2018-07-30 22:34:13 +01:00
parent afc2440673
commit 7f595d35ed
3 changed files with 506 additions and 474 deletions

View File

@@ -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)

View File

@@ -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,16 +770,21 @@ 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;
/* TODO
thdDisk = new Thread(Workers.AddMedia);
thdDisk.Start();
*/
}
protected void OnBtnStopAddDiskClicked(object sender, EventArgs e)
@@ -822,7 +845,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;
@@ -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;

View File

@@ -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)