void XmlSelectCommandExecute() { string[] files = ExDialogs.SelectionFiles(Properties.Resources.ToolItemButtonChooseXml, new[] { ".xml" }); foreach (string file in files) { if (File.Exists(file) && !Xmls.Exists(file)) { Xmls.Add(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); } } } }