コード例 #1
0
        public ModuleEditorControl CreateNewEditor(IList <Module> modules)
        {
            var editor = new TracksEditor();

            editor.SaveCommand = new AddNewModuleCommand(modules, editor.ModifiedTracks);

            return(editor);
        }
コード例 #2
0
        public ModuleEditorControl CreateEditor(Module module)
        {
            if (!IsValidModule(module))
            {
                throw new ArgumentException("Invalid module");
            }

            var editor = new TracksEditor();

            Tracks targetTracks = module as Tracks;

            editor.Tracks      = targetTracks;
            editor.SaveCommand = new SaveEdittedModuleCommand <Tracks>(targetTracks, editor.ModifiedTracks);

            return(editor);
        }