private void loadSession(string pathToFile) { SessionDataSet sds = new SessionDataSet(); sds.ReadXml(pathToFile); foreach (var ci in sds.CommandInstances) { if (ci.Type == new CutNRCommandUserControl().Type()) { CutNRCommandUserControl cutnr = new CutNRCommandUserControl() { Settings = ci.Settings }; addCommandAsTabPage(cutnr); } else if (ci.Type == new ChangeAudioNRCommandUserControl().Type()) { ChangeAudioNRCommandUserControl cutnr = new ChangeAudioNRCommandUserControl() { Settings = ci.Settings }; addCommandAsTabPage(cutnr); } else if (ci.Type == new IntToProgCommandUserControl().Type()) { IntToProgCommandUserControl cutnr = new IntToProgCommandUserControl() { Settings = ci.Settings }; addCommandAsTabPage(cutnr); } else if (ci.Type == new ChangeSpeedCommandUserControl().Type()) { ChangeSpeedCommandUserControl cutnr = new ChangeSpeedCommandUserControl() { Settings = ci.Settings }; addCommandAsTabPage(cutnr); } else if (ci.Type == new ResizeCommandUserControl().Type()) { ResizeCommandUserControl cutnr = new ResizeCommandUserControl() { Settings = ci.Settings }; addCommandAsTabPage(cutnr); } else if (ci.Type == new HardcodeSubCommandUserControl().Type()) { HardcodeSubCommandUserControl cutnr = new HardcodeSubCommandUserControl() { Settings = ci.Settings }; addCommandAsTabPage(cutnr); } else if (ci.Type == new CarPlayerConversionCommandUserControl().Type()) { CarPlayerConversionCommandUserControl cutnr = new CarPlayerConversionCommandUserControl() { Settings = ci.Settings }; addCommandAsTabPage(cutnr); } else if (ci.Type == new CropCommandUserControl().Type()) { CropCommandUserControl cutnr = new CropCommandUserControl() { Settings = ci.Settings }; addCommandAsTabPage(cutnr); } else if (ci.Type == new ConvertToMPThreeCommandUserControl().Type()) { ConvertToMPThreeCommandUserControl cutnr = new ConvertToMPThreeCommandUserControl() { Settings = ci.Settings }; addCommandAsTabPage(cutnr); } } }
private void btResize_Click(object sender, EventArgs e) { ResizeCommandUserControl cutnr = new ResizeCommandUserControl(); addCommandAsTabPage(cutnr); }