Ejemplo n.º 1
0
        private void MakeAnalogueTextHtmlCode(AnaTextData data, string path)
        {
            System.IO.FileInfo     info   = new System.IO.FileInfo(path);
            System.IO.StreamWriter writer = File.Exists(path) ? info.AppendText() : info.CreateText();

            StringBuilder code = new StringBuilder();

            string div = string.Format("</div>");
            //태그 고유아이디랑 텍스트 사이즈
            string temp = string.Format("<div id=\"{0}\" class=\"PMS_Tag_Item ui-draggable ui-draggable-handle Text_Small {1}\"", data._id, data.FontSize);

            code.Append(temp);

            //태그 주소값이랑 소수점 자리수
            temp = string.Format(" opc-tag-txt=\"{{'tag':'{0}.Value','config': {{'formats': {{'bad_q':'???','float':'{1}'}}}}}}\"", data.Tag, data.Float);
            code.Append(temp);

            //색상
            temp = string.Format(" d=\"#{0}\" hh=\"#{1}\" h=\"#{2}\" l=\"#{3}\" ll=\"#{4}\" style=\"position: absolute; top: {5}px; left: {6}px; color: rgb(255, 255, 255);\"",
                                 data.FontColor, data.HHColor, data.HColor, data.LColor, data.LLColor, data.Postion.X, data.Postion.Y);
            code.Append(temp);

            //인덱스랑 view에 쓸 내용
            temp = string.Format(" z-index: 5;\" > {0} </div>", data.Tag);
            code.Append(temp);


            writer.WriteLine(code.ToString());
            writer.Flush();
            writer.Close();
        }
Ejemplo n.º 2
0
        //아날로그 텍스트 넣기
        public string EditAnalogueTxt(AnaTextData anaData)
        {
            string temp         = "";
            int    divid        = 192121212;
            string strClass     = string.Format("<div class=\"PMS_Image)Item ui-draggable ui-draggable-handle ui-resizable\"");
            string strlind      = string.Format("\"\" style=\"position:absolute; top: {0}px; left: {1}px; z-index:{2};\">");
            string strimagepath = string.Format("<img src=\"{0}\"");

            return(temp);
        }
Ejemplo n.º 3
0
        public AnaTextData ReturnValue(Control ctrl)
        {
            AnaTextData temp = new AnaTextData();

            temp.Tag        = string.Format("{0}", text_TAG.Text);
            temp.FontColor  = string.Format("{0:X2}{1:X2}{2:X2}", lab_Color.BackColor.R, lab_Color.BackColor.G, lab_Color.BackColor.B);
            temp.FontSize   = string.Format(combo_FontSIze.SelectedItem.ToString());
            temp.FontWeight = string.Format(combo_FontBold.SelectedItem.ToString());
            temp.Zindex     = combo_Zindex.SelectedIndex;
            temp.UniqueTag  = ctrl.Tag.ToString();
            temp.Postion    = ctrl.PointToClient(ctrl.Location);
            temp.height     = ctrl.Size.Height;
            temp.weight     = ctrl.Size.Width;
            temp._id        = ctrl.Tag.ToString();

            return(temp);
        }
Ejemplo n.º 4
0
 public void Delete_AnaTextData(AnaTextData data)
 {
 }
Ejemplo n.º 5
0
 public void Modi_AnaTextData(AnaTextData data)
 {
 }
Ejemplo n.º 6
0
 public void Add_AnaTextData(AnaTextData data)
 {
     altextData.Add(data);
 }