예제 #1
0
        /// <summary>
        /// Creates and shows samplePlot [index]
        /// </summary>
        private void ShowSample(int index)
        {
            if (currentSample != null)
            {
                currentSample.Cleanup();
            }

            currentPlot   = index;
            currentType   = sampleTypes[index];
            currentSample = (IDemo)Activator.CreateInstance(currentType);
            currentSample.CreatePlot(plotSurface);

            infoBox.Buffer.Text = String.Join("\n", currentSample.Description); // update info Text

            int id = currentPlot + 1;

            exampleNumberLabel.Text = "Plot " + id.ToString("0") + "/" + sampleTypes.Length.ToString("0");

            ShowAll();
        }
        /// <summary>
        /// Creates and shows samplePlot [index]
        /// </summary>
        private void ShowSample(int index)
        {
            if (currentSample != null)
                currentSample.Cleanup();

            currentPlot = index;
            currentType = sampleTypes[index];
            currentSample = (IDemo)Activator.CreateInstance(currentType);
            currentSample.CreatePlot(plotSurface);

            infoBox.Buffer.Text = String.Join("\n", currentSample.Description);	// update info Text

            int id = currentPlot + 1;
            exampleNumberLabel.Text = "Plot " + id.ToString("0") + "/" + sampleTypes.Length.ToString("0");

            ShowAll();
        }