public static void HandleCreateRegistryKey(xServer.Core.Packets.ClientPackets.GetCreateRegistryKeyResponse 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.AddKeyToTree(packet.ParentPath, packet.Match); } else { client.Value.FrmRe.ShowErrorMessage(packet.ErrorMsg); } } } catch { } }
public static void HandleCreateRegistryKey(xServer.Core.Packets.ClientPackets.GetCreateRegistryKeyResponse 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) { //Should I include an extra log indicating that something was changed? QuasarServer.writeLog("Created new Registry Key at " + packet.ParentPath + packet.Match, client.Value.PCName); client.Value.FrmRe.CreateNewKey(packet.ParentPath, packet.Match); } else { QuasarServer.writeLog("Could not create Registry Key at " + packet.ParentPath + "(" + packet.ErrorMsg + ")", client.Value.PCName); client.Value.FrmRe.ShowErrorMessage(packet.ErrorMsg); } } } catch { } }