// returns request resolver by task name public IRequestResolver GetRequestResolverByName(string taskType) { IRequestResolver resolver = null; if (taskType == StatusResolver.RESOLVER_NAME) { resolver = new StatusResolver(this); } else if (taskType == MemoryMonitorResolver.RESOLVER_NAME) { resolver = new MemoryMonitorResolver(this); } else if (taskType == ProcessorMonitorResolver.RESOLVER_NAME) { resolver = new ProcessorMonitorResolver(this); } else if (taskType == AppPoolMonitorResolver.RESOLVER_NAME) { resolver = new AppPoolMonitorResolver(this); } else if (taskType == ClearFolderResolver.RESOLVER_NAME) { resolver = new ClearFolderResolver(this); } else if (taskType == RecycleAppPoolResolver.RESOLVER_NAME) { resolver = new RecycleAppPoolResolver(this); } if (null == resolver) { // if there are no task type, return default resolver resolver = new UnknownResolver(this); } return(resolver); }
public ReflashHistoryWithReviewForm(ReflashHistory history) { InitializeComponent(); this.history = history; txtBynaryFileName.Text = history.BinaryFileName; txtVin.Text = history.CarVin; txtPreviousBinaryName.Text = history.PreviousBinaryName; txtReflashDate.Text = history.ReflashDate.ToString(); txtPrice.Text = history.Price; txtStatus.Text = StatusResolver.ResolveReflashStatus(history.Status); if (history.Review == null) { txtCarOvner.Enabled = true; txtReview.Enabled = true; btnSendReview.Enabled = true; } else { txtCarOvner.Text = history.Review.UserName; txtReview.Text = history.Review.UserReview; chbEditReview.Visible = true; } }