Exemple #1
0
        public void initMe()
        {
            templateForm tf = new templateForm();

            tf.ShowDialog();

            if (tf.type == 0)
            {
                name        = tf.tname;
                description = tf.tdescription;
                setDocNameDesp();
                loadDefault();
                pform.Text = "模版:" + name;
                //pform.cEXWB1.DocumentComplete += new csExWB.DocumentCompleteEventHandler(DocumentComplete);
            }
            if (tf.type == 1)
            {
                if (pform != null)
                {
                    string path = tf.connectString;
                    loadfromFile(path);
                    pform.Text = "模版:" + name;
                }
                else
                {
                    System.Windows.Forms.MessageBox.Show("无法读取模版文档");
                }
            }
            if (tf.type == 2)
            {
                if (pform != null)
                {
                    loadFromDB();
                    pform.Text = "模版:" + name;
                }
                else
                {
                    System.Windows.Forms.MessageBox.Show("无法读取模版文档");
                }
            }
        }
        public void initMe()
        {
            templateForm tf = new templateForm();
            tf.ShowDialog() ;

            if (tf.type == 0)
            {
                name = tf.tname;
                description = tf.tdescription;
                setDocNameDesp();
                loadDefault();
                pform.Text = "模版:" + name;
                //pform.cEXWB1.DocumentComplete += new csExWB.DocumentCompleteEventHandler(DocumentComplete);
            }
            if (tf.type == 1)
            {

                if (pform != null)
                {
                    string path = tf.connectString;
                    loadfromFile(path);
                    pform.Text = "模版:" + name;

                }
                else System.Windows.Forms.MessageBox.Show("无法读取模版文档");
            }
            if (tf.type == 2)
            {

                if (pform != null)
                {
                    loadFromDB();
                    pform.Text = "模版:" + name;
                }
                else System.Windows.Forms.MessageBox.Show("无法读取模版文档");
            }
        }