protected internal virtual void LoadIcons() { Assembly asm = typeof(SchedulerControl).Assembly; this.recurringIcon = ResourceImageHelper.CreateIconFromResources(SchedulerIconNames.RecurringAppointment, asm); this.normalIcon = ResourceImageHelper.CreateIconFromResources(SchedulerIconNames.Appointment, asm); }
private void LoadIcon(BuildStatusEnum statusValue, bool isInProgress, bool isStuck) { BuildStatus status = new BuildStatus(statusValue, isInProgress, isStuck); if (iconsByKey.ContainsKey(status.Key)) { return; } try { string resourceName = string.Format("JenkinsTray.Resources.TrayIcons.{0}.ico", status.Key); Icon icon = ResourceImageHelper.CreateIconFromResources(resourceName, GetType().Assembly); iconsByKey.Add(status.Key, icon); } catch (Exception ex) { XtraMessageBox.Show(JenkinsTrayResources.FailedLoadingIcons_Text, JenkinsTrayResources.FailedLoadingIcons_Caption, MessageBoxButtons.OK, MessageBoxIcon.Error); LoggingHelper.LogError(logger, ex); throw new Exception("Failed loading icon: " + statusValue, ex); } }