Example #1
0
        public static Boolean isImageCtrl(controlBase ctrl)
        {
            controlTypes e = ctrl.myType;

            if (e == controlTypes.CUS_CTRL_ALERT)
            {
                return(false);
            }
            if (e == controlTypes.CUS_CTRL_BRIEF)
            {
                return(false);
            }
            if (e == controlTypes.CUS_CTRL_INFORMATION)
            {
                return(false);
            }

            if (e == controlTypes.CUS_CTRL_RESCUEREQ)
            {
                return(false);
            }

            if (e == controlTypes.CUS_CTRL_RESCUEPLAN)
            {
                return(false);
            }

            if (e == controlTypes.CUS_CTRL_RADIO)
            {
                return(false);
            }

            if (e == controlTypes.CUS_CTRL_TEXTAREA)
            {
                return(false);
            }

            if (e == controlTypes.CUS_CTRL_SUBMIT)
            {
                return(false);
            }

            if (e == controlTypes.CUS_CTRL_EFRAME)
            {
                return(false);
            }

            if (e == controlTypes.CUS_CTRK_JSON)
            {
                return(false);
            }

            if (e == controlTypes.CUS_CTRK_DIV_TIME)
            {
                return(false);
            }
            return(true);
        }
Example #2
0
        public void appendControl(ListViewItem item)
        {
            if (item == null)
            {
                return;
            }

            if (item.Tag == null)
            {
                return;
            }

            if (item.Tag is controlBase)
            {
                controlBase ctrl = (controlBase)(item.Tag);
                if (item.Tag is controls.alert)
                {
                    ctrl = (controls.alert)(item.Tag);
                }
                if (item.Tag is controls.brief)
                {
                    ctrl = (controls.brief)(item.Tag);
                }
                if (item.Tag is controls.information)
                {
                    ctrl = (controls.information)(item.Tag);
                }

                if (item.Tag is controls.rescueReq)
                {
                    ctrl = (controls.rescueReq)(item.Tag);
                }

                if (item.Tag is controls.rescuePlan)
                {
                    ctrl = (controls.rescuePlan)(item.Tag);
                }

                if (item.Tag is controls.radioSelection)
                {
                    ctrl = (controls.radioSelection)(item.Tag);
                }

                if (item.Tag is controls.textArea)
                {
                    ctrl = (controls.textArea)(item.Tag);
                }


                string html = ctrl.createHtmlView();
                parentForm.addControl(html);
            }
        }
Example #3
0
        public string createHtmlView(controlBase ctrl)
        {
            string html2 = getMyHtmlContent();

            if (html2.Equals(""))
            {
                return("");
            }
            string html = "";

            if (isImageCtrl(ctrl))
            {
                string title    = getTitle();
                string rootpath = System.Windows.Forms.Application.StartupPath;
                string imgPath  = getImagePath();
                string bakimg   = rootpath + "\\imageobj-bak-1.PNG";
                imgPath = imgPath.Replace("./", "");
                string logoimg = rootpath + imgPath;


                html  = "<DIV id=map style=\"" + "background-image:url('" + html2 + "');background-repeat:no-repeat;background-position: center;font-size:16; " + " FLOAT: center; align:center;WIDTH: 50%;border:1px;border-color:#dddddd;border-style:solid; HEIGHT: 400px\" cellspacing=0 cType='eq_ctrl' dblink='" + this.myType + "'><P>" + title + "地图</P>";
                html += "</DIV>";
            }
            else
            {
                string title    = getTitle();
                string rootpath = System.Windows.Forms.Application.StartupPath;
                string imgPath  = getImagePath();
                string bakimg   = rootpath + "\\imageobj-bak-1.PNG";
                imgPath = imgPath.Replace("./", "");
                string logoimg = rootpath + imgPath;
                html  = "<table id='" + new Random().Next().ToString() + "' style='cursor:pointer;width:90%;height:auto' style='border:1px;border-color:#dddddd;border-style:solid' cellpadding=0 cellspacing=0 cType='eq_ctrl' dblink='" + this.myType + "'>";
                html += "<tr><td style='height:24;font-size:12;border:0px;border-color:#dddddd;border-style:solid' color='#aaaaaa' align='left' valign='middle'>";
                html += "<label style='line-height:24px;background:navy;color:#ffffff';font-weight:bold>&nbsp;\"" + title + "\"对象&nbsp;</label>";
                html += "</td></tr>";
                html += "<tr><td>";
                html += html2;
                html += "</td></tr>";
                html += "</table><br/>";
            }

            return(html);
        }
