Пример #1
0
 /// <summary>
 /// Called when [XML create progress].
 /// </summary>
 /// <param name="e">The e.</param>
 protected virtual void OnXmlCreateProgress(XmlCreateProgressArgs e)
 {
     if (XmlCreateProgressEvent != null)
     {
         XmlCreateProgressEvent(this, e);
     }
 }
Пример #2
0
        private void SetPasBar(XmlCreateProgressArgs e)
        {
            switch (e.ProgressType)
            {
            case CreateTyep.CreateInfo:
                prbProd.Style = ProgressBarStyle.Continuous;
                prbProd.Value++;

                if (prbProd.Value == prbProd.Maximum)
                {
                    prbProd.Value = 0;
                }
                MsgL.Text = e.Msg;
                if (e.Complete)
                {
                    prbProd.Maximum = e.FileCount;
                }

                break;

            case CreateTyep.CreateXml:
                prbProd.Value = e.Progress;
                MsgL.Text     = e.Msg;
                if (e.Complete)
                {
                    prbProd.Value = 0;
                }
                break;

            case CreateTyep.CreateFile:
                prbProd.Value = e.Progress;
                MsgL.Text     = e.Msg;
                if (e.Complete)
                {
                    prbProd.Value   = prbProd.Maximum;
                    btnProduce.Text = "生成(&G)";
                    _xmlConfig      = null;
                }
                break;
            }
        }
Пример #3
0
        private void SetPasBar(XmlCreateProgressArgs e)
        {
            switch (e.ProgressType)
            {
                case CreateTyep.CreateInfo:
                    prbProd.Style = ProgressBarStyle.Continuous;
                    prbProd.Value++;

                    if (prbProd.Value == prbProd.Maximum)
                    {
                        prbProd.Value = 0;
                    }
                    MsgL.Text = e.Msg;
                    if (e.Complete)
                    {
                        prbProd.Maximum = e.FileCount;
                    }

                    break;
                case CreateTyep.CreateXml:
                    prbProd.Value = e.Progress;
                    MsgL.Text = e.Msg;
                    if (e.Complete)
                    {
                        prbProd.Value = 0;
                    }
                    break;
                case CreateTyep.CreateFile:
                    prbProd.Value = e.Progress;
                    MsgL.Text = e.Msg;
                    if (e.Complete)
                    {
                        prbProd.Value = prbProd.Maximum;
                        btnProduce.Text = "生成(&G)";
                        _xmlConfig = null;
                    }
                    break;
            }
        }
Пример #4
0
 private void XmlConfig_XmlCreateProgressEvent(object sender, XmlCreateProgressArgs e)
 {
     Invoke(_setPassBar, e);
 }
Пример #5
0
 /// <summary>
 /// Called when [XML create progress].
 /// </summary>
 /// <param name="e">The e.</param>
 protected virtual void OnXmlCreateProgress(XmlCreateProgressArgs e)
 {
     if (XmlCreateProgressEvent != null)
     {
         XmlCreateProgressEvent(this, e);
     }
 }
Пример #6
0
 private void XmlConfig_XmlCreateProgressEvent(object sender, XmlCreateProgressArgs e)
 {
     Invoke(_setPassBar, e);
 }