Merge branch 'develop' of github.com:n5ac/smartsdr-dsp into develop

This commit is contained in:
Ed Gonzalez 2015-01-28 17:12:25 -06:00
commit 3c21c89580
2 changed files with 29 additions and 15 deletions

View file

@ -24,6 +24,7 @@ Global
{19634B34-7569-4D1D-8182-B10AC27E13FF}.Debug|x86.ActiveCfg = Debug|x86
{19634B34-7569-4D1D-8182-B10AC27E13FF}.Debug|x86.Build.0 = Debug|x86
{19634B34-7569-4D1D-8182-B10AC27E13FF}.Release|Any CPU.ActiveCfg = Release|x86
{19634B34-7569-4D1D-8182-B10AC27E13FF}.Release|Any CPU.Build.0 = Release|x86
{19634B34-7569-4D1D-8182-B10AC27E13FF}.Release|x86.ActiveCfg = Release|x86
{19634B34-7569-4D1D-8182-B10AC27E13FF}.Release|x86.Build.0 = Release|x86
{7927817C-D5EF-4A9E-B38E-29668F308343}.Debug|Any CPU.ActiveCfg = Debug|Any CPU

View file

@ -289,25 +289,38 @@ namespace CODEC2_GUI
void slc_WaveformStatusReceived(Slice slc, string status)
{
string[] words = status.Split(' ');
foreach (string kv in words)
if(status.StartsWith("string"))
{
string[] tokens = kv.Split('=');
if (tokens.Length != 2)
Debug.WriteLine(status);
string x = "ASDLKFJASLDKJ";
int start_pos = status.IndexOf("\"");
// did we find beginning quotes?
if(start_pos < 0) return; // no -- return
/*int end_pos = status.LastIndexOf("\"");
// did we find ending quotes?
if(end_pos == start_pos) return; // no -- return
*/
start_pos += 1; // ignore beginning quotes
string value = status.Substring(start_pos);
Control c = FindControlByName(this, "txtIn" + slc.Index);
if (c == null) return;
TextBox txtbox = c as TextBox;
if (txtbox == null) return;
if (InvokeRequired)
{
Debug.WriteLine("slc_WaveformStatusReceived: Invalid key/value pair (" + kv + ")");
continue;
Invoke(new MethodInvoker(delegate
{
txtbox.Text = value;
}));
}
string key = tokens[0];
string value = tokens[1];
switch (key)
else
{
case "string":
// TODO: update the string
break;
txtbox.Text = value;
}
}
}