private void OnWindowLoaded(object sender, RoutedEventArgs e) { bottomExpander.IsExpanded = false; leftExpander.IsExpanded = false; // Retrieve the display pages... _svgPage = frameSvgInput.Content as SvgPage; _xamlPage = frameXamlOutput.Content as XamlPage; _drawingPage = frameDrawing.Content as DrawingPage; _debugPage = frameDebugging.Content as DebugPage; _settingsPage = frameSettings.Content as SettingsPage; if (_svgPage != null) { _svgPage.MainWindow = this; } if (_xamlPage != null) { _xamlPage.MainWindow = this; } if (_drawingPage != null) { _drawingPage.WorkingDrawingDir = _drawingDir; _drawingPage.MainWindow = this; } if (_debugPage != null) { _debugPage.Startup(); } if (_settingsPage != null) { _settingsPage.MainWindow = this; } if (_fileWatcher == null) { // Create a new FileSystemWatcher and set its properties. _fileWatcher = new FileSystemWatcher(); // Watch for changes in LastAccess and LastWrite times _fileWatcher.NotifyFilter = NotifyFilters.LastAccess | NotifyFilters.LastWrite; _fileWatcher.IncludeSubdirectories = false; // Add event handlers. _fileWatcher.Changed += OnFileChanged; _fileWatcher.Created += OnFileChanged; _fileWatcher.Deleted += OnFileChanged; _fileWatcher.Renamed += OnFileRenamed; } tabSvgInput.Visibility = _optionSettings.ShowInputFile ? Visibility.Visible : Visibility.Collapsed; tabXamlOutput.Visibility = _optionSettings.ShowOutputFile ? Visibility.Visible : Visibility.Collapsed; this.InitializedPath(_optionSettings.CurrentSvgPath); tabDrawing.IsSelected = true; }
private void OnWindowLoaded(object sender, RoutedEventArgs e) { leftExpander.IsExpanded = false; // Retrieve the display pages... _svgPage = frameSvgInput.Content as SvgPage; _xamlPage = frameXamlOutput.Content as XamlPage; _drawingPage = frameDrawing.Content as DrawingPage; if (_drawingPage != null) { _drawingPage.XamlDrawingDir = _drawingDir; } this.txtSvgPath.Text = IoPath.GetFullPath(@".\Samples"); }