//Òþ²Ø»ùÀà³ÉÔ± public new static AgDocument FromFile(string fullPath) { if (File.Exists(fullPath)) { string sourceText = File.ReadAllText(fullPath); AgDocument document = new AgDocument(Path.GetDirectoryName(fullPath), sourceText); document.FullPath = fullPath; return(document); } return(null); }
public static AgDocument FromFile(string fullPath) { if (File.Exists(fullPath)) { string sourceText = File.ReadAllText(fullPath); AgDocument document = new AgDocument(Path.GetDirectoryName(fullPath), sourceText); document.FullPath = fullPath; return document; } return null; }
public static XamlDocument FromFile(string fullPath) { if (File.Exists(fullPath)) { string sourceText = File.ReadAllText(fullPath); XamlDocument document = null; if (sourceText.Contains("http://schemas.microsoft.com/winfx/2006/xaml/presentation")) { document = new WpfDocument(Path.GetDirectoryName(fullPath), sourceText); } else { document = new AgDocument(Path.GetDirectoryName(fullPath), sourceText); } document.FullPath = fullPath; return(document); } return(null); }
void NewAgTab_Executed(object sender, ExecutedRoutedEventArgs args) { if (sender == this) { AgDocument doc = new AgDocument(System.IO.Directory.GetCurrentDirectory()); XamlDocuments.Add(doc); this.DocumentsView.SelectedDocument = doc; } }
public static XamlDocument FromFile(string fullPath) { if (File.Exists(fullPath)) { string sourceText = File.ReadAllText(fullPath); XamlDocument document = null; if (sourceText.Contains("http://schemas.microsoft.com/winfx/2006/xaml/presentation")) { document = new WpfDocument(Path.GetDirectoryName(fullPath), sourceText); } else { document = new AgDocument(Path.GetDirectoryName(fullPath), sourceText); } document.FullPath = fullPath; return document; } return null; }