コード例 #1
0
        public IntUserControl(ScriptParameter p)
            : this()
        {
            mIntNiceLabel.Text = p.NiceName;
            m_Parameter        = p;
            m_IntDataType      = (IntegerDataType)p.ParameterDataType;
            int             wdiff   = mIntNiceLabel.Width;
            IntegerDataType IntData = (IntegerDataType)p.ParameterDataType;

            wdiff -= mIntNiceLabel.Width;
            if (wdiff < 0)
            {
                Point location = mIntNiceLabel.Location;
                Width -= wdiff;
                mIntNiceLabel.Location = location;
            }
            else
            {
                mIntNiceLabel.Location = new Point(mIntNiceLabel.Location.X - wdiff, mIntNiceLabel.Location.Y);
            }
            List <string> intList = IntData.GetValues;

            mListBokBox.Minimum = Convert.ToInt32(intList[0]);
            mListBokBox.Maximum = Convert.ToInt32(intList[1]);
            base.Size           = this.Size;
        }
コード例 #2
0
 public IntegerDataType(ScriptParameter p, XmlNode node)
 {
     m_Parameter     = p;
     m_ValueList     = new List <string>();
     m_NiceNameList  = new List <string>();
     m_SelectedIndex = -1;
     PopulateListFromNode(node);
 }
コード例 #3
0
 public BoolControl(ScriptParameter p)
     : this()
 {
     // base.DescriptionLabel = p.Description;
     checkBox1.Text    = p.NiceName;
     m_Parameter       = p;
     m_boolDataType    = (BoolDataType)p.ParameterDataType;
     checkBox1.Checked = m_boolDataType.Value;
     base.Size         = this.Size;
 }
コード例 #4
0
        public StringDataType(ScriptParameter p, XmlNode DataTypeNode)
        {
            m_Parameter = p;
            m_Title     = p.ParameterValue;
            XmlNode ChildNode = DataTypeNode.FirstChild;

            if (ChildNode.Attributes.Count > 0)
            {
                m_strValue = ChildNode.Attributes.GetNamedItem("regex").Value;
            }
        }
コード例 #5
0
        private readonly string m_strFalse_Val = "false";   // string value being used by False flag in script

        public BoolDataType(ScriptParameter p, XmlNode DataTypeNode)
        {
            m_Parameter = p;
            XmlNode FirstChild = DataTypeNode.FirstChild;

            m_Val = Convert.ToBoolean(p.ParameterValue);
            if (FirstChild.Attributes.Count > 0)
            {
                m_strTrue_Val  = FirstChild.Attributes.GetNamedItem("true").Value;
                m_strFalse_Val = FirstChild.Attributes.GetNamedItem("false").Value;
            }
        }
コード例 #6
0
        /// <summary>
        /// <summary
        ///  populate parameter list
        /// </summary>
        private void PopulateParameterList()
        {
            XmlNodeList     CompleteNodeList = m_ScriptDocument.GetElementsByTagName("parameter");
            ScriptParameter p = null;

            foreach (XmlNode n in CompleteNodeList)
            {
                if (n.Attributes.Count > 0)
                {
                    p = new ScriptParameter(n);
                    m_ParameterList.Add(p);
                }
            }
        }
コード例 #7
0
        public EnumDataType(ScriptParameter p, XmlNode node)
        {
            m_Parameter     = p;
            m_ValueList     = new List <string>();
            m_NiceNameList  = new List <string>();
            m_SelectedIndex = -1;
            PopulateListFromNode(node);

            // select list node as default value if default  exists
            if (p.ParameterValue != null && p.ParameterValue != "" &&
                m_ValueList.Contains(p.ParameterValue))
            {
                m_SelectedIndex = m_ValueList.BinarySearch(p.ParameterValue);
            }
        }