Example #4
0
        public void appendControl(ListViewItem item)
        {
            if (item == null)
            {
                return;
            }

            if (item.Tag == null)
            {
                return;
            }

            if (item.Tag is controlBase)
            {
                controlBase ctrl = (controlBase)(item.Tag);
                if (item.Tag is controls.alert)
                {
                    ctrl = (controls.alert)(item.Tag);
                }
                if (item.Tag is controls.brief)
                {
                    ctrl = (controls.brief)(item.Tag);
                }
                if (item.Tag is controls.information)
                {
                    ctrl = (controls.information)(item.Tag);
                }

                if (item.Tag is controls.rescueReq)
                {
                    ctrl = (controls.rescueReq)(item.Tag);
                }

                if (item.Tag is controls.rescuePlan)
                {
                    ctrl = (controls.rescuePlan)(item.Tag);
                }

                if (item.Tag is controls.radioSelection)
                {
                    ctrl = (controls.radioSelection)(item.Tag);
                }

                if (item.Tag is controls.textArea)
                {
                    ctrl = (controls.textArea)(item.Tag);
                }

                if (item.Tag is controls.submit)
                {
                    ctrl = (controlBase)(controls.submit.getCtrl(this.parentForm));
                }

                try
                {
                    IfacesEnumsStructsClasses.IHTMLDocument2 doc2 = parentForm.cEXWB1.GetActiveDocument();
                    if (item.Tag is controls.eframe)
                    {
                        parentForm.iframeLoadCount = 1;
                    }
                }
                catch (Exception exp)
                {
                }

                string html = ctrl.createHtmlView();
                parentForm.addControl(html);
            }
        }
        private ListViewItem createItem(ListViewGroup groupItem, controlBase.controlTypes cType, string iconpath, string linkId, ListView lv)
        {
            ListViewItem item = new ListViewItem(" " + controlBase.getControTypeName(cType), groupItem);

            loadICON(item, iconpath, lv);
            lv.Items.Add(item);
            item.Tag =controlBase.createBase( cType);
               // item.ToolTipText = iconpath;
            return item;
        }
Example #6
0
        public string createHtmlView(controlBase ctrl)
        {
            string html2 = getMyHtmlContent();
            if (html2.Equals(""))
                return "";
            string html = "";
            if (isImageCtrl(ctrl))
            {
                string title = getTitle();
                string rootpath = System.Windows.Forms.Application.StartupPath;
                string imgPath = getImagePath();
                string bakimg = rootpath + "\\imageobj-bak-1.PNG";
                imgPath = imgPath.Replace("./", "");
                string logoimg = rootpath + imgPath;


                html = "<DIV id=map style=\"" + "background-image:url('" + html2 + "');background-repeat:no-repeat;background-position: center;font-size:16; " + " FLOAT: center; align:center;WIDTH: 50%;border:1px;border-color:#dddddd;border-style:solid; HEIGHT: 400px\" cellspacing=0 cType='eq_ctrl' dblink='" + this.myType + "'><P>" + title + "地图</P>";
                html += "</DIV>";
            }
            else 
            {
                string title = getTitle();
                string rootpath = System.Windows.Forms.Application.StartupPath;
                string imgPath = getImagePath();
                string bakimg = rootpath + "\\imageobj-bak-1.PNG";
                imgPath = imgPath.Replace("./", "");
                string logoimg = rootpath + imgPath;
                html = "<table id='" + new Random().Next().ToString() + "' style='cursor:pointer;width:90%;height:auto' style='border:1px;border-color:#dddddd;border-style:solid' cellpadding=0 cellspacing=0 cType='eq_ctrl' dblink='" + this.myType + "'>";
                html += "<tr><td style='height:24;font-size:12;border:0px;border-color:#dddddd;border-style:solid' color='#aaaaaa' align='left' valign='middle'>";
                html += "<label style='line-height:24px;background:navy;color:#ffffff';font-weight:bold>&nbsp;\"" + title + "\"对象&nbsp;</label>";
                html += "</td></tr>";
                html += "<tr><td>";
                html += html2;
                html += "</td></tr>";
                html += "</table><br/>";
            }
            
            return html;
        }
Example #7
0
        public static Boolean isImageCtrl(controlBase ctrl)
        {
            controlTypes e = ctrl.myType;
            if (e == controlTypes.CUS_CTRL_ALERT)
                return false;
            if (e == controlTypes.CUS_CTRL_BRIEF)
                return false;
            if (e == controlTypes.CUS_CTRL_INFORMATION)
                return false;

            if (e == controlTypes.CUS_CTRL_RESCUEREQ)
                return false;

            if (e == controlTypes.CUS_CTRL_RESCUEPLAN)
                return false;

            if (e == controlTypes.CUS_CTRL_RADIO)
                return false;

            if (e == controlTypes.CUS_CTRL_TEXTAREA)
                return false;

            if (e == controlTypes.CUS_CTRL_SUBMIT)
                return false;

            if (e == controlTypes.CUS_CTRL_EFRAME)
                return false;
            
            if (e == controlTypes.CUS_CTRK_JSON)
            {
                return false;
            }

            if (e == controlTypes.CUS_CTRK_DIV_TIME)
            {
                return false;
            }
            return true;      
        }