Example #1
0
 /// <summary>
 /// This function removes a reference to DCC object, it is being called only by destructor of DCC protocol
 /// </summary>
 /// <param name="dcc"></param>
 public bool RemoveDcc(ProtocolDCC dcc)
 {
     lock (queueDcc)
     {
         if (queueDcc.Contains(dcc))
         {
             queueDcc.Remove(dcc);
             return true;
         }
     }
     lock (DirectClientConnectionList)
     {
         if (DirectClientConnectionList.ContainsKey(dcc))
         {
             KeyValuePair<TreeIter, bool> result = getIter(dcc);
             if (result.Value)
             {
                 TreeIter tree = result.Key;
                 Values.Remove(ref tree);
             }
             else
             {
                 Core.DebugLog("Can't remove from sidebar because reference isn't present: " + dcc.Server);
             }
             this.DirectClientConnectionList.Remove(dcc);
             return true;
         }
     }
     return false;
 }
Example #2
0
 private void insertDcc(ProtocolDCC protocol)
 {
     TreeIter text = Values.AppendValues(protocol.UserName, protocol, ItemType.DCC, protocol.SystemWindow, "DCC connection window", Configuration.CurrentSkin.Icon_ExclamationMark);
     lock (DirectClientConnectionList)
     {
         this.DirectClientConnectionList.Add(protocol, text);
     }
 }
Example #3
0
 /// <summary>
 /// Insert dcc
 /// </summary>
 /// <param name="protocol"></param>
 public void InsertDcc(ProtocolDCC protocol)
 {
     lock (queueDcc)
     {
         queueDcc.Add(protocol);
     }
     Updated = true;
 }