Пример #1
0
        private void OnExecute(Object source, EventArgs args)
        {
            try
            {
                if (gridIn != null)
                {
                    gridIn.AcceptChanges();
                }

                ISWbemObject objOut = wmiObj.ExecMethod_(meth.Name, inParms, 0, null);
                gridOut.WMIObject = objOut;
            }
            catch (Exception exc)
            {
                MessageBox.Show(WMISys.GetString("WMISE_Exception", exc.Message, exc.StackTrace));
            }
        }
Пример #2
0
        private void OnExecute(Object source, EventArgs args)
        {
            try
            {
                if (gridIn != null)
                {
                    gridIn.AcceptChanges();
                }

                ManagementBaseObject objOut = mgmtObj.InvokeMethod(meth.Name, inParms, null);
                gridOut.WMIObject = objOut;
            }
            catch (Exception exc)
            {
                MessageBox.Show(WMISys.GetString("WMISE_Exception", exc.Message, exc.StackTrace));
            }
        }