├── .github ├── FUNDING.yml └── workflows │ └── ci.yml ├── .gitignore ├── CHANGELOG.md ├── LICENCE.txt ├── README.md ├── doc ├── gemini-demo.png ├── gemini-everything-blue.png ├── gemini-everything-light.png ├── gemini-module-codeeditor.png ├── gemini-module-errorlist.png ├── gemini-module-grapheditor.png ├── gemini-module-inspector.png ├── gemini-module-mainmenu.png ├── gemini-module-output.png ├── gemini-module-propertygrid.png ├── gemini-module-shell.png ├── gemini-module-statusbar.png ├── gemini-module-toolbars.png ├── gemini-module-toolbox.png └── gemini-module-undoredo.png ├── src ├── .editorconfig ├── .vscode │ └── launch.json ├── Directory.Build.props ├── Gemini.Demo │ ├── App.xaml │ ├── App.xaml.cs │ ├── DemoAppBootstrapper.cs │ ├── Gemini.Demo.csproj │ ├── Modules │ │ ├── FilterDesigner │ │ │ ├── Commands │ │ │ │ ├── OpenGraphCommandDefinition.cs │ │ │ │ └── OpenGraphCommandHandler.cs │ │ │ ├── Design │ │ │ │ ├── DesignTimeGraphViewModel.cs │ │ │ │ └── DesignTimeImages.cs │ │ │ ├── MenuDefinitions.cs │ │ │ ├── Resources │ │ │ │ ├── Styles.xaml │ │ │ │ ├── action_add_16xLG.png │ │ │ │ ├── active_x_16xLG.png │ │ │ │ ├── color_swatch.png │ │ │ │ └── image.png │ │ │ ├── Sample.cs │ │ │ ├── ShaderEffects │ │ │ │ ├── AddEffect.cs │ │ │ │ ├── AddEffect.fx │ │ │ │ ├── MultiplyEffect.cs │ │ │ │ ├── MultiplyEffect.fx │ │ │ │ └── ShaderEffectBase.cs │ │ │ ├── Util │ │ │ │ ├── BitmapUtility.cs │ │ │ │ ├── FastBitmap.cs │ │ │ │ └── ShaderEffectUtility.cs │ │ │ ├── ViewModels │ │ │ │ ├── ConnectionViewModel.cs │ │ │ │ ├── ConnectorDirection.cs │ │ │ │ ├── ConnectorViewModel.cs │ │ │ │ ├── ElementViewModel.cs │ │ │ │ ├── Elements │ │ │ │ │ ├── Add.cs │ │ │ │ │ ├── ColorInput.cs │ │ │ │ │ ├── DynamicElement.cs │ │ │ │ │ ├── ImageSource.cs │ │ │ │ │ ├── Multiply.cs │ │ │ │ │ └── ShaderEffectElement.cs │ │ │ │ ├── GraphViewModel.cs │ │ │ │ ├── InputConnectorViewModel.cs │ │ │ │ └── OutputConnectorViewModel.cs │ │ │ └── Views │ │ │ │ ├── GraphView.xaml │ │ │ │ └── GraphView.xaml.cs │ │ ├── Home │ │ │ ├── Commands │ │ │ │ ├── ViewHelixCommandDefinition.cs │ │ │ │ ├── ViewHelixCommandHandler.cs │ │ │ │ ├── ViewHomeCommandDefinition.cs │ │ │ │ └── ViewHomeCommandHandler.cs │ │ │ ├── Module.cs │ │ │ ├── ViewModels │ │ │ │ ├── HelixViewModel.cs │ │ │ │ ├── HomeViewModel.cs │ │ │ │ └── IDemoScript.cs │ │ │ └── Views │ │ │ │ ├── HelixView.xaml │ │ │ │ ├── HelixView.xaml.cs │ │ │ │ ├── HomeView.xaml │ │ │ │ ├── HomeView.xaml.cs │ │ │ │ └── IHelixView.cs │ │ ├── SampleBrowser │ │ │ ├── ISample.cs │ │ │ ├── Module.cs │ │ │ ├── ViewModels │ │ │ │ └── SampleBrowserViewModel.cs │ │ │ └── Views │ │ │ │ ├── SampleBrowserView.xaml │ │ │ │ └── SampleBrowserView.xaml.cs │ │ ├── Shell │ │ │ ├── ViewModels │ │ │ │ ├── DemoApplicationSettingsViewModel.cs │ │ │ │ └── ShellViewModel.cs │ │ │ └── Views │ │ │ │ ├── DemoApplicationSettingsView.xaml │ │ │ │ └── DemoApplicationSettingsView.xaml.cs │ │ ├── Startup │ │ │ └── Module.cs │ │ └── TextEditor │ │ │ ├── EditorProvider.cs │ │ │ ├── ViewModels │ │ │ └── EditorViewModel.cs │ │ │ └── Views │ │ │ ├── EditorView.xaml │ │ │ └── EditorView.xaml.cs │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ ├── PublishProfiles │ │ │ ├── FolderProfileNet5.pubxml │ │ │ └── FolderProfileNetCore31.pubxml │ │ ├── Resources.Designer.cs │ │ ├── Resources.de.Designer.cs │ │ ├── Resources.de.resx │ │ ├── Resources.fr.resx │ │ ├── Resources.ko.resx │ │ ├── Resources.resx │ │ ├── Resources.ru.resx │ │ ├── Resources.zh-Hans.resx │ │ ├── Settings.Designer.cs │ │ └── Settings.settings │ ├── Resources │ │ └── Splash.png │ └── app.config ├── Gemini.Modules.CodeCompiler │ ├── CodeCompiler.cs │ ├── Gemini.Modules.CodeCompiler.csproj │ └── ICodeCompiler.cs ├── Gemini.Modules.CodeEditor │ ├── CodeEditorToolBarDefinitions.cs │ ├── Commands │ │ ├── ShowEndOfLineCommandDefinition.cs │ │ ├── ShowLineNumbersCommandDefinition.cs │ │ ├── ShowSpacesCommandDefinition.cs │ │ ├── ShowTabsCommandDefinition.cs │ │ └── WordWrapCommandDefinition.cs │ ├── Controls │ │ └── CodeEditor.cs │ ├── DefaultLanguageDefinition.cs │ ├── EditorProvider.cs │ ├── Gemini.Modules.CodeEditor.csproj │ ├── ILanguageDefinition.cs │ ├── LanguageDefinitionManager.cs │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ ├── Resources.Designer.cs │ │ ├── Resources.de.resx │ │ ├── Resources.fr.resx │ │ ├── Resources.ko.resx │ │ ├── Resources.resx │ │ ├── Resources.ru.resx │ │ ├── Resources.zh-Hans.resx │ │ ├── Settings.Designer.cs │ │ └── Settings.settings │ ├── Resources │ │ └── Icons │ │ │ ├── Find.png │ │ │ ├── ShowEndOfLine.png │ │ │ ├── ShowLineNumbers.png │ │ │ ├── ShowSpaces.png │ │ │ ├── ShowTabs.png │ │ │ └── WordWrap.png │ ├── ViewModels │ │ ├── CodeEditorSettingsViewModel.cs │ │ └── CodeEditorViewModel.cs │ └── Views │ │ ├── CodeEditorSettingsView.xaml │ │ ├── CodeEditorSettingsView.xaml.cs │ │ ├── CodeEditorView.xaml │ │ ├── CodeEditorView.xaml.cs │ │ └── ICodeEditorView.cs ├── Gemini.Modules.ErrorList │ ├── Commands │ │ ├── ToggleErrorsCommandDefinition.cs │ │ ├── ToggleErrorsWarningsMessagesCommandHandler.cs │ │ ├── ToggleMessagesCommandDefinition.cs │ │ ├── ToggleWarningsCommandDefinition.cs │ │ ├── ViewErrorListCommandDefinition.cs │ │ └── ViewErrorListCommandHandler.cs │ ├── Converters │ │ └── ErrorListItemTypeToImageConverter.cs │ ├── Design │ │ └── DesignTimeErrorListViewModel.cs │ ├── ErrorListItem.cs │ ├── ErrorListItemType.cs │ ├── Gemini.Modules.ErrorList.csproj │ ├── IErrorList.cs │ ├── MenuDefinitions.cs │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ ├── Resources.Designer.cs │ │ ├── Resources.de.resx │ │ ├── Resources.fr.resx │ │ ├── Resources.ko.resx │ │ ├── Resources.resx │ │ ├── Resources.ru.resx │ │ ├── Resources.zh-Hans.resx │ │ ├── Settings.Designer.cs │ │ └── Settings.settings │ ├── Resources │ │ ├── Error.png │ │ ├── Message.png │ │ └── Warning.png │ ├── ToolBarDefinitions.cs │ ├── ViewModels │ │ └── ErrorListViewModel.cs │ └── Views │ │ ├── ErrorListView.xaml │ │ └── ErrorListView.xaml.cs ├── Gemini.Modules.GraphEditor │ ├── Controls │ │ ├── AnimationHelper.cs │ │ ├── BezierLine.cs │ │ ├── ConnectionDragCompletedEventArgs.cs │ │ ├── ConnectionDragEventArgs.cs │ │ ├── ConnectionDragStartedEventArgs.cs │ │ ├── ConnectionDraggingEventArgs.cs │ │ ├── ConnectionItem.cs │ │ ├── ConnectionItemsControl.cs │ │ ├── ConnectorItem.cs │ │ ├── ConnectorItemDragCompletedEventArgs.cs │ │ ├── ConnectorItemDragStartedEventArgs.cs │ │ ├── ConnectorItemDraggingEventArgs.cs │ │ ├── ElementItem.cs │ │ ├── ElementItemsControl.cs │ │ ├── GraphControl.cs │ │ ├── ZoomAndPanControl.cs │ │ └── ZoomAndPanControl_IScrollInfo.cs │ ├── Converters │ │ └── ColorToBrushConverter.cs │ ├── Gemini.Modules.GraphEditor.csproj │ ├── Module.cs │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ ├── Resources.Designer.cs │ │ ├── Resources.resx │ │ ├── Settings.Designer.cs │ │ └── Settings.settings │ └── Themes │ │ └── Generic.xaml ├── Gemini.Modules.Inspector │ ├── BoundPropertyDescriptor.cs │ ├── Commands │ │ ├── ViewInspectorCommandDefinition.cs │ │ └── ViewInspectorCommandHandler.cs │ ├── Controls │ │ ├── InspectorGrid.cs │ │ ├── InspectorItemTemplateSelector.cs │ │ ├── NumericTextBox.cs │ │ ├── ScreenColorPicker.cs │ │ └── SimpleGridSplitter.cs │ ├── Conventions │ │ ├── DefaultPropertyInspectors.cs │ │ ├── EnumPropertyEditorBuilder.cs │ │ ├── PropertyEditorBuilder.cs │ │ ├── RangePropertyEditorBuilder.cs │ │ └── StandardPropertyEditorBuilder.cs │ ├── Gemini.Modules.Inspector.csproj │ ├── IInspectableObject.cs │ ├── IInspectorTool.cs │ ├── InspectableObject.cs │ ├── InspectableObjectBuilder.cs │ ├── InspectorBuilder.cs │ ├── Inspectors │ │ ├── BitmapSourceEditorView.xaml │ │ ├── BitmapSourceEditorView.xaml.cs │ │ ├── BitmapSourceEditorViewModel.cs │ │ ├── ChangeObjectValueAction.cs │ │ ├── CheckBoxEditorView.xaml │ │ ├── CheckBoxEditorView.xaml.cs │ │ ├── CheckBoxEditorViewModel.cs │ │ ├── CollapsibleGroupBuilder.cs │ │ ├── CollapsibleGroupView.xaml │ │ ├── CollapsibleGroupView.xaml.cs │ │ ├── CollapsibleGroupViewModel.cs │ │ ├── ColorEditorView.xaml │ │ ├── ColorEditorView.xaml.cs │ │ ├── ColorEditorViewModel.cs │ │ ├── EditorBase.cs │ │ ├── EnumEditorView.xaml │ │ ├── EnumEditorView.xaml.cs │ │ ├── EnumEditorViewModel.cs │ │ ├── IEditor.cs │ │ ├── IInspector.cs │ │ ├── ILabelledInspector.cs │ │ ├── InspectorBase.cs │ │ ├── Point3DEditorView.xaml │ │ ├── Point3DEditorView.xaml.cs │ │ ├── Point3DEditorViewModel.cs │ │ ├── RangeEditorView.xaml │ │ ├── RangeEditorView.xaml.cs │ │ ├── RangeEditorViewModel.cs │ │ ├── ResetObjectValueAction.cs │ │ ├── SelectiveUndoEditorBase.cs │ │ ├── TextBoxEditorView.xaml │ │ ├── TextBoxEditorView.xaml.cs │ │ └── TextBoxEditorViewModel.cs │ ├── MenuDefinitions.cs │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ ├── Resources.Designer.cs │ │ ├── Resources.de.Designer.cs │ │ ├── Resources.de.resx │ │ ├── Resources.fr.resx │ │ ├── Resources.ko.resx │ │ ├── Resources.resx │ │ ├── Resources.ru.resx │ │ └── Resources.zh-Hans.resx │ ├── Resources │ │ ├── Resources.xaml │ │ └── eyedropper_16xLG.png │ ├── Themes │ │ └── Generic.xaml │ ├── Util │ │ ├── ExpressionUtility.cs │ │ └── ScreenShotUtility.cs │ ├── ViewModels │ │ └── InspectorViewModel.cs │ ├── Views │ │ ├── InspectorView.xaml │ │ └── InspectorView.xaml.cs │ └── Win32 │ │ └── NativeMethods.cs ├── Gemini.Modules.Output │ ├── Commands │ │ ├── ViewOutputCommandDefinition.cs │ │ └── ViewOutputCommandHandler.cs │ ├── Gemini.Modules.Output.csproj │ ├── IOutput.cs │ ├── MenuDefinitions.cs │ ├── Properties │ │ ├── Resources.Designer.cs │ │ ├── Resources.de.Designer.cs │ │ ├── Resources.de.resx │ │ ├── Resources.fr.resx │ │ ├── Resources.ko.resx │ │ ├── Resources.resx │ │ ├── Resources.ru.resx │ │ └── Resources.zh-Hans.resx │ ├── ViewModels │ │ ├── OutputViewModel.cs │ │ └── OutputWriter.cs │ └── Views │ │ ├── IOutputView.cs │ │ ├── OutputView.xaml │ │ └── OutputView.xaml.cs ├── Gemini.Modules.PropertyGrid │ ├── Commands │ │ ├── ViewPropertyGridCommandDefinition.cs │ │ └── ViewPropertyGridCommandHandler.cs │ ├── Gemini.Modules.PropertyGrid.csproj │ ├── IPropertyGrid.cs │ ├── MenuDefinitions.cs │ ├── Properties │ │ ├── Resources.Designer.cs │ │ ├── Resources.de.resx │ │ ├── Resources.fr.resx │ │ ├── Resources.ko.resx │ │ ├── Resources.resx │ │ ├── Resources.ru.resx │ │ └── Resources.zh-Hans.resx │ ├── Resources │ │ └── Icons │ │ │ └── Properties.png │ ├── ViewModels │ │ └── PropertyGridViewModel.cs │ └── Views │ │ ├── PropertyGridView.xaml │ │ └── PropertyGridView.xaml.cs ├── Gemini.sln ├── Gemini │ ├── AppBootstrapper.cs │ ├── Framework │ │ ├── AsyncCommand.cs │ │ ├── Behaviors │ │ │ ├── BindableTreeViewSelectedItemBehavior.cs │ │ │ ├── KeyboardFocusBehavior.cs │ │ │ └── WindowOptionsBehavior.cs │ │ ├── Commands │ │ │ ├── Command.cs │ │ │ ├── CommandDefinition.cs │ │ │ ├── CommandDefinitionAttribute.cs │ │ │ ├── CommandDefinitionBase.cs │ │ │ ├── CommandHandlerAttribute.cs │ │ │ ├── CommandHandlerWrapper.cs │ │ │ ├── CommandKeyGestureService.cs │ │ │ ├── CommandKeyboardShortcut.cs │ │ │ ├── CommandListDefinition.cs │ │ │ ├── CommandRouter.cs │ │ │ ├── CommandService.cs │ │ │ ├── ExcludeCommandKeyboardShortcut.cs │ │ │ ├── ICommandHandler.cs │ │ │ ├── ICommandKeyGestureService.cs │ │ │ ├── ICommandRerouter.cs │ │ │ ├── ICommandRouter.cs │ │ │ ├── ICommandService.cs │ │ │ ├── ICommandUiItem.cs │ │ │ └── TargetableCommand.cs │ │ ├── Controls │ │ │ ├── ClippingHwndHost.cs │ │ │ ├── DynamicStyle.cs │ │ │ ├── ExpanderEx.cs │ │ │ ├── HwndMouse.cs │ │ │ ├── HwndMouseEventArgs.cs │ │ │ ├── HwndMouseState.cs │ │ │ ├── HwndWrapper.cs │ │ │ └── SliderEx.cs │ │ ├── Document.cs │ │ ├── IDocument.cs │ │ ├── ILayoutItem.cs │ │ ├── IModule.cs │ │ ├── IPersistedDocument.cs │ │ ├── ITool.cs │ │ ├── IWindow.cs │ │ ├── LayoutItemBase.cs │ │ ├── Markup │ │ │ └── TranslateExtension.cs │ │ ├── Menus │ │ │ ├── CommandMenuItemDefinition.cs │ │ │ ├── ExcludeMenuDefinition.cs │ │ │ ├── ExcludeMenuItemDefinition.cs │ │ │ ├── ExcludeMenuItemGroupDefinition.cs │ │ │ ├── MenuBarDefinition.cs │ │ │ ├── MenuDefinition.cs │ │ │ ├── MenuDefinitionBase.cs │ │ │ ├── MenuItemDefinition.cs │ │ │ ├── MenuItemGroupDefinition.cs │ │ │ └── TextMenuItemDefinition.cs │ │ ├── ModuleBase.cs │ │ ├── PersistedDocument.cs │ │ ├── RelayCommand.cs │ │ ├── Results │ │ │ ├── IOpenResult.cs │ │ │ ├── LambdaResult.cs │ │ │ ├── OpenDocumentResult.cs │ │ │ ├── OpenResultBase.cs │ │ │ ├── Show.cs │ │ │ ├── ShowCommonDialogResult.cs │ │ │ ├── ShowDialogResult.cs │ │ │ ├── ShowToolResult.cs │ │ │ └── ShowWindowResult.cs │ │ ├── Services │ │ │ ├── EditorFileType.cs │ │ │ ├── ExtensionMethods.cs │ │ │ ├── IEditorProvider.cs │ │ │ ├── IInputManager.cs │ │ │ ├── IMainWindow.cs │ │ │ ├── IResourceManager.cs │ │ │ ├── IShell.cs │ │ │ ├── InputBindingTrigger.cs │ │ │ ├── InputManager.cs │ │ │ ├── PaneLocation.cs │ │ │ ├── ResourceManager.cs │ │ │ ├── ServiceProvider.cs │ │ │ └── SettingsPropertyChangedEventManager.cs │ │ ├── ShaderEffects │ │ │ ├── GrayscaleEffect.cs │ │ │ ├── GrayscaleEffect.ps │ │ │ ├── ShaderEffectBase.cs │ │ │ └── ShaderEffectUtility.cs │ │ ├── Themes │ │ │ ├── BlueTheme.cs │ │ │ ├── DarkTheme.cs │ │ │ ├── ITheme.cs │ │ │ ├── IThemeManager.cs │ │ │ ├── LightTheme.cs │ │ │ └── ThemeManager.cs │ │ ├── Threading │ │ │ └── TaskUtility.cs │ │ ├── Tool.cs │ │ ├── ToolBars │ │ │ ├── CommandToolBarItemDefinition.cs │ │ │ ├── ExcludeToolBarDefinition.cs │ │ │ ├── ExcludeToolBarItemDefinition.cs │ │ │ ├── ExcludeToolBarItemGroupDefinition.cs │ │ │ ├── ToolBarDefinition.cs │ │ │ ├── ToolBarItemDefinition.cs │ │ │ └── ToolBarItemGroupDefinition.cs │ │ ├── Utils │ │ │ └── ItemsControlUtility.cs │ │ ├── VisualTreeUtility.cs │ │ ├── Win32 │ │ │ └── NativeMethods.cs │ │ └── WindowBase.cs │ ├── Gemini.csproj │ ├── Modules │ │ ├── MainMenu │ │ │ ├── Behaviors │ │ │ │ └── MenuBehavior.cs │ │ │ ├── Controls │ │ │ │ ├── MenuEx.cs │ │ │ │ └── MenuItemEx.cs │ │ │ ├── Converters │ │ │ │ └── CultureInfoNameConverter.cs │ │ │ ├── IMenu.cs │ │ │ ├── IMenuBuilder.cs │ │ │ ├── MenuBuilder.cs │ │ │ ├── MenuDefinitions.cs │ │ │ ├── Models │ │ │ │ ├── CommandMenuItem.cs │ │ │ │ ├── MenuItemBase.cs │ │ │ │ ├── MenuItemSeparator.cs │ │ │ │ ├── MenuModel.cs │ │ │ │ ├── StandardMenuItem.cs │ │ │ │ └── TextMenuItem.cs │ │ │ ├── Resources │ │ │ │ └── Styles.xaml │ │ │ ├── ViewModels │ │ │ │ ├── MainMenuSettingsViewModel.cs │ │ │ │ └── MainMenuViewModel.cs │ │ │ └── Views │ │ │ │ ├── MainMenuSettingsView.xaml │ │ │ │ ├── MainMenuSettingsView.xaml.cs │ │ │ │ ├── MainMenuView.xaml │ │ │ │ └── MainMenuView.xaml.cs │ │ ├── MainWindow │ │ │ ├── ViewModels │ │ │ │ └── MainWindowViewModel.cs │ │ │ └── Views │ │ │ │ ├── MainWindowView.xaml │ │ │ │ └── MainWindowView.xaml.cs │ │ ├── Settings │ │ │ ├── Commands │ │ │ │ ├── OpenSettingsCommandDefinition.cs │ │ │ │ └── OpenSettingsCommandHandler.cs │ │ │ ├── ISettingsEditor.cs │ │ │ ├── ISettingsEditorAsync.cs │ │ │ ├── MenuDefinitions.cs │ │ │ ├── SampleData │ │ │ │ └── SettingsViewModelSampleData.xaml │ │ │ ├── ViewModels │ │ │ │ ├── SettingsEditorWrapper.cs │ │ │ │ ├── SettingsPageViewModel.cs │ │ │ │ └── SettingsViewModel.cs │ │ │ └── Views │ │ │ │ ├── SettingsView.xaml │ │ │ │ └── SettingsView.xaml.cs │ │ ├── Shell │ │ │ ├── Commands │ │ │ │ ├── CloseFileCommandDefinition.cs │ │ │ │ ├── CloseFileCommandHandler.cs │ │ │ │ ├── ExitCommandDefinition.cs │ │ │ │ ├── ExitCommandHandler.cs │ │ │ │ ├── NewFileCommandHandler.cs │ │ │ │ ├── NewFileCommandListDefinition.cs │ │ │ │ ├── OpenFileCommandDefinition.cs │ │ │ │ ├── OpenFileCommandHandler.cs │ │ │ │ ├── SaveAllFilesCommandDefinition.cs │ │ │ │ ├── SaveAllFilesCommandHandler.cs │ │ │ │ ├── SaveFileAsCommandDefinition.cs │ │ │ │ ├── SaveFileCommandDefinition.cs │ │ │ │ ├── SwitchToDocumentCommandListDefinition.cs │ │ │ │ ├── SwitchToDocumentListCommandHandler.cs │ │ │ │ ├── ViewFullscreenCommandDefinition.cs │ │ │ │ └── ViewFullscreenCommandHandler.cs │ │ │ ├── Controls │ │ │ │ ├── LayoutInitializer.cs │ │ │ │ ├── PanesStyleSelector.cs │ │ │ │ └── PanesTemplateSelector.cs │ │ │ ├── Converters │ │ │ │ ├── NullableValueConverter.cs │ │ │ │ └── TruncateMiddleConverter.cs │ │ │ ├── MenuDefinitions.cs │ │ │ ├── Services │ │ │ │ ├── ILayoutItemStatePersister.cs │ │ │ │ └── LayoutItemStatePersister.cs │ │ │ ├── ToolBarDefinitions.cs │ │ │ ├── ViewModels │ │ │ │ └── ShellViewModel.cs │ │ │ └── Views │ │ │ │ ├── IShellView.cs │ │ │ │ ├── LayoutUtility.cs │ │ │ │ ├── ShellView.xaml │ │ │ │ └── ShellView.xaml.cs │ │ ├── StatusBar │ │ │ ├── IStatusBar.cs │ │ │ ├── IStatusBarView.cs │ │ │ ├── ViewModels │ │ │ │ ├── StatusBarItemViewModel.cs │ │ │ │ └── StatusBarViewModel.cs │ │ │ └── Views │ │ │ │ ├── StatusBarView.xaml │ │ │ │ └── StatusBarView.xaml.cs │ │ ├── ToolBars │ │ │ ├── Controls │ │ │ │ ├── CustomToggleButton.cs │ │ │ │ ├── MainToolBar.cs │ │ │ │ ├── ToolBarBase.cs │ │ │ │ ├── ToolBarTrayContainer.cs │ │ │ │ └── ToolPaneToolBar.cs │ │ │ ├── IToolBar.cs │ │ │ ├── IToolBarBuilder.cs │ │ │ ├── IToolBars.cs │ │ │ ├── Models │ │ │ │ ├── CommandToolBarItem.cs │ │ │ │ ├── ToolBarItemBase.cs │ │ │ │ ├── ToolBarItemSeparator.cs │ │ │ │ └── ToolBarModel.cs │ │ │ ├── Module.cs │ │ │ ├── Resources │ │ │ │ └── Styles.xaml │ │ │ ├── ToolBarBuilder.cs │ │ │ ├── ToolBarDefinitions.cs │ │ │ ├── ViewModels │ │ │ │ └── ToolBarsViewModel.cs │ │ │ └── Views │ │ │ │ ├── IToolBarView.cs │ │ │ │ ├── ToolBarsView.xaml │ │ │ │ └── ToolBarsView.xaml.cs │ │ ├── Toolbox │ │ │ ├── Commands │ │ │ │ ├── ViewToolboxCommandDefinition.cs │ │ │ │ └── ViewToolboxCommandHandler.cs │ │ │ ├── Design │ │ │ │ └── DesignTimeToolboxViewModel.cs │ │ │ ├── IToolbox.cs │ │ │ ├── MenuDefinitions.cs │ │ │ ├── Models │ │ │ │ └── ToolboxItem.cs │ │ │ ├── Services │ │ │ │ ├── IToolboxService.cs │ │ │ │ └── ToolboxService.cs │ │ │ ├── ToolboxDragDrop.cs │ │ │ ├── ToolboxItemAttribute.cs │ │ │ ├── ViewModels │ │ │ │ ├── ToolboxItemViewModel.cs │ │ │ │ └── ToolboxViewModel.cs │ │ │ └── Views │ │ │ │ ├── ToolboxView.xaml │ │ │ │ └── ToolboxView.xaml.cs │ │ └── UndoRedo │ │ │ ├── Commands │ │ │ ├── RedoCommandDefinition.cs │ │ │ ├── UndoCommandDefinition.cs │ │ │ ├── ViewHistoryCommandDefinition.cs │ │ │ └── ViewHistoryCommandHandler.cs │ │ │ ├── Design │ │ │ └── DesignTimeHistoryViewModel.cs │ │ │ ├── IHistoryTool.cs │ │ │ ├── IUndoRedoManager.cs │ │ │ ├── IUndoableAction.cs │ │ │ ├── MenuDefinitions.cs │ │ │ ├── Services │ │ │ └── UndoRedoManager.cs │ │ │ ├── ToolBarDefinitions.cs │ │ │ ├── ViewModels │ │ │ ├── HistoryItemType.cs │ │ │ ├── HistoryItemViewModel.cs │ │ │ └── HistoryViewModel.cs │ │ │ └── Views │ │ │ ├── HistoryView.xaml │ │ │ └── HistoryView.xaml.cs │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ ├── Resources.Designer.cs │ │ ├── Resources.de.Designer.cs │ │ ├── Resources.de.resx │ │ ├── Resources.fr.resx │ │ ├── Resources.ko.resx │ │ ├── Resources.resx │ │ ├── Resources.ru.resx │ │ ├── Resources.zh-Hans.resx │ │ ├── Settings.Designer.cs │ │ └── Settings.settings │ ├── Resources │ │ └── Icons │ │ │ ├── FullScreen.png │ │ │ ├── Gemini-32.png │ │ │ ├── Open.png │ │ │ ├── Redo.png │ │ │ ├── Save.png │ │ │ ├── SaveAll.png │ │ │ └── Undo.png │ ├── Themes │ │ ├── Generic.xaml │ │ └── VS2013 │ │ │ ├── BlueTheme.xaml │ │ │ ├── Controls │ │ │ ├── Button.xaml │ │ │ ├── CheckBox.xaml │ │ │ ├── ColorCanvas.xaml │ │ │ ├── ComboBox.xaml │ │ │ ├── Converters │ │ │ │ └── TreeViewIndentConverter.cs │ │ │ ├── Focus.xaml │ │ │ ├── Label.xaml │ │ │ ├── Menu.xaml │ │ │ ├── Merged.xaml │ │ │ ├── ScrollBar.xaml │ │ │ ├── Slider.xaml │ │ │ ├── TextBox.xaml │ │ │ ├── Toolbar.xaml │ │ │ ├── Tooltip.xaml │ │ │ ├── TreeView.xaml │ │ │ ├── Window.xaml │ │ │ └── WindowCommands.xaml │ │ │ ├── DarkTheme.xaml │ │ │ └── LightTheme.xaml │ └── app.config └── NuGet.config └── version.json /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: [tgjones] -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: [push, pull_request] 4 | 5 | jobs: 6 | build: 7 | runs-on: windows-latest 8 | 9 | steps: 10 | - name: Checkout 11 | uses: actions/checkout@v1 12 | 13 | - name: Install .NET Core 14 | uses: actions/setup-dotnet@v1 15 | with: 16 | dotnet-version: 7.0.x 17 | 18 | - name: Version 19 | uses: aarnott/nbgv@v0.4.0 20 | with: 21 | setAllVars: true 22 | 23 | - name: Pack 24 | run: dotnet pack src --configuration Release --output build/packages 25 | 26 | - name: Upload Artifacts 27 | uses: actions/upload-artifact@v1 28 | with: 29 | name: Packages 30 | path: build/packages 31 | 32 | - name: Publish to NuGet 33 | shell: bash 34 | if: github.event_name == 'push' 35 | run: dotnet nuget push build/packages/**/*.nupkg -s nuget.org -k ${{secrets.NUGET_TOKEN}} 36 | -------------------------------------------------------------------------------- /doc/gemini-demo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tgjones/gemini/1a20a571916cb643e43d400e46098902db84bed2/doc/gemini-demo.png -------------------------------------------------------------------------------- /doc/gemini-everything-blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tgjones/gemini/1a20a571916cb643e43d400e46098902db84bed2/doc/gemini-everything-blue.png -------------------------------------------------------------------------------- /doc/gemini-everything-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tgjones/gemini/1a20a571916cb643e43d400e46098902db84bed2/doc/gemini-everything-light.png -------------------------------------------------------------------------------- /doc/gemini-module-codeeditor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tgjones/gemini/1a20a571916cb643e43d400e46098902db84bed2/doc/gemini-module-codeeditor.png -------------------------------------------------------------------------------- /doc/gemini-module-errorlist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tgjones/gemini/1a20a571916cb643e43d400e46098902db84bed2/doc/gemini-module-errorlist.png -------------------------------------------------------------------------------- /doc/gemini-module-grapheditor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tgjones/gemini/1a20a571916cb643e43d400e46098902db84bed2/doc/gemini-module-grapheditor.png -------------------------------------------------------------------------------- /doc/gemini-module-inspector.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tgjones/gemini/1a20a571916cb643e43d400e46098902db84bed2/doc/gemini-module-inspector.png -------------------------------------------------------------------------------- /doc/gemini-module-mainmenu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tgjones/gemini/1a20a571916cb643e43d400e46098902db84bed2/doc/gemini-module-mainmenu.png -------------------------------------------------------------------------------- /doc/gemini-module-output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tgjones/gemini/1a20a571916cb643e43d400e46098902db84bed2/doc/gemini-module-output.png -------------------------------------------------------------------------------- /doc/gemini-module-propertygrid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tgjones/gemini/1a20a571916cb643e43d400e46098902db84bed2/doc/gemini-module-propertygrid.png -------------------------------------------------------------------------------- /doc/gemini-module-shell.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tgjones/gemini/1a20a571916cb643e43d400e46098902db84bed2/doc/gemini-module-shell.png -------------------------------------------------------------------------------- /doc/gemini-module-statusbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tgjones/gemini/1a20a571916cb643e43d400e46098902db84bed2/doc/gemini-module-statusbar.png -------------------------------------------------------------------------------- /doc/gemini-module-toolbars.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tgjones/gemini/1a20a571916cb643e43d400e46098902db84bed2/doc/gemini-module-toolbars.png -------------------------------------------------------------------------------- /doc/gemini-module-toolbox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tgjones/gemini/1a20a571916cb643e43d400e46098902db84bed2/doc/gemini-module-toolbox.png -------------------------------------------------------------------------------- /doc/gemini-module-undoredo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tgjones/gemini/1a20a571916cb643e43d400e46098902db84bed2/doc/gemini-module-undoredo.png -------------------------------------------------------------------------------- /src/Directory.Build.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | Tim Jones 4 | https://github.com/tgjones/gemini 5 | Apache-2.0 6 | 7 | 8 | 9 | true 10 | snupkg 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/Gemini.Demo/App.xaml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/Gemini.Demo/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | namespace Gemini.Demo 4 | { 5 | /// 6 | /// Interaction logic for App.xaml 7 | /// 8 | public partial class App : Application 9 | { 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Gemini.Demo/Modules/FilterDesigner/Commands/OpenGraphCommandDefinition.cs: -------------------------------------------------------------------------------- 1 | using Gemini.Framework.Commands; 2 | 3 | namespace Gemini.Demo.Modules.FilterDesigner.Commands 4 | { 5 | [CommandDefinition] 6 | public class OpenGraphCommandDefinition : CommandDefinition 7 | { 8 | public const string CommandName = "File.OpenGraph"; 9 | 10 | public override string Name 11 | { 12 | get { return CommandName; } 13 | } 14 | 15 | public override string Text 16 | { 17 | get { return "Open Graph"; } 18 | } 19 | 20 | public override string ToolTip 21 | { 22 | get { return "Open Graph"; } 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /src/Gemini.Demo/Modules/FilterDesigner/Commands/OpenGraphCommandHandler.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.Composition; 2 | using System.Threading.Tasks; 3 | using Caliburn.Micro; 4 | using Gemini.Demo.Modules.FilterDesigner.ViewModels; 5 | using Gemini.Framework.Commands; 6 | using Gemini.Framework.Services; 7 | using Gemini.Modules.Inspector; 8 | 9 | namespace Gemini.Demo.Modules.FilterDesigner.Commands 10 | { 11 | [CommandHandler] 12 | public class OpenGraphCommandHandler : CommandHandlerBase 13 | { 14 | private readonly IShell _shell; 15 | 16 | [ImportingConstructor] 17 | public OpenGraphCommandHandler(IShell shell) 18 | { 19 | _shell = shell; 20 | } 21 | 22 | public override Task Run(Command command) 23 | { 24 | return _shell.OpenDocumentAsync(new GraphViewModel(IoC.Get())); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/Gemini.Demo/Modules/FilterDesigner/Design/DesignTimeGraphViewModel.cs: -------------------------------------------------------------------------------- 1 | using Gemini.Demo.Modules.FilterDesigner.ViewModels; 2 | 3 | namespace Gemini.Demo.Modules.FilterDesigner.Design 4 | { 5 | public class DesignTimeGraphViewModel : GraphViewModel 6 | { 7 | public DesignTimeGraphViewModel() 8 | : base(null) 9 | { 10 | 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /src/Gemini.Demo/Modules/FilterDesigner/MenuDefinitions.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.Composition; 2 | using Gemini.Demo.Modules.FilterDesigner.Commands; 3 | using Gemini.Framework.Menus; 4 | 5 | namespace Gemini.Demo.Modules.FilterDesigner 6 | { 7 | public static class MenuDefinitions 8 | { 9 | [Export] 10 | public static readonly MenuItemDefinition OpenGraphMenuItem = new CommandMenuItemDefinition( 11 | Gemini.Modules.MainMenu.MenuDefinitions.FileNewOpenMenuGroup, 2); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Gemini.Demo/Modules/FilterDesigner/Resources/Styles.xaml: -------------------------------------------------------------------------------- 1 |  3 | -------------------------------------------------------------------------------- /src/Gemini.Demo/Modules/FilterDesigner/Resources/action_add_16xLG.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tgjones/gemini/1a20a571916cb643e43d400e46098902db84bed2/src/Gemini.Demo/Modules/FilterDesigner/Resources/action_add_16xLG.png -------------------------------------------------------------------------------- /src/Gemini.Demo/Modules/FilterDesigner/Resources/active_x_16xLG.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tgjones/gemini/1a20a571916cb643e43d400e46098902db84bed2/src/Gemini.Demo/Modules/FilterDesigner/Resources/active_x_16xLG.png -------------------------------------------------------------------------------- /src/Gemini.Demo/Modules/FilterDesigner/Resources/color_swatch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tgjones/gemini/1a20a571916cb643e43d400e46098902db84bed2/src/Gemini.Demo/Modules/FilterDesigner/Resources/color_swatch.png -------------------------------------------------------------------------------- /src/Gemini.Demo/Modules/FilterDesigner/Resources/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tgjones/gemini/1a20a571916cb643e43d400e46098902db84bed2/src/Gemini.Demo/Modules/FilterDesigner/Resources/image.png -------------------------------------------------------------------------------- /src/Gemini.Demo/Modules/FilterDesigner/Sample.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.Composition; 2 | using System.Threading.Tasks; 3 | using Caliburn.Micro; 4 | using Gemini.Demo.Modules.FilterDesigner.ViewModels; 5 | using Gemini.Demo.Modules.SampleBrowser; 6 | using Gemini.Framework.Services; 7 | using Gemini.Modules.Inspector; 8 | using Gemini.Modules.Toolbox; 9 | 10 | namespace Gemini.Demo.Modules.FilterDesigner 11 | { 12 | [Export(typeof(ISample))] 13 | public class Sample : ISample 14 | { 15 | public string Name => "Filter Designer"; 16 | 17 | public async Task Activate(IShell shell) 18 | { 19 | await shell.OpenDocumentAsync(IoC.Get()); 20 | shell.ShowTool(); 21 | shell.ShowTool(); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/Gemini.Demo/Modules/FilterDesigner/ShaderEffects/AddEffect.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | using System.Windows.Media; 3 | 4 | namespace Gemini.Demo.Modules.FilterDesigner.ShaderEffects 5 | { 6 | internal class AddEffect : ShaderEffectBase 7 | { 8 | public static readonly DependencyProperty Input1Property = RegisterPixelShaderSamplerProperty( 9 | "Input1", typeof(AddEffect), 0); 10 | 11 | public Brush Input1 12 | { 13 | get { return (Brush) GetValue(Input1Property); } 14 | set { SetValue(Input1Property, value); } 15 | } 16 | 17 | public static readonly DependencyProperty Input2Property = RegisterPixelShaderSamplerProperty( 18 | "Input2", typeof(AddEffect), 1); 19 | 20 | public Brush Input2 21 | { 22 | get { return (Brush) GetValue(Input2Property); } 23 | set { SetValue(Input2Property, value); } 24 | } 25 | 26 | public AddEffect() 27 | { 28 | UpdateShaderValue(Input1Property); 29 | UpdateShaderValue(Input2Property); 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /src/Gemini.Demo/Modules/FilterDesigner/ShaderEffects/AddEffect.fx: -------------------------------------------------------------------------------- 1 | sampler2D input1 : register(s0); 2 | sampler2D input2 : register(s1); 3 | 4 | float4 main(float2 uv : TEXCOORD) : COLOR 5 | { 6 | float4 color1 = tex2D(input1, uv); 7 | float4 color2 = tex2D(input2, uv); 8 | return color1 + color2; 9 | } -------------------------------------------------------------------------------- /src/Gemini.Demo/Modules/FilterDesigner/ShaderEffects/MultiplyEffect.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | using System.Windows.Media; 3 | 4 | namespace Gemini.Demo.Modules.FilterDesigner.ShaderEffects 5 | { 6 | internal class MultiplyEffect : ShaderEffectBase 7 | { 8 | public static readonly DependencyProperty Input1Property = RegisterPixelShaderSamplerProperty( 9 | "Input1", typeof(MultiplyEffect), 0); 10 | 11 | public Brush Input1 12 | { 13 | get { return (Brush) GetValue(Input1Property); } 14 | set { SetValue(Input1Property, value); } 15 | } 16 | 17 | public static readonly DependencyProperty Input2Property = RegisterPixelShaderSamplerProperty( 18 | "Input2", typeof(MultiplyEffect), 1); 19 | 20 | public Brush Input2 21 | { 22 | get { return (Brush) GetValue(Input2Property); } 23 | set { SetValue(Input2Property, value); } 24 | } 25 | 26 | public MultiplyEffect() 27 | { 28 | UpdateShaderValue(Input1Property); 29 | UpdateShaderValue(Input2Property); 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /src/Gemini.Demo/Modules/FilterDesigner/ShaderEffects/MultiplyEffect.fx: -------------------------------------------------------------------------------- 1 | sampler2D input1 : register(s0); 2 | sampler2D input2 : register(s1); 3 | 4 | float4 main(float2 uv : TEXCOORD) : COLOR 5 | { 6 | float4 color1 = tex2D(input1, uv); 7 | float4 color2 = tex2D(input2, uv); 8 | return color1 * color2; 9 | } -------------------------------------------------------------------------------- /src/Gemini.Demo/Modules/FilterDesigner/ShaderEffects/ShaderEffectBase.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Media.Effects; 3 | using Gemini.Demo.Modules.FilterDesigner.Util; 4 | 5 | namespace Gemini.Demo.Modules.FilterDesigner.ShaderEffects 6 | { 7 | internal class ShaderEffectBase : ShaderEffect, IDisposable 8 | { 9 | [ThreadStatic] 10 | private static PixelShader _shader; 11 | 12 | private static PixelShader Shader 13 | { 14 | get { return (_shader ?? (_shader = ShaderEffectUtility.GetPixelShader(typeof(T).Name))); } 15 | } 16 | 17 | protected ShaderEffectBase() 18 | { 19 | PixelShader = Shader; 20 | } 21 | 22 | void IDisposable.Dispose() 23 | { 24 | PixelShader = null; 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /src/Gemini.Demo/Modules/FilterDesigner/Util/BitmapUtility.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | using System.Windows.Media.Imaging; 3 | 4 | namespace Gemini.Demo.Modules.FilterDesigner.Util 5 | { 6 | internal static class BitmapUtility 7 | { 8 | public static BitmapSource CreateFromBytes(byte[] bytes) 9 | { 10 | using (var stream = new MemoryStream(bytes)) 11 | { 12 | var result = new BitmapImage(); 13 | result.BeginInit(); 14 | result.CacheOption = BitmapCacheOption.OnLoad; 15 | result.StreamSource = stream; 16 | result.EndInit(); 17 | result.Freeze(); 18 | 19 | return result; 20 | } 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /src/Gemini.Demo/Modules/FilterDesigner/Util/ShaderEffectUtility.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Media.Effects; 3 | 4 | namespace Gemini.Demo.Modules.FilterDesigner.Util 5 | { 6 | internal static class ShaderEffectUtility 7 | { 8 | public static PixelShader GetPixelShader(string name) 9 | { 10 | return new PixelShader 11 | { 12 | UriSource = new Uri(AppDomain.CurrentDomain.BaseDirectory + "Modules/FilterDesigner/ShaderEffects/" + name + ".ps", UriKind.Absolute) 13 | }; 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/Gemini.Demo/Modules/FilterDesigner/ViewModels/ConnectorDirection.cs: -------------------------------------------------------------------------------- 1 | namespace Gemini.Demo.Modules.FilterDesigner.ViewModels 2 | { 3 | public enum ConnectorDirection 4 | { 5 | Input, 6 | Output 7 | } 8 | } -------------------------------------------------------------------------------- /src/Gemini.Demo/Modules/FilterDesigner/ViewModels/Elements/Add.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Media; 2 | using System.Windows.Media.Effects; 3 | using Gemini.Demo.Modules.FilterDesigner.ShaderEffects; 4 | using Gemini.Modules.Toolbox; 5 | 6 | namespace Gemini.Demo.Modules.FilterDesigner.ViewModels.Elements 7 | { 8 | [ToolboxItem(typeof(GraphViewModel), "Add", "Maths", "pack://application:,,,/Modules/FilterDesigner/Resources/action_add_16xLG.png")] 9 | public class Add : ShaderEffectElement 10 | { 11 | protected override Effect GetEffect() 12 | { 13 | return new AddEffect 14 | { 15 | Input1 = new ImageBrush(InputConnectors[0].Value), 16 | Input2 = new ImageBrush(InputConnectors[1].Value) 17 | }; 18 | } 19 | 20 | public Add() 21 | { 22 | AddInputConnector("Left", Colors.DarkSeaGreen); 23 | AddInputConnector("Right", Colors.DarkSeaGreen); 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /src/Gemini.Demo/Modules/FilterDesigner/ViewModels/Elements/ColorInput.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | using System.Windows.Media; 3 | using Gemini.Modules.Toolbox; 4 | 5 | namespace Gemini.Demo.Modules.FilterDesigner.ViewModels.Elements 6 | { 7 | [ToolboxItem(typeof(GraphViewModel), "Color", "Generators", "pack://application:,,,/Modules/FilterDesigner/Resources/color_swatch.png")] 8 | public class ColorInput : DynamicElement 9 | { 10 | private Color _color; 11 | public Color Color 12 | { 13 | get { return _color; } 14 | set 15 | { 16 | _color = value; 17 | UpdatePreviewImage(); 18 | NotifyOfPropertyChange(() => Color); 19 | } 20 | } 21 | 22 | public ColorInput() 23 | { 24 | Color = Colors.Red; 25 | UpdatePreviewImage(); 26 | } 27 | 28 | protected override void Draw(DrawingContext drawingContext, Rect bounds) 29 | { 30 | drawingContext.DrawRectangle(new SolidColorBrush(Color), null, bounds); 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /src/Gemini.Demo/Modules/FilterDesigner/ViewModels/Elements/ImageSource.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Media; 2 | using System.Windows.Media.Imaging; 3 | using Gemini.Modules.Toolbox; 4 | 5 | namespace Gemini.Demo.Modules.FilterDesigner.ViewModels.Elements 6 | { 7 | [ToolboxItem(typeof(GraphViewModel), "Image Source", "Generators", "pack://application:,,,/Modules/FilterDesigner/Resources/image.png")] 8 | public class ImageSource : ElementViewModel 9 | { 10 | private BitmapSource _bitmap; 11 | public BitmapSource Bitmap 12 | { 13 | get { return _bitmap; } 14 | set 15 | { 16 | _bitmap = value; 17 | NotifyOfPropertyChange(() => PreviewImage); 18 | RaiseOutputChanged(); 19 | } 20 | } 21 | 22 | public override BitmapSource PreviewImage 23 | { 24 | get { return Bitmap; } 25 | } 26 | 27 | public ImageSource() 28 | { 29 | SetOutputConnector("Output", Colors.DarkSeaGreen, () => Bitmap); 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /src/Gemini.Demo/Modules/FilterDesigner/ViewModels/Elements/Multiply.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Media; 2 | using System.Windows.Media.Effects; 3 | using Gemini.Demo.Modules.FilterDesigner.ShaderEffects; 4 | using Gemini.Modules.Toolbox; 5 | 6 | namespace Gemini.Demo.Modules.FilterDesigner.ViewModels.Elements 7 | { 8 | [ToolboxItem(typeof(GraphViewModel), "Multiply", "Maths", "pack://application:,,,/Modules/FilterDesigner/Resources/active_x_16xLG.png")] 9 | public class Multiply : ShaderEffectElement 10 | { 11 | protected override Effect GetEffect() 12 | { 13 | return new MultiplyEffect 14 | { 15 | Input1 = new ImageBrush(InputConnectors[0].Value), 16 | Input2 = new ImageBrush(InputConnectors[1].Value) 17 | }; 18 | } 19 | 20 | public Multiply() 21 | { 22 | AddInputConnector("Left", Colors.DarkSeaGreen); 23 | AddInputConnector("Right", Colors.DarkSeaGreen); 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /src/Gemini.Demo/Modules/FilterDesigner/ViewModels/Elements/ShaderEffectElement.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | using System.Windows.Media; 3 | using System.Windows.Media.Effects; 4 | 5 | namespace Gemini.Demo.Modules.FilterDesigner.ViewModels.Elements 6 | { 7 | public abstract class ShaderEffectElement : DynamicElement 8 | { 9 | protected override void PrepareDrawingVisual(DrawingVisual drawingVisual) 10 | { 11 | drawingVisual.Effect = GetEffect(); 12 | } 13 | 14 | protected override void Draw(DrawingContext drawingContext, Rect bounds) 15 | { 16 | drawingContext.DrawRectangle( 17 | new SolidColorBrush(Colors.Transparent), null, 18 | bounds); 19 | } 20 | 21 | protected abstract Effect GetEffect(); 22 | } 23 | } -------------------------------------------------------------------------------- /src/Gemini.Demo/Modules/Home/Commands/ViewHelixCommandDefinition.cs: -------------------------------------------------------------------------------- 1 | using Gemini.Framework.Commands; 2 | 3 | namespace Gemini.Demo.Modules.Home.Commands 4 | { 5 | [CommandDefinition] 6 | public class ViewHelixCommandDefinition : CommandDefinition 7 | { 8 | public const string CommandName = "View.Helix"; 9 | 10 | public override string Name 11 | { 12 | get { return CommandName; } 13 | } 14 | 15 | public override string Text 16 | { 17 | get { return "Helix"; } 18 | } 19 | 20 | public override string ToolTip 21 | { 22 | get { return "Helix"; } 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /src/Gemini.Demo/Modules/Home/Commands/ViewHelixCommandHandler.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.Composition; 2 | using System.Threading.Tasks; 3 | using Caliburn.Micro; 4 | using Gemini.Demo.Modules.Home.ViewModels; 5 | using Gemini.Framework; 6 | using Gemini.Framework.Commands; 7 | using Gemini.Framework.Services; 8 | using Gemini.Framework.Threading; 9 | 10 | namespace Gemini.Demo.Modules.Home.Commands 11 | { 12 | [CommandHandler] 13 | public class ViewHelixCommandHandler : CommandHandlerBase 14 | { 15 | private readonly IShell _shell; 16 | 17 | [ImportingConstructor] 18 | public ViewHelixCommandHandler(IShell shell) 19 | { 20 | _shell = shell; 21 | } 22 | 23 | public override Task Run(Command command) 24 | { 25 | return _shell.OpenDocumentAsync((IDocument) IoC.GetInstance(typeof(HelixViewModel), null)); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/Gemini.Demo/Modules/Home/Commands/ViewHomeCommandDefinition.cs: -------------------------------------------------------------------------------- 1 | using Gemini.Framework.Commands; 2 | 3 | namespace Gemini.Demo.Modules.Home.Commands 4 | { 5 | [CommandDefinition] 6 | public class ViewHomeCommandDefinition : CommandDefinition 7 | { 8 | public const string CommandName = "View.Home"; 9 | 10 | public override string Name 11 | { 12 | get { return CommandName; } 13 | } 14 | 15 | public override string Text 16 | { 17 | get { return "Home"; } 18 | } 19 | 20 | public override string ToolTip 21 | { 22 | get { return "Home"; } 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /src/Gemini.Demo/Modules/Home/Commands/ViewHomeCommandHandler.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using Caliburn.Micro; 3 | using Gemini.Demo.Modules.Home.ViewModels; 4 | using Gemini.Framework.Commands; 5 | using Gemini.Framework.Results; 6 | 7 | namespace Gemini.Demo.Modules.Home.Commands 8 | { 9 | [CommandHandler] 10 | public class ViewHomeCommandHandler : CommandHandlerBase 11 | { 12 | public override async Task Run(Command command) 13 | { 14 | await Show.Document().ExecuteAsync(); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/Gemini.Demo/Modules/Home/ViewModels/IDemoScript.cs: -------------------------------------------------------------------------------- 1 | namespace Gemini.Demo.Modules.Home.ViewModels 2 | { 3 | public interface IDemoScript 4 | { 5 | void Execute(HelixViewModel viewModel); 6 | } 7 | } -------------------------------------------------------------------------------- /src/Gemini.Demo/Modules/Home/Views/HelixView.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Controls; 2 | 3 | namespace Gemini.Demo.Modules.Home.Views 4 | { 5 | /// 6 | /// Interaction logic for HelixView.xaml 7 | /// 8 | public partial class HelixView : UserControl, IHelixView 9 | { 10 | public ICSharpCode.AvalonEdit.TextEditor TextEditor 11 | { 12 | get { return CodeEditor; } 13 | } 14 | 15 | public HelixView() 16 | { 17 | InitializeComponent(); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/Gemini.Demo/Modules/Home/Views/HomeView.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Controls; 2 | 3 | namespace Gemini.Demo.Modules.Home.Views 4 | { 5 | /// 6 | /// Interaction logic for HomeView.xaml 7 | /// 8 | public partial class HomeView : UserControl 9 | { 10 | public HomeView() 11 | { 12 | InitializeComponent(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Gemini.Demo/Modules/Home/Views/IHelixView.cs: -------------------------------------------------------------------------------- 1 | namespace Gemini.Demo.Modules.Home.Views 2 | { 3 | public interface IHelixView 4 | { 5 | ICSharpCode.AvalonEdit.TextEditor TextEditor { get; } 6 | } 7 | } -------------------------------------------------------------------------------- /src/Gemini.Demo/Modules/SampleBrowser/ISample.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using Gemini.Framework.Services; 3 | 4 | namespace Gemini.Demo.Modules.SampleBrowser 5 | { 6 | public interface ISample 7 | { 8 | string Name { get; } 9 | Task Activate(IShell shell); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Gemini.Demo/Modules/SampleBrowser/Module.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.Composition; 2 | using System.Threading.Tasks; 3 | using Caliburn.Micro; 4 | using Gemini.Demo.Modules.SampleBrowser.ViewModels; 5 | using Gemini.Framework; 6 | 7 | namespace Gemini.Demo.Modules.SampleBrowser 8 | { 9 | [Export(typeof(IModule))] 10 | public class Module : ModuleBase 11 | { 12 | public override Task PostInitializeAsync() 13 | { 14 | return Shell.OpenDocumentAsync(IoC.Get()); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/Gemini.Demo/Modules/SampleBrowser/ViewModels/SampleBrowserViewModel.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.Composition; 2 | using Gemini.Framework; 3 | using Gemini.Framework.Services; 4 | 5 | namespace Gemini.Demo.Modules.SampleBrowser.ViewModels 6 | { 7 | [Export(typeof(SampleBrowserViewModel))] 8 | public class SampleBrowserViewModel : Document 9 | { 10 | private readonly IShell _shell; 11 | private readonly ISample[] _samples; 12 | 13 | public override string DisplayName 14 | { 15 | get { return "Sample Browser"; } 16 | } 17 | 18 | public ISample[] Samples 19 | { 20 | get { return _samples; } 21 | } 22 | 23 | [ImportingConstructor] 24 | public SampleBrowserViewModel([Import] IShell shell, 25 | [ImportMany] ISample[] samples) 26 | { 27 | _shell = shell; 28 | _samples = samples; 29 | } 30 | 31 | public void Activate(ISample sample) 32 | { 33 | sample.Activate(_shell); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/Gemini.Demo/Modules/SampleBrowser/Views/SampleBrowserView.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Controls; 2 | 3 | namespace Gemini.Demo.Modules.SampleBrowser.Views 4 | { 5 | public partial class SampleBrowserView : UserControl 6 | { 7 | public SampleBrowserView() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/Gemini.Demo/Modules/Shell/Views/DemoApplicationSettingsView.xaml: -------------------------------------------------------------------------------- 1 |  10 | 11 | Confirm application exit 12 | 13 | -------------------------------------------------------------------------------- /src/Gemini.Demo/Modules/Shell/Views/DemoApplicationSettingsView.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | namespace Gemini.Demo.Modules.Shell.Views 17 | { 18 | /// 19 | /// Interaction logic for DemoApplicationSettingsView.xaml 20 | /// 21 | public partial class DemoApplicationSettingsView : UserControl 22 | { 23 | public DemoApplicationSettingsView() 24 | { 25 | InitializeComponent(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/Gemini.Demo/Modules/TextEditor/Views/EditorView.xaml: -------------------------------------------------------------------------------- 1 | 8 | 17 | 18 | -------------------------------------------------------------------------------- /src/Gemini.Demo/Modules/TextEditor/Views/EditorView.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Controls; 2 | using System.Windows.Input; 3 | 4 | namespace Gemini.Demo.Modules.TextEditor.Views 5 | { 6 | public partial class EditorView : UserControl 7 | { 8 | public EditorView() 9 | { 10 | InitializeComponent(); 11 | Loaded += (sender, e) => MoveFocus(new TraversalRequest(FocusNavigationDirection.Next)); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/Gemini.Demo/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | [assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)] 4 | -------------------------------------------------------------------------------- /src/Gemini.Demo/Properties/PublishProfiles/FolderProfileNetCore31.pubxml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | Debug 9 | Any CPU 10 | bin\Debug\netcoreapp3.1\publish\ 11 | FileSystem 12 | netcoreapp3.1 13 | true 14 | false 15 | true 16 | 17 | win-x64 18 | true 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/Gemini.Demo/Properties/Resources.de.Designer.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tgjones/gemini/1a20a571916cb643e43d400e46098902db84bed2/src/Gemini.Demo/Properties/Resources.de.Designer.cs -------------------------------------------------------------------------------- /src/Gemini.Demo/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | True 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/Gemini.Demo/Resources/Splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tgjones/gemini/1a20a571916cb643e43d400e46098902db84bed2/src/Gemini.Demo/Resources/Splash.png -------------------------------------------------------------------------------- /src/Gemini.Demo/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | True 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/Gemini.Modules.CodeCompiler/Gemini.Modules.CodeCompiler.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net6.0-windows;net7.0-windows;net462 5 | core WPF MVVM AvalonDock Caliburn Micro Visual Studio IDE Shell C# compile Roslyn 6 | CodeCompiler module for Gemini, providing C# code compilation using Roslyn. 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/Gemini.Modules.CodeCompiler/ICodeCompiler.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.CodeAnalysis; 2 | using System.Collections.Generic; 3 | using System.Reflection; 4 | 5 | namespace Gemini.Modules.CodeCompiler 6 | { 7 | public interface ICodeCompiler 8 | { 9 | Assembly Compile( 10 | IEnumerable syntaxTrees, 11 | IEnumerable references, 12 | string outputName); 13 | } 14 | } -------------------------------------------------------------------------------- /src/Gemini.Modules.CodeEditor/Commands/ShowEndOfLineCommandDefinition.cs: -------------------------------------------------------------------------------- 1 | using Gemini.Framework.Commands; 2 | using Gemini.Modules.CodeEditor.Properties; 3 | using System; 4 | 5 | namespace Gemini.Modules.CodeEditor.Commands 6 | { 7 | [CommandDefinition] 8 | public class ShowEndOfLineCommandDefinition : CommandDefinition 9 | { 10 | public const string CommandName = "CodeEditor.ShowEndOfLine"; 11 | 12 | public override string Name => CommandName; 13 | 14 | public override string Text => Resources.ShowEndOfLineCommandText; 15 | 16 | public override string ToolTip => Resources.ShowEndOfLineCommandToolTip; 17 | 18 | public override Uri IconSource => new Uri("pack://application:,,,/Gemini.Modules.CodeEditor;component/Resources/Icons/ShowEndOfLine.png"); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/Gemini.Modules.CodeEditor/Commands/ShowLineNumbersCommandDefinition.cs: -------------------------------------------------------------------------------- 1 | using Gemini.Framework.Commands; 2 | using Gemini.Modules.CodeEditor.Properties; 3 | using System; 4 | 5 | namespace Gemini.Modules.CodeEditor.Commands 6 | { 7 | [CommandDefinition] 8 | public class ShowLineNumbersCommandDefinition : CommandDefinition 9 | { 10 | public const string CommandName = "CodeEditor.ShowLineNumbers"; 11 | 12 | public override string Name => CommandName; 13 | 14 | public override string Text => Resources.ShowLineNumbersCommandText; 15 | 16 | public override string ToolTip => Resources.ShowLineNumbersCommandToolTip; 17 | 18 | public override Uri IconSource => new Uri("pack://application:,,,/Gemini.Modules.CodeEditor;component/Resources/Icons/ShowLineNumbers.png"); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/Gemini.Modules.CodeEditor/Commands/ShowSpacesCommandDefinition.cs: -------------------------------------------------------------------------------- 1 | using Gemini.Framework.Commands; 2 | using Gemini.Modules.CodeEditor.Properties; 3 | using System; 4 | 5 | namespace Gemini.Modules.CodeEditor.Commands 6 | { 7 | [CommandDefinition] 8 | public class ShowSpacesCommandDefinition : CommandDefinition 9 | { 10 | public const string CommandName = "CodeEditor.ShowSpaces"; 11 | 12 | public override string Name => CommandName; 13 | 14 | public override string Text => Resources.ShowSpacesCommandText; 15 | 16 | public override string ToolTip => Resources.ShowSpacesCommandToolTip; 17 | 18 | public override Uri IconSource => new Uri("pack://application:,,,/Gemini.Modules.CodeEditor;component/Resources/Icons/ShowSpaces.png"); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/Gemini.Modules.CodeEditor/Commands/ShowTabsCommandDefinition.cs: -------------------------------------------------------------------------------- 1 | using Gemini.Framework.Commands; 2 | using Gemini.Modules.CodeEditor.Properties; 3 | using System; 4 | 5 | namespace Gemini.Modules.CodeEditor.Commands 6 | { 7 | [CommandDefinition] 8 | public class ShowTabsCommandDefinition : CommandDefinition 9 | { 10 | public const string CommandName = "CodeEditor.ShowTabs"; 11 | 12 | public override string Name => CommandName; 13 | 14 | public override string Text => Resources.ShowTabsCommandText; 15 | 16 | public override string ToolTip => Resources.ShowTabsCommandToolTip; 17 | 18 | public override Uri IconSource => new Uri("pack://application:,,,/Gemini.Modules.CodeEditor;component/Resources/Icons/ShowTabs.png"); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/Gemini.Modules.CodeEditor/Commands/WordWrapCommandDefinition.cs: -------------------------------------------------------------------------------- 1 | using Gemini.Framework.Commands; 2 | using Gemini.Modules.CodeEditor.Properties; 3 | using System; 4 | 5 | namespace Gemini.Modules.CodeEditor.Commands 6 | { 7 | [CommandDefinition] 8 | public class WordWrapCommandDefinition : CommandDefinition 9 | { 10 | public const string CommandName = "CodeEditor.WordWrap"; 11 | 12 | public override string Name => CommandName; 13 | 14 | public override string Text => Resources.WordWrapCommandText; 15 | 16 | public override string ToolTip => Resources.WordWrapCommandToolTip; 17 | 18 | public override Uri IconSource => new Uri("pack://application:,,,/Gemini.Modules.CodeEditor;component/Resources/Icons/WordWrap.png"); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/Gemini.Modules.CodeEditor/ILanguageDefinition.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using ICSharpCode.AvalonEdit.Highlighting; 3 | 4 | namespace Gemini.Modules.CodeEditor 5 | { 6 | public interface ILanguageDefinition 7 | { 8 | string Name { get; } 9 | IEnumerable FileExtensions { get; set; } 10 | IHighlightingDefinition SyntaxHighlighting { get; } 11 | string CustomSyntaxHighlightingFileName { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /src/Gemini.Modules.CodeEditor/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | [assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)] 4 | -------------------------------------------------------------------------------- /src/Gemini.Modules.CodeEditor/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | False 7 | 8 | 9 | False 10 | 11 | 12 | False 13 | 14 | 15 | False 16 | 17 | 18 | False 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/Gemini.Modules.CodeEditor/Resources/Icons/Find.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tgjones/gemini/1a20a571916cb643e43d400e46098902db84bed2/src/Gemini.Modules.CodeEditor/Resources/Icons/Find.png -------------------------------------------------------------------------------- /src/Gemini.Modules.CodeEditor/Resources/Icons/ShowEndOfLine.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tgjones/gemini/1a20a571916cb643e43d400e46098902db84bed2/src/Gemini.Modules.CodeEditor/Resources/Icons/ShowEndOfLine.png -------------------------------------------------------------------------------- /src/Gemini.Modules.CodeEditor/Resources/Icons/ShowLineNumbers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tgjones/gemini/1a20a571916cb643e43d400e46098902db84bed2/src/Gemini.Modules.CodeEditor/Resources/Icons/ShowLineNumbers.png -------------------------------------------------------------------------------- /src/Gemini.Modules.CodeEditor/Resources/Icons/ShowSpaces.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tgjones/gemini/1a20a571916cb643e43d400e46098902db84bed2/src/Gemini.Modules.CodeEditor/Resources/Icons/ShowSpaces.png -------------------------------------------------------------------------------- /src/Gemini.Modules.CodeEditor/Resources/Icons/ShowTabs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tgjones/gemini/1a20a571916cb643e43d400e46098902db84bed2/src/Gemini.Modules.CodeEditor/Resources/Icons/ShowTabs.png -------------------------------------------------------------------------------- /src/Gemini.Modules.CodeEditor/Resources/Icons/WordWrap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tgjones/gemini/1a20a571916cb643e43d400e46098902db84bed2/src/Gemini.Modules.CodeEditor/Resources/Icons/WordWrap.png -------------------------------------------------------------------------------- /src/Gemini.Modules.CodeEditor/Views/CodeEditorSettingsView.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | namespace Gemini.Modules.CodeEditor.Views 17 | { 18 | /// 19 | /// Interaction logic for CodeEditorSettingsView.xaml 20 | /// 21 | public partial class CodeEditorSettingsView : UserControl 22 | { 23 | public CodeEditorSettingsView() 24 | { 25 | InitializeComponent(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/Gemini.Modules.CodeEditor/Views/CodeEditorView.xaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/Gemini.Modules.CodeEditor/Views/CodeEditorView.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Controls; 2 | using System.Windows.Input; 3 | using ICSharpCode.AvalonEdit; 4 | 5 | namespace Gemini.Modules.CodeEditor.Views 6 | { 7 | public partial class CodeEditorView : UserControl, ICodeEditorView 8 | { 9 | public TextEditor TextEditor 10 | { 11 | get { return CodeEditor; } 12 | } 13 | 14 | public CodeEditorView() 15 | { 16 | InitializeComponent(); 17 | Loaded += (sender, e) => MoveFocus(new TraversalRequest(FocusNavigationDirection.Next)); 18 | } 19 | 20 | public void ApplySettings() 21 | { 22 | CodeEditor?.ApplySettings(); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/Gemini.Modules.CodeEditor/Views/ICodeEditorView.cs: -------------------------------------------------------------------------------- 1 | using ICSharpCode.AvalonEdit; 2 | 3 | namespace Gemini.Modules.CodeEditor.Views 4 | { 5 | public interface ICodeEditorView 6 | { 7 | TextEditor TextEditor { get; } 8 | 9 | void ApplySettings(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Gemini.Modules.ErrorList/Commands/ToggleErrorsCommandDefinition.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Gemini.Framework.Commands; 3 | 4 | namespace Gemini.Modules.ErrorList.Commands 5 | { 6 | [CommandDefinition] 7 | public class ToggleErrorsCommandDefinition : CommandDefinition 8 | { 9 | public const string CommandName = "ErrorList.ToggleErrors"; 10 | 11 | public override string Name 12 | { 13 | get { return CommandName; } 14 | } 15 | 16 | public override string Text 17 | { 18 | get { return "[NotUsed]"; } 19 | } 20 | 21 | public override string ToolTip 22 | { 23 | get { return "[NotUsed]"; } 24 | } 25 | 26 | public override Uri IconSource 27 | { 28 | get { return new Uri("pack://application:,,,/Gemini.Modules.ErrorList;component/Resources/Error.png"); } 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /src/Gemini.Modules.ErrorList/Commands/ToggleMessagesCommandDefinition.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Gemini.Framework.Commands; 3 | 4 | namespace Gemini.Modules.ErrorList.Commands 5 | { 6 | [CommandDefinition] 7 | public class ToggleMessagesCommandDefinition : CommandDefinition 8 | { 9 | public const string CommandName = "ErrorList.ToggleMessages"; 10 | 11 | public override string Name 12 | { 13 | get { return CommandName; } 14 | } 15 | 16 | public override string Text 17 | { 18 | get { return "[NotUsed]"; } 19 | } 20 | 21 | public override string ToolTip 22 | { 23 | get { return "[NotUsed]"; } 24 | } 25 | 26 | public override Uri IconSource 27 | { 28 | get { return new Uri("pack://application:,,,/Gemini.Modules.ErrorList;component/Resources/Message.png"); } 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /src/Gemini.Modules.ErrorList/Commands/ToggleWarningsCommandDefinition.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Gemini.Framework.Commands; 3 | 4 | namespace Gemini.Modules.ErrorList.Commands 5 | { 6 | [CommandDefinition] 7 | public class ToggleWarningsCommandDefinition : CommandDefinition 8 | { 9 | public const string CommandName = "ErrorList.ToggleWarnings"; 10 | 11 | public override string Name 12 | { 13 | get { return CommandName; } 14 | } 15 | 16 | public override string Text 17 | { 18 | get { return "[NotUsed]"; } 19 | } 20 | 21 | public override string ToolTip 22 | { 23 | get { return "[NotUsed]"; } 24 | } 25 | 26 | public override Uri IconSource 27 | { 28 | get { return new Uri("pack://application:,,,/Gemini.Modules.ErrorList;component/Resources/Warning.png"); } 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /src/Gemini.Modules.ErrorList/Commands/ViewErrorListCommandDefinition.cs: -------------------------------------------------------------------------------- 1 | using Gemini.Framework.Commands; 2 | using Gemini.Modules.ErrorList.Properties; 3 | 4 | namespace Gemini.Modules.ErrorList.Commands 5 | { 6 | [CommandDefinition] 7 | public class ViewErrorListCommandDefinition : CommandDefinition 8 | { 9 | public const string CommandName = "View.ErrorList"; 10 | 11 | public override string Name 12 | { 13 | get { return CommandName; } 14 | } 15 | 16 | public override string Text 17 | { 18 | get { return Resources.ViewErrorListCommandText; } 19 | } 20 | 21 | public override string ToolTip 22 | { 23 | get { return Resources.ViewErrorListCommandToolTip; } 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /src/Gemini.Modules.ErrorList/Commands/ViewErrorListCommandHandler.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.Composition; 2 | using System.Threading.Tasks; 3 | using Gemini.Framework.Commands; 4 | using Gemini.Framework.Services; 5 | using Gemini.Framework.Threading; 6 | 7 | namespace Gemini.Modules.ErrorList.Commands 8 | { 9 | [CommandHandler] 10 | public class ViewErrorListCommandHandler : CommandHandlerBase 11 | { 12 | private readonly IShell _shell; 13 | 14 | [ImportingConstructor] 15 | public ViewErrorListCommandHandler(IShell shell) 16 | { 17 | _shell = shell; 18 | } 19 | 20 | public override Task Run(Command command) 21 | { 22 | _shell.ShowTool(); 23 | return TaskUtility.Completed; 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /src/Gemini.Modules.ErrorList/Design/DesignTimeErrorListViewModel.cs: -------------------------------------------------------------------------------- 1 | using Gemini.Modules.ErrorList.ViewModels; 2 | 3 | namespace Gemini.Modules.ErrorList.Design 4 | { 5 | public class DesignTimeErrorListViewModel : ErrorListViewModel 6 | { 7 | public DesignTimeErrorListViewModel() 8 | { 9 | Items.Add(new ErrorListItem 10 | { 11 | ItemType = ErrorListItemType.Error, 12 | Number = 1, 13 | Description = "This is an error.", 14 | Path = "File1.txt", 15 | Line = 42, 16 | Column = 24 17 | }); 18 | Items.Add(new ErrorListItem 19 | { 20 | ItemType = ErrorListItemType.Warning, 21 | Number = 2, 22 | Description = "This is a warning.", 23 | Path = "File1.txt", 24 | Line = 1, 25 | Column = 2 26 | }); 27 | Items.Add(new ErrorListItem 28 | { 29 | ItemType = ErrorListItemType.Message, 30 | Number = 3, 31 | Description = "This is a message.", 32 | }); 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /src/Gemini.Modules.ErrorList/ErrorListItemType.cs: -------------------------------------------------------------------------------- 1 | namespace Gemini.Modules.ErrorList 2 | { 3 | public enum ErrorListItemType 4 | { 5 | Error, 6 | Warning, 7 | Message 8 | } 9 | } -------------------------------------------------------------------------------- /src/Gemini.Modules.ErrorList/IErrorList.cs: -------------------------------------------------------------------------------- 1 | using Caliburn.Micro; 2 | using Gemini.Framework; 3 | 4 | namespace Gemini.Modules.ErrorList 5 | { 6 | public interface IErrorList : ITool 7 | { 8 | bool ShowErrors { get; set; } 9 | bool ShowWarnings { get; set; } 10 | bool ShowMessages { get; set; } 11 | 12 | IObservableCollection Items { get; } 13 | 14 | void AddItem(ErrorListItemType itemType, string description, 15 | string path = null, int? line = null, int? column = null, 16 | System.Action onClick = null); 17 | } 18 | } -------------------------------------------------------------------------------- /src/Gemini.Modules.ErrorList/MenuDefinitions.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.Composition; 2 | using Gemini.Framework.Menus; 3 | using Gemini.Modules.ErrorList.Commands; 4 | 5 | namespace Gemini.Modules.ErrorList 6 | { 7 | public static class MenuDefinitions 8 | { 9 | [Export] 10 | public static readonly MenuItemDefinition ViewErrorListMenuItem = new CommandMenuItemDefinition( 11 | MainMenu.MenuDefinitions.ViewToolsMenuGroup, 0); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Gemini.Modules.ErrorList/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | [assembly:ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)] 4 | -------------------------------------------------------------------------------- /src/Gemini.Modules.ErrorList/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace Gemini.Modules.ErrorList.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.4.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/Gemini.Modules.ErrorList/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/Gemini.Modules.ErrorList/Resources/Error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tgjones/gemini/1a20a571916cb643e43d400e46098902db84bed2/src/Gemini.Modules.ErrorList/Resources/Error.png -------------------------------------------------------------------------------- /src/Gemini.Modules.ErrorList/Resources/Message.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tgjones/gemini/1a20a571916cb643e43d400e46098902db84bed2/src/Gemini.Modules.ErrorList/Resources/Message.png -------------------------------------------------------------------------------- /src/Gemini.Modules.ErrorList/Resources/Warning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tgjones/gemini/1a20a571916cb643e43d400e46098902db84bed2/src/Gemini.Modules.ErrorList/Resources/Warning.png -------------------------------------------------------------------------------- /src/Gemini.Modules.ErrorList/Views/ErrorListView.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Controls; 2 | using System.Windows.Input; 3 | 4 | namespace Gemini.Modules.ErrorList.Views 5 | { 6 | /// 7 | /// Interaction logic for ErrorListView.xaml 8 | /// 9 | public partial class ErrorListView : UserControl 10 | { 11 | public ErrorListView() 12 | { 13 | InitializeComponent(); 14 | } 15 | 16 | private void OnDataGridMouseDoubleClick(object sender, MouseButtonEventArgs e) 17 | { 18 | var dataGrid = (DataGrid) sender; 19 | if (dataGrid.SelectedItems == null || dataGrid.SelectedItems.Count != 1) 20 | return; 21 | 22 | var errorListItem = (ErrorListItem) dataGrid.SelectedItem; 23 | if (errorListItem.OnClick != null) 24 | errorListItem.OnClick(); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/Gemini.Modules.GraphEditor/Controls/ConnectionDragCompletedEventArgs.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | namespace Gemini.Modules.GraphEditor.Controls 4 | { 5 | public class ConnectionDragCompletedEventArgs : ConnectionDragEventArgs 6 | { 7 | private readonly object _connection; 8 | 9 | public object Connection 10 | { 11 | get { return _connection; } 12 | } 13 | 14 | internal ConnectionDragCompletedEventArgs(RoutedEvent routedEvent, object source, 15 | ElementItem elementItem, object connection, ConnectorItem sourceConnectorItem) 16 | : base(routedEvent, source, elementItem, sourceConnectorItem) 17 | { 18 | _connection = connection; 19 | } 20 | } 21 | 22 | public delegate void ConnectionDragCompletedEventHandler(object sender, ConnectionDragCompletedEventArgs e); 23 | } -------------------------------------------------------------------------------- /src/Gemini.Modules.GraphEditor/Controls/ConnectionDragEventArgs.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | namespace Gemini.Modules.GraphEditor.Controls 4 | { 5 | public abstract class ConnectionDragEventArgs : RoutedEventArgs 6 | { 7 | private readonly ElementItem _elementItem; 8 | private readonly ConnectorItem _sourceConnectorItem; 9 | 10 | public ElementItem ElementItem 11 | { 12 | get { return _elementItem; } 13 | } 14 | 15 | public ConnectorItem SourceConnector 16 | { 17 | get { return _sourceConnectorItem; } 18 | } 19 | 20 | protected ConnectionDragEventArgs(RoutedEvent routedEvent, object source, 21 | ElementItem elementItem, ConnectorItem sourceConnectorItem) 22 | : base(routedEvent, source) 23 | { 24 | _elementItem = elementItem; 25 | _sourceConnectorItem = sourceConnectorItem; 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /src/Gemini.Modules.GraphEditor/Controls/ConnectionDragStartedEventArgs.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | namespace Gemini.Modules.GraphEditor.Controls 4 | { 5 | public class ConnectionDragStartedEventArgs : ConnectionDragEventArgs 6 | { 7 | public object Connection { get; set; } 8 | 9 | public ConnectionDragStartedEventArgs(RoutedEvent routedEvent, object source, 10 | ElementItem elementItem, ConnectorItem connectorItem) 11 | : base(routedEvent, source, elementItem, connectorItem) 12 | { 13 | } 14 | } 15 | 16 | public delegate void ConnectionDragStartedEventHandler(object sender, ConnectionDragStartedEventArgs e); 17 | } -------------------------------------------------------------------------------- /src/Gemini.Modules.GraphEditor/Controls/ConnectionDraggingEventArgs.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | namespace Gemini.Modules.GraphEditor.Controls 4 | { 5 | public class ConnectionDraggingEventArgs : ConnectionDragEventArgs 6 | { 7 | private readonly object _connection; 8 | 9 | public object Connection 10 | { 11 | get { return _connection; } 12 | } 13 | 14 | internal ConnectionDraggingEventArgs(RoutedEvent routedEvent, object source, 15 | ElementItem elementItem, object connection, ConnectorItem connectorItem) 16 | : base(routedEvent, source, elementItem, connectorItem) 17 | { 18 | _connection = connection; 19 | } 20 | } 21 | 22 | public delegate void ConnectionDraggingEventHandler(object sender, ConnectionDraggingEventArgs e); 23 | } -------------------------------------------------------------------------------- /src/Gemini.Modules.GraphEditor/Controls/ConnectionItem.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | using System.Windows.Controls; 3 | using System.Windows.Input; 4 | using System.Windows.Media; 5 | using Gemini.Framework; 6 | 7 | namespace Gemini.Modules.GraphEditor.Controls 8 | { 9 | public class ConnectionItem : ListBoxItem 10 | { 11 | static ConnectionItem() 12 | { 13 | DefaultStyleKeyProperty.OverrideMetadata(typeof(ConnectionItem), 14 | new FrameworkPropertyMetadata(typeof(ConnectionItem))); 15 | } 16 | 17 | private GraphControl ParentGraphControl 18 | { 19 | get { return VisualTreeUtility.FindParent(this); } 20 | } 21 | 22 | protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e) 23 | { 24 | ParentGraphControl.UnselectAll(); 25 | base.OnMouseLeftButtonDown(e); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/Gemini.Modules.GraphEditor/Controls/ConnectionItemsControl.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | using System.Windows; 6 | using System.Windows.Controls; 7 | using System.Windows.Controls.Primitives; 8 | using System.Windows.Input; 9 | 10 | namespace Gemini.Modules.GraphEditor.Controls 11 | { 12 | public class ConnectionItemsControl : ListBox 13 | { 14 | public ConnectionItemsControl() 15 | { 16 | SelectionMode = SelectionMode.Extended; 17 | } 18 | 19 | protected override DependencyObject GetContainerForItemOverride() 20 | { 21 | return new ConnectionItem(); 22 | 23 | } 24 | 25 | protected override bool IsItemItsOwnContainerOverride(object item) 26 | { 27 | return item is ConnectionItem; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/Gemini.Modules.GraphEditor/Controls/ConnectorItemDragCompletedEventArgs.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | namespace Gemini.Modules.GraphEditor.Controls 4 | { 5 | internal class ConnectorItemDragCompletedEventArgs : RoutedEventArgs 6 | { 7 | public ConnectorItemDragCompletedEventArgs(RoutedEvent routedEvent, object source) : 8 | base(routedEvent, source) 9 | { 10 | } 11 | } 12 | 13 | internal delegate void ConnectorItemDragCompletedEventHandler(object sender, ConnectorItemDragCompletedEventArgs e); 14 | } -------------------------------------------------------------------------------- /src/Gemini.Modules.GraphEditor/Controls/ConnectorItemDragStartedEventArgs.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | namespace Gemini.Modules.GraphEditor.Controls 4 | { 5 | internal class ConnectorItemDragStartedEventArgs : RoutedEventArgs 6 | { 7 | public bool Cancel { get; set; } 8 | 9 | internal ConnectorItemDragStartedEventArgs(RoutedEvent routedEvent, object source) 10 | : base(routedEvent, source) 11 | { 12 | } 13 | } 14 | 15 | internal delegate void ConnectorItemDragStartedEventHandler(object sender, ConnectorItemDragStartedEventArgs e); 16 | } -------------------------------------------------------------------------------- /src/Gemini.Modules.GraphEditor/Controls/ConnectorItemDraggingEventArgs.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | namespace Gemini.Modules.GraphEditor.Controls 4 | { 5 | internal class ConnectorItemDraggingEventArgs : RoutedEventArgs 6 | { 7 | private readonly double _horizontalChange; 8 | 9 | private readonly double _verticalChange; 10 | 11 | public ConnectorItemDraggingEventArgs(RoutedEvent routedEvent, object source, double horizontalChange, double verticalChange) : 12 | base(routedEvent, source) 13 | { 14 | _horizontalChange = horizontalChange; 15 | _verticalChange = verticalChange; 16 | } 17 | 18 | public double HorizontalChange 19 | { 20 | get { return _horizontalChange; } 21 | } 22 | 23 | public double VerticalChange 24 | { 25 | get { return _verticalChange; } 26 | } 27 | } 28 | 29 | internal delegate void ConnectorItemDraggingEventHandler(object sender, ConnectorItemDraggingEventArgs e); 30 | } -------------------------------------------------------------------------------- /src/Gemini.Modules.GraphEditor/Controls/ElementItemsControl.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | using System.Windows.Controls; 3 | 4 | namespace Gemini.Modules.GraphEditor.Controls 5 | { 6 | public class ElementItemsControl : ListBox 7 | { 8 | protected override DependencyObject GetContainerForItemOverride() 9 | { 10 | return new ElementItem(); 11 | } 12 | 13 | protected override bool IsItemItsOwnContainerOverride(object item) 14 | { 15 | return item is ElementItem; 16 | } 17 | 18 | public ElementItemsControl() 19 | { 20 | SelectionMode = SelectionMode.Extended; 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /src/Gemini.Modules.GraphEditor/Converters/ColorToBrushConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using System.Windows.Data; 4 | using System.Windows.Media; 5 | 6 | namespace Gemini.Modules.GraphEditor.Converters 7 | { 8 | public class ColorToBrushConverter : IValueConverter 9 | { 10 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 11 | { 12 | return new SolidColorBrush((Color) value); 13 | } 14 | 15 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 16 | { 17 | throw new NotImplementedException(); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /src/Gemini.Modules.GraphEditor/Module.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.Composition; 2 | using Gemini.Framework; 3 | 4 | namespace Gemini.Modules.GraphEditor 5 | { 6 | [Export(typeof(IModule))] 7 | public class Module : ModuleBase 8 | { 9 | 10 | } 11 | } -------------------------------------------------------------------------------- /src/Gemini.Modules.GraphEditor/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | [assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)] 4 | -------------------------------------------------------------------------------- /src/Gemini.Modules.GraphEditor/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace Gemini.Modules.GraphEditor.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.4.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/Gemini.Modules.GraphEditor/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/Gemini.Modules.Inspector/Commands/ViewInspectorCommandDefinition.cs: -------------------------------------------------------------------------------- 1 | using Gemini.Framework.Commands; 2 | using Gemini.Modules.Inspector.Properties; 3 | 4 | namespace Gemini.Modules.Inspector.Commands 5 | { 6 | [CommandDefinition] 7 | public class ViewInspectorCommandDefinition : CommandDefinition 8 | { 9 | public const string CommandName = "View.Inspector"; 10 | 11 | public override string Name 12 | { 13 | get { return CommandName; } 14 | } 15 | 16 | public override string Text 17 | { 18 | get { return Resources.ViewInspectorCommandText; } 19 | } 20 | 21 | public override string ToolTip 22 | { 23 | get { return Resources.ViewInspectorCommandToolTip; } 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /src/Gemini.Modules.Inspector/Commands/ViewInspectorCommandHandler.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.Composition; 2 | using System.Threading.Tasks; 3 | using Gemini.Framework.Commands; 4 | using Gemini.Framework.Services; 5 | using Gemini.Framework.Threading; 6 | 7 | namespace Gemini.Modules.Inspector.Commands 8 | { 9 | [CommandHandler] 10 | public class ViewInspectorCommandHandler : CommandHandlerBase 11 | { 12 | private readonly IShell _shell; 13 | 14 | [ImportingConstructor] 15 | public ViewInspectorCommandHandler(IShell shell) 16 | { 17 | _shell = shell; 18 | } 19 | 20 | public override Task Run(Command command) 21 | { 22 | _shell.ShowTool(); 23 | return TaskUtility.Completed; 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /src/Gemini.Modules.Inspector/Controls/InspectorItemTemplateSelector.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | using System.Windows.Controls; 3 | using Gemini.Modules.Inspector.Inspectors; 4 | 5 | namespace Gemini.Modules.Inspector.Controls 6 | { 7 | public class InspectorItemTemplateSelector : DataTemplateSelector 8 | { 9 | public DataTemplate LabelledTemplate { get; set; } 10 | public DataTemplate DefaultTemplate { get; set; } 11 | 12 | public override DataTemplate SelectTemplate(object item, DependencyObject container) 13 | { 14 | if (item is ILabelledInspector) 15 | return LabelledTemplate; 16 | return DefaultTemplate; 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /src/Gemini.Modules.Inspector/Conventions/EnumPropertyEditorBuilder.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.ComponentModel; 3 | using Gemini.Modules.Inspector.Inspectors; 4 | 5 | namespace Gemini.Modules.Inspector.Conventions 6 | { 7 | public class EnumPropertyEditorBuilder : PropertyEditorBuilder 8 | { 9 | public override bool IsApplicable(PropertyDescriptor propertyDescriptor) 10 | { 11 | return typeof(Enum).IsAssignableFrom(propertyDescriptor.PropertyType); 12 | } 13 | 14 | public override IEditor BuildEditor(PropertyDescriptor propertyDescriptor) 15 | { 16 | return new EnumEditorViewModel(propertyDescriptor.PropertyType); 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /src/Gemini.Modules.Inspector/Conventions/PropertyEditorBuilder.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | using Gemini.Modules.Inspector.Inspectors; 3 | 4 | namespace Gemini.Modules.Inspector.Conventions 5 | { 6 | public abstract class PropertyEditorBuilder 7 | { 8 | public abstract bool IsApplicable(PropertyDescriptor propertyDescriptor); 9 | public abstract IEditor BuildEditor(PropertyDescriptor propertyDescriptor); 10 | } 11 | } -------------------------------------------------------------------------------- /src/Gemini.Modules.Inspector/Conventions/StandardPropertyEditorBuilder.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | using Gemini.Modules.Inspector.Inspectors; 3 | 4 | namespace Gemini.Modules.Inspector.Conventions 5 | { 6 | public class StandardPropertyEditorBuilder : PropertyEditorBuilder 7 | where TEditor : IEditor, new() 8 | { 9 | public override bool IsApplicable(PropertyDescriptor propertyDescriptor) 10 | { 11 | return propertyDescriptor.PropertyType == typeof(T); 12 | } 13 | 14 | public override IEditor BuildEditor(PropertyDescriptor propertyDescriptor) 15 | { 16 | return new TEditor(); 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /src/Gemini.Modules.Inspector/IInspectableObject.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Gemini.Modules.Inspector.Inspectors; 3 | 4 | namespace Gemini.Modules.Inspector 5 | { 6 | public interface IInspectableObject 7 | { 8 | IEnumerable Inspectors { get; } 9 | } 10 | } -------------------------------------------------------------------------------- /src/Gemini.Modules.Inspector/IInspectorTool.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Gemini.Framework; 3 | 4 | namespace Gemini.Modules.Inspector 5 | { 6 | public interface IInspectorTool : ITool 7 | { 8 | event EventHandler SelectedObjectChanged; 9 | IInspectableObject SelectedObject { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /src/Gemini.Modules.Inspector/InspectableObject.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Gemini.Modules.Inspector.Inspectors; 3 | 4 | namespace Gemini.Modules.Inspector 5 | { 6 | public class InspectableObject : IInspectableObject 7 | { 8 | public IEnumerable Inspectors { get; set; } 9 | 10 | public InspectableObject(IEnumerable inspectors) 11 | { 12 | Inspectors = inspectors; 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /src/Gemini.Modules.Inspector/InspectableObjectBuilder.cs: -------------------------------------------------------------------------------- 1 | namespace Gemini.Modules.Inspector 2 | { 3 | public class InspectableObjectBuilder : InspectorBuilder 4 | { 5 | public InspectableObject ToInspectableObject() 6 | { 7 | return new InspectableObject(Inspectors); 8 | } 9 | } 10 | } -------------------------------------------------------------------------------- /src/Gemini.Modules.Inspector/Inspectors/BitmapSourceEditorView.xaml: -------------------------------------------------------------------------------- 1 |  8 | 10 | 11 | 13 | 14 |