Beispiel #1
0
        public void CheckDupeAndMult(string fromCall, string digitalMode, XDpack77.Pack77Message.Message rm, out bool dupeout, out short mult)
        {
            int dupe = 0;

            mult = 0;
            iWlDupingEntry.ClearEntry();
            if (DgtlFieldNumber > 0)
            {
                iWlDupingEntry.SetFieldN((short)DgtlFieldNumber, digitalMode);
            }
            if (ReceivedRstFieldNumber > 0) // ClearEntry in WL defaults the RST. clear it out
            {
                iWlDupingEntry.SetFieldN((short)ReceivedRstFieldNumber, "");
            }
            if (GridSquareReceivedFieldNumber > 0)
            {
                XDpack77.Pack77Message.Exchange hisGrid = rm as XDpack77.Pack77Message.Exchange;
                if (hisGrid != null && !String.IsNullOrEmpty(hisGrid.GridSquare))
                {
                    iWlDupingEntry.SetFieldN((short)GridSquareReceivedFieldNumber, hisGrid.GridSquare);
                }
            }
            iWlDupingEntry.Callsign = fromCall;
            dupe = iWlDupingEntry.Dupe();
            if (dupe == 0)
            {
                mult = iWlDupingEntry.IsNewMultiplier((short)-1);
                if (mult <= 0 && GridSquareReceivedFieldNumber > 0)
                {
                    mult = iWlDupingEntry.IsNewMultiplier((short)GridSquareReceivedFieldNumber);
                }
            }
            dupeout = dupe != 0;
        }
Beispiel #2
0
 public void SetCurrentCallAndGridAndSerial(string call, string grid, uint serial)
 {
     iWlEntry.ClearEntry();
     if (!String.IsNullOrEmpty(call))
     {
         iWlEntry.Callsign = call;
     }
     if (GridSquareReceivedFieldNumber >= 0)
     {
         iWlEntry.SetFieldN((short)GridSquareReceivedFieldNumber, grid);
     }
     if (serial != 0)
     {
         iWlEntry.SerialNumber = serial;
     }
     try
     {
         // Only WriteLog 12.51 and forward have this.
         iWlEntry.UpdateDisplaysFromCall();
     }
     catch (System.Runtime.InteropServices.COMException)
     {
         // ignore this exception
     }
 }
Beispiel #3
0
 public void SetCurrentCallAndGrid(string call, string grid)
 {
     iWlEntry.ClearEntry();
     if (!String.IsNullOrEmpty(call))
     {
         iWlEntry.Callsign = call;
     }
     if (GridSquareReceivedFieldNumber >= 0)
     {
         iWlEntry.SetFieldN((short)GridSquareReceivedFieldNumber, grid);
     }
 }