Exemplo n.º 1
0
 public static void HandleRenameRegistryValue(xServer.Core.Packets.ClientPackets.GetRenameRegistryValueResponse packet, Client client)
 {
     try
     {
         // Make sure that the client is in the correct state to handle the packet appropriately.
         if (client != null && client.Value.FrmRe != null && !client.Value.FrmRe.IsDisposed || !client.Value.FrmRe.Disposing)
         {
             if (!packet.IsError)
             {
                 client.Value.FrmRe.RenameValueFromList(packet.KeyPath, packet.OldValueName, packet.NewValueName);
             }
             else
             {
                 client.Value.FrmRe.ShowErrorMessage(packet.ErrorMsg);
             }
         }
     }
     catch { }
 }
Exemplo n.º 2
0
 public static void HandleRenameRegistryValue(xServer.Core.Packets.ClientPackets.GetRenameRegistryValueResponse packet, Client client)
 {
     try
     {
         // Make sure that the client is in the correct state to handle the packet appropriately.
         if (client != null && client.Value.FrmRe != null && !client.Value.FrmRe.IsDisposed || !client.Value.FrmRe.Disposing)
         {
             if (!packet.IsError)
             {
                 QuasarServer.writeLog("Renamed Registry Key Value " + packet.OldValueName + " to " + packet.NewValueName, client.Value.PCName);
                 client.Value.FrmRe.RenameValue(packet.KeyPath, packet.OldValueName, packet.NewValueName);
             }
             else
             {
                 QuasarServer.writeLog("Could not rename Registry Key Value " + packet.OldValueName + "(" + packet.ErrorMsg + ")", client.Value.PCName);
                 client.Value.FrmRe.ShowErrorMessage(packet.ErrorMsg);
             }
         }
     }
     catch { }
 }