コード例 #1
0
        /// <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());
        }
コード例 #2
0
        /// <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());
        }
コード例 #3
0
        /// <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());
        }
コード例 #4
0
 /// <summary>
 /// Changes the session used.
 /// </summary>
 public void ChangeSession(Session session)
 {
     ValueCTRL.ChangeSession(session);
 }