ConsoleGUI excluded from project

This commit is contained in:
Timerix 2021-10-05 19:14:19 +03:00
parent f57d55b9ab
commit 2e1726af75
3 changed files with 14 additions and 25 deletions

View File

@ -33,13 +33,7 @@
<ItemGroup> <ItemGroup>
<Compile Include="Color.cs" /> <Compile Include="Color.cs" />
<Compile Include="CompressedArray.cs" /> <Compile Include="CompressedArray.cs" />
<Compile Include="ConsoleGUI\Container.cs" /> <Compile Include="Dtsod\DtsodV22.cs" />
<Compile Include="ConsoleGUI\Control.cs" />
<Compile Include="ConsoleGUI\IDrawable.cs" />
<Compile Include="ConsoleGUI\Label.cs" />
<Compile Include="ConsoleGUI\Window.cs" />
<Compile Include="ConsoleGUI\WindowOld.cs" />
<Compile Include="Dtsod\DtsodV23.cs" />
<Compile Include="Dtsod\DtsodV21.cs" /> <Compile Include="Dtsod\DtsodV21.cs" />
<Compile Include="cs9somefix.cs" /> <Compile Include="cs9somefix.cs" />
<Compile Include="Dtsod\ValueTypes.cs" /> <Compile Include="Dtsod\ValueTypes.cs" />

View File

@ -1,6 +1,5 @@
using DTLib.Dtsod; using DTLib.Dtsod;
using DTLib.Filesystem; using DTLib.Filesystem;
using System;
using System.Net.Sockets; using System.Net.Sockets;
using System.Text; using System.Text;
using static DTLib.PublicLog; using static DTLib.PublicLog;
@ -30,8 +29,7 @@ namespace DTLib.Network
Debug("b", $"requesting file download: {filePath_server}\n"); Debug("b", $"requesting file download: {filePath_server}\n");
MainSocket.SendPackage("requesting file download".ToBytes()); MainSocket.SendPackage("requesting file download".ToBytes());
MainSocket.SendPackage(filePath_server.ToBytes()); MainSocket.SendPackage(filePath_server.ToBytes());
}, out Exception exception); });
exception?.Throw();
DownloadFile(filePath_client); DownloadFile(filePath_client);
} }
@ -50,8 +48,7 @@ namespace DTLib.Network
Debug("b", $"requesting file download: {filePath_server}\n"); Debug("b", $"requesting file download: {filePath_server}\n");
MainSocket.SendPackage("requesting file download".ToBytes()); MainSocket.SendPackage("requesting file download".ToBytes());
MainSocket.SendPackage(filePath_server.ToBytes()); MainSocket.SendPackage(filePath_server.ToBytes());
}, out System.Exception exception); });
exception?.Throw();
return DownloadFileToMemory(); return DownloadFileToMemory();
} }
@ -100,8 +97,7 @@ namespace DTLib.Network
BytesDownloaded+=(uint)buffer.Length; BytesDownloaded+=(uint)buffer.Length;
fileStream.Write(buffer, 0, buffer.Length); fileStream.Write(buffer, 0, buffer.Length);
} }
}, out System.Exception exception); });
exception?.Throw();
if(requiresFlushing) if(requiresFlushing)
fileStream.Flush(); fileStream.Flush();
} }
@ -136,8 +132,7 @@ namespace DTLib.Network
MainSocket.SendPackage(buffer); MainSocket.SendPackage(buffer);
BytesUploaded+=(uint)buffer.Length; BytesUploaded+=(uint)buffer.Length;
} }
}, out System.Exception exception); });
exception?.Throw();
fileStream.Close(); fileStream.Close();
Debug(new string[] { "g", $" uploaded {BytesUploaded} of {Filesize} bytes\n" }); Debug(new string[] { "g", $" uploaded {BytesUploaded} of {Filesize} bytes\n" });
} }
@ -149,7 +144,7 @@ namespace DTLib.Network
if(!dirOnServer.EndsWith("\\")) if(!dirOnServer.EndsWith("\\"))
dirOnServer+="\\"; dirOnServer+="\\";
Debug("b", "downloading manifest <", "c", dirOnServer+"manifest.dtsod", "b", ">\n"); Debug("b", "downloading manifest <", "c", dirOnServer+"manifest.dtsod", "b", ">\n");
var manifest = new DtsodV23(SimpleConverter.ToString(DownloadFileToMemory(dirOnServer+"manifest.dtsod"))); var manifest = new DtsodV22(SimpleConverter.ToString(DownloadFileToMemory(dirOnServer+"manifest.dtsod")));
Debug("g", $"found {manifest.Values.Count} files in manifest\n"); Debug("g", $"found {manifest.Values.Count} files in manifest\n");
var hasher = new Hasher(); var hasher = new Hasher();
foreach(string fileOnServer in manifest.Keys) foreach(string fileOnServer in manifest.Keys)