public void deleteDB()
        {
            if (pform == null)
            {
                return;
            }
            dbTemplateForm dbt = new dbTemplateForm();
            dbt.ShowDialog();
            if (dbt.sel_template != null)
            {

            }
        }
Exemple #2
0
        public void deleteDB()
        {
            if (pform == null)
            {
                return;
            }
            dbTemplateForm dbt = new dbTemplateForm();

            dbt.ShowDialog();
            if (dbt.sel_template != null)
            {
            }
        }
Exemple #3
0
        public void loadFromDB()
        {
            if (pform == null)
            {
                return;
            }

            dbTemplateForm dbt = new dbTemplateForm();

            dbt.ShowDialog();
            if (dbt.sel_template != null)
            {
                this.name = dbt.sel_template[0];
                string html = dbt.sel_template[1];
                this.description = dbt.sel_template[2];
                this.type        = dbt.sel_template[3];


                IfacesEnumsStructsClasses.IHTMLDocument2 doc = pform.cEXWB1.GetActiveDocument();

                mshtml.HTMLDocument docc = (mshtml.HTMLDocument)doc;

                // Encoding ec = Encoding.GetEncoding("gb2312");
                // html = ec.GetString(System.Text.Encoding.Default.GetBytes(html));



                string tempfilepath = Application.StartupPath;
                if (!tempfilepath.EndsWith("\\"))
                {
                    tempfilepath = tempfilepath + "\\";
                }

                tempfilepath = tempfilepath + "tempFile.html";

                System.IO.File.WriteAllText(tempfilepath, html, Encoding.GetEncoding("gb2312"));
                ///  docc.documentElement.innerHTML = html;
                //  docc.body.outerHTML = "<body><label>a</label></body>";
                this.setDocNameDesp();
                pform.cEXWB1.Navigate(tempfilepath);
            }
        }
Exemple #4
0
        public void loadFromDB()
        {
            if (pform == null)
                return;

            dbTemplateForm dbt = new dbTemplateForm();
            dbt.ShowDialog();
            if (dbt.sel_template != null)
            {
                this.name = dbt.sel_template[0];
                string html = dbt.sel_template[1];
                this.description = dbt.sel_template[2];
                this.type = dbt.sel_template[3];


                IfacesEnumsStructsClasses.IHTMLDocument2  doc = pform.cEXWB1.GetActiveDocument();

                mshtml.HTMLDocument docc = (mshtml.HTMLDocument)doc;

               // Encoding ec = Encoding.GetEncoding("gb2312");
               // html = ec.GetString(System.Text.Encoding.Default.GetBytes(html));

                 

                string tempfilepath = Application.StartupPath;
                if (!tempfilepath.EndsWith("\\"))
                    tempfilepath = tempfilepath + "\\";

                tempfilepath = tempfilepath + "tempFile.html";

                System.IO.File.WriteAllText(tempfilepath, html, Encoding.GetEncoding("gb2312"));
              ///  docc.documentElement.innerHTML = html;
              //  docc.body.outerHTML = "<body><label>a</label></body>";
                this.setDocNameDesp();
                pform.cEXWB1.Navigate(tempfilepath); 
            }
        }