Esempio n. 1
0
        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);
                }
            }
        }
Esempio n. 2
0
        private void btHardcodeSub_Click(object sender, EventArgs e)
        {
            HardcodeSubCommandUserControl cutnr = new HardcodeSubCommandUserControl();

            addCommandAsTabPage(cutnr);
        }