示例#1
0
    public string getStringVariable(ushort clientID, ClientProperties property)
    {
        IntPtr valuePtr = IntPtr.Zero;
        uint   result   = Error.ok;

        if ((result = GetClientVariableAsString(_serverID, clientID, property, out valuePtr)) != Error.ok)
        {
            notifyError(string.Format("Error getting variable: {0}", property.ToString()));
            return(string.Empty);
        }
        return(getStringFromPointer(valuePtr));
    }
示例#2
0
 public string getStringVariable(ushort clientID, ClientProperties property)
 {
     IntPtr valuePtr = IntPtr.Zero;
     uint result = Error.ok;
     if ((result = GetClientVariableAsString(_serverID, clientID, property, out valuePtr)) != Error.ok)
     {
         notifyError(string.Format("Error getting variable: {0}", property.ToString()));
         return string.Empty;
     }
     return getStringFromPointer(valuePtr);
 }
示例#3
0
 public int getIntVariable(ClientProperties property)
 {
     int value = 0;
     if (GetClientSelfVariableAsInt(_connectedServerID, property, out value) != Error.ok)
     {
         notifyError(string.Format("Error getting variable: {0}", property.ToString()));
         return 0;
     }
     return value;
 }
示例#4
0
 public bool setIntVariable(ulong serverID, ulong channelID, ClientProperties property, int value)
 {
     if (SetClientSelfVariableAsInt(_connectedServerID, property, value) != Error.ok)
     {
         notifyError(string.Format("Error setting variable: {0}", property.ToString()));
         return false;
     }
     return true;
 }