示例#1
0
 /// <summary>
 /// 设计时若自动保存出发事件
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void m_frm_ReportStateChanged(object sender, ReportStateEventArgs e)
 {
     ReportUtil.DataSource = _templateSource;
     if (e.ReportState == ReportState.Changed)
     {
         if (m_Save2File)
         {
             XRDesignFormExBase frm = sender as XRDesignFormExBase;
             frm.SaveReport(frm.FileName);
         }
     }
 }
示例#2
0
 /// <summary>
 /// 设计时若自动保存出发事件
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void m_frm_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     if (!m_FromStream)
     {
         XRDesignFormExBase frm = sender as XRDesignFormExBase;
         frm.SaveReport(frm.FileName);
     }
     else
     {
         ReportUtil.ReportStream = new MemoryStream();
         ReportUtil.CurrentReport.SaveLayout(ReportUtil.ReportStream);
     }
 }
示例#3
0
        void m_frm_TextChanged(object sender, EventArgs e)
        {
            ReportUtil.DataSource = _templateSource;
            XRDesignFormExBase frm  = sender as XRDesignFormExBase;
            string             text = frm.Text;
            int pos = text.IndexOf(" - ");

            if (pos > 0)
            {
                text             = text.Substring(pos + 3);
                frm.TextChanged -= new EventHandler(m_frm_TextChanged);
                frm.Text         = string.Format(TEXTFmt, text);
                frm.TextChanged += new EventHandler(m_frm_TextChanged);
            }
        }