Skip to content

Commit 4b06454

Browse files
committed
Fixing configuration directory error
1 parent 471f31c commit 4b06454

25 files changed

+186
-23
lines changed

.vs/Posers/v17/.suo

0 Bytes
Binary file not shown.

Form1.cs

Lines changed: 32 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -190,40 +190,49 @@ private void SaveConfigurationButton_Click(object sender, EventArgs e)
190190

191191
private void LoadConfigurationButton_Click(object sender, EventArgs e)
192192
{
193-
FolderPathText.Clear();
194-
SessionOptionList.Items.Clear();
195193

196-
using (LoadData loadDataForm = new LoadData())
194+
if (Directory.Exists("config"))
197195
{
198-
DialogResult result = loadDataForm.ShowDialog();
196+
FolderPathText.Clear();
197+
SessionOptionList.Items.Clear();
199198

200-
if (result == DialogResult.OK)
199+
using (LoadData loadDataForm = new LoadData())
201200
{
202-
string selectedConfig = loadDataForm.selectedConfig;
201+
DialogResult result = loadDataForm.ShowDialog();
203202

204-
IEnumerable<string> lines = File.ReadLines("config/" + selectedConfig + ".conf");
205-
int lineNum = 0;
206-
207-
foreach (string line in lines)
203+
if (result == DialogResult.OK)
208204
{
209-
if (lineNum == 0)
210-
{
211-
FolderPathText.Text = line;
212-
populateImages(line);
213-
lineNum += 1;
214-
}
215-
else
216-
{
217-
string[] durationLine = line.Split(",");
205+
string selectedConfig = loadDataForm.selectedConfig;
206+
207+
IEnumerable<string> lines = File.ReadLines("config/" + selectedConfig + ".conf");
208+
int lineNum = 0;
218209

219-
string[] row = { durationLine[0], durationLine[1], durationLine[2] };
220-
ListViewItem item = new ListViewItem(row);
221-
SessionOptionList.Items.Add(item);
210+
foreach (string line in lines)
211+
{
212+
if (lineNum == 0)
213+
{
214+
FolderPathText.Text = line;
215+
populateImages(line);
216+
lineNum += 1;
217+
}
218+
else
219+
{
220+
string[] durationLine = line.Split(",");
221+
222+
string[] row = { durationLine[0], durationLine[1], durationLine[2] };
223+
ListViewItem item = new ListViewItem(row);
224+
SessionOptionList.Items.Add(item);
225+
}
222226
}
223227
}
224-
}
225228

229+
}
226230
}
231+
else
232+
{
233+
MessageBox.Show("No configurations available");
234+
}
235+
227236
}
228237

229238
private void StatsButton_Click(object sender, EventArgs e)
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"runtimeTarget": {
3+
"name": ".NETCoreApp,Version=v6.0",
4+
"signature": ""
5+
},
6+
"compilationOptions": {},
7+
"targets": {
8+
".NETCoreApp,Version=v6.0": {
9+
"Posers/1.0.0": {
10+
"runtime": {
11+
"Posers.dll": {}
12+
}
13+
}
14+
}
15+
},
16+
"libraries": {
17+
"Posers/1.0.0": {
18+
"type": "project",
19+
"serviceable": false,
20+
"sha512": ""
21+
}
22+
}
23+
}
18.2 KB
Binary file not shown.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"runtimeOptions": {
3+
"tfm": "net6.0",
4+
"frameworks": [
5+
{
6+
"name": "Microsoft.NETCore.App",
7+
"version": "6.0.0"
8+
},
9+
{
10+
"name": "Microsoft.WindowsDesktop.App",
11+
"version": "6.0.0"
12+
}
13+
],
14+
"configProperties": {
15+
"System.Reflection.Metadata.MetadataUpdater.IsSupported": false
16+
}
17+
}
18+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// <autogenerated />
2+
using System;
3+
using System.Reflection;
4+
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v6.0", FrameworkDisplayName = "")]
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
//------------------------------------------------------------------------------
2+
// <auto-generated>
3+
// This code was generated by a tool.
4+
// Runtime Version:4.0.30319.42000
5+
//
6+
// Changes to this file may cause incorrect behavior and will be lost if
7+
// the code is regenerated.
8+
// </auto-generated>
9+
//------------------------------------------------------------------------------
10+
11+
using System;
12+
using System.Reflection;
13+
14+
[assembly: System.Reflection.AssemblyCompanyAttribute("Posers")]
15+
[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")]
16+
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
17+
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
18+
[assembly: System.Reflection.AssemblyProductAttribute("Posers")]
19+
[assembly: System.Reflection.AssemblyTitleAttribute("Posers")]
20+
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
21+
[assembly: System.Runtime.Versioning.TargetPlatformAttribute("Windows7.0")]
22+
[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("Windows7.0")]
23+
24+
// Generated by the MSBuild WriteCodeFragment class.
25+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
fd65edd678bd016533c904ec21e478374bd0adfe
180 Bytes
Binary file not shown.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
is_global = true
2+
build_property.ApplicationManifest =
3+
build_property.StartupObject =
4+
build_property.ApplicationDefaultFont =
5+
build_property.ApplicationHighDpiMode =
6+
build_property.ApplicationUseCompatibleTextRendering =
7+
build_property.ApplicationVisualStyles =
8+
build_property.TargetFramework = net6.0-windows
9+
build_property.TargetPlatformMinVersion = 7.0
10+
build_property.UsingMicrosoftNETSdkWeb =
11+
build_property.ProjectTypeGuids =
12+
build_property.InvariantGlobalization =
13+
build_property.PlatformNeutralAssembly =
14+
build_property._SupportedPlatformList = Linux,macOS,Windows
15+
build_property.RootNamespace = Posers
16+
build_property.ProjectDir = Z:\Posers\

0 commit comments

Comments
 (0)