示例#1
0
        private void Load_App_Name()
        {
            MySqlCommand CMD = new MySqlCommand();

            CMD.Connection  = CN;
            CMD.CommandType = System.Data.CommandType.Text;
            CMD.CommandText = "SELECT object_name FROM osae_v_object_property WHERE object_type='GUI CLIENT' AND property_name='Computer Name' AND property_value='" + OSAEApi.ComputerName + "'";
            try
            {
                CN.Open();
                gAppName = "" + (String)CMD.ExecuteScalar();
                CN.Close();
                if (gAppName == "")
                {
                    gAppName = "GUI CLIENT-" + OSAEApi.ComputerName;
                    OSAEApi.ObjectAdd(gAppName, gAppName, "GUI CLIENT", "", "SYSTEM", true);
                    OSAEApi.ObjectPropertySet(gAppName, "Computer Name", OSAEApi.ComputerName);
                }
                ///AddToLog("found my Object Name: " + gAppName);
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error messaging host: " + ex.Message);
            }
        }
 private void Load_App_Name()
 {
     try
     {
         gAppName = OSAEApi.GetPluginName("VR CLIENT", OSAEApi.ComputerName);
         if (gAppName == "")
         {
             gAppName = "VR CLIENT-" + OSAEApi.ComputerName;
             OSAEApi.ObjectAdd(gAppName, gAppName, "VR CLIENT", "", "SYSTEM", true);
             OSAEApi.ObjectPropertySet(gAppName, "Computer Name", OSAEApi.ComputerName);
         }
     }
     catch (Exception ex)
     {
         AddToLog("Error messaging host: " + ex.Message);
     }
 }