public HITView addHIT(string name, HITData data, int jobNumber) { HITView hs; if (name == ShortnJob.HIT_TYPE) { hs = new ShortnView(name, data as ShortnData, jobNumber); } else if (name == CrowdproofJob.HIT_TYPE) { hs = new CrowdproofView(name, data as CrowdproofData, jobNumber); } else if (name == HumanMacroJob.HIT_TYPE) { HumanMacroData hdata = data as HumanMacroData; hs = new HumanMacroView(name, hdata, jobNumber); } else { hs = new HITView(name, data, jobNumber); } jobMap[jobNumber] = data; // Assign the WPF UserControl to the ElementHost control's // Child property. sidebar.addHitView(jobNumber, hs); //host.Child = hs; // Add the ElementHost control to the form's // collection of child controls. //this.Controls.Add(host); return hs; }
public HITView addHITtoList(string name, HITData data, int jobNumber) { HITView hs; if (name == ShortnJob.HIT_TYPE) { hs = new ShortnView(name, data as ShortnData, jobNumber); } else if (name == CrowdproofJob.HIT_TYPE) { hs = new CrowdproofView(name, data as CrowdproofData, jobNumber); } else if (name == HumanMacroJob.HIT_TYPE) { HumanMacroData hdata = data as HumanMacroData; hs = new HumanMacroView(name, hdata, jobNumber); } else { hs = new HITView(name, data, jobNumber); } jobMap[jobNumber] = data; return hs; }