Beispiel #1
0
        bool ValidateData()
        {
            if (this.txt_make_str_Model.Text.Trim() == "")
            {
                this.txt_make_str_Model.Focus();
                return(false);
            }

            if (this.txt_make_str_String.Text.Trim() == "")
            {
                this.txt_make_str_String.Focus();
                return(false);
            }

            string strHalignFilFilePath = Path.Combine(this.AppDataPath, "HALIGN.FIL");

            CHIPInfo[] infoarr = CHalignHipUtil.ReadHaligns(strHalignFilFilePath);
            foreach (CHIPInfo info in infoarr)
            {
                if (info.ModelName.Trim().ToLower() == this.txt_make_str_Model.Text.Trim().ToLower() &&
                    info.StringLabel.Trim().ToLower() == this.txt_make_str_String.Text.Trim().ToLower())
                {
                    this.txt_make_str_String.Focus();
                    return(false);
                }
            }

            return(true);
        }
Beispiel #2
0
        bool ValidateData()
        {
            if (this.tbModelName_.Text.Trim() == "")
            {
                this.errorProvider.SetError(this.tbModelName_, Properties.Resources.ST_PROMPT_INVALID_INPUT);
                this.tbModelName_.Focus();
                return(false);
            }

            if (this.tbStringlabel_.Text.Trim() == "")
            {
                this.errorProvider.SetError(this.tbStringlabel_, Properties.Resources.ST_PROMPT_INVALID_INPUT);
                this.tbStringlabel_.Focus();
                return(false);
            }

            string strHalignFilFilePath = Path.Combine(this.app.AppDataPath, "HALIGN.FIL");

            CHIPInfo[] infoarr = CHalignHipUtil.ReadHaligns(strHalignFilFilePath);
            foreach (CHIPInfo info in infoarr)
            {
                if (info.ModelName.Trim().ToLower() == this.tbModelName_.Text.Trim().ToLower() &&
                    info.StringLabel.Trim().ToLower() == this.tbStringlabel_.Text.Trim().ToLower())
                {
                    this.errorProvider.SetError(this.tbStringlabel_
                                                , "Model Name and String Level already exists\nPlease specify unique Model Name and String Level");
                    this.tbStringlabel_.Focus();
                    return(false);
                }
            }

            return(true);
        }
Beispiel #3
0
        void PopulateSelectionTree()
        {
            TreeNode nodeRoot = this.treeViewDesigns_.Nodes[0];

            nodeRoot.Tag = null;
            nodeRoot.Expand();
            string strFilPath = Path.Combine(this.app.AppDataPath, "HALIGN.FIL");

            CHIPInfo[] infoarr = CHalignHipUtil.ReadHaligns(strFilPath);
            foreach (CHIPInfo info in infoarr)
            {
                TreeNode nodemodel = this.FindModelNode(info.ModelName);
                if (nodemodel == null)
                {
                    nodemodel = nodeRoot.Nodes.Add(info.ModelName);
                }

                TreeNode nodeLabel = nodemodel.Nodes.Add(info.StringLabel);
                nodeLabel.Tag = info;
            }
        }