Esempio n. 1
0
 private void ShowAssociatedErrorDetails(WipeError error)
 {
     SeverityLabel.Text = "Severity: " + error.Severity.ToString();
     TimeLabel.Text = "Time: " + error.Time.ToLongTimeString();
     MessageLabel.Text = "Message: " + error.Message;
     SeverityIcon.Image = SeverityIcons.Images[(int)error.Severity];
 }
Esempio n. 2
0
 public FailedObject(WipeObjectType type, string path, WipeError error)
 {
     _type = type;
     _path = path;
     _associatedError = error;
 }
Esempio n. 3
0
        /// <summary>
        /// Get the category of wipe errors
        /// </summary>
        public List<WipeError> GetWipeErrors()
        {
            List<WipeError> wipeErrors = new List<WipeError>();
            ContextStatus status;
            bool valid = false;
            int count = _beforeWipeErrors.Count;

            // add before wipe errors
            for(int i = 0; i < count; i++) {
                wipeErrors.Add(_beforeWipeErrors[i]);
            }

            if(context.IsOpen) {
                // ensure the context is stopped
                if(context.GetContextStatus(out status)) {
                    if(status == ContextStatus.Stopped) {
                        valid = context.IsInitialized;
                    }
                }

                if(valid) {
                    // get the errors
                    NativeMethods.WError[] errors = context.GetErrors();

                    if(errors != null) {
                        for(int i = 0; i < errors.Length; i++) {
                            WipeError error = new WipeError();
                            error.ReadNative(errors[i]);
                            wipeErrors.Add(error);
                        }
                    }
                }
            }

            // add after wipe errors
            count = _afterWipeErrors.Count;

            for(int i = 0; i < count; i++) {
                wipeErrors.Add(_afterWipeErrors[i]);
            }

            return wipeErrors;
        }