コード例 #8
0
        public PathDataType(ScriptParameter p, XmlNode DataTypeNode)
        {
            m_Parameter = p;
            m_Path      = p.ParameterValue;
            XmlNode ChildNode = DataTypeNode.FirstChild;

            if (ChildNode.Name == "file")
            {
                m_FileOrDirectory = FileOrDirectory.File;
                FileExtenssion    = GetFileExtensionFromFileNode(ChildNode);
            }
            else
            {
                m_FileOrDirectory = FileOrDirectory.Directory;
            }

            m_InputOrOutput = ChildNode.Attributes.GetNamedItem("type").Value == "input" ? InputOrOutput.input : InputOrOutput.output;
        }
コード例 #9
0
        public PathBrowserControl(ScriptParameter p, string SelectedPath, string ProjectDirectory, string strBrtextBox)
            : this()
        {
            m_SelectedPath     = SelectedPath;
            m_ProjectDirectory = ProjectDirectory;
            m_Parameter        = p;
            //m_PreDestination = strBrtextBox;

            m_PathData = (PathDataType)p.ParameterDataType;

            int wdiff = mNiceNameLabel.Width;

            mNiceNameLabel.Text = p.NiceName;

            int x = mNiceNameLabel.Width;

            wdiff -= mNiceNameLabel.Width;
            if (wdiff < 0)
            {
                Point location = mNiceNameLabel.Location;
                Width -= wdiff;
                mNiceNameLabel.Location = location;
            }
            else
            {
                mNiceNameLabel.Location = new Point(mNiceNameLabel.Location.X - wdiff, mNiceNameLabel.Location.Y);
            }
            mTextBox.AccessibleName = p.Description;
            mTextBox.Text           = strBrtextBox;
            mTextBox.SelectionStart = 0;

            try
            {
                if (m_PathData.isInputOrOutput == PathDataType.InputOrOutput.input)
                {
                    mTextBox.Text = SelectedPath;
                }
            }
            catch (Exception e)
            {
                MessageBox.Show(e.Message);
            }
        }
コード例 #10
0
        public StrUserControl(ScriptParameter p)
            : this()
        {
            m_Parameter = p;
            m_StrData   = (StringDataType)p.ParameterDataType;
            int wdiff = m_StrNiceLbl.Width;

            m_StrNiceLbl.Text = p.NiceName;
            StringDataType StrData = (StringDataType)p.ParameterDataType;

            wdiff -= m_StrNiceLbl.Width;
            if (wdiff < 0)
            {
                Point location = m_StrNiceLbl.Location;
                Width -= wdiff;
                m_StrNiceLbl.Location = location;
            }
            else
            {
                m_StrNiceLbl.Location = new Point(m_StrNiceLbl.Location.X - wdiff, m_StrNiceLbl.Location.Y);
            }
        }
コード例 #11
0
        public EnumControl(ScriptParameter p)
            : this()
        {
            m_Parameter = p;
            m_EnumData  = (EnumDataType)p.ParameterDataType;
            int wdiff = mNiceNameLabel.Width;

            mNiceNameLabel.Text = p.NiceName;
            //Point a = (Point) mNiceNameLabel.Width;
            mComboBox.AccessibleName = p.NiceName;
            mComboBox.Items.Clear();
            //base.DescriptionLabel = p.Description;
            EnumDataType EnumData = (EnumDataType)p.ParameterDataType;

            wdiff -= mNiceNameLabel.Width;
            if (wdiff < 0)
            {
                Point location = mNiceNameLabel.Location;
                //mComboBox.Location = new Point(mNiceNameLabel.Location.X + 42, mComboBox.Location.Y);
                Width -= wdiff;
                mNiceNameLabel.Location = location;
            }
            else
            {
                mNiceNameLabel.Location = new Point(mNiceNameLabel.Location.X - wdiff, mNiceNameLabel.Location.Y);
            }
            foreach (string s in EnumData.GetNiceNames)
            {
                mComboBox.Items.Add(s);
            }
            base.Size = this.Size;
            if (m_EnumData.SelectedIndex >= 0 && m_EnumData.SelectedIndex < m_EnumData.GetValues.Count)
            {
                mComboBox.SelectedIndex = m_EnumData.SelectedIndex;
            }
        }