public MainViewModel(string[] args) { BindingOperations.EnableCollectionSynchronization(Xmls, new object()); Progress = new ProgressModel(); #if DEBUG Schema = new DocumentSchemaModel(@"C:\Users\ehirakawa\Source\Workspaces\Schematron Learning\testdata\tournament.iso\tournament-schema.sch"); #endif }
void SchemaSelectCommandExecute() { string file = ExDialogs.SelectionFile(Properties.Resources.ToolItemButtonChooseSch, new[] { ".sch" }); if (File.Exists(file)) { Schema = new DocumentSchemaModel(file); } }
void FileDropCommandExecute(object param) { string[] files = param as string[]; if (files != null) { foreach (string file in files) { if (!File.Exists(file)) { continue; } string ext = Path.GetExtension(file).ToLower(); if (ext == ".sch") { Schema = new DocumentSchemaModel(file); } else if (ext == ".xml" && !Xmls.Exists(file)) { Xmls.Add(file); } } } }