@@ -22,12 +22,15 @@ public partial class Form1 : Form
22
22
private string TOMLPath ;
23
23
private FlexGUIConfig flexGUIConfig ;
24
24
private System . Text . Encoding enc1252 ;
25
+ private string flexasioGuiVersion = "0.3" ;
26
+ private string flexasioVersion = "1.7a" ;
27
+ private string tomlName = "FlexASIO.toml" ;
25
28
26
29
public Form1 ( )
27
30
{
28
31
InitializeComponent ( ) ;
29
32
30
- this . Text = "FlexASIO GUI v0.2 " ;
33
+ this . Text = $ "FlexASIO GUI v { flexasioGuiVersion } ";
31
34
32
35
System . Globalization . CultureInfo customCulture = ( System . Globalization . CultureInfo ) System . Threading . Thread . CurrentThread . CurrentCulture . Clone ( ) ;
33
36
customCulture . NumberFormat . NumberDecimalSeparator = "." ;
@@ -38,7 +41,7 @@ public Form1()
38
41
CultureInfo . DefaultThreadCurrentCulture = customCulture ;
39
42
CultureInfo . DefaultThreadCurrentUICulture = customCulture ;
40
43
41
- TOMLPath = $ "{ Environment . GetFolderPath ( Environment . SpecialFolder . UserProfile ) } \\ FlexASIO.toml ";
44
+ TOMLPath = $ "{ Environment . GetFolderPath ( Environment . SpecialFolder . UserProfile ) } \\ { tomlName } ";
42
45
43
46
flexGUIConfig = new FlexGUIConfig ( ) ;
44
47
if ( File . Exists ( TOMLPath ) )
@@ -86,7 +89,7 @@ public Form1()
86
89
wasapiAutoConvertOutput . Checked = flexGUIConfig . output . wasapiAutoConvert ;
87
90
88
91
InitDone = true ;
89
- SetStatusMessage ( $ "FlexASIO GUI for FlexASIO 0.15 started ({ Configuration . VersionString } )") ;
92
+ SetStatusMessage ( $ "FlexASIO GUI for FlexASIO { flexasioVersion } started ({ Configuration . VersionString } )") ;
90
93
GenerateOutput ( ) ;
91
94
}
92
95
@@ -147,6 +150,7 @@ private void comboBackend_SelectedIndexChanged(object sender, EventArgs e)
147
150
treeDevicesOutput . Nodes . Clear ( ) ;
148
151
treeDevicesOutput . Nodes . AddRange ( GetDevicesForBackend ( selectedBackend , false ) ) ;
149
152
}
153
+ if ( selectedBackend == "(None)" ) selectedBackend = "" ;
150
154
flexGUIConfig . backend = selectedBackend ;
151
155
GenerateOutput ( ) ;
152
156
}
@@ -183,7 +187,7 @@ private void btSaveAs_Click(object sender, EventArgs e)
183
187
{
184
188
SaveFileDialog saveFileDialog = new SaveFileDialog ( ) ;
185
189
saveFileDialog . InitialDirectory = Environment . GetFolderPath ( Environment . SpecialFolder . UserProfile ) ;
186
- saveFileDialog . FileName = "FlexASIO.toml" ;
190
+ saveFileDialog . FileName = tomlName ;
187
191
var ret = saveFileDialog . ShowDialog ( ) ;
188
192
if ( ret == DialogResult . OK )
189
193
{
@@ -233,7 +237,7 @@ private void treeDevicesInput_AfterSelect(object sender, TreeViewEventArgs e)
233
237
if ( o . SelectedNode != null )
234
238
{
235
239
o . SelectedNode . Checked = true ;
236
- flexGUIConfig . input . device = o . SelectedNode . Text ;
240
+ flexGUIConfig . input . device = o . SelectedNode . Text == "(None)" ? "" : o . SelectedNode . Text ;
237
241
GenerateOutput ( ) ;
238
242
}
239
243
}
@@ -245,7 +249,7 @@ private void treeDevicesOutput_AfterSelect(object sender, TreeViewEventArgs e)
245
249
if ( o . SelectedNode != null )
246
250
{
247
251
o . SelectedNode . Checked = true ;
248
- flexGUIConfig . output . device = o . SelectedNode . Text ;
252
+ flexGUIConfig . output . device = o . SelectedNode . Text == "(None)" ? "" : o . SelectedNode . Text ;
249
253
GenerateOutput ( ) ;
250
254
}
251
255
}
0 commit comments