public MainWindow() { InitializeComponent(); Logger.Init(); EditorKernel.Inject(this); ThemeResourceDictionary.ApplyTheme(this, Settings.Theme); removeInvalidRecents(); workspacePanel.Loaded += WorkspacePanel_Loaded; Width = Settings.WindowSize.Width != 0 ? Settings.WindowSize.Width : 800; Height = Settings.WindowSize.Height != 0 ? Settings.WindowSize.Height : 600; if (Settings.ReopenMostRecentProject && Settings.RecentProjects.Count > 0) { // TODO: reopen project string path = Settings.RecentProjects[0]; Project project = Controls.Workspace.Extensions.ReadFromBinaryFile <Project>(path); ProjectExplorer.Project = project; } AddHandler(ActionPerformedEvent, new RoutedActionPerformedEventHandler(actionPerformedHandler)); AddHandler(FileOpenedEvent, new RoutedFileOpenedEventHandler(fileOpenedHandler)); AddHandler(PropertyGrid.ValueEditedEvent, new RoutedValueEditedEventHandler(valueEditedHandler)); AddHandler(WorkspacePanel.SelectionChangedEvent, new RoutedSelectionChangedEventHandler(selectionChangedHandler)); AddHandler(WorkspacePanel.PanelFocusedEvent, new PanelActionEventHandler(panelFocused)); Logger.OnLog += Logger_OnLog; }
public WelcomePage() { InitializeComponent(); EditorKernel.Inject(this); recentProjects.ItemsSource = Settings.RecentProjects.Select(path => new ResourceFile(path, ResourceContext, ThumbnailRenderer)).ToList(); recentFiles.ItemsSource = Settings.RecentFiles.Select(path => new ResourceFile(path, ResourceContext, ThumbnailRenderer)).ToList(); }
public SettingsWindow() { InitializeComponent(); EditorKernel.Inject(this); propertyGrid.PropertyEditorFactory = new PropertyEditorFactory(); propertyGrid.SelectedObject = Settings; ThemeResourceDictionary.ApplyTheme(this, Settings.Theme); }
public ResourceManagerPanel() { InitializeComponent(); EditorKernel.Inject(this); supportedExtensions = ResourceFormat.Values.Map(format => format.Extension).Filter(extension => extension != null).ToArray(); foreach (string library in Settings.Libraries) { loadLibrary(library); } }
public IDockablePanel MakePanel(Type type) { return(EditorKernel.GetService(type) as IDockablePanel); }