-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9756dd9
commit 5ccf74c
Showing
17 changed files
with
2,224 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,31 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
<configSections> | ||
</configSections> | ||
<connectionStrings> | ||
<add name="OpenStudioIDE.Properties.Settings.OpenStudioDataConnectionString" connectionString="Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\OpenStudioData.accdb" providerName="System.Data.OleDb"/> | ||
</connectionStrings> | ||
<startup> | ||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" /> | ||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/> | ||
</startup> | ||
<runtime> | ||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> | ||
<dependentAssembly> | ||
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> | ||
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" /> | ||
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/> | ||
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0"/> | ||
</dependentAssembly> | ||
<dependentAssembly> | ||
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" /> | ||
<bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" /> | ||
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral"/> | ||
<bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2"/> | ||
</dependentAssembly> | ||
<dependentAssembly> | ||
<assemblyIdentity name="Microsoft.Bcl.AsyncInterfaces" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral"/> | ||
<bindingRedirect oldVersion="0.0.0.0-7.0.0.0" newVersion="7.0.0.0"/> | ||
</dependentAssembly> | ||
<dependentAssembly> | ||
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral"/> | ||
<bindingRedirect oldVersion="0.0.0.0-4.2.0.1" newVersion="4.2.0.1"/> | ||
</dependentAssembly> | ||
</assemblyBinding> | ||
</runtime> | ||
</configuration> | ||
</configuration> |
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
using CsvHelper; | ||
using CsvHelper.Configuration; | ||
using System.Collections.Generic; | ||
using System; | ||
using System.Globalization; | ||
using System.IO; | ||
using System.Threading.Tasks; | ||
|
||
namespace OpenStudioIDE | ||
{ | ||
partial class OpenStudioDataDataSet | ||
{ | ||
partial class ideDataTable | ||
{ | ||
public void AddRow(string filename, string path, string location, DateTime lastmodified, string extention, bool? latest) | ||
{ | ||
ideRow row = (ideRow)NewRow(); | ||
row.BeginEdit(); | ||
row["filename"] = filename; | ||
row["location"] = path; | ||
row["lastmodified"] = lastmodified; | ||
row["extention"] = extention; | ||
row["latest?"] = latest; | ||
row.EndEdit(); | ||
|
||
} | ||
public void RemoveRow(string filename) | ||
{ | ||
foreach (ideRow row in this.Rows) | ||
{ | ||
if (row["filename"].ToString() == filename) | ||
{ | ||
row.Delete(); | ||
break; | ||
} | ||
} | ||
} | ||
public void UpdateRow(string filename, string path, string location, DateTime lastmodified, string extention, bool? latest) | ||
{ | ||
foreach (ideRow row in this.Rows) | ||
{ | ||
if (row["filename"].ToString() == filename) | ||
{ | ||
row.BeginEdit(); | ||
row["filename"] = filename; | ||
row["location"] = path; | ||
row["lastmodified"] = lastmodified; | ||
row["extention"] = extention; | ||
row["latest?"] = latest; | ||
row.EndEdit(); | ||
break; | ||
} | ||
} | ||
} | ||
public void DumpDBToxml(string filename) | ||
{ | ||
this.WriteXml(filename); | ||
} | ||
public void LoadDBFromxml(string filename) | ||
{ | ||
this.ReadXml(filename); | ||
} | ||
public void ExportDBToCSV(string filename) | ||
{ | ||
using (var writer = new StreamWriter(filename)) | ||
using (var csv = new CsvWriter(writer, CultureInfo.InvariantCulture)) | ||
{ | ||
csv.WriteRecords(this); | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
Oops, something went wrong.