private void AddSample <T>(string path) where T : Sample { if (AllSamples.ContainsKey(path)) { return; } AllSamples[path] = typeof(T); AllSamplesPath.Add(path); }
public void BeginRenderSample(string sampleName) { if (AllSamples == null || !AllSamples.ContainsKey(sampleName)) { return; } if (CurrentSample != null) { CurrentSample.OnExit(); } CurrentSample = Activator.CreateInstance(AllSamples[sampleName]) as Sample; CurrentSample.OnInit(); }