示例#1
0
        private static void LogExceptionDialog(Exception exception)
        {
            var content = exception.ToString();

            while (exception.InnerException != null)
            {
                exception = exception.InnerException;
                content  += Environment.NewLine;
                content  += exception.ToString();
            }

            if (_formException == null)
            {
                _formException = new FormException();
            }

            _formException.ErrorDetails.Add(new Error {
                Title = exception.Message, Content = content
            });
            _formException.LoadCombobox();

            if (!_formException.Visible)
            {
                _formException.Show();
            }
        }
示例#2
0
        /// <summary>
        /// Log exception
        /// </summary>
        /// <param name="ex"></param>
        protected void LogException(Exception ex)
        {
            Console.WriteLine(ex.StackTrace);
            FormException form = new FormException(ex);

            form.ShowDialog();
        }
示例#3
0
 private void btExecutor_Click(object sender, EventArgs e)
 {
     //设置参数
     if (this.compParameters1.Parameters != null)
     {
         this.compParameters1.Parameters.GetParameterValues();
         IStrategy strategy = this.strategyData.Strategy;
         strategy.Parameters.SetParameterValue(this.compParameters1.Parameters.GetParameterValues());
     }
     try
     {
         this.chartComponent.ChartComponentStrategy.Run();
         this.DialogResult = DialogResult.OK;
         this.Close();
     }
     catch (Exception ex)
     {
         FormException form = new FormException(ex);
         form.ShowDialog();
         //MessageBox.Show("执行策略出错:" + e.Message);
     }
 }