public static void ModifyValue(BaseViewModel viewmodel, string oldvalueString, string newvalueString)
 {
     if (oldvalueString != newvalueString && viewmodel.NetWorkNum != -1)
     {
         if (_valueRelatedModel.ContainsKey(oldvalueString))
         {
             var hset = _valueRelatedModel[oldvalueString];
             hset.Remove(viewmodel);
             if (hset.Count == 0)
             {
                 _valueRelatedModel.Remove(oldvalueString);
                 MappedMessageChanged.Invoke(new MappedMessageChangedEventArgs(MappedMessageChangedType.RemoveLast, oldvalueString, viewmodel));
             }
             else
             {
                 MappedMessageChanged.Invoke(new MappedMessageChangedEventArgs(MappedMessageChangedType.Remove, oldvalueString, viewmodel));
             }
         }
         if (newvalueString != string.Empty)
         {
             if (_valueRelatedModel.ContainsKey(newvalueString))
             {
                 var hset = _valueRelatedModel[newvalueString];
                 hset.Add(viewmodel);
                 MappedMessageChanged.Invoke(new MappedMessageChangedEventArgs(MappedMessageChangedType.Add, newvalueString, viewmodel));
             }
             else
             {
                 _valueRelatedModel.Add(newvalueString, new HashSet <BaseViewModel>()
                 {
                     viewmodel
                 });
                 MappedMessageChanged.Invoke(new MappedMessageChangedEventArgs(MappedMessageChangedType.AddFirst, newvalueString, viewmodel));
             }
         }
     }
 }
 public static void RaiseMappedMessageChangedEvent()
 {
     MappedMessageChanged.Invoke(new MappedMessageChangedEventArgs(MappedMessageChangedType.Refresh, string.Empty, null));
 }