Пример #1
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (!eProp.ReadOnly && !m_OldValue.Equals(eProp.Text))
     {
         WmiClassList.SetPropertyValue(m_Presenter.Namespace, m_Args.ClassName, m_Args.PropertyName, eProp.Text);
     }
 }
Пример #2
0
 public void SetArgsToControls()
 {
     lClass.Text       = string.Format(CultureInfo.InvariantCulture, @"{0}\{1}", m_Args.NamespaceName, m_Args.ClassName);
     eClass.Text       = WmiClassList.GetPropertyValue(m_Presenter.Namespace, m_Args.ClassName, "Caption");
     lProperty.Text    = "&" + m_Args.PropertyName;
     lDescription.Text = WmiClassList.Instance.GetPropertyDescription(m_Args.ClassName,
                                                                      m_Args.PropertyName);
     m_OldValue = WmiClassList.GetPropertyValue(m_Presenter.Namespace, m_Args.ClassName,
                                                m_Args.PropertyName);
     eProp.Text     = m_OldValue;
     eProp.ReadOnly = !WmiClassList.Instance.IsPropertyEditable(m_Args.ClassName, m_Args.PropertyName);
 }
Пример #3
0
        public void UpdateTitle()
        {
            var description = WmiClassList.GetPropertyValue(m_Presenter.Namespace, "Win32_OperatingSystem",
                                                            "Description");

            if (string.IsNullOrEmpty(description))
            {
                Text = @"\\" + m_Args.ComputerName;
            }
            else
            {
                Text = string.Format(CultureInfo.InvariantCulture, MainForm.TITLE_FMT, m_Args.ComputerName, description);
            }
        }