Ejemplo n.º 1
0
        public MainViewModel()
        {
            this.DisplayName = Properties.Resources.AppTitleLong;
            schemaPath       = AppDomain.CurrentDomain.BaseDirectory + "\\schema.xml";

            nodesWorkspace    = new NodesWorkspaceViewModel(this);
            texturesWorkspace = new TexturesWorkspaceViewModel(this);

            // Commands
            newCommand            = new RelayCommand(NewCommand_Execute);
            openCommand           = new RelayCommand(OpenCommand_Execute);
            saveCommand           = new RelayCommand(SaveCommand_Execute, SaveCommand_CanExecute);
            savePssgCommand       = new RelayCommand(SavePssgCommand_Execute, SaveCommand_CanExecute);
            saveCompressedCommand = new RelayCommand(SaveCompressedCommand_Execute, SaveCommand_CanExecute);
            saveXmlCommand        = new RelayCommand(SaveXmlCommand_Execute, SaveCommand_CanExecute);
            loadSchema            = new RelayCommand(LoadSchema_Execute);
            saveSchema            = new RelayCommand(SaveSchema_Execute);
            clearSchema           = new RelayCommand(ClearSchema_Execute);

            try { LoadSchema_Execute(null); } catch { }
            ParseCommandLineArguments();
        }