Ejemplo n.º 1
0
        private void uxLstView_Items_DoubleClick(object sender, EventArgs e)
        {
            // Get the selected Property / Method / Qualifier's name
            string itemName = uxLstView_Items.SelectedItems[0].SubItems[0].Text;

            WbemClient cl = Form1.Client;
            CimInstanceName name = (CimInstanceName)uxLstView_Items.SelectedItems[0].Tag;
            GetInstanceOpSettings io = new GetInstanceOpSettings(name);
            io.LocalOnly = false;
            io.IncludeClassOrigin = false;
            io.IncludeQualifiers = false;

            CimInstance instance = cl.GetInstance(io);

            CimInstanceForm tmpForm = new CimInstanceForm(instance);
            if (tmpForm.ShowDialog() == DialogResult.OK)
            {
                cl.ModifyInstance(tmpForm.DisplayInstance);
            }
        }
Ejemplo n.º 2
0
        public CimInstance GetInstance(GetInstanceOpSettings settings)
        {
            SingleResponse response = MakeSingleRequest("GetInstance", settings);

            if (response.Value == null)
            {
                return null;
            }

            CheckSingleResponse(response, typeof(CimInstanceList));

            return CombineInstanceAndInstanceName(((CimInstanceList)response.Value)[0], settings.InstanceName);
        }