private void PopulateResourceSource(ResourceSource source, DoWorkEventArgs e) { CurrentObject = source; _mode = ResourceListViewMode.Type; float i = 0, cnt = source.AllTypes.Count; Boolean showIcons = PopulatePromptIcons(cnt); foreach (ResourceType type in source.AllTypes) { if (__bg.CancellationPending) { e.Cancel = true; return; } AddResourceTypeItem(type, showIcons); __bg.ReportProgress(Convert.ToInt32(100 * i++ / cnt)); } __bg.ReportProgress(100); }
private void PopulateResourceName(ResourceName name, DoWorkEventArgs e) { CurrentObject = name; _mode = ResourceListViewMode.Lang; float i = 0, cnt = name.Langs.Count; Boolean showIcons = PopulatePromptIcons(cnt); foreach (ResourceLang lang in name.Langs) { if (__bg.CancellationPending) { e.Cancel = true; return; } AddResourceLangItem(lang, showIcons); __bg.ReportProgress(Convert.ToInt32(100 * i++ / cnt)); } __bg.ReportProgress(100); }
private void PopulateResourceType(ResourceType type, DoWorkEventArgs e) { CurrentObject = type; _mode = ResourceListViewMode.Name; float i = 0, cnt = type.Names.Count; var showIcons = PopulatePromptIcons(cnt); foreach (var name in type.Names) { if (__bg.CancellationPending) { e.Cancel = true; return; } AddResourceNameItem(name, showIcons); __bg.ReportProgress(Convert.ToInt32(100 * i++ / cnt)); } __bg.ReportProgress(100); }
public ResourceListViewEventArgs(Object selectedItem, ResourceListViewMode mode) { Mode = mode; SelectedItem = selectedItem; }