From c5a7ba3adb798cfda7d5bd16295fe5739c10ab67 Mon Sep 17 00:00:00 2001 From: mlhnet Date: Mon, 24 Aug 2015 14:10:30 -0400 Subject: [PATCH 1/6] New layout, log, MRU lists, Reflector selection, VS2015 Solution --- pc/CODEC2 GUI/CODEC2 GUI/App.config | 40 + pc/CODEC2 GUI/CODEC2 GUI/AssemblyInfo.cs | 120 +++ pc/CODEC2 GUI/CODEC2 GUI/DstarInfo.cs | 297 +++++++ pc/CODEC2 GUI/CODEC2 GUI/Form1.Designer.cs | 63 -- pc/CODEC2 GUI/CODEC2 GUI/Form1.cs | 758 ------------------ pc/CODEC2 GUI/CODEC2 GUI/Images/FDVLogo.ico | Bin 25464 -> 0 bytes pc/CODEC2 GUI/CODEC2 GUI/Images/dstar.ico | Bin 0 -> 9662 bytes pc/CODEC2 GUI/CODEC2 GUI/MainForm.Designer.cs | 259 ++++++ pc/CODEC2 GUI/CODEC2 GUI/MainForm.cs | 323 ++++++++ pc/CODEC2 GUI/CODEC2 GUI/MainForm.resx | 290 +++++++ pc/CODEC2 GUI/CODEC2 GUI/Program.cs | 2 +- .../CODEC2 GUI/Properties/AssemblyInfo.cs | 10 +- .../Properties/Resources.Designer.cs | 6 +- .../Properties/Settings.Designer.cs | 75 +- .../CODEC2 GUI/Properties/Settings.settings | 29 +- .../CODEC2 GUI/SelectForm.Designer.cs | 180 +++++ pc/CODEC2 GUI/CODEC2 GUI/SelectForm.cs | 192 +++++ pc/CODEC2 GUI/CODEC2 GUI/SelectForm.resx | 123 +++ pc/CODEC2 GUI/CODEC2 GUI/ThumbDV_GUI.csproj | 154 ++++ pc/CODEC2 GUI/CODEC2 GUI/ThumbDV_GUI.sln | 22 + pc/CODEC2 GUI/CODEC2 GUI/dstarctl.Designer.cs | 269 +++++++ pc/CODEC2 GUI/CODEC2 GUI/dstarctl.cs | 449 +++++++++++ pc/CODEC2 GUI/CODEC2 GUI/dstarctl.resx | 141 ++++ .../CODEC2 GUI/dstarlistitem.Designer.cs | 113 +++ pc/CODEC2 GUI/CODEC2 GUI/dstarlistitem.cs | 356 ++++++++ .../{Form1.resx => dstarlistitem.resx} | 0 26 files changed, 3432 insertions(+), 839 deletions(-) create mode 100644 pc/CODEC2 GUI/CODEC2 GUI/App.config create mode 100644 pc/CODEC2 GUI/CODEC2 GUI/AssemblyInfo.cs create mode 100644 pc/CODEC2 GUI/CODEC2 GUI/DstarInfo.cs delete mode 100644 pc/CODEC2 GUI/CODEC2 GUI/Form1.Designer.cs delete mode 100644 pc/CODEC2 GUI/CODEC2 GUI/Form1.cs delete mode 100644 pc/CODEC2 GUI/CODEC2 GUI/Images/FDVLogo.ico create mode 100644 pc/CODEC2 GUI/CODEC2 GUI/Images/dstar.ico create mode 100644 pc/CODEC2 GUI/CODEC2 GUI/MainForm.Designer.cs create mode 100644 pc/CODEC2 GUI/CODEC2 GUI/MainForm.cs create mode 100644 pc/CODEC2 GUI/CODEC2 GUI/MainForm.resx create mode 100644 pc/CODEC2 GUI/CODEC2 GUI/SelectForm.Designer.cs create mode 100644 pc/CODEC2 GUI/CODEC2 GUI/SelectForm.cs create mode 100644 pc/CODEC2 GUI/CODEC2 GUI/SelectForm.resx create mode 100644 pc/CODEC2 GUI/CODEC2 GUI/ThumbDV_GUI.csproj create mode 100644 pc/CODEC2 GUI/CODEC2 GUI/ThumbDV_GUI.sln create mode 100644 pc/CODEC2 GUI/CODEC2 GUI/dstarctl.Designer.cs create mode 100644 pc/CODEC2 GUI/CODEC2 GUI/dstarctl.cs create mode 100644 pc/CODEC2 GUI/CODEC2 GUI/dstarctl.resx create mode 100644 pc/CODEC2 GUI/CODEC2 GUI/dstarlistitem.Designer.cs create mode 100644 pc/CODEC2 GUI/CODEC2 GUI/dstarlistitem.cs rename pc/CODEC2 GUI/CODEC2 GUI/{Form1.resx => dstarlistitem.resx} (100%) diff --git a/pc/CODEC2 GUI/CODEC2 GUI/App.config b/pc/CODEC2 GUI/CODEC2 GUI/App.config new file mode 100644 index 0000000..f641abf --- /dev/null +++ b/pc/CODEC2 GUI/CODEC2 GUI/App.config @@ -0,0 +1,40 @@ + + + + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + 1000 + + + + diff --git a/pc/CODEC2 GUI/CODEC2 GUI/AssemblyInfo.cs b/pc/CODEC2 GUI/CODEC2 GUI/AssemblyInfo.cs new file mode 100644 index 0000000..a360720 --- /dev/null +++ b/pc/CODEC2 GUI/CODEC2 GUI/AssemblyInfo.cs @@ -0,0 +1,120 @@ +/******************************************************************************* + * AssemblyInfo.cs + * + * Helper class that holds Assembly Info + * + * Created on: 2015-08-23 + * Author: Mark Hanson / AA3RK / MKCM Software, LLC. + * + * + ******************************************************************************* + * + * Copyright (C) 2015 FlexRadio Systems. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + * Contact: gplflexradiocom or + * + * GPL C/O FlexRadio Systems + * 4616 W. Howard Lane + * Suite 1-150 + * Austin, TX USA 78728 + * + ******************************************************************************/ +using System; +using System.IO; +using System.Reflection; + +namespace CODEC2_GUI +{ + public class AssemblyInfo + { + public AssemblyInfo(Assembly assembly) + { + if (assembly == null) + throw new ArgumentNullException("assembly"); + this.assembly = assembly; + } + + private readonly Assembly assembly; + + /// + /// Gets the title property + /// + public string ProductTitle + { + get + { + return GetAttributeValue(a => a.Title, + Path.GetFileNameWithoutExtension(assembly.CodeBase)); + } + } + + /// + /// Gets the application's version + /// + public string Version + { + get + { + string result = string.Empty; + Version version = assembly.GetName().Version; + if (version != null) + return version.ToString(); + else + return "1.0.0.0"; + } + } + + /// + /// Gets the description about the application. + /// + public string Description + { + get { return GetAttributeValue(a => a.Description); } + } + + + /// + /// Gets the product's full name. + /// + public string Product + { + get { return GetAttributeValue(a => a.Product); } + } + + /// + /// Gets the copyright information for the product. + /// + public string Copyright + { + get { return GetAttributeValue(a => a.Copyright); } + } + + /// + /// Gets the company information for the product. + /// + public string Company + { + get { return GetAttributeValue(a => a.Company); } + } + + protected string GetAttributeValue(Func resolveFunc, string defaultResult = null) where TAttr : Attribute + { + object[] attributes = assembly.GetCustomAttributes(typeof(TAttr), false); + if (attributes.Length > 0) + return resolveFunc((TAttr)attributes[0]); + else + return defaultResult; + } + } +} diff --git a/pc/CODEC2 GUI/CODEC2 GUI/DstarInfo.cs b/pc/CODEC2 GUI/CODEC2 GUI/DstarInfo.cs new file mode 100644 index 0000000..7b80558 --- /dev/null +++ b/pc/CODEC2 GUI/CODEC2 GUI/DstarInfo.cs @@ -0,0 +1,297 @@ +/******************************************************************************* + * DstarInfo.cs + * + * Helper class which collects DSTAR information + * + * Created on: 2015-08-22 + * Author: Mark Hanson / AA3RK / MKCM Software, LLC. + * + * + ******************************************************************************* + * + * Copyright (C) 2015 FlexRadio Systems. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + * Contact: gplflexradiocom or + * + * GPL C/O FlexRadio Systems + * 4616 W. Howard Lane + * Suite 1-150 + * Austin, TX USA 78728 + * + ******************************************************************************/ + + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Net; +using System.Net.Http; +using System.Threading.Tasks; +using System.IO; +using System.Net.Http.Headers; +using System.Reflection; + +namespace CODEC2_GUI +{ + public class DstarInfo + { + public DstarInfo() + { + + } + + private List Repeaters_; + public List Repeaters + { + get + { + if (Repeaters_ == null) + { + LoadRepeaters(); + if (Repeaters_ == null || Repeaters_.Count == 0) + { + try + { + FetchAndSaveRepeaterList(); + } + catch { } + } + } + return Repeaters_; + } + } + + private List Reflectors_; + public List Refelectors + { + get + { + if (Reflectors_ == null) + { + LoadReflectors(); + if (Reflectors_ == null || Reflectors_.Count == 0) + { + try + { + FetchAndSaveReflectorList(); + } + catch { } + } + } + return Reflectors_; + } + } + + public bool FetchAndSaveRepeaterList() + { + return false; + } + + public bool FetchAndSaveReflectorList() + { + bool result = false; + try + { + List refs = GetDStarInfoReflectors(); + if (refs != null && refs.Count > 0) + { + SaveReflectors(refs); + Reflectors_ = refs; + result = true; + } + } + catch(Exception ex) + { + string msg = "Fetch and save Relflector list failed!"; + System.Diagnostics.Debug.WriteLine(string.Format("{0} {1}", msg, ex.Message)); + throw new ApplicationException(msg, ex); + } + return result; + } + + + private List GetDStarInfoReflectors() + { + string htmlReflector = string.Empty; + + using (HttpClient client = new HttpClient()) + { + client.BaseAddress = new Uri("http://apps.dstarinfo.com"); + HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, "reflectors.aspx"); + Task resp = client.SendAsync(request); + resp.Wait(); + Task strm = resp.Result.Content.ReadAsStreamAsync(); + strm.Wait(); + using (StreamReader sr = new StreamReader(strm.Result, System.Text.Encoding.UTF8)) + { + htmlReflector = sr.ReadToEnd(); + } + } + + List refs = new List(); + + // parsing HTML table of reflector information + // start by finding start of reflector name by prefix + // find next span tag which is description + // eliminate any link tag inside description span tag + + // find the start of reflector NAME + int ofs = htmlReflector.IndexOf(">REF"); + while (ofs > 0) + { + // find end of name span + int ofs2 = htmlReflector.IndexOf("", ofs + 1); + if (ofs2 > 0) + { + ReflectorOrRepeater rf = new ReflectorOrRepeater(); + string sref = htmlReflector.Substring(ofs + 1, ofs2 - ofs - 1); + rf.Name = sref; + // find desc span + int ofs3 = htmlReflector.IndexOf(" 0) + { + // find end of desc open span tag + ofs3 = htmlReflector.IndexOf(">", ofs3 + 1); + // find desc close span tag + int ofs4 = htmlReflector.IndexOf("", ofs3 + 1); + // find possible surrounding link tag + int ofs5 = htmlReflector.IndexOf("= 0 && ofs5 < ofs4) + { + ofs3 = htmlReflector.IndexOf(">", ofs5 + 1); + ofs4 = htmlReflector.IndexOf("", ofs3 + 1); + } + string desc = htmlReflector.Substring(ofs3 + 1, ofs4 - ofs3 - 1); + rf.Desc = desc; + refs.Add(rf); + // find next + ofs = htmlReflector.IndexOf(">REF", ofs3); + continue; + } + } + break; + } + + return refs; + } + + private void SaveRepeaters(List refs) + { + if (refs == null || refs.Count == 0) + return; + string fname = GetBaseAppDataPath("Repeaters.txt"); + using (StreamWriter sw = new StreamWriter(fname)) + { + foreach (ReflectorOrRepeater rf in refs) + { + sw.WriteLine("{0}|{1}", rf.Name, rf.Desc); + } + sw.Close(); + } + } + + private void SaveReflectors(List refs) + { + if (refs == null || refs.Count == 0) + return; + string fname = GetBaseAppDataPath("Reflectors.txt"); + using (StreamWriter sw = new StreamWriter(fname)) + { + foreach (ReflectorOrRepeater rf in refs) + { + sw.WriteLine("{0}|{1}", rf.Name, rf.Desc); + } + sw.Close(); + } + } + + private void LoadRepeaters() + { + try + { + string fname = GetBaseAppDataPath("Repeaters.txt"); + List refs = new List(); + using (StreamReader sr = new StreamReader(fname)) + { + while (!sr.EndOfStream) + { + string line = sr.ReadLine(); + string[] vals = line.Split('|'); + if (vals.Length == 2) + { + refs.Add(new ReflectorOrRepeater() { Name = vals[0], Desc = vals[1] }); + } + } + sr.Close(); + } + Repeaters_ = refs; + } + catch { } + } + + + private void LoadReflectors() + { + try + { + string fname = GetBaseAppDataPath("Reflectors.txt"); + List refs = new List(); + using (StreamReader sr = new StreamReader(fname)) + { + while (!sr.EndOfStream) + { + string line = sr.ReadLine(); + string[] vals = line.Split('|'); + if (vals.Length == 2) + { + refs.Add(new ReflectorOrRepeater() { Name = vals[0], Desc = vals[1] }); + } + } + sr.Close(); + } + Reflectors_ = refs; + } + catch { } + } + + + private static string rootappdata; + + private static string GetBaseAppDataPath(string fname) + { + if (rootappdata == null) + { + string basepath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData); + + AssemblyInfo ai = new AssemblyInfo(Assembly.GetAssembly(typeof(MainForm))); + + string mybasepath = System.IO.Path.Combine(basepath, ai.Company.Replace(' ', '_'), ai.ProductTitle.Replace(' ', '_')); + if (!System.IO.Directory.Exists(mybasepath)) + System.IO.Directory.CreateDirectory(mybasepath); + + rootappdata = mybasepath; + } + return System.IO.Path.Combine(rootappdata, fname); + } + } + + + public class ReflectorOrRepeater + { + public string Name { get; set; } + public string Desc { get; set; } + } + +} diff --git a/pc/CODEC2 GUI/CODEC2 GUI/Form1.Designer.cs b/pc/CODEC2 GUI/CODEC2 GUI/Form1.Designer.cs deleted file mode 100644 index 14d67c3..0000000 --- a/pc/CODEC2 GUI/CODEC2 GUI/Form1.Designer.cs +++ /dev/null @@ -1,63 +0,0 @@ -namespace CODEC2_GUI -{ - partial class Form1 - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.label1 = new System.Windows.Forms.Label(); - this.SuspendLayout(); - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(196, 105); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(123, 13); - this.label1.TabIndex = 0; - this.label1.Text = "No DSTAR (D*FM) Slice"; - // - // Form1 - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(519, 236); - this.Controls.Add(this.label1); - this.Name = "Form1"; - this.Text = "DSTAR"; - this.Load += new System.EventHandler(this.Form1_Load); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.Label label1; - - } -} - diff --git a/pc/CODEC2 GUI/CODEC2 GUI/Form1.cs b/pc/CODEC2 GUI/CODEC2 GUI/Form1.cs deleted file mode 100644 index fdb94e5..0000000 --- a/pc/CODEC2 GUI/CODEC2 GUI/Form1.cs +++ /dev/null @@ -1,758 +0,0 @@ -/******************************************************************************* - * Form1.cs - * - * An example GUI showing how to interface to the FlexRadio Modem API - * - * Created on: 2014-08-28 - * Author: Eric / KE5DTO - * - ******************************************************************************* - * - * Copyright (C) 2014 FlexRadio Systems. - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * Contact: gplflexradiocom or - * - * GPL C/O FlexRadio Systems - * 4616 W. Howard Lane - * Suite 1-150 - * Austin, TX USA 78728 - * - ******************************************************************************/ - -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Diagnostics; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Windows.Forms; - -using Flex.Smoothlake.FlexLib; - - -namespace CODEC2_GUI -{ - public partial class Form1 : Form - { - private bool _radioConnected = false; - private Radio _radio = null; - //private List _slices; - private List _waveformSlices; - - public Form1() - { - InitializeComponent(); - - _waveformSlices = new List(); - } - - private void Form1_Load(object sender, EventArgs e) - { - API.RadioAdded += new API.RadioAddedEventHandler(API_RadioAdded); - API.RadioRemoved += new API.RadioRemovedEventHandler(API_RadioRemoved); - API.Init(); - } - - //************************************* - // API Event Handlers - //************************************* - - void API_RadioAdded(Radio radio) - { - // if we have already connected to another radio, ignore this one - if(_radioConnected) return; - - // set the flag so that we don't try to connect to other radios - _radioConnected = true; - - // save a reference to the radio - _radio = radio; - - // attach Slice event handlers - _radio.SliceAdded += new Radio.SliceAddedEventHandler(_radio_SliceAdded); - _radio.SliceRemoved += new Radio.SliceRemovedEventHandler(_radio_SliceRemoved); - - // connect to the radio - _radio.Connect(); - } - - void API_RadioRemoved(Radio radio) - { - - } - - //************************************* - // Radio Event Handlers - //************************************* - - void _radio_SliceAdded(Slice slc) - { - //if(_slices.Contains(slc)) return; - - //_slices.Add(slc); - - slc.PropertyChanged += new PropertyChangedEventHandler(slc_PropertyChanged); - slc.WaveformStatusReceived += new Slice.WaveformStatusReceivedEventHandler(slc_WaveformStatusReceived); - - if (InvokeRequired) - { - Invoke(new MethodInvoker(delegate - { - CheckDemodMode(slc); - })); - } - else - { - CheckDemodMode(slc); - } - } - - void _radio_SliceRemoved(Slice slc) - { - if (_waveformSlices.Contains(slc)) - { - // yes -- tear down any GUI components - if (InvokeRequired) - { - Invoke(new MethodInvoker(delegate - { - RemoveWaveformSliceControls(slc); - })); - } - else - { - RemoveWaveformSliceControls(slc); - } - - // now remove it - _waveformSlices.Remove(slc); - } - - slc.PropertyChanged -= slc_PropertyChanged; - slc.WaveformStatusReceived -= slc_WaveformStatusReceived; - } - - //************************************* - // Slice Event Handlers - //************************************* - - void slc_PropertyChanged(object sender, PropertyChangedEventArgs e) - { - if (InvokeRequired) - { - Invoke(new MethodInvoker(delegate - { - slc_PropertyChanged(sender, e.PropertyName); - })); - } - else - { - slc_PropertyChanged(sender, e.PropertyName); - } - } - - void slc_PropertyChanged(object sender, string property_name) - { - Slice slc = sender as Slice; - if (slc == null) return; - - switch (property_name) - { - case "DemodMode": - // Is the mode set to FreeDV? - CheckDemodMode(slc); - break; - } - } - - private void CheckDemodMode(Slice slc) - { - if (slc.DemodMode == "D*FM") - { - // yes -- is this Slice already in the list? - if (!_waveformSlices.Contains(slc)) - { - // no -- lets go add it - _waveformSlices.Add(slc); - slc.SendWaveformCommand("status"); - - // now create GUI components to go with it - AddFDVSliceControls(slc); - } - } - else - { - // was this Slice in FreeDV mode before? - if (_waveformSlices.Contains(slc)) - { - // yes -- tear down any GUI components - RemoveWaveformSliceControls(slc); - - // now remove it - _waveformSlices.Remove(slc); - } - } - } - - - void slc_WaveformStatusReceived(Slice slc, string status) - { - string[] words = status.Split(' '); - - foreach (string kv in words) - { - string[] tokens = kv.Split('='); - - if (tokens.Length != 2) - { - continue; - } - - string key = tokens[0]; - string value = tokens[1]; - - value = value.Replace('\u007f', ' '); - Control c = null; - TextBox txtbox = null; - switch (key.ToLower()) - { - case "destination_rptr_rx": - c = FindControlByName(this, "destinationRptrOut" + slc.Index); - if (c == null) continue; - txtbox = c as TextBox; - if (txtbox == null) continue; - if (InvokeRequired) - { - - Invoke(new MethodInvoker(delegate - { - txtbox.Text = value; - })); - } - else - { - txtbox.Text = value; - } - break; - case "departure_rptr_rx": - c = FindControlByName(this, "departureRptrOut" + slc.Index); - if (c == null) continue; - txtbox = c as TextBox; - if (txtbox == null) continue; - if (InvokeRequired) - { - - Invoke(new MethodInvoker(delegate - { - txtbox.Text = value; - })); - } - else - { - txtbox.Text = value; - } - break; - case "companion_call_rx": - c = FindControlByName(this, "companionCallOut" + slc.Index); - if (c == null) continue; - txtbox = c as TextBox; - if (txtbox == null) continue; - if (InvokeRequired) - { - - Invoke(new MethodInvoker(delegate - { - txtbox.Text = value; - })); - } - else - { - txtbox.Text = value; - } - break; - case "own_call1_rx": - c = FindControlByName(this, "ownCall1Out" + slc.Index); - if (c == null) continue; - txtbox = c as TextBox; - if (txtbox == null) continue; - if (InvokeRequired) - { - - Invoke(new MethodInvoker(delegate - { - txtbox.Text = value; - })); - } - else - { - txtbox.Text = value; - } - break; - case "own_call2_rx": - c = FindControlByName(this, "ownCall2Out" + slc.Index); - if (c == null) continue; - txtbox = c as TextBox; - if (txtbox == null) continue; - if (InvokeRequired) - { - - Invoke(new MethodInvoker(delegate - { - txtbox.Text = value; - })); - } - else - { - txtbox.Text = value; - } - break; - case "destination_rptr_tx": - c = FindControlByName(this, "destinationRptrIn" + slc.Index); - if (c == null) continue; - txtbox = c as TextBox; - if (txtbox == null) continue; - if (InvokeRequired) - { - - Invoke(new MethodInvoker(delegate - { - txtbox.Text = value; - })); - } - else - { - txtbox.Text = value; - } - break; - case "departure_rptr_tx": - c = FindControlByName(this, "departureRptrIn" + slc.Index); - if (c == null) continue; - txtbox = c as TextBox; - if (txtbox == null) continue; - if (InvokeRequired) - { - - Invoke(new MethodInvoker(delegate - { - txtbox.Text = value; - })); - } - else - { - txtbox.Text = value; - } - break; - case "companion_call_tx": - c = FindControlByName(this, "companionCallIn" + slc.Index); - if (c == null) continue; - txtbox = c as TextBox; - if (txtbox == null) continue; - if (InvokeRequired) - { - - Invoke(new MethodInvoker(delegate - { - txtbox.Text = value; - })); - } - else - { - txtbox.Text = value; - } - break; - case "own_call1_tx": - c = FindControlByName(this, "ownCall1In" + slc.Index); - if (c == null) continue; - txtbox = c as TextBox; - if (txtbox == null) continue; - if (InvokeRequired) - { - - Invoke(new MethodInvoker(delegate - { - txtbox.Text = value; - })); - } - else - { - txtbox.Text = value; - } - break; - case "own_call2_tx": - c = FindControlByName(this, "ownCall2In" + slc.Index); - if (c == null) continue; - txtbox = c as TextBox; - if (txtbox == null) continue; - if (InvokeRequired) - { - - Invoke(new MethodInvoker(delegate - { - txtbox.Text = value; - })); - } - else - { - txtbox.Text = value; - } - break; - } - } - } - - - - - - //************************************* - // GUI Routines - //************************************* - - private void AddFDVSliceControls(Slice slc) - { - lock (this) - { - int index = _waveformSlices.IndexOf(slc); - label1.Visible = false; - - int vertical_offset = 30; - - this.SuspendLayout(); - - Label myInfo = new Label(); - myInfo.Text = "MY INFO"; - Label rxInfo = new Label(); - rxInfo.Text = "RX INFO"; - - Label destinationRptrInLabel = new Label(); - destinationRptrInLabel.Text = "Destination Repeater:"; - destinationRptrInLabel.Anchor = AnchorStyles.Left; - Label departureRptrInLabel = new Label(); - departureRptrInLabel.Text = "Departure Repeater:"; - Label companionCallInLabel = new Label(); - companionCallInLabel.Text = "Companion Call:"; - Label ownCall1InLabel = new Label(); - ownCall1InLabel.Text = "Own Call 1:"; - Label ownCall2InLabel = new Label(); - ownCall2InLabel.Text = "Own Call 2:"; - - TextBox destinationRptrIn = new TextBox(); - TextBox departureRptrIn = new TextBox(); - TextBox companionCallIn = new TextBox(); - TextBox ownCall1In = new TextBox(); - TextBox ownCall2In = new TextBox(); - - Label destinationRptrOutLabel = new Label(); - destinationRptrOutLabel.Text = "Destination Repeater:"; - Label departureRptrOutLabel = new Label(); - departureRptrOutLabel.Text = "Departure Repeater:"; - Label companionCallOutLabel = new Label(); - companionCallOutLabel.Text = "Companion Call:"; - Label ownCall1OutLabel = new Label(); - ownCall1OutLabel.Text = "Own Call 1:"; - Label ownCall2OutLabel = new Label(); - ownCall2OutLabel.Text = "Own Call 2:"; - - TextBox destinationRptrOut = new TextBox(); - TextBox departureRptrOut = new TextBox(); - TextBox companionCallOut = new TextBox(); - TextBox ownCall1Out = new TextBox(); - TextBox ownCall2Out = new TextBox(); - - GroupBox groupbox = new GroupBox(); - groupbox.SuspendLayout(); - // - // groupBox - // - - groupbox.Controls.Add(myInfo); - groupbox.Controls.Add(rxInfo); - - groupbox.Controls.Add(destinationRptrInLabel); - groupbox.Controls.Add(departureRptrInLabel); - groupbox.Controls.Add(companionCallInLabel); - groupbox.Controls.Add(ownCall1InLabel); - groupbox.Controls.Add(ownCall2InLabel); - groupbox.Controls.Add(destinationRptrIn); - groupbox.Controls.Add(departureRptrIn); - groupbox.Controls.Add(companionCallIn); - groupbox.Controls.Add(ownCall1In); - groupbox.Controls.Add(ownCall2In); - - groupbox.Controls.Add(destinationRptrOutLabel); - groupbox.Controls.Add(departureRptrOutLabel); - groupbox.Controls.Add(companionCallOutLabel); - groupbox.Controls.Add(ownCall1OutLabel); - groupbox.Controls.Add(ownCall2OutLabel); - groupbox.Controls.Add(destinationRptrOut); - groupbox.Controls.Add(departureRptrOut); - groupbox.Controls.Add(companionCallOut); - groupbox.Controls.Add(ownCall1Out); - groupbox.Controls.Add(ownCall2Out); - - groupbox.Location = new Point(10, 10 + index * 220); - groupbox.Name = "grpSlice" + index; - groupbox.Size = new Size(500, 220); - groupbox.Text = "Slice " + SliceIndexToLetter(slc.Index); - - - - myInfo.Location = new Point(75, 30); - myInfo.Size = new Size(100, 20); - myInfo.TextAlign = ContentAlignment.MiddleCenter; - - - rxInfo.Location = new Point(325, 30); - rxInfo.Size = new Size(100, 20); - rxInfo.TextAlign = ContentAlignment.MiddleCenter; - - // - // destinationRptrIn - // - destinationRptrInLabel.Location = new Point(10, 30 + vertical_offset); - destinationRptrInLabel.Size = new Size(120, 20); - destinationRptrIn.Location = new Point(130, 30 + vertical_offset); - destinationRptrIn.Name = "destinationRptrIn" + slc.Index; - destinationRptrIn.Size = new Size(100, 20); - destinationRptrIn.PreviewKeyDown += new PreviewKeyDownEventHandler(txtIn_PreviewKeyDown); - // - // departureRptrIn - - departureRptrInLabel.Location = new Point(10, 60 + vertical_offset); - departureRptrInLabel.Size = new Size(120, 20); - departureRptrIn.Location = new Point(130, 60 + vertical_offset); - departureRptrIn.Name = "departureRptrIn" + slc.Index; - departureRptrIn.Size = new Size(100, 20); - departureRptrIn.PreviewKeyDown += new PreviewKeyDownEventHandler(txtIn_PreviewKeyDown); - - companionCallInLabel.Location = new Point(10, 90 + vertical_offset); - companionCallInLabel.Size = new Size(120, 20); - companionCallIn.Location = new Point(130, 90 + vertical_offset); - companionCallIn.Name = "companionCallIn" + slc.Index; - companionCallIn.Size = new Size(100, 20); - companionCallIn.PreviewKeyDown += new PreviewKeyDownEventHandler(txtIn_PreviewKeyDown); - - ownCall1InLabel.Location = new Point(10, 120 + vertical_offset); - ownCall1InLabel.Size = new Size(120, 20); - ownCall1In.Location = new Point(130, 120 + vertical_offset); - ownCall1In.Name = "ownCall1In" + slc.Index; - ownCall1In.Size = new Size(100, 20); - ownCall1In.PreviewKeyDown += new PreviewKeyDownEventHandler(txtIn_PreviewKeyDown); - - ownCall2InLabel.Location = new Point(10, 150 + vertical_offset); - ownCall2InLabel.Size = new Size(120, 20); - ownCall2In.Location = new Point(130, 150 + vertical_offset); - ownCall2In.Name = "ownCall2In" + slc.Index; - ownCall2In.Size = new Size(100, 20); - ownCall2In.PreviewKeyDown += new PreviewKeyDownEventHandler(txtIn_PreviewKeyDown); - - /* OUT indicates it get's retrieved by the radio */ - - destinationRptrOutLabel.Location = new Point(250, 30 + vertical_offset); - destinationRptrOutLabel.Size = new Size(120, 20); - destinationRptrOut.Location = new Point(250 + 120, 30 + vertical_offset); - destinationRptrOut.Name = "destinationRptrOut" + slc.Index; - destinationRptrOut.Size = new Size(100, 20); - destinationRptrOut.ReadOnly = true; - - departureRptrOutLabel.Location = new Point(250, 60 + vertical_offset); - departureRptrOutLabel.Size = new Size(120, 20); - departureRptrOut.Location = new Point(250 + 120, 60 + vertical_offset); - departureRptrOut.Name = "departureRptrOut" + slc.Index; - departureRptrOut.Size = new Size(100, 20); - departureRptrOut.ReadOnly = true; - - companionCallOutLabel.Location = new Point(250, 90 + vertical_offset); - companionCallOutLabel.Size = new Size(120, 20); - companionCallOut.Location = new Point(250 + 120, 90 + vertical_offset); - companionCallOut.Name = "companionCallOut" + slc.Index; - companionCallOut.Size = new Size(100, 20); - companionCallOut.ReadOnly = true; - - ownCall1OutLabel.Location = new Point(250, 120 + vertical_offset); - ownCall1OutLabel.Size = new Size(120, 20); - ownCall1Out.Location = new Point(250 + 120, 120 + vertical_offset); - ownCall1Out.Name = "ownCall1Out" + slc.Index; - ownCall1Out.Size = new Size(100, 20); - ownCall1Out.ReadOnly = true; - - ownCall2OutLabel.Location = new Point(250, 150 + vertical_offset); - ownCall2OutLabel.Size = new Size(120, 20); - ownCall2Out.Location = new Point(250 + 120, 150 + vertical_offset); - ownCall2Out.Name = "ownCall2Out" + slc.Index; - ownCall2Out.Size = new Size(100, 20); - ownCall2Out.ReadOnly = true; - - // - // Form1 - // - if (groupbox.Bottom > this.Height) - this.Height += 180; - this.Controls.Add(groupbox); - groupbox.ResumeLayout(); - this.ResumeLayout(false); - this.PerformLayout(); - } - } - - void txtIn_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e) - { - if (e.KeyCode != Keys.Enter && e.KeyCode != Keys.Tab) return; - - TextBox txt = sender as TextBox; - if (txt == null) return; - - string text = txt.Name.Substring(0, txt.Name.Length - 1); - string slice = txt.Name.Substring(txt.Name.Length - 1, 1); - int slice_index = 0; - bool b = Int32.TryParse(slice, out slice_index); - if (!b) - { - return; - } - - txt.Text = txt.Text.ToUpper(); - - string cmd = ""; - - switch (text) - { - case "destinationRptrIn": - cmd = "set destination_rptr=" + txt.Text.Replace(" ", "\u007f"); - break; - case "departureRptrIn": - cmd = "set departure_rptr=" + txt.Text.Replace(" ", "\u007f"); - break; - case "companionCallIn": - cmd = "set companion_call=" + txt.Text.Replace(" ", "\u007f"); - break; - case "ownCall1In": - cmd = "set own_call1=" + txt.Text.Replace(" ", "\u007f"); - break; - case "ownCall2In": - cmd = "set own_call2=" + txt.Text.Replace(" ", "\u007f"); - break; - default: - break; - } - - if (cmd == "") - return; - // first we need to find the slice that goes with this control - foreach(Slice slc in _waveformSlices) - { - if (slc.Index == slice_index) - { - // now that we have found the slice, we need to send a waveform command to set the string - slc.SendWaveformCommand(cmd); - return; - } - } - } - - private void RemoveWaveformSliceControls(Slice slc) - { - lock (this) - { - this.SuspendLayout(); - - int index = _waveformSlices.IndexOf(slc); - - // find the right groupbox and remove it - for (int i = 0; i < this.Controls.Count; i++) - { - Control c = this.Controls[i]; - GroupBox groupbox = c as GroupBox; - if (groupbox == null) continue; - - int temp; - bool b = int.TryParse(groupbox.Name.Substring("grpSlice".Length), out temp); - - if (!b) continue; - - // is this the one we are looking for? - if (temp == index) - { - // yes -- remove the whole groupbox - this.Controls.Remove(groupbox); - i--; - - // detach the PreviewKeyDown event - foreach (Control c2 in groupbox.Controls) - { - if (c2.Name.Contains("In")) - { - TextBox txt = c2 as TextBox; - txt.PreviewKeyDown -= txtIn_PreviewKeyDown; - } - } - groupbox.Controls.Clear(); - } - // is this one below the one we are removing? - else if (temp > index) - { - // yes -- move it on up - groupbox.Top -= 180; - groupbox.Name = "grpSlice" + (temp - 1); - } - } - - if (_waveformSlices.Count == 1) - label1.Visible = true; - - this.ResumeLayout(false); - this.PerformLayout(); - } - } - - private Control FindControlByName(Control start_control, string name) - { - foreach (Control c in start_control.Controls) - { - if (c.Name == name) return c; - - if (c.GetType() == typeof(GroupBox)) - { - Control result = FindControlByName(c, name); - if (result != null) return result; - } - } - - return null; - } - - //************************************* - // GUI Routines - //************************************* - - private string SliceIndexToLetter(int index) - { - return Convert.ToChar('A' + index).ToString(); - } - } - - public class VerticalProgressBar : ProgressBar - { - protected override CreateParams CreateParams - { - get - { - CreateParams cp = base.CreateParams; - cp.Style |= 0x04; - return cp; - } - } - } -} diff --git a/pc/CODEC2 GUI/CODEC2 GUI/Images/FDVLogo.ico b/pc/CODEC2 GUI/CODEC2 GUI/Images/FDVLogo.ico deleted file mode 100644 index 89bca5295335c376ef60f81d97b2282462738807..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 25464 zcmeHv2UJwa(*KR?-V8Z*lCEK_uM{d%@3{X z*H`{T#Ji! zQoJM1e<*LGCo6%aU*N!{%Uc7Io?N=#mhUhiea1K=iwNKFu`;Q`l6U)&AuhkmxQZoF1E&v))*R;Ffg5n-eII>6hAEoR zl|S)nH>1EgbLz(ICr`?baA0I8OLp+wN`8X~_CA&2LC`PDpiW^+0##Gg<1+%LMJx1+h=NG|h9ZZ=mXIG$*QQ4wZyVjTVX?IQxAMbA% zKf5Bqs#IJ3Lc>Z?!zjKh zB3XB}>C$tz`z#D|8)PnDVyP9Qoie(zVd)}|oWY2fX^Nf>Qtc<6Jlw^X%uX+IG+H;L zyqRKt;726%Vq&mV1UG*|^X^I9a-P2Q#D_Ec8uER9bbQ1$q{!>LYr9oUub$TBm>3== zN2(sul|P+#iBpZ&&2wFE$?3soZ^jCf6|~uS>t?IvyTb=hknFcFGT4yQYGr(Y>?2sy zP}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Fo7TMFl-9iX>#edd1_$~j{Y6!gW? z(R+AOQWvpzln#ZU;BMgMioNskd3@G~xcID2o=;a&ssech;l5KE=p2=p&Y`4KIiD{nnE-W&fS%J1bIJ<4Bc`kS4CDXx-Ahf) z7LZLBcu=8zf4P^5>M%6gLAXQm40IbK&@DZ&cQif+c6I|u-vNDV4dc=W?hCwtyobMm zq2Y5l?|1wv9n~jLdNdC$GZ#nG=3rp(1oGOTotJ?uyXZ@n{QOP8%ew;lVmF+_-+mMD z^RI-l;s4Fp&k=L}3^q7V$MEqP4@yY5f-S}UF9FVoFsHPh z0^faeyhBju8S3!)22Tj^MbBZVdq^BGcMda}`zlEL;vpf3NFW~X&;!4HAI0N0{RvPS zJNVr^?{?sU$Kj+;kVvUuANt?@9-2ft4d)O6A2NB{vs0Noi#FNF1V2ZZ_XTZC3vN2;KG9I$t8 zZV&iYKltY5Se&2VAJ*YG*bl6L?gH%1;jkxV!#=wcY;EY>_iosW>fsw#L%a;=EU+{I z0WYX83F;1jbub?CmqDG57{tVaA>9|g!4iwJvo8i71=yaYqEdz3U)Iv<0GahbXWRvR z6Jf7-Lf6;t#DMM*hK5h)<3>gU;M;!zcBUQ(|8;lP(6AR|2m;;j9Npaf&0m6y%n|sW zl)t==%gY}HyIai6U%eA0Cl~aZhsQ9*#^xoglhgkzSX*~OKPn!9Imp7zt(&Bxa%^(Z Zq6DxL{yCJDLq|9`RKlSw%>Dn{^FQJc_0IqR diff --git a/pc/CODEC2 GUI/CODEC2 GUI/Images/dstar.ico b/pc/CODEC2 GUI/CODEC2 GUI/Images/dstar.ico new file mode 100644 index 0000000000000000000000000000000000000000..822a59ea90812e1fb980540d0403f18746824037 GIT binary patch literal 9662 zcmeHMX>?WP6}|VqAs}F}3^F)Sk%}M%id9NLKmw6~8Kf?h)CR$T1`yg*DhUL{Xmq)- z43$vElqSN`+88E543t5JkVH@!v=oa%7+Na`8Q-vb&b|5azWcpgl7C%qtzOsWo^PLh z_SyHo_uz+`rqh4@`f2o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4QRHgSr;PesHZk%V+RA-Nd|45O^aUJ~jJoqkrRL-{}*Ypv6zOyHL^A4vy z+~-+&F06j)R#e^qwFO!Hn&A5&7d6YCF=4(ps>NL3@78xq?lUL))i1@F&&V8W*o!ar z78-RAYt8pUvqIC@z3PchXbQE9QxW(w^!?{^bz1+1Ij)%#m)d9lnt5a3+p@xxuor98 zz08R{tmPS16Lucg8C4OC>V(dSXvB3vbp)ekWLK!Dd;U={R9-!sx|gS-t})clH`eAvJcXE$4!dGOejlLZ!0=u?= zq4MgvIXceioBM2&Uct{w%}1)6k`Sh4jxW}z8EPM-{0ageQGSBTtLNtEc&{&m@+&*k zbKRp4Aoyu1f*0v?m`u-5ujiUM?y*Mj4fmhkfm#KDos^%T^6I%cIy3+5=bH2q-oayK zJc7EE1QT2{C;IBWuFsuN5!gZb2`aCio1^3X{`9may@aQr(Q$r%8f8^>G3{ax;Yir{9-Pf&UF+#DV64osQe zq*q| + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm)); + this.lblNoDstar = new System.Windows.Forms.Label(); + this.sliceFlow = new System.Windows.Forms.FlowLayoutPanel(); + this.menuStrip1 = new System.Windows.Forms.MenuStrip(); + this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.reloadDStarRepeaterListToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.reloadDStarInfoRelectorListToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.closeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.editToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.clearURListToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.logList = new System.Windows.Forms.ListBox(); + this.splitContainer1 = new System.Windows.Forms.SplitContainer(); + this.toolStripContainer1 = new System.Windows.Forms.ToolStripContainer(); + this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); + this.saveLogToFileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); + this.menuStrip1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); + this.splitContainer1.Panel1.SuspendLayout(); + this.splitContainer1.Panel2.SuspendLayout(); + this.splitContainer1.SuspendLayout(); + this.toolStripContainer1.ContentPanel.SuspendLayout(); + this.toolStripContainer1.TopToolStripPanel.SuspendLayout(); + this.toolStripContainer1.SuspendLayout(); + this.SuspendLayout(); + // + // lblNoDstar + // + this.lblNoDstar.Anchor = System.Windows.Forms.AnchorStyles.None; + this.lblNoDstar.AutoSize = true; + this.lblNoDstar.Location = new System.Drawing.Point(196, 24); + this.lblNoDstar.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.lblNoDstar.Name = "lblNoDstar"; + this.lblNoDstar.Size = new System.Drawing.Size(241, 21); + this.lblNoDstar.TabIndex = 4; + this.lblNoDstar.Text = "No DSTAR (DSTR) Slice"; + // + // sliceFlow + // + this.sliceFlow.AutoScroll = true; + this.sliceFlow.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.sliceFlow.Dock = System.Windows.Forms.DockStyle.Fill; + this.sliceFlow.Location = new System.Drawing.Point(0, 0); + this.sliceFlow.Name = "sliceFlow"; + this.sliceFlow.Size = new System.Drawing.Size(682, 200); + this.sliceFlow.TabIndex = 1; + this.sliceFlow.TabStop = true; + // + // menuStrip1 + // + this.menuStrip1.Dock = System.Windows.Forms.DockStyle.None; + this.menuStrip1.ImageScalingSize = new System.Drawing.Size(20, 20); + this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.fileToolStripMenuItem, + this.editToolStripMenuItem}); + this.menuStrip1.Location = new System.Drawing.Point(0, 0); + this.menuStrip1.Name = "menuStrip1"; + this.menuStrip1.Size = new System.Drawing.Size(682, 28); + this.menuStrip1.TabIndex = 0; + this.menuStrip1.Text = "menuStrip1"; + // + // fileToolStripMenuItem + // + this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.reloadDStarRepeaterListToolStripMenuItem, + this.reloadDStarInfoRelectorListToolStripMenuItem, + this.toolStripSeparator1, + this.saveLogToFileToolStripMenuItem, + this.toolStripSeparator2, + this.closeToolStripMenuItem}); + this.fileToolStripMenuItem.Name = "fileToolStripMenuItem"; + this.fileToolStripMenuItem.Size = new System.Drawing.Size(44, 24); + this.fileToolStripMenuItem.Text = "&File"; + // + // reloadDStarRepeaterListToolStripMenuItem + // + this.reloadDStarRepeaterListToolStripMenuItem.Name = "reloadDStarRepeaterListToolStripMenuItem"; + this.reloadDStarRepeaterListToolStripMenuItem.Size = new System.Drawing.Size(262, 26); + this.reloadDStarRepeaterListToolStripMenuItem.Text = "Reload DStar Repeater List"; + this.reloadDStarRepeaterListToolStripMenuItem.Click += new System.EventHandler(this.reloadDStarRepeaterListToolStripMenuItem_Click); + // + // reloadDStarInfoRelectorListToolStripMenuItem + // + this.reloadDStarInfoRelectorListToolStripMenuItem.Name = "reloadDStarInfoRelectorListToolStripMenuItem"; + this.reloadDStarInfoRelectorListToolStripMenuItem.Size = new System.Drawing.Size(262, 26); + this.reloadDStarInfoRelectorListToolStripMenuItem.Text = "Reload DStar Relector List"; + this.reloadDStarInfoRelectorListToolStripMenuItem.Click += new System.EventHandler(this.reloadDStarInfoRelectorListToolStripMenuItem_Click); + // + // closeToolStripMenuItem + // + this.closeToolStripMenuItem.Name = "closeToolStripMenuItem"; + this.closeToolStripMenuItem.Size = new System.Drawing.Size(262, 26); + this.closeToolStripMenuItem.Text = "&Close"; + this.closeToolStripMenuItem.Click += new System.EventHandler(this.closeToolStripMenuItem_Click); + // + // editToolStripMenuItem + // + this.editToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.clearURListToolStripMenuItem}); + this.editToolStripMenuItem.Name = "editToolStripMenuItem"; + this.editToolStripMenuItem.Size = new System.Drawing.Size(47, 24); + this.editToolStripMenuItem.Text = "&Edit"; + // + // clearURListToolStripMenuItem + // + this.clearURListToolStripMenuItem.Name = "clearURListToolStripMenuItem"; + this.clearURListToolStripMenuItem.Size = new System.Drawing.Size(186, 26); + this.clearURListToolStripMenuItem.Text = "Clear MRU Lists"; + this.clearURListToolStripMenuItem.Click += new System.EventHandler(this.clearURListToolStripMenuItem_Click); + // + // logList + // + this.logList.Dock = System.Windows.Forms.DockStyle.Fill; + this.logList.FormattingEnabled = true; + this.logList.IntegralHeight = false; + this.logList.ItemHeight = 20; + this.logList.Location = new System.Drawing.Point(0, 0); + this.logList.Name = "logList"; + this.logList.ScrollAlwaysVisible = true; + this.logList.Size = new System.Drawing.Size(682, 121); + this.logList.TabIndex = 2; + // + // splitContainer1 + // + this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; + this.splitContainer1.Location = new System.Drawing.Point(0, 0); + this.splitContainer1.Name = "splitContainer1"; + this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal; + // + // splitContainer1.Panel1 + // + this.splitContainer1.Panel1.Controls.Add(this.lblNoDstar); + this.splitContainer1.Panel1.Controls.Add(this.sliceFlow); + this.splitContainer1.Panel1MinSize = 200; + // + // splitContainer1.Panel2 + // + this.splitContainer1.Panel2.Controls.Add(this.logList); + this.splitContainer1.Panel2MinSize = 50; + this.splitContainer1.Size = new System.Drawing.Size(682, 325); + this.splitContainer1.SplitterDistance = 200; + this.splitContainer1.TabIndex = 0; + // + // toolStripContainer1 + // + // + // toolStripContainer1.ContentPanel + // + this.toolStripContainer1.ContentPanel.Controls.Add(this.splitContainer1); + this.toolStripContainer1.ContentPanel.Size = new System.Drawing.Size(682, 325); + this.toolStripContainer1.Dock = System.Windows.Forms.DockStyle.Fill; + this.toolStripContainer1.Location = new System.Drawing.Point(0, 0); + this.toolStripContainer1.Name = "toolStripContainer1"; + this.toolStripContainer1.Size = new System.Drawing.Size(682, 353); + this.toolStripContainer1.TabIndex = 1; + this.toolStripContainer1.Text = "toolStripContainer1"; + // + // toolStripContainer1.TopToolStripPanel + // + this.toolStripContainer1.TopToolStripPanel.Controls.Add(this.menuStrip1); + // + // toolStripSeparator1 + // + this.toolStripSeparator1.Name = "toolStripSeparator1"; + this.toolStripSeparator1.Size = new System.Drawing.Size(259, 6); + // + // saveLogToFileToolStripMenuItem + // + this.saveLogToFileToolStripMenuItem.Name = "saveLogToFileToolStripMenuItem"; + this.saveLogToFileToolStripMenuItem.Size = new System.Drawing.Size(262, 26); + this.saveLogToFileToolStripMenuItem.Text = "&Save Log to File..."; + this.saveLogToFileToolStripMenuItem.Click += new System.EventHandler(this.saveLogToFileToolStripMenuItem_Click); + // + // toolStripSeparator2 + // + this.toolStripSeparator2.Name = "toolStripSeparator2"; + this.toolStripSeparator2.Size = new System.Drawing.Size(259, 6); + // + // MainForm + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + this.ClientSize = new System.Drawing.Size(682, 353); + this.Controls.Add(this.toolStripContainer1); + this.Font = new System.Drawing.Font("Courier New", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.MainMenuStrip = this.menuStrip1; + this.Margin = new System.Windows.Forms.Padding(4); + this.MinimumSize = new System.Drawing.Size(200, 200); + this.Name = "MainForm"; + this.Text = "FLEX 6000 DSTAR"; + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing); + this.Load += new System.EventHandler(this.Form1_Load); + this.menuStrip1.ResumeLayout(false); + this.menuStrip1.PerformLayout(); + this.splitContainer1.Panel1.ResumeLayout(false); + this.splitContainer1.Panel1.PerformLayout(); + this.splitContainer1.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); + this.splitContainer1.ResumeLayout(false); + this.toolStripContainer1.ContentPanel.ResumeLayout(false); + this.toolStripContainer1.TopToolStripPanel.ResumeLayout(false); + this.toolStripContainer1.TopToolStripPanel.PerformLayout(); + this.toolStripContainer1.ResumeLayout(false); + this.toolStripContainer1.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Label lblNoDstar; + private System.Windows.Forms.FlowLayoutPanel sliceFlow; + private System.Windows.Forms.ListBox logList; + private System.Windows.Forms.SplitContainer splitContainer1; + private System.Windows.Forms.MenuStrip menuStrip1; + private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem closeToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem editToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem clearURListToolStripMenuItem; + private System.Windows.Forms.ToolStripContainer toolStripContainer1; + private System.Windows.Forms.ToolStripMenuItem reloadDStarInfoRelectorListToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem reloadDStarRepeaterListToolStripMenuItem; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; + private System.Windows.Forms.ToolStripMenuItem saveLogToFileToolStripMenuItem; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator2; + } +} + diff --git a/pc/CODEC2 GUI/CODEC2 GUI/MainForm.cs b/pc/CODEC2 GUI/CODEC2 GUI/MainForm.cs new file mode 100644 index 0000000..3caa146 --- /dev/null +++ b/pc/CODEC2 GUI/CODEC2 GUI/MainForm.cs @@ -0,0 +1,323 @@ +/******************************************************************************* + * MainForm.cs + * + * An example GUI showing how to interface to the FlexRadio Modem API + * + * Created on: 2014-08-28 + * Author: Eric / KE5DTO + * + * Enhancements: Mark Hanson / AA3RK / MKCM Software, LLC. + * + ******************************************************************************* + * + * Copyright (C) 2014 FlexRadio Systems. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + * Contact: gplflexradiocom or + * + * GPL C/O FlexRadio Systems + * 4616 W. Howard Lane + * Suite 1-150 + * Austin, TX USA 78728 + * + ******************************************************************************/ + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Diagnostics; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; + +using Flex.Smoothlake.FlexLib; +using System.IO; + +namespace CODEC2_GUI +{ + public partial class MainForm : Form + { + private bool _radioConnected = false; + private Radio _radio = null; + public BindingList LogQueue { get; set; } + + public MainForm() + { + InitializeComponent(); + + + + } + + private void Form1_FormClosing(object sender, FormClosingEventArgs e) + { + if (this.WindowState == FormWindowState.Normal) + Properties.Settings.Default.MainPosition = + string.Format("{0},{1},{2},{3},{4}", + this.Left, this.Top, this.Width, this.Height, + splitContainer1.SplitterDistance); + + Properties.Settings.Default.Save(); + } + + + private void Form1_Load(object sender, EventArgs e) + { + // not complete code + reloadDStarRepeaterListToolStripMenuItem.Visible = false; + + // end not complete code + + + + + if (!string.IsNullOrEmpty(Properties.Settings.Default.MainPosition)) + { + string[] cords = Properties.Settings.Default.MainPosition.Split(','); + if (cords.Length == 5) + { + this.Left = Convert.ToInt32(cords[0]); + this.Top = Convert.ToInt32(cords[1]); + this.Width = Convert.ToInt32(cords[2]); + this.Height = Convert.ToInt32(cords[3]); + splitContainer1.SplitterDistance = Convert.ToInt32(cords[4]); + } + } + + API.RadioAdded += new API.RadioAddedEventHandler(API_RadioAdded); + API.RadioRemoved += new API.RadioRemovedEventHandler(API_RadioRemoved); + API.Init(); + + LogQueue = new BindingList(); + logList.DataSource = LogQueue; + + } + + + //************************************* + // API Event Handlers + //************************************* + + void API_RadioAdded(Radio radio) + { + // if we have already connected to another radio, ignore this one + if(_radioConnected) return; + + // set the flag so that we don't try to connect to other radios + _radioConnected = true; + + // save a reference to the radio + _radio = radio; + + // attach Slice event handlers + _radio.SliceAdded += new Radio.SliceAddedEventHandler(_radio_SliceAdded); + _radio.SliceRemoved += new Radio.SliceRemovedEventHandler(_radio_SliceRemoved); + + // connect to the radio + _radio.Connect(); + } + + void API_RadioRemoved(Radio radio) + { + //sliceFlow.Controls.Clear(); + } + + //************************************* + // Radio Event Handlers + //************************************* + + void _radio_SliceAdded(Slice slc) + { + if (InvokeRequired) + { + Invoke(new MethodInvoker(delegate + { + _radio_SliceAdded(slc); + })); + return; + } + + // get existing DStar list items + List lst = new List(sliceFlow.Controls.Cast()); + sliceFlow.Controls.Clear(); + // create new item + dstarlistitem dli = new dstarlistitem(); + dli.slice = slc; + dli.LogEvent += Dli_LogEvent; + lst.Add(dli); + // sort items by slice index + lst.Sort((dstarlistitem x, dstarlistitem y) => { return x.slice.Index - y.slice.Index; }); + // update flow control + sliceFlow.Controls.AddRange(lst.ToArray()); + // set no slice indicator + lblNoDstar.Visible = sliceFlow.Controls.Count == 0; + } + + private void Dli_LogEvent(object sender, LogEventArgs e) + { + // current selection + int sel = logList.SelectedIndex; + int maxlogsentry = Properties.Settings.Default.LogEntryMax; + while (LogQueue.Count > maxlogsentry) + { + LogQueue.RemoveAt(maxlogsentry); + } + if (LogQueue.Count == 0) + LogQueue.Add(e.LogEntry); + else + LogQueue.Insert(0, e.LogEntry); + // maintain top selected item if was selected or no selection + if (logList.SelectedIndex == -1 || sel == 0) + logList.SelectedIndex = 0; + } + + void _radio_SliceRemoved(Slice slc) + { + if (InvokeRequired) + { + Invoke(new MethodInvoker(delegate + { + _radio_SliceRemoved(slc); + })); + return; + } + + foreach (dstarlistitem dli in sliceFlow.Controls) + { + if (dli.slice == slc) + { + dli.LogEvent -= Dli_LogEvent; + dli.slice = null; + sliceFlow.Controls.Remove(dli); + break; + } + } + // set no slice indicator + lblNoDstar.Visible = sliceFlow.Controls.Count == 0; + } + + + private void closeToolStripMenuItem_Click(object sender, EventArgs e) + { + Close(); + } + + private void clearURListToolStripMenuItem_Click(object sender, EventArgs e) + { + Properties.Settings.Default.URList = string.Empty; + Properties.Settings.Default.RPT1List = string.Empty; + Properties.Settings.Default.RPT2List = string.Empty; + Properties.Settings.Default.Save(); + + foreach(dstarlistitem dli in sliceFlow.Controls) + { + dli.ClearMYList(); + dli.ClearRPT1List(); + dli.ClearRPT2List(); + } + + } + + + private void reloadDStarInfoRelectorListToolStripMenuItem_Click(object sender, EventArgs e) + { + try + { + DstarInfo di = new DstarInfo(); + di.FetchAndSaveReflectorList(); + SelectForm sf = new SelectForm(); + sf.showOnly = true; + sf.Mode = SelectForm.RMode.Reflector; + sf.Owner = this; + sf.Show(); + } + catch(Exception ex) + { + StringBuilder sb = new StringBuilder(); + Exception ex1 = ex; + while(ex1 != null) + { + sb.AppendLine(ex1.Message); + ex1 = ex1.InnerException; + } + MessageBox.Show(sb.ToString(), "Load DSTARINFO Error!", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); + } + } + + private void reloadDStarRepeaterListToolStripMenuItem_Click(object sender, EventArgs e) + { + try + { + DstarInfo di = new DstarInfo(); + di.FetchAndSaveRepeaterList(); + SelectForm sf = new SelectForm(); + sf.showOnly = true; + sf.Mode = SelectForm.RMode.Repeater; + sf.Owner = this; + sf.Show(); + } + catch (Exception ex) + { + StringBuilder sb = new StringBuilder(); + Exception ex1 = ex; + while (ex1 != null) + { + sb.AppendLine(ex1.Message); + ex1 = ex1.InnerException; + } + MessageBox.Show(sb.ToString(), "Load DSTARINFO Error!", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); + } + } + + private void saveLogToFileToolStripMenuItem_Click(object sender, EventArgs e) + { + if (LogQueue.Count() == 0) + { + MessageBox.Show(this, "There are no log entries!", "Save Log Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning); + return; + } + SaveFileDialog sfd = new SaveFileDialog(); + sfd.OverwritePrompt = true; + sfd.DefaultExt = ".TXT"; + sfd.Filter = "Text (*.TXT)|.TXT\0"; + sfd.Title = "Save Log File"; + sfd.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments); + if (sfd.ShowDialog() == DialogResult.OK) + { + using (StreamWriter sw = File.CreateText(sfd.FileName)) + { + foreach (string str in LogQueue) + { + sw.WriteLine(str); + } + sw.Close(); + } + } + } + } + + + + public class VerticalProgressBar : ProgressBar + { + protected override CreateParams CreateParams + { + get + { + CreateParams cp = base.CreateParams; + cp.Style |= 0x04; + return cp; + } + } + } +} diff --git a/pc/CODEC2 GUI/CODEC2 GUI/MainForm.resx b/pc/CODEC2 GUI/CODEC2 GUI/MainForm.resx new file mode 100644 index 0000000..8733b00 --- /dev/null +++ b/pc/CODEC2 GUI/CODEC2 GUI/MainForm.resx @@ -0,0 +1,290 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + + + + AAABAAEAMDAAAAEAIACoJQAAFgAAACgAAAAwAAAAYAAAAAEAIAAAAAAAgCUAAAAAAAAAAAAAAAAAAAAA + AADp6QD/6ekA/+npAP/p6QD/6ekA/+npAP/p6QD/6ekA/+npAP/p6QD/6ekA/+npAP/p6QD/6ekA/+np + AP/p6QD/6ekA/+npAP/p6QD/6ekA/+npAP/p6QD/6ekA/+npAP/p6QD/6ekA/+npAP/p6QD/6ekA/+np + AP/p6QD/6ekA/+npAP/p6QD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8AAAD/AAAA/wAA + AP9fRAT/vYcI/+6qCv/uqgr/7qoK/82TCf98WQX/BwUA/wAAAP8NCQH/XkME/8qQCP/uqgr/KR0C/wAA + AP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8CAQD/akwE/+6qCv/uqgr/vYcI/yUbAv9JNAP/7qoK/+6q + Cv/uqgr/7qoK/1E6A/8AAAD/AAAA/wAAAP8AAAD/AAAA/zwrA/+idAf/56UK/+6qCv/vpQv/76UL/++l + C//vpQv/76UL/++lC//vpQv/76UL/++lC//vpQv/76UL/++lC//vpQv/76UL/++lC//vpQv/76UL/++l + C//vpQv/76UL/++lC//vpQv/76UL/++lC//vpQv/76UL/++lC//vpQv/76UL/++lC//vpQv/76UL/++l + C//vpQv/76UL/++lC//vpQv/76UL/++lC//vpQv/76UL/++lC//vpQv/76UL/++lC//vpQv/76UL/++l + C//voAz/76AM/++gDP/voAz/76AM/++gDP/voAz/76AM/++gDP/voAz/76AM/++gDP/voAz/76AM/++g + DP/voAz/76AM/++gDP/voAz/76AM/++gDP/voAz/76AM/++gDP/voAz/76AM/++gDP/voAz/76AM/++g + DP/voAz/76AM/++gDP/voAz/76AM/++gDP/voAz/76AM/++gDP/voAz/76AM/++gDP/voAz/76AM/++g + DP/voAz/76AM/++gDP/wnAz/8JwM//CcDP/wnAz/8JwM//CcDP/wnAz/8JwM//CcDP/wnAz/8JwM//Cc + DP/wnAz/8JwM//CcDP/wnAz/8JwM//CcDP/wnAz/8JwM//CcDP/wnAz/8JwM//CcDP/wnAz/8JwM//Cc + DP/wnAz/8JwM//CcDP/wnAz/8JwM//CcDP/wnAz/8JwM//CcDP/wnAz/8JwM//CcDP/wnAz/8JwM//Cc + DP/wnAz/8JwM//CcDP/wnAz/8JwM//CcDP/wlw3/8JcN//CXDf/wlw3/8JcN//CXDf/wlw3/8JcN//CX + Df/wlw3/8JcN//CXDf/wlw3/8JcN//CXDf/wlw3/8JcN//CXDf/wlw3/8JcN//CXDf/wlw3/8JcN//CX + Df/wlw3/8JcN//CXDf/wlw3/8JcN//CXDf/wlw3/8JcN//CXDf/wlw3/8JcN//CXDf/wlw3/8JcN//CX + Df/wlw3/8JcN//CXDf/wlw3/8JcN//CXDf/wlw3/8JcN//CXDf/xkg7/8ZIO//GSDv/xkg7/8ZIO//GS + Dv/xkg7/8ZIO//GSDv/xkg7/8ZIO//GSDv/xkg7/8ZIO//GSDv/xkg7/8ZIO//GSDv/xkg7/8ZIO//GS + Dv/xkg7/8ZIO//GSDv/xkg7/8ZIO//GSDv/xkg7/8ZIO//GSDv/xkg7/8ZIO//GSDv/xkg7/8ZIO//GS + Dv/xkg7/8ZIO//GSDv/xkg7/8ZIO//GSDv/xkg7/8ZIO//GSDv/xkg7/8ZIO//GSDv/xjQ//8Y0P//GN + D//xjQ//8Y0P//GND//xjQ//8Y0P//GND//zmin/9rNf//azX//2s1//8Y0P//GND//xjQ//8Y0P//GN + D//xjQ//9rNf//azX//xjQ//8Y0P//GND//xjQ//8Y0P//GND//zmin/9rNf//SmRP/xjQ//8Y0P//GN + D//xjQ//8Y0P//GND//0pkT/9rNf//OaKf/xjQ//8Y0P//GND//xjQ//8Y0P//GND//xjQ//8Y0P//GN + D//xiBD/8YgQ//GIEP/xiBD/8YgQ//GIEP/xiBD/8YgQ//e9ev/85Mr/////////////////+tev//Si + RP/xiBD/8YgQ//SiRP/616/////////////616//9KJE//GIEP/xiBD/8YgQ//e9ev/85Mr///////3x + 5P/616//8YgQ//GIEP/xiBD/8YgQ//rXr//98eT///////zkyv/3vXr/8YgQ//GIEP/xiBD/8YgQ//GI + EP/xiBD/8YgQ//GIEP/yhBD/8oQQ//KEEP/yhBD/8oQQ//KEEP/yhBD/85Iq//zkyv/+8eT/9Z9E//KE + EP/4u3r///////nIlP/yhBD/8oQQ///////85Mr/8oQQ//KEEP/85Mr///////KEEP/yhBD/9q1g//// + ///4u3r/8oQQ//WfRP/+8eT/+9av//KEEP/yhBD/+9av//7x5P/1n0T/8oQQ//i7ev//////9q1g//KE + EP/yhBD/8oQQ//KEEP/yhBD/8oQQ//KEEP/yfxH/8n8R//J/Ef/yfxH/8n8R//J/Ef/yfxH/9qpg//// + ///1m0X/8n8R//J/Ef/yfxH/+caV///////yfxH/+Lh6//ziyv/zjSv/8n8R//J/Ef/zjSv//OLK//i4 + ev/yfxH//OLK//nGlf/yfxH/8n8R//J/Ef/1m0X//vDk//WbRf/1m0X//vDk//WbRf/yfxH/8n8R//J/ + Ef/5xpX//OLK//J/Ef/yfxH/8n8R//J/Ef/yfxH/8n8R//J/Ef/zehL/83oS//N6Ev/zehL/83oS//N6 + Ev/zehL/96Zh///////zehL/83oS//N6Ev/zehL/96Zh///////zehL/+9Ow//vTsP/zehL/83oS//N6 + Ev/zehL/+9Ow//vTsP/zehL///////emYf/zehL/83oS//N6Ev/zehL///////emYf/3pmH///////N6 + Ev/zehL/83oS//N6Ev/3pmH///////N6Ev/zehL/83oS//N6Ev/zehL/83oS//N6Ev/zdRP/83UT//N1 + E//zdRP/83UT//N1E//zdRP/96Ni///////4snz/83UT//N1E//zdRP//ODK///////zdRP/+9Gw//vR + sP/zdRP/83UT//N1E//zdRP/+9Gw//vRsP/zdRP///////ejYv/zdRP/83UT//N1E//zdRP///////ej + Yv/3o2L///////N1E//zdRP/83UT//N1E//3o2L///////N1E//zdRP/83UT//N1E//zdRP/83UT//N1 + E//0cBT/9HAU//RwFP/0cBT/9HAU//RwFP/0cBT/+KBi////////////+r+W//igYv/938r///////ig + Yv/0cBT/+8+x//vPsf/0cBT/9HAU//RwFP/0cBT/+8+x//vPsf/0cBT///////igYv/0cBT/9HAU//Rw + FP/0cBT///////igYv/4oGL///////RwFP/0cBT/9HAU//RwFP/4oGL///////RwFP/0cBT/9HAU//Rw + FP/0cBT/9HAU//RwFP/0axX/9GsV//RrFf/0axX/9GsV//RrFf/0axX/+Jxj///////4nGP//d7L//// + ////////+Jxj//V7L//0axX/+86x//vOsf/0axX/9GsV//RrFf/0axX/+86x//vOsf/0axX///////ic + Y//0axX/9GsV//RrFf/0axX///////icY//4nGP///////RrFf/0axX/9GsV//RrFf/4nGP///////Rr + Ff/0axX/9GsV//RrFf/0axX/9GsV//RrFf/1ZxX/9WcV//VnFf/1ZxX/9WcV//VnFf/1ZxX/+Jpj//// + ///1ZxX/9WcV//VnFf/1ZxX/9WcV//VnFf/1ZxX//Myx//zMsf/1ZxX/9WcV//VnFf/1ZxX//Myx//zM + sf/1ZxX///////iaY//1ZxX/9WcV//VnFf/1ZxX///////iaY//4mmP///////VnFf/1ZxX/9WcV//Vn + Ff/4mmP///////VnFf/1ZxX/9WcV//VnFf/1ZxX/9WcV//VnFf/1Yhb/9WIW//ViFv/1Yhb/9WIW//Vi + Fv/1Yhb/9nMw//3cy//5qH3/9WIW//ViFv/1Yhb/94RJ//zLsf/1Yhb/94RJ//7t5f/3hEn/9WIW//Vi + Fv/3hEn//u3l//eESf/1Yhb/+7mX//3cy//1Yhb/9WIW//ViFv/5qH3//dzL//ZzMP/2czD//dzL//mo + ff/1Yhb/9WIW//ViFv/93Mv/+7mX//ViFv/1Yhb/9WIW//ViFv/1Yhb/9WIW//ViFv/1XRf/9V0X//Vd + F//1XRf/9V0X//VdF//1XRf/9V0X//mlfv//////+7eX//iTZP/4k2T///////iTZP/1XRf/9V0X//3b + y///////+JNk//iTZP///////dvL//VdF//1XRf/94FK//7t5f/928v/+JNk//u3l///////+aV+//Vd + F//1XRf/+aV+///////7t5f/+JNk//3by//+7eX/94FK//VdF//1XRf/9V0X//VdF//1XRf/9V0X//Vd + F//2WBj/9lgY//ZYGP/2WBj/9lgY//ZYGP/2WBj/9lgY//ZYGP/5kGX//drL////////////+ZBl//dq + Mf/2WBj/9lgY//dqMf/5kGX////////////5kGX/92ox//ZYGP/2WBj/9lgY//h9S//7tJj///////3a + y//5kGX/9lgY//ZYGP/2WBj/9lgY//mQZf/92sv///////u0mP/4fUv/9lgY//ZYGP/2WBj/9lgY//ZY + GP/2WBj/9lgY//ZYGP/2Uxn/9lMZ//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+EAc//hAHP/4QBz/+EAc//hA + HP/9v7P//////////////////////////////////b+z//hAHP////////////////////////////// + //////////////2/s//9v7P//unl//pqTv/4QBz/+EAc//hAHP/4QBz/+EAc//hAHP/6ak7//unl//2/ + s//4QBz/+EAc//hAHP/5Ox3/+Tsd//k7Hf/5Ox3/+Tsd//2+tP/9vrT/+Tsd//k7Hf/5Ox3/+Tsd//k7 + Hf/5Ox3/+Tsd//k7Hf/9vrT//b60//k7Hf/5Ox3/+Tsd//k7Hf/5Ox3/+Tsd//k7Hf//////+3xo//k7 + Hf/5Ox3/+Tsd//k7Hf/5Ox3/+Tsd//k7Hf/5Ox3//tPM///////6Zk//+Tsd//k7Hf/5Ox3/+Tsd//pm + T////////tPM//k7Hf/5Ox3/+Tsd//k7Hf/5Nx3/+Tcd//k3Hf/5Nx3/+Tcd//28tP/9vLT/+Tcd//k3 + Hf/5Nx3/+Tcd//k3Hf/5Nx3/+Tcd//k3Hf/9vLT//by0//k3Hf/5Nx3/+Tcd//k3Hf/5Nx3/+Tcd//k3 + Hf//////+3po//k3Hf/5Nx3/+Tcd//k3Hf/5Nx3/+Tcd//k3Hf/5Nx3/+k02//7SzP/+6OX/+mNP//k3 + Hf/5Nx3/+mNP//7o5f/+0sz/+k02//k3Hf/5Nx3/+Tcd//k3Hf/5Mh7/+TIe//kyHv/5Mh7/+TIe//27 + tP/9u7T/+TIe//kyHv/5Mh7/+TIe//kyHv/5Mh7/+TIe//kyHv/9u7T//bu0//kyHv/5Mh7/+TIe//ky + Hv/5Mh7/+TIe//kyHv//////+3Zp//kyHv/5Mh7/+TIe//kyHv/5Mh7/+TIe//kyHv/5Mh7/+TIe//ky + Hv/+0c3///////pfT//6X0////////7Rzf/5Mh7/+TIe//kyHv/5Mh7/+TIe//kyHv/6LR//+i0f//ot + H//6LR//+i0f//25tP/9ubT/+i0f//otH//6LR//+i0f//otH//6LR//+i0f//otH//9ubT//bm0//ot + H//6LR//+i0f//otH//6LR//+i0f//otH////////HNq//otH//6LR//+i0f//otH//6LR//+i0f//ot + H//6LR//+i0f//otH//7RDj//tDN//7n5v/+5+b//tDN//tEOP/6LR//+i0f//otH//6LR//+i0f//ot + H//6KCD/+igg//ooIP/6KCD/+igg//23tf/////////////////////////////////9t7X/+igg//oo + IP/9t7X//be1//ooIP/6KCD/+igg//ooIP/6KCD/+igg//ooIP////////////////////////////// + /////////HBq//ooIP/6KCD/+igg//ooIP/6KCD/+1dR////////////+1dR//ooIP/6KCD/+igg//oo + IP/6KCD/+igg//ooIP/7IyH/+yMh//sjIf/7IyH/+yMh//62tf/+zs3//Gxr//xsa//8bGv//Gxr//xs + a//8U1L/+yMh//sjIf/+trX//ra1//sjIf/7IyH/+yMh//sjIf/7IyH/+yMh//sjIf///////Z2c//xs + a//8bGv//Gxr//xsa//8bGv/+zs5//sjIf/7IyH/+yMh//sjIf/8U1L//+bm//7Ozf/+zs3//+bm//xT + Uv/7IyH/+yMh//sjIf/7IyH/+yMh//sjIf/7HyH/+x8h//sfIf/7HyH/+x8h//60tf/+tLX/+x8h//sf + If/7HyH/+x8h//sfIf/7HyH/+x8h//sfIf/+tLX//rS1//sfIf/7HyH/+x8h//sfIf/7HyH/+x8h//sf + If///////Gpr//sfIf/7HyH/+x8h//sfIf/7HyH/+x8h//sfIf/7HyH/+x8h//xQUv///////s3N//sf + If/7HyH//s3N///////8UFL/+x8h//sfIf/7HyH/+x8h//sfIf/8GiL//Boi//waIv/8GiL//Boi//6z + tf/+s7X//Boi//waIv/8GiL//Boi//waIv/8GiL//Boi//waIv/+s7X//rO1//waIv/8GiL//Boi//wa + Iv/8GiL//Boi//waIv///////WZs//waIv/8GiL//Boi//waIv/8GiL//Boi//waIv/8GiL//UxT///l + 5v/+zM7//DM6//waIv/8GiL//DM6//7Mzv//5eb//UxT//waIv/8GiL//Boi//waIv/8FSP//BUj//wV + I//8FSP//BUj//6xtv/+y87//WNs//1jbP/9Y2z//WNs//1jbP/9Y2z//WNs//wVI//+sbb//rG2//wV + I//8FSP//BUj//wVI//8FSP//BUj//wVI////////pad//1jbP/9Y2z//WNs//1jbP/9Y2z//WNs//1I + U//9SFP///////7Lzv/8FSP//BUj//wVI//8FSP//BUj//wVI//+y87///////1IU//8FSP//BUj//wV + I//9ECT//RAk//0QJP/9ECT//RAk//6vtv////////////////////////////////////////////0Q + JP/+r7b//q+2//0QJP/9ECT//RAk//0QJP/9ECT//RAk//0QJP////////////////////////////// + //////////////6vtv/+r7b//8rO//0qPP/9ECT//RAk//0QJP/9ECT//RAk//0QJP/9Kjz//8rO//6v + tv/9ECT//RAk//0QJP/9CyX//Qsl//0LJf/9CyX//Qsl//0LJf/9CyX//Qsl//0LJf/9CyX//Qsl//0L + Jf/9CyX//Qsl//0LJf/9CyX//Qsl//0LJf/9CyX//Qsl//0LJf/9CyX//Qsl//0LJf/9CyX//Qsl//0L + Jf/9CyX//Qsl//0LJf/9CyX//Qsl//0LJf/9CyX//Qsl//0LJf/9CyX//Qsl//0LJf/9CyX//Qsl//0L + Jf/9CyX//Qsl//0LJf/9CyX//Qsl//0LJf/+Byb//gcm//4HJv/+Byb//gcm//4HJv/+Byb//gcm//4H + Jv/+Byb//gcm//4HJv/+Byb//gcm//4HJv/+Byb//gcm//4HJv/+Byb//gcm//4HJv/+Byb//gcm//4H + Jv/+Byb//gcm//4HJv/+Byb//gcm//4HJv/+Byb//gcm//4HJv/+Byb//gcm//4HJv/+Byb//gcm//4H + Jv/+Byb//gcm//4HJv/+Byb//gcm//4HJv/+Byb//gcm//4HJv8AAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAA= + + + \ No newline at end of file diff --git a/pc/CODEC2 GUI/CODEC2 GUI/Program.cs b/pc/CODEC2 GUI/CODEC2 GUI/Program.cs index 650c48b..21dddbe 100644 --- a/pc/CODEC2 GUI/CODEC2 GUI/Program.cs +++ b/pc/CODEC2 GUI/CODEC2 GUI/Program.cs @@ -46,7 +46,7 @@ namespace CODEC2_GUI { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); - Application.Run(new Form1()); + Application.Run(new MainForm()); } } } diff --git a/pc/CODEC2 GUI/CODEC2 GUI/Properties/AssemblyInfo.cs b/pc/CODEC2 GUI/CODEC2 GUI/Properties/AssemblyInfo.cs index 7eede1b..1489ca0 100644 --- a/pc/CODEC2 GUI/CODEC2 GUI/Properties/AssemblyInfo.cs +++ b/pc/CODEC2 GUI/CODEC2 GUI/Properties/AssemblyInfo.cs @@ -5,12 +5,12 @@ using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. -[assembly: AssemblyTitle("CODEC2 GUI")] +[assembly: AssemblyTitle("ThumbDV VODEC GUI")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("FlexRadio Systems")] -[assembly: AssemblyProduct("CODEC2 GUI")] -[assembly: AssemblyCopyright("Copyright © FlexRadio Systems 2014")] +[assembly: AssemblyProduct("ThumbDV_GUI")] +[assembly: AssemblyCopyright("Copyright © FlexRadio Systems 2014-2015")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyVersion("1.4.0.0")] +[assembly: AssemblyFileVersion("1.4.0.0")] diff --git a/pc/CODEC2 GUI/CODEC2 GUI/Properties/Resources.Designer.cs b/pc/CODEC2 GUI/CODEC2 GUI/Properties/Resources.Designer.cs index 5d29ea5..6fb357b 100644 --- a/pc/CODEC2 GUI/CODEC2 GUI/Properties/Resources.Designer.cs +++ b/pc/CODEC2 GUI/CODEC2 GUI/Properties/Resources.Designer.cs @@ -1,14 +1,14 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.34209 +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ -namespace FreeDV.Properties { +namespace CODEC2_GUI.Properties { using System; @@ -39,7 +39,7 @@ namespace FreeDV.Properties { internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("FreeDV.Properties.Resources", typeof(Resources).Assembly); + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CODEC2_GUI.Properties.Resources", typeof(Resources).Assembly); resourceMan = temp; } return resourceMan; diff --git a/pc/CODEC2 GUI/CODEC2 GUI/Properties/Settings.Designer.cs b/pc/CODEC2 GUI/CODEC2 GUI/Properties/Settings.Designer.cs index d958bdb..7d3ca0b 100644 --- a/pc/CODEC2 GUI/CODEC2 GUI/Properties/Settings.Designer.cs +++ b/pc/CODEC2 GUI/CODEC2 GUI/Properties/Settings.Designer.cs @@ -1,18 +1,18 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.34209 +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ -namespace FreeDV.Properties { +namespace CODEC2_GUI.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); @@ -22,5 +22,74 @@ namespace FreeDV.Properties { return defaultInstance; } } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("")] + public string URList { + get { + return ((string)(this["URList"])); + } + set { + this["URList"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("")] + public string MainPosition { + get { + return ((string)(this["MainPosition"])); + } + set { + this["MainPosition"] = value; + } + } + + [global::System.Configuration.ApplicationScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("1000")] + public int LogEntryMax { + get { + return ((int)(this["LogEntryMax"])); + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("")] + public string RPT1List { + get { + return ((string)(this["RPT1List"])); + } + set { + this["RPT1List"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("")] + public string RPT2List { + get { + return ((string)(this["RPT2List"])); + } + set { + this["RPT2List"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("")] + public string MYCallSign { + get { + return ((string)(this["MYCallSign"])); + } + set { + this["MYCallSign"] = value; + } + } } } diff --git a/pc/CODEC2 GUI/CODEC2 GUI/Properties/Settings.settings b/pc/CODEC2 GUI/CODEC2 GUI/Properties/Settings.settings index 3964565..05ccdaf 100644 --- a/pc/CODEC2 GUI/CODEC2 GUI/Properties/Settings.settings +++ b/pc/CODEC2 GUI/CODEC2 GUI/Properties/Settings.settings @@ -1,7 +1,24 @@  - - - - - - + + + + + + + + + + + 1000 + + + + + + + + + + + + \ No newline at end of file diff --git a/pc/CODEC2 GUI/CODEC2 GUI/SelectForm.Designer.cs b/pc/CODEC2 GUI/CODEC2 GUI/SelectForm.Designer.cs new file mode 100644 index 0000000..c682532 --- /dev/null +++ b/pc/CODEC2 GUI/CODEC2 GUI/SelectForm.Designer.cs @@ -0,0 +1,180 @@ +namespace CODEC2_GUI +{ + partial class SelectForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.btnSelect = new System.Windows.Forms.Button(); + this.btnCancel = new System.Windows.Forms.Button(); + this.listView1 = new System.Windows.Forms.ListView(); + this.nameCol = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.descCol = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.rb3 = new System.Windows.Forms.RadioButton(); + this.rb2 = new System.Windows.Forms.RadioButton(); + this.rb1 = new System.Windows.Forms.RadioButton(); + ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit(); + this.groupBox1.SuspendLayout(); + this.SuspendLayout(); + // + // btnSelect + // + this.btnSelect.DialogResult = System.Windows.Forms.DialogResult.OK; + this.btnSelect.Location = new System.Drawing.Point(115, 281); + this.btnSelect.Name = "btnSelect"; + this.btnSelect.Size = new System.Drawing.Size(101, 33); + this.btnSelect.TabIndex = 1; + this.btnSelect.Text = "Select"; + this.btnSelect.UseVisualStyleBackColor = true; + this.btnSelect.Click += new System.EventHandler(this.btnSelect_Click); + // + // btnCancel + // + this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.btnCancel.Location = new System.Drawing.Point(431, 281); + this.btnCancel.Name = "btnCancel"; + this.btnCancel.Size = new System.Drawing.Size(101, 33); + this.btnCancel.TabIndex = 2; + this.btnCancel.Text = "Cancel"; + this.btnCancel.UseVisualStyleBackColor = true; + this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); + // + // listView1 + // + this.listView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.nameCol, + this.descCol}); + this.listView1.FullRowSelect = true; + this.listView1.HideSelection = false; + this.listView1.Location = new System.Drawing.Point(12, 64); + this.listView1.MultiSelect = false; + this.listView1.Name = "listView1"; + this.listView1.Size = new System.Drawing.Size(653, 205); + this.listView1.TabIndex = 0; + this.listView1.UseCompatibleStateImageBehavior = false; + this.listView1.View = System.Windows.Forms.View.Details; + // + // nameCol + // + this.nameCol.Text = "Name"; + this.nameCol.Width = 100; + // + // descCol + // + this.descCol.Text = "Description"; + this.descCol.Width = 515; + // + // bindingSource1 + // + this.bindingSource1.DataMember = "items"; + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.rb3); + this.groupBox1.Controls.Add(this.rb2); + this.groupBox1.Controls.Add(this.rb1); + this.groupBox1.Location = new System.Drawing.Point(13, 3); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(652, 49); + this.groupBox1.TabIndex = 3; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "Mode"; + // + // rb3 + // + this.rb3.AutoSize = true; + this.rb3.Location = new System.Drawing.Point(404, 22); + this.rb3.Name = "rb3"; + this.rb3.Size = new System.Drawing.Size(229, 25); + this.rb3.TabIndex = 2; + this.rb3.TabStop = true; + this.rb3.Text = "Reflector Commands"; + this.rb3.UseVisualStyleBackColor = true; + this.rb3.CheckedChanged += new System.EventHandler(this.rb3_CheckedChanged); + // + // rb2 + // + this.rb2.AutoSize = true; + this.rb2.Location = new System.Drawing.Point(230, 22); + this.rb2.Name = "rb2"; + this.rb2.Size = new System.Drawing.Size(141, 25); + this.rb2.TabIndex = 1; + this.rb2.TabStop = true; + this.rb2.Text = "Reflectors"; + this.rb2.UseVisualStyleBackColor = true; + this.rb2.CheckedChanged += new System.EventHandler(this.rb2_CheckedChanged); + // + // rb1 + // + this.rb1.AutoSize = true; + this.rb1.Location = new System.Drawing.Point(41, 22); + this.rb1.Name = "rb1"; + this.rb1.Size = new System.Drawing.Size(130, 25); + this.rb1.TabIndex = 0; + this.rb1.TabStop = true; + this.rb1.Text = "Repeaters"; + this.rb1.UseVisualStyleBackColor = true; + this.rb1.Click += new System.EventHandler(this.rb1_Click); + // + // SelectForm + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + this.CancelButton = this.btnCancel; + this.ClientSize = new System.Drawing.Size(677, 326); + this.ControlBox = false; + this.Controls.Add(this.groupBox1); + this.Controls.Add(this.listView1); + this.Controls.Add(this.btnCancel); + this.Controls.Add(this.btnSelect); + this.Font = new System.Drawing.Font("Courier New", 11F); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; + this.Name = "SelectForm"; + this.Text = "Select"; + this.Load += new System.EventHandler(this.SelectForm_Load); + ((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit(); + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Button btnSelect; + private System.Windows.Forms.Button btnCancel; + private System.Windows.Forms.ListView listView1; + private System.Windows.Forms.ColumnHeader nameCol; + private System.Windows.Forms.ColumnHeader descCol; + private System.Windows.Forms.BindingSource bindingSource1; + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.RadioButton rb3; + private System.Windows.Forms.RadioButton rb2; + private System.Windows.Forms.RadioButton rb1; + } +} \ No newline at end of file diff --git a/pc/CODEC2 GUI/CODEC2 GUI/SelectForm.cs b/pc/CODEC2 GUI/CODEC2 GUI/SelectForm.cs new file mode 100644 index 0000000..7f8a572 --- /dev/null +++ b/pc/CODEC2 GUI/CODEC2 GUI/SelectForm.cs @@ -0,0 +1,192 @@ +/******************************************************************************* + * SelectForm.cs + * + * DStar Repeater / Reflector Selection Dialog + * + * Created on: 2015-08-23 + * Author: Mark Hanson / AA3RK / MKCM Software, LLC. + * + * + ******************************************************************************* + * + * Copyright (C) 2015 FlexRadio Systems. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + * Contact: gplflexradiocom or + * + * GPL C/O FlexRadio Systems + * 4616 W. Howard Lane + * Suite 1-150 + * Austin, TX USA 78728 + * + ******************************************************************************/ + + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace CODEC2_GUI +{ + public partial class SelectForm : Form + { + public enum RMode { Repeater, Reflector, ReflectorCmd }; + public RMode Mode { get; set; } + public bool showOnly { get; set; } + public bool repeaterOnly { get; set; } + + public string SelectedName { get; set; } + + private IEnumerable ReflectorList { get; set; } + private IEnumerable RepeaterList { get; set; } + private IEnumerable ReflectorCmdList { get; set; } + + public SelectForm() + { + InitializeComponent(); + ReflectorCmdList = new List() { + { new ReflectorOrRepeater() { Name = " U", Desc = "Unlink command"} }, + { new ReflectorOrRepeater() { Name = " I", Desc = "Info command" } }, + { new ReflectorOrRepeater() { Name = " E", Desc = "Echo command" } } + }; + } + + private void SelectForm_Load(object sender, EventArgs e) + { + if (showOnly) + { + btnSelect.Visible = false; + btnCancel.Text = "Close"; + } + + + DstarInfo di = new DstarInfo(); + + ReflectorList = di.Refelectors; + RepeaterList = di.Repeaters; + + if (repeaterOnly) + { + Mode = RMode.Repeater; + rb1.Checked = true; + rb2.Visible = false; + rb3.Visible = false; + } + else + { + if (RepeaterList == null || RepeaterList.Count() == 0) + { + Mode = RMode.Reflector; + rb1.Visible = false; + } + + switch (Mode) + { + case RMode.Repeater: + rb1.Checked = true; + break; + case RMode.Reflector: + rb2.Checked = true; + break; + case RMode.ReflectorCmd: + rb3.Checked = true; + break; + } + } + setlistitems(); + } + + private void setlistitems() + { + listView1.Items.Clear(); + IEnumerable rlist; + switch(Mode) + { + case RMode.Reflector: + rlist = ReflectorList; + break; + case RMode.ReflectorCmd: + rlist = ReflectorCmdList; + break; + case RMode.Repeater: + default: + rlist = RepeaterList; + break; + } + if (rlist != null) + { + foreach (ReflectorOrRepeater rr in rlist) + { + listView1.Items.Add(new ListViewItem(new string[] { rr.Name, rr.Desc })); + } + } + if (listView1.Items.Count > 0) + listView1.SelectedIndices.Add(0); + + listView1.Select(); + } + + private void btnSelect_Click(object sender, EventArgs e) + { + if (listView1.SelectedItems.Count > 0) + { + SelectedName = listView1.SelectedItems[0].Text; + if (Mode == RMode.Reflector) + SelectedName = string.Format("{0,-7}L", SelectedName); + + DialogResult = DialogResult.OK; + Close(); + } + else + MessageBox.Show(this, "Nothing selected!", "Information"); + } + + private void btnCancel_Click(object sender, EventArgs e) + { + Close(); + } + + + private void rb1_Click(object sender, EventArgs e) + { + if (rb1.Checked) + { + Mode = RMode.Repeater; + setlistitems(); + } + } + + private void rb2_CheckedChanged(object sender, EventArgs e) + { + if (rb2.Checked) + { + Mode = RMode.Reflector; + setlistitems(); + } + } + + private void rb3_CheckedChanged(object sender, EventArgs e) + { + if (rb3.Checked) + { + Mode = RMode.ReflectorCmd; + setlistitems(); + } + } + } +} diff --git a/pc/CODEC2 GUI/CODEC2 GUI/SelectForm.resx b/pc/CODEC2 GUI/CODEC2 GUI/SelectForm.resx new file mode 100644 index 0000000..76cdda2 --- /dev/null +++ b/pc/CODEC2 GUI/CODEC2 GUI/SelectForm.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + \ No newline at end of file diff --git a/pc/CODEC2 GUI/CODEC2 GUI/ThumbDV_GUI.csproj b/pc/CODEC2 GUI/CODEC2 GUI/ThumbDV_GUI.csproj new file mode 100644 index 0000000..c74d229 --- /dev/null +++ b/pc/CODEC2 GUI/CODEC2 GUI/ThumbDV_GUI.csproj @@ -0,0 +1,154 @@ + + + + + Debug + AnyCPU + {4BD2FDA2-298F-4FFD-86AD-F7A677ABD93E} + WinExe + Properties + CODEC2_GUI + ThumbDV_GUI + v4.5 + 512 + true + + + + x86 + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + false + + + x86 + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + false + + + Images\dstar.ico + + + true + bin\x86\Debug\ + DEBUG;TRACE + full + x86 + prompt + MinimumRecommendedRules.ruleset + + + bin\x86\Release\ + TRACE + true + pdbonly + x86 + prompt + MinimumRecommendedRules.ruleset + + + + ..\..\..\..\..\SmartSDR_1_14_21_References\Flex.UiWpfFramework.dll + + + ..\..\..\..\..\SmartSDR_1_14_21_References\FlexLib.dll + + + + + + + + + + + + + + + + UserControl + + + dstarctl.cs + + + + UserControl + + + dstarlistitem.cs + + + Form + + + MainForm.cs + + + + + Form + + + SelectForm.cs + + + dstarctl.cs + + + dstarlistitem.cs + + + MainForm.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + True + + + SelectForm.cs + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + + + + + + + \ No newline at end of file diff --git a/pc/CODEC2 GUI/CODEC2 GUI/ThumbDV_GUI.sln b/pc/CODEC2 GUI/CODEC2 GUI/ThumbDV_GUI.sln new file mode 100644 index 0000000..3d26cb9 --- /dev/null +++ b/pc/CODEC2 GUI/CODEC2 GUI/ThumbDV_GUI.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.23107.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ThumbDV_GUI", "ThumbDV_GUI.csproj", "{4BD2FDA2-298F-4FFD-86AD-F7A677ABD93E}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x86 = Debug|x86 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {4BD2FDA2-298F-4FFD-86AD-F7A677ABD93E}.Debug|x86.ActiveCfg = Debug|x86 + {4BD2FDA2-298F-4FFD-86AD-F7A677ABD93E}.Debug|x86.Build.0 = Debug|x86 + {4BD2FDA2-298F-4FFD-86AD-F7A677ABD93E}.Release|x86.ActiveCfg = Release|x86 + {4BD2FDA2-298F-4FFD-86AD-F7A677ABD93E}.Release|x86.Build.0 = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/pc/CODEC2 GUI/CODEC2 GUI/dstarctl.Designer.cs b/pc/CODEC2 GUI/CODEC2 GUI/dstarctl.Designer.cs new file mode 100644 index 0000000..7005f5d --- /dev/null +++ b/pc/CODEC2 GUI/CODEC2 GUI/dstarctl.Designer.cs @@ -0,0 +1,269 @@ +namespace CODEC2_GUI +{ + partial class dstarctl + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.mycallsign = new System.Windows.Forms.Label(); + this.urcallsign = new System.Windows.Forms.Label(); + this.rpt1 = new System.Windows.Forms.Label(); + this.rpt2 = new System.Windows.Forms.Label(); + this.mytxt = new System.Windows.Forms.TextBox(); + this.mynotetxt = new System.Windows.Forms.TextBox(); + this.urtxt = new System.Windows.Forms.ComboBox(); + this.rpt1txt = new System.Windows.Forms.ComboBox(); + this.rpt2txt = new System.Windows.Forms.ComboBox(); + this.rbDV = new System.Windows.Forms.RadioButton(); + this.rbDR = new System.Windows.Forms.RadioButton(); + this.mynote = new System.Windows.Forms.Label(); + this.rpt1tip = new System.Windows.Forms.ToolTip(this.components); + this.rpt2tip = new System.Windows.Forms.ToolTip(this.components); + this.urtip = new System.Windows.Forms.ToolTip(this.components); + this.mytip = new System.Windows.Forms.ToolTip(this.components); + this.mynotetip = new System.Windows.Forms.ToolTip(this.components); + this.dvtip = new System.Windows.Forms.ToolTip(this.components); + this.drtip = new System.Windows.Forms.ToolTip(this.components); + this.btnReset = new System.Windows.Forms.Button(); + this.btnRef = new System.Windows.Forms.Button(); + this.btnRpt = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // mycallsign + // + this.mycallsign.AutoSize = true; + this.mycallsign.Location = new System.Drawing.Point(3, 64); + this.mycallsign.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.mycallsign.Name = "mycallsign"; + this.mycallsign.Size = new System.Drawing.Size(43, 21); + this.mycallsign.TabIndex = 2; + this.mycallsign.Text = "MY:"; + // + // urcallsign + // + this.urcallsign.AutoSize = true; + this.urcallsign.Location = new System.Drawing.Point(3, 106); + this.urcallsign.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.urcallsign.Name = "urcallsign"; + this.urcallsign.Size = new System.Drawing.Size(43, 21); + this.urcallsign.TabIndex = 6; + this.urcallsign.Text = "UR:"; + // + // rpt1 + // + this.rpt1.AutoSize = true; + this.rpt1.Location = new System.Drawing.Point(316, 64); + this.rpt1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.rpt1.Name = "rpt1"; + this.rpt1.Size = new System.Drawing.Size(65, 21); + this.rpt1.TabIndex = 9; + this.rpt1.Text = "RPT1:"; + // + // rpt2 + // + this.rpt2.AutoSize = true; + this.rpt2.Location = new System.Drawing.Point(316, 110); + this.rpt2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.rpt2.Name = "rpt2"; + this.rpt2.Size = new System.Drawing.Size(65, 21); + this.rpt2.TabIndex = 12; + this.rpt2.Text = "RPT2:"; + // + // mytxt + // + this.mytxt.Location = new System.Drawing.Point(53, 60); + this.mytxt.Margin = new System.Windows.Forms.Padding(4); + this.mytxt.MaxLength = 8; + this.mytxt.Name = "mytxt"; + this.mytxt.Size = new System.Drawing.Size(110, 28); + this.mytxt.TabIndex = 3; + this.mytxt.TextChanged += new System.EventHandler(this.mytxt_TextChanged); + // + // mynotetxt + // + this.mynotetxt.Location = new System.Drawing.Point(200, 62); + this.mynotetxt.Margin = new System.Windows.Forms.Padding(4); + this.mynotetxt.MaxLength = 4; + this.mynotetxt.Name = "mynotetxt"; + this.mynotetxt.Size = new System.Drawing.Size(77, 28); + this.mynotetxt.TabIndex = 5; + this.mynotetxt.TextChanged += new System.EventHandler(this.mynotetxt_TextChanged); + // + // urtxt + // + this.urtxt.Items.AddRange(new object[] { + "CQCQCQ"}); + this.urtxt.Location = new System.Drawing.Point(53, 102); + this.urtxt.Margin = new System.Windows.Forms.Padding(4); + this.urtxt.MaxLength = 8; + this.urtxt.Name = "urtxt"; + this.urtxt.Size = new System.Drawing.Size(152, 28); + this.urtxt.TabIndex = 7; + this.urtxt.TextChanged += new System.EventHandler(this.urtxt_TextChanged); + // + // rpt1txt + // + this.rpt1txt.Location = new System.Drawing.Point(387, 60); + this.rpt1txt.Margin = new System.Windows.Forms.Padding(4); + this.rpt1txt.MaxLength = 8; + this.rpt1txt.Name = "rpt1txt"; + this.rpt1txt.Size = new System.Drawing.Size(159, 28); + this.rpt1txt.TabIndex = 10; + this.rpt1txt.TextChanged += new System.EventHandler(this.rpt1txt_TextChanged); + // + // rpt2txt + // + this.rpt2txt.Location = new System.Drawing.Point(387, 106); + this.rpt2txt.Margin = new System.Windows.Forms.Padding(4); + this.rpt2txt.MaxLength = 8; + this.rpt2txt.Name = "rpt2txt"; + this.rpt2txt.Size = new System.Drawing.Size(159, 28); + this.rpt2txt.TabIndex = 13; + this.rpt2txt.TextChanged += new System.EventHandler(this.rpt2txt_TextChanged); + // + // rbDV + // + this.rbDV.AutoSize = true; + this.rbDV.Location = new System.Drawing.Point(192, 9); + this.rbDV.Margin = new System.Windows.Forms.Padding(4); + this.rbDV.Name = "rbDV"; + this.rbDV.Size = new System.Drawing.Size(53, 25); + this.rbDV.TabIndex = 0; + this.rbDV.TabStop = true; + this.rbDV.Text = "DV"; + this.rbDV.UseVisualStyleBackColor = true; + this.rbDV.Click += new System.EventHandler(this.rbDV_Click); + // + // rbDR + // + this.rbDR.AutoSize = true; + this.rbDR.Location = new System.Drawing.Point(267, 9); + this.rbDR.Margin = new System.Windows.Forms.Padding(4); + this.rbDR.Name = "rbDR"; + this.rbDR.Size = new System.Drawing.Size(53, 25); + this.rbDR.TabIndex = 1; + this.rbDR.TabStop = true; + this.rbDR.Text = "DR"; + this.rbDR.UseVisualStyleBackColor = true; + this.rbDR.Click += new System.EventHandler(this.rbDR_Click); + // + // mynote + // + this.mynote.AutoSize = true; + this.mynote.Location = new System.Drawing.Point(173, 62); + this.mynote.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.mynote.Name = "mynote"; + this.mynote.Size = new System.Drawing.Size(21, 21); + this.mynote.TabIndex = 4; + this.mynote.Text = "/"; + // + // btnReset + // + this.btnReset.Location = new System.Drawing.Point(351, 7); + this.btnReset.Margin = new System.Windows.Forms.Padding(4); + this.btnReset.Name = "btnReset"; + this.btnReset.Size = new System.Drawing.Size(77, 29); + this.btnReset.TabIndex = 14; + this.btnReset.Text = "Reset"; + this.btnReset.UseVisualStyleBackColor = true; + this.btnReset.Visible = false; + this.btnReset.Click += new System.EventHandler(this.btnReset_Click); + // + // btnRef + // + this.btnRef.Location = new System.Drawing.Point(228, 102); + this.btnRef.Name = "btnRef"; + this.btnRef.Size = new System.Drawing.Size(61, 31); + this.btnRef.TabIndex = 8; + this.btnRef.Text = "R/R"; + this.btnRef.UseVisualStyleBackColor = true; + this.btnRef.Click += new System.EventHandler(this.btnRef_Click); + // + // btnRpt + // + this.btnRpt.Location = new System.Drawing.Point(566, 58); + this.btnRpt.Name = "btnRpt"; + this.btnRpt.Size = new System.Drawing.Size(61, 33); + this.btnRpt.TabIndex = 11; + this.btnRpt.Text = "Rpt"; + this.btnRpt.UseVisualStyleBackColor = true; + this.btnRpt.Click += new System.EventHandler(this.btnRpt_Click); + // + // dstarctl + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + this.Controls.Add(this.btnRpt); + this.Controls.Add(this.btnRef); + this.Controls.Add(this.btnReset); + this.Controls.Add(this.rbDR); + this.Controls.Add(this.rbDV); + this.Controls.Add(this.rpt2txt); + this.Controls.Add(this.rpt1txt); + this.Controls.Add(this.urtxt); + this.Controls.Add(this.mynotetxt); + this.Controls.Add(this.mytxt); + this.Controls.Add(this.rpt2); + this.Controls.Add(this.rpt1); + this.Controls.Add(this.urcallsign); + this.Controls.Add(this.mynote); + this.Controls.Add(this.mycallsign); + this.Font = new System.Drawing.Font("Courier New", 11F); + this.Margin = new System.Windows.Forms.Padding(4); + this.Name = "dstarctl"; + this.Size = new System.Drawing.Size(641, 148); + this.Load += new System.EventHandler(this.dstarctl_Load); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label mycallsign; + private System.Windows.Forms.Label urcallsign; + private System.Windows.Forms.Label rpt1; + private System.Windows.Forms.Label rpt2; + private System.Windows.Forms.TextBox mytxt; + private System.Windows.Forms.TextBox mynotetxt; + private System.Windows.Forms.ComboBox urtxt; + private System.Windows.Forms.ComboBox rpt1txt; + private System.Windows.Forms.ComboBox rpt2txt; + private System.Windows.Forms.RadioButton rbDV; + private System.Windows.Forms.RadioButton rbDR; + private System.Windows.Forms.Label mynote; + private System.Windows.Forms.ToolTip rpt1tip; + private System.Windows.Forms.ToolTip rpt2tip; + private System.Windows.Forms.ToolTip urtip; + private System.Windows.Forms.ToolTip mytip; + private System.Windows.Forms.ToolTip mynotetip; + private System.Windows.Forms.ToolTip dvtip; + private System.Windows.Forms.ToolTip drtip; + private System.Windows.Forms.Button btnReset; + private System.Windows.Forms.Button btnRef; + private System.Windows.Forms.Button btnRpt; + } +} diff --git a/pc/CODEC2 GUI/CODEC2 GUI/dstarctl.cs b/pc/CODEC2 GUI/CODEC2 GUI/dstarctl.cs new file mode 100644 index 0000000..bd712bf --- /dev/null +++ b/pc/CODEC2 GUI/CODEC2 GUI/dstarctl.cs @@ -0,0 +1,449 @@ +/******************************************************************************* + * dstarctl.cs + * + * UI Control for DSTAR Settings + * + * Created on: 2015-08-20 + * Author: Mark Hanson / AA3RK / MKCM Software, LLC. + * + * + ******************************************************************************* + * + * Copyright (C) 2015 FlexRadio Systems. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + * Contact: gplflexradiocom or + * + * GPL C/O FlexRadio Systems + * 4616 W. Howard Lane + * Suite 1-150 + * Austin, TX USA 78728 + * + ******************************************************************************/ + + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; +using System.Windows.Forms; + +namespace CODEC2_GUI +{ + public partial class dstarctl : UserControl, INotifyPropertyChanged + { + [Flags] + public enum ModifyFlags : byte + { + NOFLAGS = 0, + MYFLAG = 1, + NOTEFLAG = 2, + URFLAG = 4, + RPT1FLAG = 8, + RPT2FLAG = 16, + DRFLAG = 32 + } + public ModifyFlags Modified { get; set; } + + private bool DRModeOrig; + private string MYOrig = string.Empty; + private string NOTEOrig = string.Empty; + private string UROrig = string.Empty; + private string RPT1Orig = string.Empty; + private string RPT2Orig = string.Empty; + + public bool DRMode + { + get + { + return rbDR.Checked; + } + set + { + if ((rbDV.Checked && value) || (rbDR.Checked && !value) || (!rbDV.Checked && !rbDR.Checked)) + { + rbDV.Checked = !value; + rbDR.Checked = value; + Modified = Modified & ~ModifyFlags.DRFLAG; + rpt1txt.Enabled = + rpt1.Enabled = + rpt2.Enabled = + //btnRpt.Visible = + rpt2txt.Enabled = + value; + OnPropertyChanged("DRMode"); + } + DRModeOrig = value; + } + } + public string MY + { + get + { + return mytxt.Text.ToUpper(); + } + set + { + if (value == null) + value = string.Empty; + if (string.Compare(value, mytxt.Text, true) != 0) + { + mytxt.Text = value.ToUpper(); + Modified = Modified & ~ModifyFlags.MYFLAG; + OnPropertyChanged("MY"); + } + MYOrig = value; + updateReset(); + } + } + public string NOTE + { + get + { + return mynotetxt.Text; + } + set + { + if (value == null) + value = string.Empty; + if (string.Compare(value, mynotetxt.Text, true) != 0) + { + mynotetxt.Text = value; + Modified = Modified & ~ModifyFlags.NOTEFLAG; + OnPropertyChanged("NOTE"); + } + NOTEOrig = value; + updateReset(); + } + } + public string UR + { + get + { + return urtxt.Text.ToUpper(); + } + set + { + if (value == null) + value = string.Empty; + if (string.Compare(value, urtxt.Text, true) != 0) + { + urtxt.Text = value.ToUpper(); + Modified = Modified & ~ModifyFlags.URFLAG; + OnPropertyChanged("UR"); + } + UROrig = value; + updateReset(); + } + } + public string RPT1 + { + get + { + return rpt1txt.Text.ToUpper(); + } + set + { + if (value == null) + value = string.Empty; + if (string.Compare(value, rpt1txt.Text, true) != 0) + { + rpt1txt.Text = value.ToUpper(); + Modified = Modified & ~ModifyFlags.RPT1FLAG; + OnPropertyChanged("RPT1"); + } + RPT1Orig = value; + updateReset(); + } + } + public string RPT2 + { + get + { + return DRMode ? rpt2txt.Text.ToUpper() : string.Empty; + } + set + { + if (value == null) + value = string.Empty; + if (string.Compare(value, rpt2txt.Text, true) != 0) + { + rpt2txt.Text = value.ToUpper(); + Modified = Modified & ~ModifyFlags.RPT2FLAG; + OnPropertyChanged("RPT2"); + } + RPT2Orig = value; + updateReset(); + } + } + + public List URList + { + get + { + List lst = new List(urtxt.Items.Cast()); + int i = lst.IndexOf("CQCQCQ"); + if (i >= 0) + lst.RemoveAt(i); + return lst; + } + set + { + urtxt.Items.Clear(); + if (value != null && value.Count > 0) + { + if (!value.Contains("CQCQCQ")) + urtxt.Items.Add("CQCQCQ"); + urtxt.Items.AddRange(value.ToArray()); + } + else + urtxt.Items.Add("CQCQCQ"); + } + } + + public List RPT1List + { + get + { + List lst = new List(rpt1txt.Items.Cast()); + return lst; + } + set + { + rpt1txt.Items.Clear(); + if (value != null && value.Count > 0) + { + rpt1txt.Items.AddRange(value.ToArray()); + } + } + } + + public List RPT2List + { + get + { + List lst = new List(rpt2txt.Items.Cast()); + return lst; + } + set + { + rpt2txt.Items.Clear(); + if (value != null && value.Count > 0) + { + rpt2txt.Items.AddRange(value.ToArray()); + } + } + } + + public dstarctl() + { + InitializeComponent(); + } + + public event PropertyChangedEventHandler PropertyChanged; + + private void OnPropertyChanged(string prop) + { + if (prop == "Modified") + { + btnReset.Visible = Modified != ModifyFlags.NOFLAGS; + } + if (PropertyChanged != null) + PropertyChanged(this, new PropertyChangedEventArgs(prop)); + } + + private void rbDV_Click(object sender, EventArgs e) + { + if (rbDR.Checked == true) + rbDR.Checked = false; + + Modified = Modified & ~ModifyFlags.DRFLAG; + rpt1txt.Enabled = false; + rpt1txt.Text = string.Empty; + rpt2txt.Text = string.Empty; + rpt1.Enabled = false; + rpt2.Enabled = false; + rpt2txt.Enabled = false; + //btnRpt.Visible = false; + OnPropertyChanged("DRMode"); + OnPropertyChanged("Modified"); + + } + + private void rbDR_Click(object sender, EventArgs e) + { + if (rbDV.Checked == true) + rbDV.Checked = false; + Modified = Modified | ModifyFlags.DRFLAG; + rpt1txt.Enabled = true; + rpt1.Enabled = true; + rpt2.Enabled = true; + rpt2txt.Enabled = true; + //btnRpt.Visible = true; + OnPropertyChanged("DRMode"); + OnPropertyChanged("Modified"); + } + + private void dstarctl_Load(object sender, EventArgs e) + { + Modified = ModifyFlags.NOFLAGS; + btnReset.Visible = false; + rpt1tip.SetToolTip(rpt1txt, "Access / Area Callsign"); + rpt2tip.SetToolTip(rpt2txt, "Link / Gateway Callsign"); + urtip.SetToolTip(urtxt, "Destination Callsign (CQ, Individual Callsign or Reflector Command)"); + mytip.SetToolTip(mytxt, "MY Callsign (8 chars max)"); + mynotetip.SetToolTip(mynotetxt, "Note (4 chars max)"); + dvtip.SetToolTip(rbDV, "DStar Simplex Mode"); + drtip.SetToolTip(rbDR, "DStar Repeater Mode"); + + + // not complete code + btnRpt.Visible = false; + + // end not complete code + } + + + private void mytxt_TextChanged(object sender, EventArgs e) + { + Modified = Modified | ModifyFlags.MYFLAG; + OnPropertyChanged("MY"); + OnPropertyChanged("Modified"); + } + + private void mynotetxt_TextChanged(object sender, EventArgs e) + { + Modified = Modified | ModifyFlags.NOTEFLAG; + OnPropertyChanged("NOTE"); + OnPropertyChanged("Modified"); + } + + private void urtxt_TextChanged(object sender, EventArgs e) + { + Modified = Modified | ModifyFlags.URFLAG; + OnPropertyChanged("UR"); + OnPropertyChanged("Modified"); + } + + private void rpt1txt_TextChanged(object sender, EventArgs e) + { + Modified = Modified | ModifyFlags.RPT1FLAG; + OnPropertyChanged("RPT1"); + OnPropertyChanged("Modified"); + } + + private void rpt2txt_TextChanged(object sender, EventArgs e) + { + Modified = Modified | ModifyFlags.RPT2FLAG; + OnPropertyChanged("RPT2"); + OnPropertyChanged("Modified"); + } + + private void updateReset() + { + bool isorig = (MYOrig == MY && NOTEOrig == NOTE && UROrig == UR && RPT1Orig == RPT1 && RPT2Orig == RPT2); + + if (btnReset.Visible == isorig) + { + btnReset.Visible = !isorig; + if (isorig) + Modified = ModifyFlags.NOFLAGS; + } + OnPropertyChanged("Modified"); + } + + private void btnReset_Click(object sender, EventArgs e) + { + rbDV.Checked = !DRModeOrig; + rbDR.Checked = DRModeOrig; + mytxt.Text = MYOrig; + mynotetxt.Text = NOTEOrig; + urtxt.Text = UROrig; + rpt1txt.Text = RPT1Orig; + rpt2txt.Text = RPT2Orig; + rpt1txt.Enabled = + rpt1.Enabled = + rpt2.Enabled = + //btnRpt.Visible = + rpt2txt.Enabled = + DRModeOrig; + + Modified = ModifyFlags.NOFLAGS; + btnReset.Visible = false; + + OnPropertyChanged("MY"); + OnPropertyChanged("NOTE"); + OnPropertyChanged("UR"); + OnPropertyChanged("RPT1"); + OnPropertyChanged("RPT2"); + OnPropertyChanged("Modified"); + } + + private void btnRef_Click(object sender, EventArgs e) + { + try + { + SelectForm sf = new SelectForm(); + sf.Owner = this.TopLevelControl as Form; + if (sf.ShowDialog() == DialogResult.OK) + { + urtxt.Text = sf.SelectedName; + Modified = Modified | ModifyFlags.URFLAG; + OnPropertyChanged("UR"); + OnPropertyChanged("Modified"); + } + } + catch (Exception ex) + { + StringBuilder sb = new StringBuilder(); + Exception ex1 = ex; + while (ex1 != null) + { + sb.AppendLine(ex1.Message); + ex1 = ex1.InnerException; + } + MessageBox.Show(sb.ToString(), "Select DSTARINFO Error!", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); + } + } + + private void btnRpt_Click(object sender, EventArgs e) + { + try + { + SelectForm sf = new SelectForm(); + sf.repeaterOnly = true; + sf.Owner = this.TopLevelControl as Form; + if (sf.ShowDialog() == DialogResult.OK) + { + rpt1txt.Text = sf.SelectedName; + Modified = Modified | ModifyFlags.RPT1FLAG; + OnPropertyChanged("RPT1"); + OnPropertyChanged("Modified"); + } + } + catch (Exception ex) + { + StringBuilder sb = new StringBuilder(); + Exception ex1 = ex; + while (ex1 != null) + { + sb.AppendLine(ex1.Message); + ex1 = ex1.InnerException; + } + MessageBox.Show(sb.ToString(), "Select DSTARINFO Error!", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); + } + } + } +} diff --git a/pc/CODEC2 GUI/CODEC2 GUI/dstarctl.resx b/pc/CODEC2 GUI/CODEC2 GUI/dstarctl.resx new file mode 100644 index 0000000..e9d531b --- /dev/null +++ b/pc/CODEC2 GUI/CODEC2 GUI/dstarctl.resx @@ -0,0 +1,141 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + + 120, 17 + + + 223, 17 + + + 312, 17 + + + 407, 17 + + + 533, 17 + + + 624, 17 + + \ No newline at end of file diff --git a/pc/CODEC2 GUI/CODEC2 GUI/dstarlistitem.Designer.cs b/pc/CODEC2 GUI/CODEC2 GUI/dstarlistitem.Designer.cs new file mode 100644 index 0000000..5346bf4 --- /dev/null +++ b/pc/CODEC2 GUI/CODEC2 GUI/dstarlistitem.Designer.cs @@ -0,0 +1,113 @@ +namespace CODEC2_GUI +{ + partial class dstarlistitem + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(dstarlistitem)); + this.btnCommit = new System.Windows.Forms.Button(); + this.lblName = new System.Windows.Forms.Label(); + this.lblMode = new System.Windows.Forms.Label(); + this.dstarctl1 = new CODEC2_GUI.dstarctl(); + this.SuspendLayout(); + // + // btnCommit + // + this.btnCommit.Location = new System.Drawing.Point(528, 5); + this.btnCommit.Margin = new System.Windows.Forms.Padding(4); + this.btnCommit.Name = "btnCommit"; + this.btnCommit.Size = new System.Drawing.Size(103, 29); + this.btnCommit.TabIndex = 1; + this.btnCommit.Text = "Commit"; + this.btnCommit.UseVisualStyleBackColor = true; + this.btnCommit.Click += new System.EventHandler(this.btnCommit_Click); + // + // lblName + // + this.lblName.AutoSize = true; + this.lblName.Location = new System.Drawing.Point(6, 9); + this.lblName.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.lblName.Name = "lblName"; + this.lblName.Size = new System.Drawing.Size(65, 21); + this.lblName.TabIndex = 2; + this.lblName.Text = "Slice"; + // + // lblMode + // + this.lblMode.AutoSize = true; + this.lblMode.Location = new System.Drawing.Point(98, 9); + this.lblMode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.lblMode.Name = "lblMode"; + this.lblMode.Size = new System.Drawing.Size(54, 21); + this.lblMode.TabIndex = 3; + this.lblMode.Text = "Mode"; + // + // dstarctl1 + // + this.dstarctl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.dstarctl1.DRMode = false; + this.dstarctl1.Font = new System.Drawing.Font("Courier New", 11F); + this.dstarctl1.Location = new System.Drawing.Point(-1, -1); + this.dstarctl1.Margin = new System.Windows.Forms.Padding(4); + this.dstarctl1.Modified = CODEC2_GUI.dstarctl.ModifyFlags.NOFLAGS; + this.dstarctl1.MY = ""; + this.dstarctl1.Name = "dstarctl1"; + this.dstarctl1.NOTE = ""; + this.dstarctl1.RPT1 = ""; + this.dstarctl1.RPT2 = ""; + this.dstarctl1.Size = new System.Drawing.Size(632, 146); + this.dstarctl1.TabIndex = 0; + this.dstarctl1.UR = ""; + // + // dstarlistitem + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + this.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.Controls.Add(this.lblMode); + this.Controls.Add(this.lblName); + this.Controls.Add(this.btnCommit); + this.Controls.Add(this.dstarctl1); + this.Font = new System.Drawing.Font("Courier New", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Margin = new System.Windows.Forms.Padding(4); + this.Name = "dstarlistitem"; + this.Size = new System.Drawing.Size(652, 149); + this.Load += new System.EventHandler(this.dstarlistitem_Load); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private dstarctl dstarctl1; + private System.Windows.Forms.Button btnCommit; + private System.Windows.Forms.Label lblName; + private System.Windows.Forms.Label lblMode; + } +} diff --git a/pc/CODEC2 GUI/CODEC2 GUI/dstarlistitem.cs b/pc/CODEC2 GUI/CODEC2 GUI/dstarlistitem.cs new file mode 100644 index 0000000..0280e2f --- /dev/null +++ b/pc/CODEC2 GUI/CODEC2 GUI/dstarlistitem.cs @@ -0,0 +1,356 @@ +/******************************************************************************* + * DstarListItem.cs + * + * DStar Flow List Item control + * + * Created on: 2015-08-22 + * Author: Mark Hanson / AA3RK / MKCM Software, LLC. + * + * + ******************************************************************************* + * + * Copyright (C) 2015 FlexRadio Systems. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + * Contact: gplflexradiocom or + * + * GPL C/O FlexRadio Systems + * 4616 W. Howard Lane + * Suite 1-150 + * Austin, TX USA 78728 + * + ******************************************************************************/ + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; +using System.Windows.Forms; +using Flex.Smoothlake.FlexLib; + +namespace CODEC2_GUI +{ + public partial class dstarlistitem : UserControl + { + public event EventHandler LogEvent; + + private Slice _slice; + public Slice slice + { + get { return _slice; } + set + { + if (_slice == value) + return; + + if (_slice != null && value == null) + { + _slice.PropertyChanged -= slc_PropertyChanged; + _slice.WaveformStatusReceived -= slc_WaveformStatusReceived; + this.Enabled = false; + this.Visible = false; + return; + } + _slice = value; + _slice.PropertyChanged += new PropertyChangedEventHandler(slc_PropertyChanged); + _slice.WaveformStatusReceived += new Slice.WaveformStatusReceivedEventHandler(slc_WaveformStatusReceived); + lblName.Text = "Slice " + Convert.ToChar(0x41 + _slice.Index).ToString(); + this.Enabled = true; + this.Visible = true; + slc_PropertyChanged(_slice, new PropertyChangedEventArgs("DemodMode")); + } + } + + //************************************* + // Slice Event Handlers + //************************************* + + void slc_PropertyChanged(object sender, PropertyChangedEventArgs e) + { + if (InvokeRequired) + { + Invoke(new MethodInvoker(delegate + { + slc_PropertyChanged(sender, e.PropertyName); + })); + } + else + { + slc_PropertyChanged(sender, e.PropertyName); + } + } + + void slc_PropertyChanged(object sender, string property_name) + { + Slice slc = sender as Slice; + if (slc == null) return; + + switch (property_name) + { + case "DemodMode": + // Is the mode set to FreeDV? + CheckDemodMode(slc); + break; + } + } + + private void CheckDemodMode(Slice slc) + { + if (slc.DemodMode == "DSTR" || slc.DemodMode == "D*FM") + { + this.Enabled = true; + dstarctl1.Visible = true; + slc.SendWaveformCommand("status"); + } + else + { + this.Enabled = false; + dstarctl1.Visible = false; + } + lblMode.Text = slc.DemodMode; + } + + + void slc_WaveformStatusReceived(Slice slc, string status) + { + if (InvokeRequired) + { + Invoke(new MethodInvoker(delegate + { + slc_WaveformStatusReceived(slc, status); + })); + return; + } + + string logMY = null; + string logNote = null; + string logUR = null; + string logRPT1 = null; + string logRPT2 = null; + bool setDRMode = false; + + string[] words = status.Split(' '); + + foreach (string kv in words) + { + string[] tokens = kv.Split('='); + + if (tokens.Length != 2) + { + continue; + } + + string key = tokens[0]; + string value = tokens[1]; + + value = value.Replace('\u007f', ' ').Trim(); + switch (key.ToLower()) + { + case "destination_rptr_tx": + dstarctl1.RPT2 = value == "DIRECT" ? string.Empty : value; + setDRMode = true; + break; + case "departure_rptr_tx": + dstarctl1.RPT1 = value == "DIRECT" ? string.Empty : value; + setDRMode = true; + break; + case "companion_call_tx": + dstarctl1.UR = value; + break; + case "own_call1_tx": + if (string.IsNullOrEmpty(value) || value == "CALLSIGN") + { + if (!string.IsNullOrEmpty(Properties.Settings.Default.MYCallSign)) + dstarctl1.MY = Properties.Settings.Default.MYCallSign; + else + dstarctl1.MY = string.Empty; + } + else + dstarctl1.MY = value; + break; + case "own_call2_tx": + dstarctl1.NOTE = value; + break; + + case "destination_rptr_rx": + logRPT2 = value == "DIRECT" ? string.Empty : value; + break; + case "departure_rptr_rx": + logRPT1 = value == "DIRECT" ? string.Empty : value; + break; + case "companion_call_rx": + logUR = value; + break; + case "own_call1_rx": + logMY = value; + break; + case "own_call2_rx": + logNote = value; + break; + } + } + + if (setDRMode) + { + dstarctl1.DRMode = string.IsNullOrEmpty(dstarctl1.RPT1) ? false : true; + } + + if (!string.IsNullOrEmpty(logMY) && !string.IsNullOrEmpty(logUR)) + { + if (LogEvent != null) + LogEvent(this, new LogEventArgs(string.Format("{0} UR: {1,-8} MY: {2,-13}{3}", + DateTime.UtcNow.ToString("yyyy-MM-dd HH:mm:ss"), + logUR, + logMY + (string.IsNullOrEmpty(logNote) ? string.Empty : "/" + logNote), + string.IsNullOrEmpty(logRPT1) ? string.Empty : + string.Format(" RPT1: {0,-8} RPT2: {1,-8}", logRPT1, logRPT2)))); + } + else + { + System.Diagnostics.Debug.WriteLine("log information not set"); + } + + btnCommit.Enabled = dstarctl1.Modified != dstarctl.ModifyFlags.NOFLAGS; + } + + + + public dstarlistitem() + { + InitializeComponent(); + } + + private void dstarlistitem_Load(object sender, EventArgs e) + { + dstarctl1.PropertyChanged += Dstarctl1_PropertyChanged; + + if (!string.IsNullOrEmpty(Properties.Settings.Default.URList)) + { + dstarctl1.URList = Properties.Settings.Default.URList.Split('|').ToList(); + dstarctl1.RPT1List = Properties.Settings.Default.RPT1List.Split('|').ToList(); + dstarctl1.RPT2List = Properties.Settings.Default.RPT2List.Split('|').ToList(); + } + + } + + private void Dstarctl1_PropertyChanged(object sender, PropertyChangedEventArgs e) + { + if (e.PropertyName == "Modified") + { + btnCommit.Enabled = dstarctl1.Modified != dstarctl.ModifyFlags.NOFLAGS; + } + } + + private void btnCommit_Click(object sender, EventArgs e) + { + if (dstarctl1.DRMode && string.IsNullOrEmpty(dstarctl1.RPT1)) + { + MessageBox.Show(this, "DR Mode requires RPT1 value!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); + return; + } + string cmd; + string rpt2 = string.IsNullOrEmpty(dstarctl1.RPT2) ? "DIRECT" : dstarctl1.RPT2; + cmd = "set destination_rptr=" + rpt2.Replace(" ", "\u007f"); + _slice.SendWaveformCommand(cmd); + string rpt1 = string.IsNullOrEmpty(dstarctl1.RPT1) ? "DIRECT" : dstarctl1.RPT1; + cmd = "set departure_rptr=" + rpt1.Replace(" ", "\u007f"); + _slice.SendWaveformCommand(cmd); + string ur = dstarctl1.UR; + cmd = "set companion_call=" + ur.Replace(" ", "\u007f"); + _slice.SendWaveformCommand(cmd); + string my = dstarctl1.MY; + cmd = "set own_call1=" + my.Replace(" ", "\u007f"); + _slice.SendWaveformCommand(cmd); + string note = dstarctl1.NOTE; + cmd = "set own_call2=" + note.Replace(" ", "\u007f"); + _slice.SendWaveformCommand(cmd); + + dstarctl1.Modified = dstarctl.ModifyFlags.NOFLAGS; + + btnCommit.Enabled = false; + + dstarctl1.MY = my; + dstarctl1.NOTE = note; + dstarctl1.UR = ur; + dstarctl1.RPT1 = rpt1 == "DIRECT" ? string.Empty : rpt1; + dstarctl1.RPT2 = rpt2 == "DIRECT" ? string.Empty : rpt2; + dstarctl1.DRMode = !string.IsNullOrEmpty(dstarctl1.RPT1); + + + // add new UR entry to dropdown list + List lst = new List(dstarctl1.URList); + ur = ur.ToUpper(); + if (!lst.Contains(ur)) + { + lst.Add(ur); + dstarctl1.URList = lst; + Properties.Settings.Default.URList = string.Join("|", lst); + } + + if (dstarctl1.DRMode) + { + if (rpt1.Length > 0 && rpt1 != "DIRECT") + { + lst = new List(dstarctl1.RPT1List); + rpt1 = rpt1.ToUpper(); + if (!lst.Contains(rpt1)) + { + lst.Add(rpt1); + dstarctl1.RPT1List = lst; + Properties.Settings.Default.RPT1List = string.Join("|", lst); + } + } + if (rpt2.Length > 0 && rpt2 != "DIRECT") + { + lst = new List(dstarctl1.RPT2List); + rpt2 = rpt2.ToUpper(); + if (!lst.Contains(rpt2)) + { + lst.Add(rpt2); + dstarctl1.RPT2List = lst; + Properties.Settings.Default.RPT2List = string.Join("|", lst); + } + } + } + + if (!string.IsNullOrEmpty(my)) + Properties.Settings.Default.MYCallSign = my; + + } + + public void ClearMYList() + { + dstarctl1.URList = new List(); + } + public void ClearRPT1List() + { + dstarctl1.RPT1List = new List(); + } + public void ClearRPT2List() + { + dstarctl1.RPT2List = new List(); + } + + } + + public class LogEventArgs : EventArgs + { + public string LogEntry { get; set; } + public LogEventArgs(string logentry) + { + LogEntry = logentry; + } + } +} diff --git a/pc/CODEC2 GUI/CODEC2 GUI/Form1.resx b/pc/CODEC2 GUI/CODEC2 GUI/dstarlistitem.resx similarity index 100% rename from pc/CODEC2 GUI/CODEC2 GUI/Form1.resx rename to pc/CODEC2 GUI/CODEC2 GUI/dstarlistitem.resx From 5aacd492f96178e4eadbf17cc9b5d140e9e9d233 Mon Sep 17 00:00:00 2001 From: mlhnet Date: Thu, 27 Aug 2015 10:20:32 -0400 Subject: [PATCH 2/6] Add Repeater selection and tuning --- pc/CODEC2 GUI/CODEC2 GUI/DstarInfo.cs | 327 +++++++++++++++--- pc/CODEC2 GUI/CODEC2 GUI/MainForm.Designer.cs | 69 ++-- pc/CODEC2 GUI/CODEC2 GUI/MainForm.cs | 55 ++- .../CODEC2 GUI/Properties/AssemblyInfo.cs | 4 +- .../CODEC2 GUI/ReflectorOrRepeater.cs | 51 +++ .../CODEC2 GUI/RepeaterModule.Designer.cs | 107 ++++++ pc/CODEC2 GUI/CODEC2 GUI/RepeaterModule.cs | 143 ++++++++ pc/CODEC2 GUI/CODEC2 GUI/RepeaterModule.resx | 120 +++++++ pc/CODEC2 GUI/CODEC2 GUI/SelectForm.cs | 42 ++- pc/CODEC2 GUI/CODEC2 GUI/ThumbDV_GUI.csproj | 10 + pc/CODEC2 GUI/CODEC2 GUI/dstarctl.Designer.cs | 13 +- pc/CODEC2 GUI/CODEC2 GUI/dstarctl.cs | 104 ++++-- .../CODEC2 GUI/dstarlistitem.Designer.cs | 9 +- pc/CODEC2 GUI/CODEC2 GUI/dstarlistitem.cs | 55 ++- pc/CODEC2 GUI/CODEC2 GUI/dstarlistitem.resx | 27 ++ 15 files changed, 992 insertions(+), 144 deletions(-) create mode 100644 pc/CODEC2 GUI/CODEC2 GUI/ReflectorOrRepeater.cs create mode 100644 pc/CODEC2 GUI/CODEC2 GUI/RepeaterModule.Designer.cs create mode 100644 pc/CODEC2 GUI/CODEC2 GUI/RepeaterModule.cs create mode 100644 pc/CODEC2 GUI/CODEC2 GUI/RepeaterModule.resx diff --git a/pc/CODEC2 GUI/CODEC2 GUI/DstarInfo.cs b/pc/CODEC2 GUI/CODEC2 GUI/DstarInfo.cs index 7b80558..8b18fd7 100644 --- a/pc/CODEC2 GUI/CODEC2 GUI/DstarInfo.cs +++ b/pc/CODEC2 GUI/CODEC2 GUI/DstarInfo.cs @@ -41,6 +41,7 @@ using System.Threading.Tasks; using System.IO; using System.Net.Http.Headers; using System.Reflection; +using System.Xml; namespace CODEC2_GUI { @@ -51,6 +52,21 @@ namespace CODEC2_GUI } + private static HttpClient _client; + private static HttpClient client + { + get + { + if (_client == null) + _client = new HttpClient() { BaseAddress = new Uri("http://apps.dstarinfo.com") }; + return _client; + } + } + private static string eventvalidation; + private static string viewstate; + private static string viewstategenerator; + + private List Repeaters_; public List Repeaters { @@ -59,14 +75,9 @@ namespace CODEC2_GUI if (Repeaters_ == null) { LoadRepeaters(); - if (Repeaters_ == null || Repeaters_.Count == 0) - { - try - { - FetchAndSaveRepeaterList(); - } - catch { } - } + if (Repeaters_ == null) + Repeaters_ = new List(); + } return Repeaters_; } @@ -93,9 +104,26 @@ namespace CODEC2_GUI } } - public bool FetchAndSaveRepeaterList() + public bool FetchAndSaveRepeaterList(string area) { - return false; + bool result = false; + try + { + List rptrs = GetDStarRepeaterByArea(area); + if (rptrs != null && rptrs.Count > 0) + { + SaveRepeaters(rptrs); + Repeaters_ = rptrs; + result = true; + } + } + catch (Exception ex) + { + string msg = "Fetch and save Repeater list failed!"; + System.Diagnostics.Debug.WriteLine(string.Format("{0} {1}", msg, ex.Message)); + throw new ApplicationException(msg, ex); + } + return result; } public bool FetchAndSaveReflectorList() @@ -120,17 +148,214 @@ namespace CODEC2_GUI return result; } + public List GetDStarRepeaterAreas() + { + List rptareas = new List(); + string htmlAreas = string.Empty; + + try + { + if (client != null) + { + HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, "D-STAR_Repeater_List.aspx"); + Task resp = client.SendAsync(request); + resp.Wait(); + resp.Result.EnsureSuccessStatusCode(); + + Task strm = resp.Result.Content.ReadAsStreamAsync(); + strm.Wait(); + using (StreamReader sr = new StreamReader(strm.Result, System.Text.Encoding.UTF8)) + { + htmlAreas = sr.ReadToEnd(); + } + } + + viewstate = getHiddenValues(htmlAreas, "id=\"__VIEWSTATE\" value=\""); + viewstategenerator = getHiddenValues(htmlAreas, "id=\"__VIEWSTATEGENERATOR\" value=\""); + eventvalidation = getHiddenValues(htmlAreas, "id=\"__EVENTVALIDATION\" value=\""); + + // parsing HTML select of areas + // start by finding "", ofs + 23); + if (ofs2 > 0) + { + string selVals = htmlAreas.Substring(ofs, ofs2 - ofs); + int ofs3 = 0; + int ofs4 = 0; + while (ofs4 < selVals.Length) + { + ofs4 = selVals.IndexOf(" - + - + - + @@ -354,6 +178,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -418,4 +309,5 @@ + diff --git a/DSP_API/Release/CODEC2_FREEDV/codebook.d b/DSP_API/Release/CODEC2_FREEDV/codebook.d deleted file mode 100644 index dc5f6f2..0000000 --- a/DSP_API/Release/CODEC2_FREEDV/codebook.d +++ /dev/null @@ -1,4 +0,0 @@ -CODEC2_FREEDV/codebook.d: ../CODEC2_FREEDV/codebook.c \ - ../CODEC2_FREEDV/defines.h - -../CODEC2_FREEDV/defines.h: diff --git a/DSP_API/Release/CODEC2_FREEDV/subdir.mk b/DSP_API/Release/CODEC2_FREEDV/subdir.mk deleted file mode 100644 index 01a752c..0000000 --- a/DSP_API/Release/CODEC2_FREEDV/subdir.mk +++ /dev/null @@ -1,96 +0,0 @@ -################################################################################ -# Automatically-generated file. Do not edit! -################################################################################ - -# Add inputs and outputs from these tool invocations to the build variables -C_SRCS += \ -../CODEC2_FREEDV/codebook.c \ -../CODEC2_FREEDV/codebookd.c \ -../CODEC2_FREEDV/codebookdt.c \ -../CODEC2_FREEDV/codebookge.c \ -../CODEC2_FREEDV/codebookjnd.c \ -../CODEC2_FREEDV/codebookjvm.c \ -../CODEC2_FREEDV/codebookvq.c \ -../CODEC2_FREEDV/codebookvqanssi.c \ -../CODEC2_FREEDV/codec2.c \ -../CODEC2_FREEDV/dump.c \ -../CODEC2_FREEDV/fdmdv.c \ -../CODEC2_FREEDV/fifo.c \ -../CODEC2_FREEDV/freedv_api.c \ -../CODEC2_FREEDV/golay23.c \ -../CODEC2_FREEDV/interp.c \ -../CODEC2_FREEDV/kiss_fft.c \ -../CODEC2_FREEDV/lpc.c \ -../CODEC2_FREEDV/lsp.c \ -../CODEC2_FREEDV/nlp.c \ -../CODEC2_FREEDV/pack.c \ -../CODEC2_FREEDV/phase.c \ -../CODEC2_FREEDV/postfilter.c \ -../CODEC2_FREEDV/quantise.c \ -../CODEC2_FREEDV/sine.c \ -../CODEC2_FREEDV/varicode.c - -OBJS += \ -./CODEC2_FREEDV/codebook.o \ -./CODEC2_FREEDV/codebookd.o \ -./CODEC2_FREEDV/codebookdt.o \ -./CODEC2_FREEDV/codebookge.o \ -./CODEC2_FREEDV/codebookjnd.o \ -./CODEC2_FREEDV/codebookjvm.o \ -./CODEC2_FREEDV/codebookvq.o \ -./CODEC2_FREEDV/codebookvqanssi.o \ -./CODEC2_FREEDV/codec2.o \ -./CODEC2_FREEDV/dump.o \ -./CODEC2_FREEDV/fdmdv.o \ -./CODEC2_FREEDV/fifo.o \ -./CODEC2_FREEDV/freedv_api.o \ -./CODEC2_FREEDV/golay23.o \ -./CODEC2_FREEDV/interp.o \ -./CODEC2_FREEDV/kiss_fft.o \ -./CODEC2_FREEDV/lpc.o \ -./CODEC2_FREEDV/lsp.o \ -./CODEC2_FREEDV/nlp.o \ -./CODEC2_FREEDV/pack.o \ -./CODEC2_FREEDV/phase.o \ -./CODEC2_FREEDV/postfilter.o \ -./CODEC2_FREEDV/quantise.o \ -./CODEC2_FREEDV/sine.o \ -./CODEC2_FREEDV/varicode.o - -C_DEPS += \ -./CODEC2_FREEDV/codebook.d \ -./CODEC2_FREEDV/codebookd.d \ -./CODEC2_FREEDV/codebookdt.d \ -./CODEC2_FREEDV/codebookge.d \ -./CODEC2_FREEDV/codebookjnd.d \ -./CODEC2_FREEDV/codebookjvm.d \ -./CODEC2_FREEDV/codebookvq.d \ -./CODEC2_FREEDV/codebookvqanssi.d \ -./CODEC2_FREEDV/codec2.d \ -./CODEC2_FREEDV/dump.d \ -./CODEC2_FREEDV/fdmdv.d \ -./CODEC2_FREEDV/fifo.d \ -./CODEC2_FREEDV/freedv_api.d \ -./CODEC2_FREEDV/golay23.d \ -./CODEC2_FREEDV/interp.d \ -./CODEC2_FREEDV/kiss_fft.d \ -./CODEC2_FREEDV/lpc.d \ -./CODEC2_FREEDV/lsp.d \ -./CODEC2_FREEDV/nlp.d \ -./CODEC2_FREEDV/pack.d \ -./CODEC2_FREEDV/phase.d \ -./CODEC2_FREEDV/postfilter.d \ -./CODEC2_FREEDV/quantise.d \ -./CODEC2_FREEDV/sine.d \ -./CODEC2_FREEDV/varicode.d - - -# Each subdirectory must supply rules for building sources it contributes -CODEC2_FREEDV/%.o: ../CODEC2_FREEDV/%.c - @echo 'Building file: $<' - @echo 'Invoking: GCC C Compiler' - arm-linux-gnueabihf-gcc -static -I"/home/graham/workspace/smartsdr-dsp/DSP_API" -I"/home/graham/workspace/smartsdr-dsp/DSP_API/SmartSDR_Interface" -I"/home/graham/workspace/smartsdr-dsp/DSP_API/CODEC2_FREEDV" -O3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<" - @echo 'Finished building: $<' - @echo ' ' - - diff --git a/DSP_API/Release/SmartSDR_Interface/subdir.mk b/DSP_API/Release/SmartSDR_Interface/subdir.mk deleted file mode 100644 index 80b1a54..0000000 --- a/DSP_API/Release/SmartSDR_Interface/subdir.mk +++ /dev/null @@ -1,60 +0,0 @@ -################################################################################ -# Automatically-generated file. Do not edit! -################################################################################ - -# Add inputs and outputs from these tool invocations to the build variables -C_SRCS += \ -../SmartSDR_Interface/cmd_basics.c \ -../SmartSDR_Interface/cmd_engine.c \ -../SmartSDR_Interface/discovery_client.c \ -../SmartSDR_Interface/hal_buffer.c \ -../SmartSDR_Interface/hal_listener.c \ -../SmartSDR_Interface/hal_vita.c \ -../SmartSDR_Interface/io_utils.c \ -../SmartSDR_Interface/sched_waveform.c \ -../SmartSDR_Interface/smartsdr_dsp_api.c \ -../SmartSDR_Interface/status_processor.c \ -../SmartSDR_Interface/traffic_cop.c \ -../SmartSDR_Interface/utils.c \ -../SmartSDR_Interface/vita_output.c - -OBJS += \ -./SmartSDR_Interface/cmd_basics.o \ -./SmartSDR_Interface/cmd_engine.o \ -./SmartSDR_Interface/discovery_client.o \ -./SmartSDR_Interface/hal_buffer.o \ -./SmartSDR_Interface/hal_listener.o \ -./SmartSDR_Interface/hal_vita.o \ -./SmartSDR_Interface/io_utils.o \ -./SmartSDR_Interface/sched_waveform.o \ -./SmartSDR_Interface/smartsdr_dsp_api.o \ -./SmartSDR_Interface/status_processor.o \ -./SmartSDR_Interface/traffic_cop.o \ -./SmartSDR_Interface/utils.o \ -./SmartSDR_Interface/vita_output.o - -C_DEPS += \ -./SmartSDR_Interface/cmd_basics.d \ -./SmartSDR_Interface/cmd_engine.d \ -./SmartSDR_Interface/discovery_client.d \ -./SmartSDR_Interface/hal_buffer.d \ -./SmartSDR_Interface/hal_listener.d \ -./SmartSDR_Interface/hal_vita.d \ -./SmartSDR_Interface/io_utils.d \ -./SmartSDR_Interface/sched_waveform.d \ -./SmartSDR_Interface/smartsdr_dsp_api.d \ -./SmartSDR_Interface/status_processor.d \ -./SmartSDR_Interface/traffic_cop.d \ -./SmartSDR_Interface/utils.d \ -./SmartSDR_Interface/vita_output.d - - -# Each subdirectory must supply rules for building sources it contributes -SmartSDR_Interface/%.o: ../SmartSDR_Interface/%.c - @echo 'Building file: $<' - @echo 'Invoking: GCC C Compiler' - arm-linux-gnueabihf-gcc -static -I"/home/graham/workspace/smartsdr-dsp/DSP_API" -I"/home/graham/workspace/smartsdr-dsp/DSP_API/SmartSDR_Interface" -I"/home/graham/workspace/smartsdr-dsp/DSP_API/CODEC2_FREEDV" -O3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<" - @echo 'Finished building: $<' - @echo ' ' - - diff --git a/DSP_API/Release/makefile b/DSP_API/Release/makefile deleted file mode 100644 index 2872af3..0000000 --- a/DSP_API/Release/makefile +++ /dev/null @@ -1,51 +0,0 @@ -################################################################################ -# Automatically-generated file. Do not edit! -################################################################################ - --include ../makefile.init - -RM := rm -rf - -# All of the sources participating in the build are defined here --include sources.mk --include SmartSDR_Interface/subdir.mk --include CODEC2_FREEDV/subdir.mk --include subdir.mk --include objects.mk - -ifneq ($(MAKECMDGOALS),clean) -ifneq ($(strip $(C_DEPS)),) --include $(C_DEPS) -endif -endif - --include ../makefile.defs - -# Add inputs and outputs from these tool invocations to the build variables - -# All Target -all: freedv - -# Tool invocations -freedv: $(OBJS) $(USER_OBJS) - @echo 'Building target: $@' - @echo 'Invoking: GCC C Linker' - arm-linux-gnueabihf-gcc -static -o "freedv" $(OBJS) $(USER_OBJS) $(LIBS) - @echo 'Finished building target: $@' - @echo ' ' - $(MAKE) --no-print-directory post-build - -# Other Targets -clean: - -$(RM) $(OBJS)$(C_DEPS)$(EXECUTABLES) freedv - -@echo ' ' - -post-build: - -@echo 'Install in BeagleBone at /home/debian/bin' - -scp freedv root@192.168.20.33:/home/debian/bin/ - -@echo ' ' - -.PHONY: all clean dependents -.SECONDARY: post-build - --include ../makefile.targets diff --git a/DSP_API/Release/objects.mk b/DSP_API/Release/objects.mk deleted file mode 100644 index 61d364b..0000000 --- a/DSP_API/Release/objects.mk +++ /dev/null @@ -1,8 +0,0 @@ -################################################################################ -# Automatically-generated file. Do not edit! -################################################################################ - -USER_OBJS := - -LIBS := -lm -lpthread -lrt - diff --git a/DSP_API/Release/sources.mk b/DSP_API/Release/sources.mk deleted file mode 100644 index 7dc98a2..0000000 --- a/DSP_API/Release/sources.mk +++ /dev/null @@ -1,19 +0,0 @@ -################################################################################ -# Automatically-generated file. Do not edit! -################################################################################ - -O_SRCS := -C_SRCS := -S_UPPER_SRCS := -OBJ_SRCS := -ASM_SRCS := -OBJS := -C_DEPS := -EXECUTABLES := - -# Every subdirectory with source files must be described here -SUBDIRS := \ -. \ -SmartSDR_Interface \ -CODEC2_FREEDV \ - diff --git a/DSP_API/Release/subdir.mk b/DSP_API/Release/subdir.mk deleted file mode 100644 index d466154..0000000 --- a/DSP_API/Release/subdir.mk +++ /dev/null @@ -1,30 +0,0 @@ -################################################################################ -# Automatically-generated file. Do not edit! -################################################################################ - -# Add inputs and outputs from these tool invocations to the build variables -C_SRCS += \ -../circular_buffer.c \ -../main.c \ -../resampler.c - -OBJS += \ -./circular_buffer.o \ -./main.o \ -./resampler.o - -C_DEPS += \ -./circular_buffer.d \ -./main.d \ -./resampler.d - - -# Each subdirectory must supply rules for building sources it contributes -%.o: ../%.c - @echo 'Building file: $<' - @echo 'Invoking: GCC C Compiler' - arm-linux-gnueabihf-gcc -static -I"/home/graham/workspace/smartsdr-dsp/DSP_API" -I"/home/graham/workspace/smartsdr-dsp/DSP_API/SmartSDR_Interface" -I"/home/graham/workspace/smartsdr-dsp/DSP_API/CODEC2_FREEDV" -O3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o "$@" "$<" - @echo 'Finished building: $<' - @echo ' ' - - diff --git a/DSP_API/SmartSDR_Interface/sched_waveform.c b/DSP_API/SmartSDR_Interface/sched_waveform.c index 01d189e..485529c 100644 --- a/DSP_API/SmartSDR_Interface/sched_waveform.c +++ b/DSP_API/SmartSDR_Interface/sched_waveform.c @@ -304,52 +304,53 @@ void sched_waveform_setOwnCall1( uint32 slice , const char * owncall1 ) { } void sched_waveform_setOwnCall2( uint32 slice , const char * owncall2 ) { - /* Ignore slice for now */ - char string[10]; - strncpy( string, owncall2, 5 ); - charReplace( string, ' ', ( char ) 0x7F ); - memset( _dstar->outgoing_header.own_call2, ' ', 4 ); /* We limit the copy to the string length so that * we can fill the rest of the string with spaces to * comply with DSTAR */ - uint32 copy_len = strlen( owncall2 ); - - if ( copy_len > 5 ) - copy_len = 5; - - strncpy( _dstar->outgoing_header.own_call2, string, copy_len ); - + memset( _dstar->outgoing_header.own_call2, ' ', 4 ); /* Enforce termination */ _dstar->outgoing_header.own_call2[4] = '\0'; + if (strlen(owncall2) > 0) + { + strncpy( string, owncall2, 4); + string[4] = 0; + charReplace( string, ( char ) 0x7F, ' ' ); + uint32 copy_len = strlen( owncall2 ); + if ( copy_len > 4 ) + copy_len = 4; + strncpy( _dstar->outgoing_header.own_call2, string, copy_len ); + } + dstar_dumpHeader( &( _dstar->outgoing_header ) ); } void sched_waveform_setMessage( uint32 slice, const char * message) { - /* Ignore slice for now */ char string[SLOW_DATA_MESSAGE_LENGTH_BYTES + 1 ]; - strncpy( string, message, SLOW_DATA_MESSAGE_LENGTH_BYTES + 1); - charReplace( string, ' ', ( char ) 0x7F ); - memset(_dstar->slow_encoder->message, ' ', SLOW_DATA_MESSAGE_LENGTH_BYTES); - /* We limit the copy to the string length so that * we can fill the rest of the string with spaces to * comply with DSTAR */ - - uint32 copy_len = strlen( string ); - - if ( copy_len > SLOW_DATA_MESSAGE_LENGTH_BYTES ) - copy_len = SLOW_DATA_MESSAGE_LENGTH_BYTES; - - strncpy(_dstar->slow_encoder->message, string, copy_len); - + memset(_dstar->slow_encoder->message, ' ', SLOW_DATA_MESSAGE_LENGTH_BYTES); /* Enforce termination */ _dstar->slow_encoder->message[SLOW_DATA_MESSAGE_LENGTH_BYTES] = '\0'; + /* Ignore slice for now */ + if (strlen(message) > 0) + { + strncpy( string, message, SLOW_DATA_MESSAGE_LENGTH_BYTES); + string[SLOW_DATA_MESSAGE_LENGTH_BYTES] = 0; + charReplace( string, ( char ) 0x7F, ' ' ); + uint32 copy_len = strlen( string ); + if ( copy_len > SLOW_DATA_MESSAGE_LENGTH_BYTES ) + copy_len = SLOW_DATA_MESSAGE_LENGTH_BYTES; + strncpy(_dstar->slow_encoder->message, string, copy_len); + } + + output( "TX Message: '%s'\n", _dstar->slow_encoder->message ); } void sched_waveform_setFD( int fd ) { @@ -520,8 +521,16 @@ static void * _sched_waveform_thread( void * param ) { for ( j = 0 ; j < nout ; j++ ) cbWriteShort( RX3_cb, speech_out[j] ); } + + if (_dstar->rx_state == END_PATTERN) + { + char msg[64]; + sprintf( msg, "waveform status slice=%d RX=END", _dstar->slice); + tc_sendSmartSDRcommand( msg, FALSE, NULL ); + } } + // Check for >= 160 samples in RX3_cb, convert to floats // and spin the upsampler. Move output to RX4_cb. diff --git a/DSP_API/ThumbDV/dstar.c b/DSP_API/ThumbDV/dstar.c index e3a82bd..300e619 100644 --- a/DSP_API/ThumbDV/dstar.c +++ b/DSP_API/ThumbDV/dstar.c @@ -603,7 +603,8 @@ void dstar_updateStatus( DSTAR_MACHINE machine, uint32 slice, enum STATUS_TYPE } char status[200] = {0}; - char header_string[200] = {0}; + char header_string[256] = {0}; + char message_string[21]; /* Make copy to replace spaces with special char */ @@ -634,19 +635,30 @@ void dstar_updateStatus( DSTAR_MACHINE machine, uint32 slice, enum STATUS_TYPE charReplace( ( char * )h.destination_rptr, ' ', ( char ) 0x7F ); charReplace( ( char * )h.departure_rptr, ' ', ( char ) 0x7F ); - charReplace( ( char * )h.companion_call, ' ', ( char ) 0x7F ); + charReplace((char *) h.companion_call, ' ', ( char ) 0x7F ); charReplace( ( char * )h.own_call1, ' ', ( char ) 0x7F ); charReplace( ( char * )h.own_call2, ' ', ( char ) 0x7F ); sprintf( header_string, "destination_rptr_tx=%s departure_rptr_tx=%s companion_call_tx=%s own_call1_tx=%s own_call2_tx=%s", h.destination_rptr, h.departure_rptr, h.companion_call, h.own_call1, h.own_call2 ); + if (machine->slow_encoder != NULL && machine->slow_encoder->message[0] != 0) + { + memcpy( message_string, machine->slow_encoder->message, sizeof( message_string ) ); + message_string[sizeof( message_string ) - 1] = 0; + charReplace( message_string, ' ', ( char ) 0x7F ); + sprintf( header_string + strlen(header_string), " message_tx=%s", message_string); + } + sprintf( status, "waveform status slice=%d %s", slice, header_string ); tc_sendSmartSDRcommand( status, FALSE, NULL ); break; case STATUS_SLOW_DATA_MESSAGE: - sprintf( status, "waveform status slice=%d message=%s", slice, machine->slow_decoder->message_string); + memcpy( message_string, machine->slow_decoder->message_string, sizeof( message_string ) ); + message_string[sizeof( message_string ) - 1] = 0; + charReplace( message_string, ' ', ( char ) 0x7F ); + sprintf( status, "waveform status slice=%d message=%s", slice, message_string); tc_sendSmartSDRcommand( status, FALSE, NULL ); break; } From f737a6b6181a30016412edfc09f166c63d12dbe2 Mon Sep 17 00:00:00 2001 From: mlhnet Date: Sun, 30 Aug 2015 19:25:56 -0400 Subject: [PATCH 5/6] Add message field, improve logging --- .gitignore | 9 ++ pc/CODEC2 GUI/CODEC2 GUI/App.config | 3 + pc/CODEC2 GUI/CODEC2 GUI/MainForm.cs | 1 + .../CODEC2 GUI/Properties/AssemblyInfo.cs | 4 +- .../Properties/Settings.Designer.cs | 12 ++ .../CODEC2 GUI/Properties/Settings.settings | 3 + pc/CODEC2 GUI/CODEC2 GUI/ThumbDV_GUI.csproj | 2 +- pc/CODEC2 GUI/CODEC2 GUI/dstarctl.Designer.cs | 30 ++++- pc/CODEC2 GUI/CODEC2 GUI/dstarctl.cs | 69 +++++++++++- pc/CODEC2 GUI/CODEC2 GUI/dstarctl.resx | 3 + .../CODEC2 GUI/dstarlistitem.Designer.cs | 5 +- pc/CODEC2 GUI/CODEC2 GUI/dstarlistitem.cs | 103 ++++++++++++++++-- 12 files changed, 225 insertions(+), 19 deletions(-) diff --git a/.gitignore b/.gitignore index 4d40434..f0f4d72 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ *.ko *.obj *.elf +obj # Libraries *.lib @@ -21,3 +22,11 @@ *.i*86 *.x86_64 *.hex + +# Others +.metadata +.vs +bin +Debug +Release +.settings diff --git a/pc/CODEC2 GUI/CODEC2 GUI/App.config b/pc/CODEC2 GUI/CODEC2 GUI/App.config index f641abf..c67a3ad 100644 --- a/pc/CODEC2 GUI/CODEC2 GUI/App.config +++ b/pc/CODEC2 GUI/CODEC2 GUI/App.config @@ -28,6 +28,9 @@ + + + diff --git a/pc/CODEC2 GUI/CODEC2 GUI/MainForm.cs b/pc/CODEC2 GUI/CODEC2 GUI/MainForm.cs index e35250b..1e8554b 100644 --- a/pc/CODEC2 GUI/CODEC2 GUI/MainForm.cs +++ b/pc/CODEC2 GUI/CODEC2 GUI/MainForm.cs @@ -213,6 +213,7 @@ namespace CODEC2_GUI dli.ClearMYList(); dli.ClearRPT1List(); dli.ClearRPT2List(); + dli.ClearMESSAGEList(); } } diff --git a/pc/CODEC2 GUI/CODEC2 GUI/Properties/AssemblyInfo.cs b/pc/CODEC2 GUI/CODEC2 GUI/Properties/AssemblyInfo.cs index 32b0378..2ff013a 100644 --- a/pc/CODEC2 GUI/CODEC2 GUI/Properties/AssemblyInfo.cs +++ b/pc/CODEC2 GUI/CODEC2 GUI/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.4.0.1")] -[assembly: AssemblyFileVersion("1.4.0.1")] +[assembly: AssemblyVersion("1.4.0.2")] +[assembly: AssemblyFileVersion("1.4.0.2")] diff --git a/pc/CODEC2 GUI/CODEC2 GUI/Properties/Settings.Designer.cs b/pc/CODEC2 GUI/CODEC2 GUI/Properties/Settings.Designer.cs index 7d3ca0b..43f63ad 100644 --- a/pc/CODEC2 GUI/CODEC2 GUI/Properties/Settings.Designer.cs +++ b/pc/CODEC2 GUI/CODEC2 GUI/Properties/Settings.Designer.cs @@ -91,5 +91,17 @@ namespace CODEC2_GUI.Properties { this["MYCallSign"] = value; } } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("")] + public string MESSAGEList { + get { + return ((string)(this["MESSAGEList"])); + } + set { + this["MESSAGEList"] = value; + } + } } } diff --git a/pc/CODEC2 GUI/CODEC2 GUI/Properties/Settings.settings b/pc/CODEC2 GUI/CODEC2 GUI/Properties/Settings.settings index 05ccdaf..4ff4fa7 100644 --- a/pc/CODEC2 GUI/CODEC2 GUI/Properties/Settings.settings +++ b/pc/CODEC2 GUI/CODEC2 GUI/Properties/Settings.settings @@ -20,5 +20,8 @@ + + + \ No newline at end of file diff --git a/pc/CODEC2 GUI/CODEC2 GUI/ThumbDV_GUI.csproj b/pc/CODEC2 GUI/CODEC2 GUI/ThumbDV_GUI.csproj index f61dfea..d5fa3d2 100644 --- a/pc/CODEC2 GUI/CODEC2 GUI/ThumbDV_GUI.csproj +++ b/pc/CODEC2 GUI/CODEC2 GUI/ThumbDV_GUI.csproj @@ -8,7 +8,7 @@ WinExe Properties CODEC2_GUI - ThumbDV_GUI + ThumbDV_DSTAR_GUI v4.5 512 true diff --git a/pc/CODEC2 GUI/CODEC2 GUI/dstarctl.Designer.cs b/pc/CODEC2 GUI/CODEC2 GUI/dstarctl.Designer.cs index b94ef6b..2574899 100644 --- a/pc/CODEC2 GUI/CODEC2 GUI/dstarctl.Designer.cs +++ b/pc/CODEC2 GUI/CODEC2 GUI/dstarctl.Designer.cs @@ -51,6 +51,9 @@ this.btnReset = new System.Windows.Forms.Button(); this.btnRef = new System.Windows.Forms.Button(); this.btnRpt = new System.Windows.Forms.Button(); + this.msgtxt = new System.Windows.Forms.ComboBox(); + this.lblMESSAGE = new System.Windows.Forms.Label(); + this.msgtip = new System.Windows.Forms.ToolTip(this.components); this.SuspendLayout(); // // mycallsign @@ -216,9 +219,31 @@ this.btnRpt.UseVisualStyleBackColor = true; this.btnRpt.Click += new System.EventHandler(this.btnRpt_Click); // + // msgtxt + // + this.msgtxt.FormattingEnabled = true; + this.msgtxt.Location = new System.Drawing.Point(156, 157); + this.msgtxt.MaxLength = 20; + this.msgtxt.Name = "msgtxt"; + this.msgtxt.Size = new System.Drawing.Size(462, 28); + this.msgtxt.TabIndex = 15; + this.msgtxt.SelectedIndexChanged += new System.EventHandler(this.msgtxt_SelectedIndexChanged); + this.msgtxt.TextChanged += new System.EventHandler(this.msgtxt_TextChanged); + // + // lblMESSAGE + // + this.lblMESSAGE.AutoSize = true; + this.lblMESSAGE.Location = new System.Drawing.Point(34, 157); + this.lblMESSAGE.Name = "lblMESSAGE"; + this.lblMESSAGE.Size = new System.Drawing.Size(98, 21); + this.lblMESSAGE.TabIndex = 16; + this.lblMESSAGE.Text = "Message:"; + // // dstarctl // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + this.Controls.Add(this.lblMESSAGE); + this.Controls.Add(this.msgtxt); this.Controls.Add(this.btnRpt); this.Controls.Add(this.btnRef); this.Controls.Add(this.btnReset); @@ -237,7 +262,7 @@ this.Font = new System.Drawing.Font("Courier New", 11F); this.Margin = new System.Windows.Forms.Padding(4); this.Name = "dstarctl"; - this.Size = new System.Drawing.Size(730, 148); + this.Size = new System.Drawing.Size(730, 198); this.Load += new System.EventHandler(this.dstarctl_Load); this.ResumeLayout(false); this.PerformLayout(); @@ -268,5 +293,8 @@ private System.Windows.Forms.Button btnReset; private System.Windows.Forms.Button btnRef; private System.Windows.Forms.Button btnRpt; + private System.Windows.Forms.ComboBox msgtxt; + private System.Windows.Forms.Label lblMESSAGE; + private System.Windows.Forms.ToolTip msgtip; } } diff --git a/pc/CODEC2 GUI/CODEC2 GUI/dstarctl.cs b/pc/CODEC2 GUI/CODEC2 GUI/dstarctl.cs index 780b5e0..b1434a2 100644 --- a/pc/CODEC2 GUI/CODEC2 GUI/dstarctl.cs +++ b/pc/CODEC2 GUI/CODEC2 GUI/dstarctl.cs @@ -51,7 +51,8 @@ namespace CODEC2_GUI URFLAG = 4, RPT1FLAG = 8, RPT2FLAG = 16, - DRFLAG = 32 + DRFLAG = 32, + MESSAGE = 64 } public ModifyFlags Modified { get; set; } @@ -61,6 +62,7 @@ namespace CODEC2_GUI private string UROrig = string.Empty; private string RPT1Orig = string.Empty; private string RPT2Orig = string.Empty; + private string MESSAGEOrig = string.Empty; private bool inreset; @@ -199,6 +201,27 @@ namespace CODEC2_GUI } } + public string MESSAGE + { + get + { + return msgtxt.Text; + } + set + { + if (value == null) + value = string.Empty; + if (string.Compare(value, msgtxt.Text, true) != 0) + { + msgtxt.Text = value.ToUpper(); + Modified = Modified & ~ModifyFlags.MESSAGE; + OnPropertyChanged("MESSAGE"); + } + MESSAGEOrig = value; + updateReset(); + } + } + public List URList { get @@ -257,6 +280,23 @@ namespace CODEC2_GUI } } + public List MESSAGEList + { + get + { + List lst = new List(msgtxt.Items.Cast()); + return lst; + } + set + { + msgtxt.Items.Clear(); + if (value != null && value.Count > 0) + { + msgtxt.Items.AddRange(value.ToArray()); + } + } + } + public dstarctl() { InitializeComponent(); @@ -320,6 +360,7 @@ namespace CODEC2_GUI mynotetip.SetToolTip(mynotetxt, "Note (4 chars max)"); dvtip.SetToolTip(rbDV, "DStar Simplex Mode"); drtip.SetToolTip(rbDR, "DStar Repeater Mode"); + msgtip.SetToolTip(msgtxt, "Slow Data Message (20 chars max)"); } @@ -367,6 +408,17 @@ namespace CODEC2_GUI OnPropertyChanged("RPT2"); OnPropertyChanged("Modified"); } + + private void msgtxt_TextChanged(object sender, EventArgs e) + { + if (inreset) + return; + Modified = Modified | ModifyFlags.MESSAGE; + OnPropertyChanged("MESSAGE"); + OnPropertyChanged("Modified"); + } + + private void rpt1txt_SelectedIndexChanged(object sender, EventArgs e) { if (inreset) @@ -394,10 +446,21 @@ namespace CODEC2_GUI OnPropertyChanged("Modified"); } + private void msgtxt_SelectedIndexChanged(object sender, EventArgs e) + { + if (inreset) + return; + Modified = Modified | ModifyFlags.MESSAGE; + OnPropertyChanged("MESSAGE"); + OnPropertyChanged("Modified"); + } + + private void updateReset() { - bool isorig = (MYOrig == MY && NOTEOrig == NOTE && UROrig == UR && RPT1Orig == RPT1 && RPT2Orig == RPT2); + bool isorig = (MYOrig == MY && NOTEOrig == NOTE && UROrig == UR && + RPT1Orig == RPT1 && RPT2Orig == RPT2 && MESSAGEOrig == MESSAGE); if (btnReset.Visible == isorig) { @@ -425,6 +488,7 @@ namespace CODEC2_GUI btnRpt.Visible = rpt2txt.Enabled = DRModeOrig; + msgtxt.Text = MESSAGEOrig; btnReset.Visible = false; inreset = false; @@ -435,6 +499,7 @@ namespace CODEC2_GUI OnPropertyChanged("UR"); OnPropertyChanged("RPT1"); OnPropertyChanged("RPT2"); + OnPropertyChanged("MESSAGE"); OnPropertyChanged("Modified"); } diff --git a/pc/CODEC2 GUI/CODEC2 GUI/dstarctl.resx b/pc/CODEC2 GUI/CODEC2 GUI/dstarctl.resx index e9d531b..48996c7 100644 --- a/pc/CODEC2 GUI/CODEC2 GUI/dstarctl.resx +++ b/pc/CODEC2 GUI/CODEC2 GUI/dstarctl.resx @@ -138,4 +138,7 @@ 624, 17 + + 713, 17 + \ No newline at end of file diff --git a/pc/CODEC2 GUI/CODEC2 GUI/dstarlistitem.Designer.cs b/pc/CODEC2 GUI/CODEC2 GUI/dstarlistitem.Designer.cs index 74cceaf..6cd4f28 100644 --- a/pc/CODEC2 GUI/CODEC2 GUI/dstarlistitem.Designer.cs +++ b/pc/CODEC2 GUI/CODEC2 GUI/dstarlistitem.Designer.cs @@ -75,6 +75,7 @@ this.dstarctl1.Font = new System.Drawing.Font("Courier New", 11F); this.dstarctl1.Location = new System.Drawing.Point(-1, -1); this.dstarctl1.Margin = new System.Windows.Forms.Padding(4); + this.dstarctl1.MESSAGE = ""; this.dstarctl1.Modified = CODEC2_GUI.dstarctl.ModifyFlags.NOFLAGS; this.dstarctl1.MY = ""; this.dstarctl1.Name = "dstarctl1"; @@ -83,7 +84,7 @@ this.dstarctl1.RPT1List = ((System.Collections.Generic.List)(resources.GetObject("dstarctl1.RPT1List"))); this.dstarctl1.RPT2 = ""; this.dstarctl1.RPT2List = ((System.Collections.Generic.List)(resources.GetObject("dstarctl1.RPT2List"))); - this.dstarctl1.Size = new System.Drawing.Size(731, 146); + this.dstarctl1.Size = new System.Drawing.Size(731, 208); this.dstarctl1.TabIndex = 0; this.dstarctl1.UR = ""; this.dstarctl1.URList = ((System.Collections.Generic.List)(resources.GetObject("dstarctl1.URList"))); @@ -99,7 +100,7 @@ this.Font = new System.Drawing.Font("Courier New", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.Margin = new System.Windows.Forms.Padding(4); this.Name = "dstarlistitem"; - this.Size = new System.Drawing.Size(734, 149); + this.Size = new System.Drawing.Size(734, 206); this.Load += new System.EventHandler(this.dstarlistitem_Load); this.ResumeLayout(false); this.PerformLayout(); diff --git a/pc/CODEC2 GUI/CODEC2 GUI/dstarlistitem.cs b/pc/CODEC2 GUI/CODEC2 GUI/dstarlistitem.cs index 59e8259..88a65da 100644 --- a/pc/CODEC2 GUI/CODEC2 GUI/dstarlistitem.cs +++ b/pc/CODEC2 GUI/CODEC2 GUI/dstarlistitem.cs @@ -120,6 +120,11 @@ namespace CODEC2_GUI lblMode.Text = slc.DemodMode; } + private int headerCount; + private bool headerSent; + private string headerInfo; + private bool messageSent; + private string messageInfo; void slc_WaveformStatusReceived(Slice slc, string status) { @@ -138,6 +143,8 @@ namespace CODEC2_GUI string logRPT1 = null; string logRPT2 = null; bool setDRMode = false; + string logMessage = null; + bool rxEnd = false; string[] words = status.Split(' '); @@ -181,6 +188,9 @@ namespace CODEC2_GUI case "own_call2_tx": dstarctl1.NOTE = value; break; + case "message_tx": + dstarctl1.MESSAGE = value; + break; case "destination_rptr_rx": logRPT2 = value == "DIRECT" ? string.Empty : value; @@ -189,6 +199,7 @@ namespace CODEC2_GUI logRPT1 = value == "DIRECT" ? string.Empty : value; break; case "companion_call_rx": + headerCount++; logUR = value; break; case "own_call1_rx": @@ -197,6 +208,13 @@ namespace CODEC2_GUI case "own_call2_rx": logNote = value; break; + case "message": + logMessage = value; + break; + case "rx": + if (value == "END") + rxEnd = true; + break; } } @@ -205,20 +223,64 @@ namespace CODEC2_GUI dstarctl1.DRMode = string.IsNullOrEmpty(dstarctl1.RPT1) ? false : true; } - if (!string.IsNullOrEmpty(logMY) && !string.IsNullOrEmpty(logUR)) + if (LogEvent != null) { - if (LogEvent != null) - LogEvent(this, new LogEventArgs(string.Format("{0} CALLED: {1,-8} CALLER: {2,-13}{3}", - DateTime.UtcNow.ToString("yyyy-MM-dd HH:mm:ss"), - logUR, - logMY + (string.IsNullOrEmpty(logNote) ? string.Empty : "/" + logNote), - string.IsNullOrEmpty(logRPT1) ? string.Empty : - string.Format(" RPT1: {0,-8} RPT2: {1,-8}", logRPT1, logRPT2)))); + string msg = null; + // format message if present + if (!string.IsNullOrWhiteSpace(logMessage)) + msg = string.Format(" MSG:{0}", logMessage.Trim()); + // determine if it is new + if (msg != null && (messageInfo == null || string.Compare(messageInfo, msg, true) != 0)) + { + messageInfo = msg; + messageSent = false; + } + + // determin if header info + if (!string.IsNullOrEmpty(logMY) && !string.IsNullOrEmpty(logUR)) + { + // format header info + string hdr = string.Format("CALLED: {0,-8} CALLER: {1,-13}{2}", + logUR, logMY + (string.IsNullOrEmpty(logNote) ? string.Empty : "/" + logNote), + string.IsNullOrEmpty(logRPT1) ? string.Empty : string.Format(" RPT1: {0,-8} RPT2: {1,-8}", logRPT1, logRPT2)); + // see if header is new + if (headerInfo == null || string.Compare(headerInfo, hdr, true) != 0) + { + headerInfo = hdr; + headerSent = false; + } + } + + // builder header + StringBuilder sb = new StringBuilder(); + bool msg2snd = (messageInfo != null && messageSent == false); + // log info if we get header for third time or finally got message + bool hdr2snd = (headerInfo != null && headerSent == false && (headerCount > 3 || msg2snd)); + if (hdr2snd || msg2snd) + sb.Append(DateTime.UtcNow.ToString("yyyy-MM-dd HH:mm:ss")); + if (hdr2snd) + { + headerSent = true; + sb.AppendFormat(" {0}", headerInfo); + } + if (msg2snd) + { + messageSent = true; + sb.AppendFormat(" {0}", logMessage); + } + if (sb.Length > 0) + LogEvent(this, new LogEventArgs(sb.ToString())); + + if (rxEnd) // reset header cache if end of RX + { + headerSent = messageSent = false; + headerCount = 0; + headerInfo = null; + messageInfo = null; + } } else - { - System.Diagnostics.Debug.WriteLine("log information not set"); - } + headerCount = 0; btnCommit.Enabled = dstarctl1.Modified != dstarctl.ModifyFlags.NOFLAGS; } @@ -239,6 +301,7 @@ namespace CODEC2_GUI dstarctl1.URList = Properties.Settings.Default.URList.Split('|').ToList(); dstarctl1.RPT1List = Properties.Settings.Default.RPT1List.Split('|').ToList(); dstarctl1.RPT2List = Properties.Settings.Default.RPT2List.Split('|').ToList(); + dstarctl1.MESSAGEList = Properties.Settings.Default.MESSAGEList.Split('|').ToList(); } } @@ -274,6 +337,9 @@ namespace CODEC2_GUI string note = dstarctl1.NOTE; cmd = "set own_call2=" + note.Replace(" ", "\u007f"); _slice.SendWaveformCommand(cmd); + string message = dstarctl1.MESSAGE; + cmd = "set message=" + message.Replace(" ", "\u007f"); + _slice.SendWaveformCommand(cmd); if (string.IsNullOrEmpty(dstarctl1.RPT1)) { @@ -366,6 +432,17 @@ namespace CODEC2_GUI } } + if (message.Length > 0) + { + lst = new List(dstarctl1.MESSAGEList); + if (!lst.Contains(message)) + { + lst.Add(message); + dstarctl1.MESSAGEList = lst; + Properties.Settings.Default.MESSAGEList = string.Join("|", lst); + } + } + if (!string.IsNullOrEmpty(my)) Properties.Settings.Default.MYCallSign = my; @@ -383,6 +460,10 @@ namespace CODEC2_GUI { dstarctl1.RPT2List = new List(); } + public void ClearMESSAGEList() + { + dstarctl1.MESSAGEList = new List(); + } } From 134cb2cfee585e93f53366037ea35e0c13441dba Mon Sep 17 00:00:00 2001 From: mlhnet Date: Sun, 30 Aug 2015 20:05:23 -0400 Subject: [PATCH 6/6] INNO Setup File --- ...x_ThumbDV_Waveform_Inno_Install_Script.iss | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 pc/CODEC2 GUI/CODEC2_GUI_INSTALLER/Flex_ThumbDV_Waveform_Inno_Install_Script.iss diff --git a/pc/CODEC2 GUI/CODEC2_GUI_INSTALLER/Flex_ThumbDV_Waveform_Inno_Install_Script.iss b/pc/CODEC2 GUI/CODEC2_GUI_INSTALLER/Flex_ThumbDV_Waveform_Inno_Install_Script.iss new file mode 100644 index 0000000..952119f --- /dev/null +++ b/pc/CODEC2 GUI/CODEC2_GUI_INSTALLER/Flex_ThumbDV_Waveform_Inno_Install_Script.iss @@ -0,0 +1,51 @@ +; + +#define MyAppName "Flex DSTAR Waveform" +#define MyAppVersion "1.4.0.2" +#define MyAppPublisher "FlexRadio Systems, LLC" +#define MyAppURL "http://www.flexradio.com/" +#define MyAppExeName "ThumbDV_DSTAR_GUI.exe" + +[Setup] +AppId={{2AA4AC17-A170-4825-9BE9-D9974CCC9444} +AppName={#MyAppName} +AppVersion={#MyAppVersion} +VersionInfoVersion={#MyAppVersion} +AppVerName={#MyAppName} {#MyAppVersion} +AppPublisher={#MyAppPublisher} +AppPublisherURL={#MyAppURL} +AppSupportURL={#MyAppURL} +AppUpdatesURL={#MyAppURL} +DefaultDirName=FlexRadio Systems\ThumbDV DSTAR +DisableDirPage=yes +DefaultGroupName=Flex DSTAR Waveform +DisableProgramGroupPage=yes +OutputBaseFilename=FlexDSTARWaveform +SetupIconFile=..\CODEC2 GUI\Images\dstar.ico +Compression=lzma +SolidCompression=yes + +[Languages] +Name: "english"; MessagesFile: "compiler:Default.isl" + +[Tasks] +Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked + +[Files] +Source: "..\CODEC2 GUI\bin\x86\Release\ThumbDV_DSTAR_GUI.exe"; DestDir: "{app}"; Flags: ignoreversion +Source: "..\CODEC2 GUI\bin\x86\Release\ThumbDV_DSTAR_GUI.exe.config"; DestDir: "{app}"; Flags: ignoreversion +Source: "..\CODEC2 GUI\bin\x86\Release\Flex.UiWpfFramework.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "..\CODEC2 GUI\bin\x86\Release\FlexLib.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "..\CODEC2 GUI\bin\x86\Release\Ionic.Zip.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "..\CODEC2 GUI\bin\x86\Release\Util.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "..\CODEC2 GUI\bin\x86\Release\Vita.dll"; DestDir: "{app}"; Flags: ignoreversion +Source: "..\..\..\DSP_API\ThumbDV_Release\ThumbDV.ssdr_waveform"; DestDir: {userappdata}\FlexRadio Systems\Waveforms; Flags: ignoreversion +; NOTE: Don't use "Flags: ignoreversion" on any shared system files + +[Icons] +Name: "{commonprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}" +Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon + +[Run] +Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent +