/// <summary>
        /// Prompts the user to view or edit the value.
        /// </summary>
        public object ShowDialog(
            Session session,
            NodeId nodeId,
            uint attributeId,
            string name,
            object value,
            bool readOnly,
            string caption)
        {
            if (!String.IsNullOrEmpty(caption))
            {
                this.Text = caption;
            }

            OkBTN.Visible = !readOnly;

            ValueCTRL.ChangeSession(session);
            ValueCTRL.ShowValue(nodeId, attributeId, name, value, readOnly);

            if (base.ShowDialog() != DialogResult.OK)
            {
                return(null);
            }

            return(ValueCTRL.GetValue());
        }
        /// <summary>
        /// Prompts the user to edit the value.
        /// </summary>
        public object ShowDialog(
            Session session,
            string name,
            NodeId dataType,
            int valueRank,
            object value,
            string caption)
        {
            if (!String.IsNullOrEmpty(caption))
            {
                this.Text = caption;
            }

            OkBTN.Visible = true;

            ValueCTRL.ChangeSession(session);
            ValueCTRL.ShowValue(name, dataType, valueRank, value);

            if (base.ShowDialog() != DialogResult.OK)
            {
                return(null);
            }

            return(ValueCTRL.GetValue());
        }
Пример #3
0
 private void SetTypeBTN_Click(object sender, EventArgs e)
 {
     try {
         ValueCTRL.SetArraySize();
     } catch (Exception exception) {
         ClientUtils.HandleException(this.Text, exception);
     }
 }
Пример #4
0
 private void SetTypeCB_SelectedIndexChanged(object sender, EventArgs e)
 {
     try {
         ValueCTRL.SetType((BuiltInType)SetTypeCB.SelectedItem);
     } catch (Exception exception) {
         ClientUtils.HandleException(this.Text, exception);
     }
 }
Пример #5
0
 private void BackBTN_Click(object sender, EventArgs e)
 {
     try {
         ValueCTRL.Back();
     } catch (Exception exception) {
         ClientUtils.HandleException(this.Text, exception);
     }
 }
 /// <summary>
 /// Updates the value shown in the control.
 /// </summary>
 public void UpdateValue(
     NodeId nodeId,
     uint attributeId,
     string name,
     object value)
 {
     ValueCTRL.ShowValue(nodeId, attributeId, name, value, true);
 }
Пример #7
0
 private void OkBTN_Click(object sender, EventArgs e)
 {
     try {
         m_value      = ValueCTRL.GetDataValue();
         DialogResult = DialogResult.OK;
     } catch (Exception exception) {
         ClientUtils.HandleException(this.Text, exception);
     }
 }
Пример #8
0
 private void BackBTN_Click(object sender, EventArgs e)
 {
     try
     {
         ValueCTRL.Back();
     }
     catch (Exception exception)
     {
         MessageBox.Show(Text + ": " + exception.Message);
     }
 }
Пример #9
0
 private void SetTypeCB_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         ValueCTRL.SetType((BuiltInType)SetTypeCB.SelectedItem);
     }
     catch (Exception exception)
     {
         MessageBox.Show(Text + ": " + exception.Message);
     }
 }
Пример #10
0
 private void SetTypeCB_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         ValueCTRL.SetType((BuiltInType)SetTypeCB.SelectedItem);
     }
     catch (Exception ex)
     {
         Opc.Ua.Client.Controls.ExceptionDlg.Show(Text, ex);
     }
 }
Пример #11
0
 private void SetTypeBTN_Click(object sender, EventArgs e)
 {
     try
     {
         ValueCTRL.SetArraySize();
     }
     catch (Exception ex)
     {
         Opc.Ua.Client.Controls.ExceptionDlg.Show(Text, ex);
     }
 }
Пример #12
0
 private void SetTypeBTN_Click(object sender, EventArgs e)
 {
     try
     {
         ValueCTRL.SetArraySize();
     }
     catch (Exception exception)
     {
         MessageBox.Show(Text + ": " + exception.Message);
     }
 }
Пример #13
0
 private void BackBTN_Click(object sender, EventArgs e)
 {
     try
     {
         ValueCTRL.Back();
     }
     catch (Exception ex)
     {
         Opc.Ua.Client.Controls.ExceptionDlg.Show(Text, ex);
     }
 }
Пример #14
0
 private void OkBTN_Click(object sender, EventArgs e)
 {
     try
     {
         ValueCTRL.EndEdit();
         DialogResult = DialogResult.OK;
     }
     catch (Exception ex)
     {
         Opc.Ua.Client.Controls.ExceptionDlg.Show(Text, ex);
     }
 }
Пример #15
0
 private void OkBTN_Click(object sender, EventArgs e)
 {
     try
     {
         ValueCTRL.EndEdit();
         DialogResult = DialogResult.OK;
     }
     catch (Exception exception)
     {
         MessageBox.Show(Text + ": " + exception.Message);
     }
 }
Пример #16
0
        /// <summary>
        /// Displays the dialog.
        /// </summary>
        public object ShowDialog(object value, MonitoredItem monitoredItem)
        {
            m_value = Utils.Clone(value);

            ValueCTRL.MonitoredItem = monitoredItem;
            ValueCTRL.ShowValue(m_value);

            if (ShowDialog() != DialogResult.OK)
            {
                return(null);
            }

            return(m_value);
        }
Пример #17
0
        /// <summary>
        /// Prompts the user to edit a data value.
        /// </summary>
        public DataValue ShowDialog(DataValue value, TypeInfo expectedType, string caption)
        {
            if (caption != null)
            {
                this.Text = caption;
            }

            ValueCTRL.SetDataValue(value, expectedType);
            ValueCTRL.ShowStatusTimestamp = true;

            if (ShowDialog() != DialogResult.OK)
            {
                return(null);
            }

            return(m_value);
        }
        /// <summary>
        /// Prompts the user to edit the value.
        /// </summary>
        public object ShowDialog(
            TypeInfo expectedType,
            string name,
            object value,
            string caption)
        {
            if (!String.IsNullOrEmpty(caption))
            {
                this.Text = caption;
            }

            OkBTN.Visible = true;

            ValueCTRL.ChangeSession(null);
            ValueCTRL.ShowValue(expectedType, name, value);

            if (base.ShowDialog() != DialogResult.OK)
            {
                return(null);
            }

            return(ValueCTRL.GetValue());
        }
 /// <summary>
 /// Changes the session used.
 /// </summary>
 public void ChangeSession(Session session)
 {
     ValueCTRL.ChangeSession(session);
 }