Sorry that the README is not complete

This commit is contained in:
Mike Nolan 2022-05-20 01:44:35 -05:00
parent 4944637550
commit 9609e5c791
4 changed files with 17 additions and 14 deletions

View File

@ -100,7 +100,7 @@ public class TimelapsePack
} }
return null; return null;
} }
public static void DirCopy(string src,string dest,Func<string,bool> copyItem) public static void DirCopy(string src,string dest,Func<string,bool>? copyItem)
{ {
foreach(var f in Directory.GetDirectories(src)) foreach(var f in Directory.GetDirectories(src))
{ {
@ -109,6 +109,7 @@ public class TimelapsePack
continue; continue;
} }
string fname =Path.GetFileName(f); string fname =Path.GetFileName(f);
DirCopy(f,fname,copyItem); DirCopy(f,fname,copyItem);
} }
@ -141,8 +142,10 @@ public class TimelapsePack
{ {
Directory.CreateDirectory("_build/extension"); Directory.CreateDirectory("_build/extension");
File.Copy("extension_info.json","_build/extension_info.json"); File.Copy("extension_info.json","_build/extension_info.json");
string? dirname=Path.GetDirectoryName(outPut);
DirCopy(Path.GetDirectoryName(outPut),"_build/extension",(e)=>{ if(!string.IsNullOrWhiteSpace(dirname)){
DirCopy(dirname,"_build/extension",(e)=>{
if(e==outPut) if(e==outPut)
{ {
return false; return false;
@ -165,6 +168,7 @@ public class TimelapsePack
ZipFile.CreateFromDirectory ("_build",fname,CompressionLevel.SmallestSize, false); ZipFile.CreateFromDirectory ("_build",fname,CompressionLevel.SmallestSize, false);
Directory.Delete("_build"); Directory.Delete("_build");
return fname; return fname;
}
} }
return null; return null;
} }
@ -176,7 +180,9 @@ public class TimelapsePack
Console.Write($"Are you sure you want to delete {name} (Yes/No): "); Console.Write($"Are you sure you want to delete {name} (Yes/No): ");
j: j:
var read=Console.ReadLine().ToLower(); var read=Console.ReadLine();
if(string.IsNullOrWhiteSpace(read)) read="";
read=read.ToLower();
if(read == "yes") if(read == "yes")
{ {
Console.WriteLine("I asked ya, you said yes so deleting"); Console.WriteLine("I asked ya, you said yes so deleting");

View File

@ -1,11 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\TimelapseApi\TimelapseApi.csproj" /> <PackageReference Include="Tesses.TimelapseApi" Version="1.0.1" />
</ItemGroup>
<PackageReference Include="System.IO.Compression.ZipFile" Version="4.3.0" />
<ItemGroup>
<PackageReference Include="System.IO.Compression.ZipFile" Version="4.3.0" />
</ItemGroup> </ItemGroup>
<PropertyGroup> <PropertyGroup>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>

View File

@ -9,9 +9,9 @@
<PackageId>Tesses.TimelapseApi</PackageId> <PackageId>Tesses.TimelapseApi</PackageId>
<Authors>Mike Nolan</Authors> <Authors>Mike Nolan</Authors>
<Company>Tesses</Company> <Company>Tesses</Company>
<Version>1.0.0</Version> <Version>1.0.1</Version>
<AssemblyVersion>1.0.0</AssemblyVersion> <AssemblyVersion>1.0.1</AssemblyVersion>
<FileVersion>1.0.0</FileVersion> <FileVersion>1.0.1</FileVersion>
<Description>The api for TimelapseNow</Description> <Description>The api for TimelapseNow</Description>
<PackageLicenseExpression>GPL-3.0-only</PackageLicenseExpression> <PackageLicenseExpression>GPL-3.0-only</PackageLicenseExpression>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance> <PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>

View File

@ -24,9 +24,7 @@ internal class FrameHandlerSettingsForm : Dialog
internal class FrameHandlerSettings internal class FrameHandlerSettings
{ {
public Guid Guid; public Guid Guid;
CheckBox? cb;
private bool? _chk;
public FrameHandlerSettings(TimelapseExtension ext,string handlerName,bool overlay,bool block) public FrameHandlerSettings(TimelapseExtension ext,string handlerName,bool overlay,bool block)
{ {
ExtensionName=ext.Name; ExtensionName=ext.Name;