Esempio n. 1
0
 /// <summary>
 /// ...
 /// </summary>
 private static void backup_Feedback(object sender, FeedbackEventArgs e)
 {
     int percent = (int)(e.PerCent * 100);
     Console.WriteLine("LOG> " + percent.ToString("000") + " : " + e.Message);
     if (e.FeedbackObj != null)
         Console.WriteLine("FBK> " + percent.ToString("000") + " : " + e.FeedbackObj.ToString());
 }
Esempio n. 2
0
        /// <summary>
        /// Backup feedback event handler
        /// </summary>
        private void Backup_Feedback(object sender, FeedbackEventArgs e)
        {
            if (this.InvokeRequired)
                this.BeginInvoke(new EventHandler<FeedbackEventArgs>(Backup_Feedback), sender, e);
            else
            {
                int percent = (int)(e.PerCent * 100);
                this.progressBar1.Value = percent;

                if (!String.IsNullOrEmpty(e.Message))
                    this.StoreLogMsgInfo(percent, e.Message);

                if (e.FeedbackObj != null)
                {
                    this.StoreLogMsgInfo(percent, "FO> " + e.FeedbackObj.ToString());
                    this.dataGV.Rows.Add(
                        new object[] {
                            e.FeedbackObj.FileName,
                            e.FeedbackObj.DocType,
                            e.FeedbackObj.ExportFormat.ToUpper(),
                            e.FeedbackObj.Action,
                            e.FeedbackObj.RemoteDateTime.ToString() });
                }
            }
        }