├── src ├── Base │ ├── Properties │ │ └── licenses.licx │ ├── Gui │ │ ├── IWorkbench.cs │ │ ├── AssemblyInfo.cs │ │ ├── IViewContent.cs │ │ ├── DefaultWorkbench.cs │ │ ├── SdiWorkbenchLayout.cs │ │ ├── WorkbenchSingleton.cs │ │ ├── Components │ │ │ ├── OpenFileTab.cs │ │ │ ├── SdStatusBar.cs │ │ │ ├── IOwnerState.cs │ │ │ ├── SdMenuCommand.cs │ │ │ ├── AxStatusBar.cs │ │ │ └── AxStatusBarPanel.cs │ │ ├── IMementoCapable.cs │ │ ├── IPadContent.cs │ │ ├── IDisplayBinding.cs │ │ └── DefaultWorkbench.resx │ ├── Internal │ │ ├── Services │ │ │ ├── IService.cs │ │ │ ├── MessageService.cs │ │ │ ├── ServiceManager.cs │ │ │ ├── AbstractService.cs │ │ │ ├── PropertyService.cs │ │ │ ├── ResourceService.cs │ │ │ ├── DefaultFileService.cs │ │ │ ├── FileUtilityService.cs │ │ │ ├── StringParserService.cs │ │ │ ├── IStatusBarService.cs │ │ │ ├── ViewTypeService.cs │ │ │ ├── IMessageService.cs │ │ │ ├── SaveErrorChooseDialog.resx │ │ │ ├── IFileService.cs │ │ │ └── DefaultStatusBarService.cs │ │ ├── Codons │ │ │ ├── MenuItemCodon.cs │ │ │ ├── AutoStartCodon.cs │ │ │ ├── ServiceCodon.cs │ │ │ ├── ViewTypeCodon.cs │ │ │ ├── PadCodon.cs │ │ │ ├── FileFilterCodon.cs │ │ │ ├── IconCodon.cs │ │ │ ├── ToolbarItemCodon.cs │ │ │ └── ToolbarCodon.cs │ │ └── Properties │ │ │ ├── IProperties.cs │ │ │ ├── DefaultProperties.cs │ │ │ ├── IXmlConvertable.cs │ │ │ └── PropertyEventArgs.cs │ └── Commands │ │ ├── ISubmenuBuilder.cs │ │ ├── IMenuCommand.cs │ │ ├── AbstractMenuCommand.cs │ │ ├── ICommand.cs │ │ └── AbstractCommand.cs ├── Core │ ├── AddIn.cs │ ├── CodonBuilder.cs │ ├── CodonFactory.cs │ ├── DefaultAddInTree.cs │ ├── AddInTreeSingleton.cs │ ├── PathAttribute.cs │ ├── AssemblyInfo.cs │ ├── CodonNameAttribute.cs │ ├── XmlMemberAttributeAttribute.cs │ ├── XmlMemberArraryAttribute.cs │ ├── IAddInTreeNode.cs │ ├── ICodon.cs │ ├── IAddInTree.cs │ └── InternalFileService.cs ├── Top │ ├── AssemblyInfo.cs │ ├── Gui │ │ ├── Views │ │ │ ├── HtmlView.cs │ │ │ ├── TextEditorView.cs │ │ │ ├── IEditable.cs │ │ │ ├── IPositionable.cs │ │ │ ├── IPrintable.cs │ │ │ └── IClipboardHandler.cs │ │ ├── Dialogs │ │ │ ├── InputBox.cs │ │ │ ├── TreeViewOptions.cs │ │ │ ├── CommonAboutDialog.cs │ │ │ ├── AlgorithmDialogs │ │ │ │ ├── BiTreeDialog.cs │ │ │ │ ├── IndexBFDialog.cs │ │ │ │ ├── InitDataForm.cs │ │ │ │ ├── BinSearchDialog.cs │ │ │ │ ├── BubbleSortDialog.cs │ │ │ │ ├── CreateListDialog.cs │ │ │ │ ├── InsertSortDialog.cs │ │ │ │ ├── ListDeleteDialog.cs │ │ │ │ ├── ListInsertDialog.cs │ │ │ │ ├── SelectSortDialog.cs │ │ │ │ ├── SeqSearchDialog.cs │ │ │ │ ├── OneQuickPassDialog.cs │ │ │ │ ├── SequenceMergeDialog.cs │ │ │ │ ├── SequenceDeleteDialog.cs │ │ │ │ ├── SequenceInsertDialog.cs │ │ │ │ └── InitDataForm.resx │ │ │ ├── SplashScreen.cs │ │ │ ├── InputBox.resx │ │ │ ├── SplashScreen.resx │ │ │ ├── TreeViewOptions.resx │ │ │ └── CommonAboutDialog.resx │ │ ├── Pads │ │ │ ├── FileBrowsePad.cs │ │ │ ├── HelpBrowserPad.cs │ │ │ ├── StackPad.cs │ │ │ └── PropertyPad.cs │ │ ├── XmlForms │ │ │ ├── BaseXmlForm.cs │ │ │ ├── IObjectCreator.cs │ │ │ ├── DataStructureObjectCreator.cs │ │ │ └── DefaultObjectCreator.cs │ │ └── OptionPanels │ │ │ ├── AbstractOptionPanel.cs │ │ │ ├── BehaviorTextEditorPanel.cs │ │ │ ├── HighlightingEditorPanel │ │ │ ├── EditHighlightingPanel.cs │ │ │ ├── NodePanels │ │ │ │ ├── NodeOptionPanel.cs │ │ │ │ └── SchemeOptionPanel.cs │ │ │ └── Nodes │ │ │ │ ├── SpansNode.cs │ │ │ │ ├── RuleSetsNode.cs │ │ │ │ ├── KeywordListsNode.cs │ │ │ │ ├── MarkersNode.cs │ │ │ │ ├── AbstractNode.cs │ │ │ │ ├── DigitsNode.cs │ │ │ │ └── PropertiesNode.cs │ │ │ ├── IDialogPanelDescriptor.cs │ │ │ ├── IDialogPanel.cs │ │ │ └── DefaultDialogPanelDescriptor.cs │ ├── Commands │ │ ├── FileCommands.cs │ │ ├── MenuItemBuilders.cs │ │ ├── AlgorithmCommands.cs │ │ ├── AutostartCommands.cs │ │ ├── AlgorithmExecuteCommands.cs │ │ ├── FileTabStripCommands.cs │ │ ├── WindowCommands.cs │ │ └── ToolsCommands.cs │ └── Internal │ │ ├── Algorithms │ │ ├── Glyphs │ │ │ ├── IGlyph.cs │ │ │ ├── INode.cs │ │ │ ├── Square.cs │ │ │ ├── Pointer.cs │ │ │ ├── BezierLine.cs │ │ │ ├── BiTreeNode.cs │ │ │ ├── IBiTreeNode.cs │ │ │ ├── MyRectangle.cs │ │ │ ├── SquareLine.cs │ │ │ ├── StackItem.cs │ │ │ ├── SwerveLine.cs │ │ │ ├── LinkLineNode.cs │ │ │ ├── BiTreeLineNode.cs │ │ │ ├── LinkCircleNode.cs │ │ │ └── VerticalPointer.cs │ │ ├── Iterators │ │ │ ├── IIterator.cs │ │ │ ├── ArrayIterator.cs │ │ │ ├── NullIterator.cs │ │ │ ├── StackIterator.cs │ │ │ ├── NodeListIterator.cs │ │ │ ├── BiTreeInOrderIterator.cs │ │ │ ├── BiTreePostOrderIterator.cs │ │ │ └── BiTreePreOrderIterator.cs │ │ ├── AlgorithmObjects │ │ │ ├── IndexBF.cs │ │ │ ├── BSTSearch.cs │ │ │ ├── BinSearch.cs │ │ │ ├── BubbleSort.cs │ │ │ ├── CreateList.cs │ │ │ ├── IAlgorithm.cs │ │ │ ├── InsertSort.cs │ │ │ ├── ListDelete.cs │ │ │ ├── ListInsert.cs │ │ │ ├── SelectSort.cs │ │ │ ├── SeqSearch.cs │ │ │ ├── OneQuickPass.cs │ │ │ ├── SequenceMerge.cs │ │ │ ├── AlgorithmManager.cs │ │ │ ├── BiTreeGenerator.cs │ │ │ ├── InOrderTraverse.cs │ │ │ ├── PreOrderTraverse.cs │ │ │ ├── SequenceDelete.cs │ │ │ ├── SequenceInsert.cs │ │ │ ├── AbstractAlgorithm.cs │ │ │ └── PostOrderTraverse.cs │ │ └── StatusObjects │ │ │ ├── BiTreeStatus.cs │ │ │ ├── IndexBFStatus.cs │ │ │ ├── BinSearchStatus.cs │ │ │ ├── BubbleSortStatus.cs │ │ │ ├── CreateListStatus.cs │ │ │ ├── InsertSortStatus.cs │ │ │ ├── ListDeleteStatus.cs │ │ │ ├── ListInsertStatus.cs │ │ │ ├── QuickSortStatus.cs │ │ │ ├── SelectSortStatus.cs │ │ │ ├── SeqSearchStatus.cs │ │ │ ├── SequenceMergeStatus.cs │ │ │ ├── StatusItemControl.cs │ │ │ ├── SequenceDeleteStatus.cs │ │ │ ├── SequenceInsertStatus.cs │ │ │ └── StatusItemControl.resx │ │ ├── ExternalTool │ │ └── ExternalTool.cs │ │ ├── ViewTypes │ │ ├── TextEditorViewType.cs │ │ └── BrowserViewType.cs │ │ └── Codons │ │ ├── DialogPanelCodon.cs │ │ └── AlgorithmCodon.cs ├── HelpFileSource │ ├── topic1.htm │ ├── topic2.htm │ ├── topic3.htm │ ├── topic4.htm │ ├── Welcome.htm │ ├── HowToUse1.htm │ ├── HowtoUse2.htm │ ├── HowtoUse3.htm │ ├── HowtoUse4.htm │ ├── DataStructure0.1.chm │ ├── DataStructure0.1.hhc │ ├── DataStructure0.1.hhp │ ├── HelpDescription.xml │ └── DataStructure0.1.hhk ├── StartUp │ ├── AssemblyInfo.cs │ ├── DataStructure.ICO │ ├── SplashScreen.png │ ├── DataStructureMain.cs │ ├── AddInSettingsHandler.cs │ ├── BitmapResources.resources │ ├── StringResources.resources │ └── App.config ├── TextEditor │ ├── RightArrow.cur │ ├── Gui │ │ ├── TextArea.cs │ │ ├── AbstractMargin.cs │ │ ├── IconBarMargin.cs │ │ ├── TextViewMargin.cs │ │ ├── TextAreaControl.cs │ │ ├── TextEditorControl.cs │ │ ├── TextEditorControlBase.cs │ │ └── HRuler.cs │ ├── Undo │ │ ├── UndoStack.cs │ │ ├── UndoableDelete.cs │ │ ├── UndoableInsert.cs │ │ ├── UndoableReplace.cs │ │ ├── IUndoableOperation.cs │ │ └── UndoQueue.cs │ ├── Mode.xsx │ ├── Document │ │ ├── Strategies │ │ │ ├── HighlightingStrategy │ │ │ │ ├── NextMarker.cs │ │ │ │ ├── PrevMarker.cs │ │ │ │ ├── FontContainer.cs │ │ │ │ ├── HighlightColor.cs │ │ │ │ ├── HighlightRuleSet.cs │ │ │ │ ├── HighlightingManager.cs │ │ │ │ ├── DefaultHighlightingStrategy.cs │ │ │ │ ├── IHighlightingStrategy.cs │ │ │ │ └── SyntaxMode.cs │ │ │ ├── FoldingStrategy │ │ │ │ ├── ParserFoldingStrategy.cs │ │ │ │ └── IFoldingStrategy.cs │ │ │ ├── TextMarkerStrategy │ │ │ │ └── TextMarker.cs │ │ │ └── TextBufferStrategy │ │ │ │ └── StringTextBufferStrategy.cs │ │ ├── ISegment.cs │ │ ├── AbstractSegment.cs │ │ ├── SelectionManager │ │ │ ├── ISelection.cs │ │ │ └── ColumnRange.cs │ │ ├── DocumentFactory.cs │ │ └── BookmarkManager │ │ │ └── IBookMarkManager.cs │ ├── AssemblyInfo.cs │ ├── Actions │ │ ├── ClipBoardActions.cs │ │ ├── IEditAction.cs │ │ ├── FoldActions.cs │ │ └── BookmarkActions.cs │ └── Others │ │ └── BrushRegistry.cs ├── BrowseAddinTree │ ├── BrowseAddinTreePad.cs │ └── Properties │ │ └── AssemblyInfo.cs └── NetFocus.Components.AddIns2.0 │ ├── AddIn.cs │ ├── AddIn.xsx │ ├── DefaultAddInTree.cs │ ├── AddInTreeSingleton.cs │ ├── Codons │ ├── CodonFactory.cs │ ├── CodonBuilder.cs │ └── ICodon.cs │ ├── DefaultAddinTreeNode.cs │ ├── Conditions │ ├── ConditionBuilder.cs │ ├── ConditionFactory.cs │ ├── ConditionCollection.cs │ ├── ConditionBuilderCollection.cs │ ├── ICondition.cs │ ├── AbstractCondition.cs │ ├── CompareCondition.cs │ └── ComplexConditions.cs │ ├── Exceptions │ ├── CodonNotFoundException.cs │ ├── ConditionNotFoundException.cs │ ├── AddInLoadException.cs │ ├── AddInSignatureException.cs │ ├── AddInTreeFormatException.cs │ ├── TreePathNotFoundException.cs │ ├── TypeNotFoundException.cs │ ├── DuplicateCodonException.cs │ ├── AddInInitializeException.cs │ ├── ConditionWithoutRequiredAttributesException.cs │ └── DuplicateConditionException.cs │ ├── Attributes │ ├── PathAttribute.cs │ ├── ConditionAttribute.cs │ ├── CodonAttribute.cs │ ├── XmlMemberAttributeAttribute.cs │ └── XmlMemberArraryAttribute.cs │ ├── AssemblyInfo.cs │ ├── IAddInTreeNode.cs │ └── InternalFileService.cs ├── README.md ├── doc ├── 两张图.doc ├── 结题表.doc ├── 1插件子系统.doc ├── SRTP.doc ├── 架构分析.ppt ├── 立项申请表.doc ├── 设计思想.doc ├── 2用户界面子系统.doc ├── fengmian.doc ├── 二叉树生成原理.doc ├── 3文本编辑器子系统.doc ├── DataStructure.vsd └── help │ ├── DataStructure0.1.chm │ └── HelpConv.xml ├── lib ├── Interop.SHDocVw.dll ├── MagicLocalLibrary.dll └── DevComponents.DotNetBar.dll ├── data ├── options │ ├── LayoutConfig.xml │ ├── SdiLayoutConfig.xml │ └── DataStructure-Tools.xml ├── resources │ ├── algorithms │ │ ├── IndexBF.c │ │ ├── BSTSearch.c │ │ ├── BinSearch.c │ │ ├── BubbleSort.c │ │ ├── CreateList.c │ │ ├── ListDelete.c │ │ ├── ListInsert.c │ │ ├── SelectSort.c │ │ ├── SeqSearch.c │ │ ├── OneQuickPass.c │ │ ├── SequenceMerge.c │ │ ├── InorderTraverse.c │ │ ├── PreOrderTraverse.c │ │ ├── SequenceDelete.c │ │ ├── SequenceInsert.c │ │ ├── PostOrderTraverse.c │ │ └── InsertSort.c │ ├── templates │ │ ├── EmptyTextFile.xft │ │ ├── EmptyCFile.xft │ │ ├── EmptyVBFile.xft │ │ ├── EmptyCSharpFile.xft │ │ ├── EmptyC++File.xft │ │ ├── EmptyXMLFile.xft │ │ ├── EmptyHTMLFile.xft │ │ ├── EmptyJavaFile.xft │ │ └── EmptyXSLTFile.xft │ └── panels │ │ └── HighlightingEditor │ │ └── OptionPanel.xfrm └── modes │ └── BAT-Mode.xshd └── addins └── BrowseAddinPad.addin /src/Base/Properties/licenses.licx: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | DataStructure 2 | ============= 3 | 4 | 一个C#实现的数据结构动画演示系统 5 | -------------------------------------------------------------------------------- /doc/两张图.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/doc/两张图.doc -------------------------------------------------------------------------------- /doc/结题表.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/doc/结题表.doc -------------------------------------------------------------------------------- /doc/1插件子系统.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/doc/1插件子系统.doc -------------------------------------------------------------------------------- /doc/SRTP.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/doc/SRTP.doc -------------------------------------------------------------------------------- /doc/架构分析.ppt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/doc/架构分析.ppt -------------------------------------------------------------------------------- /doc/立项申请表.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/doc/立项申请表.doc -------------------------------------------------------------------------------- /doc/设计思想.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/doc/设计思想.doc -------------------------------------------------------------------------------- /doc/2用户界面子系统.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/doc/2用户界面子系统.doc -------------------------------------------------------------------------------- /doc/fengmian.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/doc/fengmian.doc -------------------------------------------------------------------------------- /doc/二叉树生成原理.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/doc/二叉树生成原理.doc -------------------------------------------------------------------------------- /doc/3文本编辑器子系统.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/doc/3文本编辑器子系统.doc -------------------------------------------------------------------------------- /src/Core/AddIn.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Core/AddIn.cs -------------------------------------------------------------------------------- /doc/DataStructure.vsd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/doc/DataStructure.vsd -------------------------------------------------------------------------------- /lib/Interop.SHDocVw.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/lib/Interop.SHDocVw.dll -------------------------------------------------------------------------------- /src/Core/CodonBuilder.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Core/CodonBuilder.cs -------------------------------------------------------------------------------- /src/Core/CodonFactory.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Core/CodonFactory.cs -------------------------------------------------------------------------------- /src/Top/AssemblyInfo.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/AssemblyInfo.cs -------------------------------------------------------------------------------- /lib/MagicLocalLibrary.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/lib/MagicLocalLibrary.dll -------------------------------------------------------------------------------- /src/Base/Gui/IWorkbench.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Base/Gui/IWorkbench.cs -------------------------------------------------------------------------------- /data/options/LayoutConfig.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/data/options/LayoutConfig.xml -------------------------------------------------------------------------------- /doc/help/DataStructure0.1.chm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/doc/help/DataStructure0.1.chm -------------------------------------------------------------------------------- /src/Base/Gui/AssemblyInfo.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Base/Gui/AssemblyInfo.cs -------------------------------------------------------------------------------- /src/Base/Gui/IViewContent.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Base/Gui/IViewContent.cs -------------------------------------------------------------------------------- /src/Core/DefaultAddInTree.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Core/DefaultAddInTree.cs -------------------------------------------------------------------------------- /src/HelpFileSource/topic1.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/HelpFileSource/topic1.htm -------------------------------------------------------------------------------- /src/HelpFileSource/topic2.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/HelpFileSource/topic2.htm -------------------------------------------------------------------------------- /src/HelpFileSource/topic3.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/HelpFileSource/topic3.htm -------------------------------------------------------------------------------- /src/HelpFileSource/topic4.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/HelpFileSource/topic4.htm -------------------------------------------------------------------------------- /src/StartUp/AssemblyInfo.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/StartUp/AssemblyInfo.cs -------------------------------------------------------------------------------- /src/StartUp/DataStructure.ICO: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/StartUp/DataStructure.ICO -------------------------------------------------------------------------------- /src/StartUp/SplashScreen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/StartUp/SplashScreen.png -------------------------------------------------------------------------------- /src/TextEditor/RightArrow.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/TextEditor/RightArrow.cur -------------------------------------------------------------------------------- /src/Top/Gui/Views/HtmlView.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Gui/Views/HtmlView.cs -------------------------------------------------------------------------------- /lib/DevComponents.DotNetBar.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/lib/DevComponents.DotNetBar.dll -------------------------------------------------------------------------------- /src/Core/AddInTreeSingleton.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Core/AddInTreeSingleton.cs -------------------------------------------------------------------------------- /src/HelpFileSource/Welcome.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/HelpFileSource/Welcome.htm -------------------------------------------------------------------------------- /src/TextEditor/Gui/TextArea.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/TextEditor/Gui/TextArea.cs -------------------------------------------------------------------------------- /src/Top/Gui/Dialogs/InputBox.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Gui/Dialogs/InputBox.cs -------------------------------------------------------------------------------- /data/options/SdiLayoutConfig.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/data/options/SdiLayoutConfig.xml -------------------------------------------------------------------------------- /src/Base/Gui/DefaultWorkbench.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Base/Gui/DefaultWorkbench.cs -------------------------------------------------------------------------------- /src/Base/Gui/SdiWorkbenchLayout.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Base/Gui/SdiWorkbenchLayout.cs -------------------------------------------------------------------------------- /src/Base/Gui/WorkbenchSingleton.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Base/Gui/WorkbenchSingleton.cs -------------------------------------------------------------------------------- /src/HelpFileSource/HowToUse1.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/HelpFileSource/HowToUse1.htm -------------------------------------------------------------------------------- /src/HelpFileSource/HowtoUse2.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/HelpFileSource/HowtoUse2.htm -------------------------------------------------------------------------------- /src/HelpFileSource/HowtoUse3.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/HelpFileSource/HowtoUse3.htm -------------------------------------------------------------------------------- /src/HelpFileSource/HowtoUse4.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/HelpFileSource/HowtoUse4.htm -------------------------------------------------------------------------------- /src/StartUp/DataStructureMain.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/StartUp/DataStructureMain.cs -------------------------------------------------------------------------------- /src/TextEditor/Undo/UndoStack.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/TextEditor/Undo/UndoStack.cs -------------------------------------------------------------------------------- /src/Top/Commands/FileCommands.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Commands/FileCommands.cs -------------------------------------------------------------------------------- /src/Top/Gui/Pads/FileBrowsePad.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Gui/Pads/FileBrowsePad.cs -------------------------------------------------------------------------------- /src/Top/Gui/Pads/HelpBrowserPad.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Gui/Pads/HelpBrowserPad.cs -------------------------------------------------------------------------------- /data/resources/algorithms/IndexBF.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/data/resources/algorithms/IndexBF.c -------------------------------------------------------------------------------- /src/StartUp/AddInSettingsHandler.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/StartUp/AddInSettingsHandler.cs -------------------------------------------------------------------------------- /src/TextEditor/Gui/AbstractMargin.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/TextEditor/Gui/AbstractMargin.cs -------------------------------------------------------------------------------- /src/TextEditor/Gui/IconBarMargin.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/TextEditor/Gui/IconBarMargin.cs -------------------------------------------------------------------------------- /src/TextEditor/Gui/TextViewMargin.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/TextEditor/Gui/TextViewMargin.cs -------------------------------------------------------------------------------- /src/Top/Commands/MenuItemBuilders.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Commands/MenuItemBuilders.cs -------------------------------------------------------------------------------- /src/Top/Gui/Views/TextEditorView.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Gui/Views/TextEditorView.cs -------------------------------------------------------------------------------- /src/Top/Gui/XmlForms/BaseXmlForm.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Gui/XmlForms/BaseXmlForm.cs -------------------------------------------------------------------------------- /data/resources/algorithms/BSTSearch.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/data/resources/algorithms/BSTSearch.c -------------------------------------------------------------------------------- /data/resources/algorithms/BinSearch.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/data/resources/algorithms/BinSearch.c -------------------------------------------------------------------------------- /data/resources/algorithms/BubbleSort.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/data/resources/algorithms/BubbleSort.c -------------------------------------------------------------------------------- /data/resources/algorithms/CreateList.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/data/resources/algorithms/CreateList.c -------------------------------------------------------------------------------- /data/resources/algorithms/ListDelete.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/data/resources/algorithms/ListDelete.c -------------------------------------------------------------------------------- /data/resources/algorithms/ListInsert.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/data/resources/algorithms/ListInsert.c -------------------------------------------------------------------------------- /data/resources/algorithms/SelectSort.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/data/resources/algorithms/SelectSort.c -------------------------------------------------------------------------------- /data/resources/algorithms/SeqSearch.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/data/resources/algorithms/SeqSearch.c -------------------------------------------------------------------------------- /src/Base/Gui/Components/OpenFileTab.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Base/Gui/Components/OpenFileTab.cs -------------------------------------------------------------------------------- /src/Base/Gui/Components/SdStatusBar.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Base/Gui/Components/SdStatusBar.cs -------------------------------------------------------------------------------- /src/Base/Internal/Services/IService.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Base/Internal/Services/IService.cs -------------------------------------------------------------------------------- /src/HelpFileSource/DataStructure0.1.chm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/HelpFileSource/DataStructure0.1.chm -------------------------------------------------------------------------------- /src/HelpFileSource/DataStructure0.1.hhc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/HelpFileSource/DataStructure0.1.hhc -------------------------------------------------------------------------------- /src/HelpFileSource/DataStructure0.1.hhp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/HelpFileSource/DataStructure0.1.hhp -------------------------------------------------------------------------------- /src/StartUp/BitmapResources.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/StartUp/BitmapResources.resources -------------------------------------------------------------------------------- /src/StartUp/StringResources.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/StartUp/StringResources.resources -------------------------------------------------------------------------------- /src/TextEditor/Gui/TextAreaControl.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/TextEditor/Gui/TextAreaControl.cs -------------------------------------------------------------------------------- /src/TextEditor/Gui/TextEditorControl.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/TextEditor/Gui/TextEditorControl.cs -------------------------------------------------------------------------------- /src/TextEditor/Mode.xsx: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /src/TextEditor/Undo/UndoableDelete.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/TextEditor/Undo/UndoableDelete.cs -------------------------------------------------------------------------------- /src/TextEditor/Undo/UndoableInsert.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/TextEditor/Undo/UndoableInsert.cs -------------------------------------------------------------------------------- /src/TextEditor/Undo/UndoableReplace.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/TextEditor/Undo/UndoableReplace.cs -------------------------------------------------------------------------------- /src/Top/Commands/AlgorithmCommands.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Commands/AlgorithmCommands.cs -------------------------------------------------------------------------------- /src/Top/Commands/AutostartCommands.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Commands/AutostartCommands.cs -------------------------------------------------------------------------------- /src/Top/Gui/Dialogs/TreeViewOptions.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Gui/Dialogs/TreeViewOptions.cs -------------------------------------------------------------------------------- /data/resources/algorithms/OneQuickPass.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/data/resources/algorithms/OneQuickPass.c -------------------------------------------------------------------------------- /data/resources/algorithms/SequenceMerge.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/data/resources/algorithms/SequenceMerge.c -------------------------------------------------------------------------------- /src/Base/Internal/Codons/MenuItemCodon.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Base/Internal/Codons/MenuItemCodon.cs -------------------------------------------------------------------------------- /src/BrowseAddinTree/BrowseAddinTreePad.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/BrowseAddinTree/BrowseAddinTreePad.cs -------------------------------------------------------------------------------- /src/Top/Gui/Dialogs/CommonAboutDialog.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Gui/Dialogs/CommonAboutDialog.cs -------------------------------------------------------------------------------- /data/resources/algorithms/InorderTraverse.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/data/resources/algorithms/InorderTraverse.c -------------------------------------------------------------------------------- /data/resources/algorithms/PreOrderTraverse.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/data/resources/algorithms/PreOrderTraverse.c -------------------------------------------------------------------------------- /data/resources/algorithms/SequenceDelete.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/data/resources/algorithms/SequenceDelete.c -------------------------------------------------------------------------------- /data/resources/algorithms/SequenceInsert.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/data/resources/algorithms/SequenceInsert.c -------------------------------------------------------------------------------- /src/Base/Internal/Properties/IProperties.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Base/Internal/Properties/IProperties.cs -------------------------------------------------------------------------------- /src/Base/Internal/Services/MessageService.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Base/Internal/Services/MessageService.cs -------------------------------------------------------------------------------- /src/Base/Internal/Services/ServiceManager.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Base/Internal/Services/ServiceManager.cs -------------------------------------------------------------------------------- /src/HelpFileSource/HelpDescription.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /src/NetFocus.Components.AddIns2.0/AddIn.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/NetFocus.Components.AddIns2.0/AddIn.cs -------------------------------------------------------------------------------- /src/TextEditor/Gui/TextEditorControlBase.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/TextEditor/Gui/TextEditorControlBase.cs -------------------------------------------------------------------------------- /src/Top/Commands/AlgorithmExecuteCommands.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Commands/AlgorithmExecuteCommands.cs -------------------------------------------------------------------------------- /src/Top/Internal/Algorithms/Glyphs/IGlyph.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Internal/Algorithms/Glyphs/IGlyph.cs -------------------------------------------------------------------------------- /src/Top/Internal/Algorithms/Glyphs/INode.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Internal/Algorithms/Glyphs/INode.cs -------------------------------------------------------------------------------- /src/Top/Internal/Algorithms/Glyphs/Square.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Internal/Algorithms/Glyphs/Square.cs -------------------------------------------------------------------------------- /data/resources/algorithms/PostOrderTraverse.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/data/resources/algorithms/PostOrderTraverse.c -------------------------------------------------------------------------------- /src/Base/Internal/Services/AbstractService.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Base/Internal/Services/AbstractService.cs -------------------------------------------------------------------------------- /src/Base/Internal/Services/PropertyService.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Base/Internal/Services/PropertyService.cs -------------------------------------------------------------------------------- /src/Base/Internal/Services/ResourceService.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Base/Internal/Services/ResourceService.cs -------------------------------------------------------------------------------- /src/Top/Internal/Algorithms/Glyphs/Pointer.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Internal/Algorithms/Glyphs/Pointer.cs -------------------------------------------------------------------------------- /src/Top/Internal/ExternalTool/ExternalTool.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Internal/ExternalTool/ExternalTool.cs -------------------------------------------------------------------------------- /src/Base/Internal/Properties/DefaultProperties.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Base/Internal/Properties/DefaultProperties.cs -------------------------------------------------------------------------------- /src/Base/Internal/Properties/IXmlConvertable.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Base/Internal/Properties/IXmlConvertable.cs -------------------------------------------------------------------------------- /src/Base/Internal/Properties/PropertyEventArgs.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Base/Internal/Properties/PropertyEventArgs.cs -------------------------------------------------------------------------------- /src/Base/Internal/Services/DefaultFileService.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Base/Internal/Services/DefaultFileService.cs -------------------------------------------------------------------------------- /src/Base/Internal/Services/FileUtilityService.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Base/Internal/Services/FileUtilityService.cs -------------------------------------------------------------------------------- /src/Base/Internal/Services/StringParserService.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Base/Internal/Services/StringParserService.cs -------------------------------------------------------------------------------- /src/NetFocus.Components.AddIns2.0/AddIn.xsx: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /src/Top/Gui/OptionPanels/AbstractOptionPanel.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Gui/OptionPanels/AbstractOptionPanel.cs -------------------------------------------------------------------------------- /src/Top/Internal/Algorithms/Glyphs/BezierLine.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Internal/Algorithms/Glyphs/BezierLine.cs -------------------------------------------------------------------------------- /src/Top/Internal/Algorithms/Glyphs/BiTreeNode.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Internal/Algorithms/Glyphs/BiTreeNode.cs -------------------------------------------------------------------------------- /src/Top/Internal/Algorithms/Glyphs/IBiTreeNode.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Internal/Algorithms/Glyphs/IBiTreeNode.cs -------------------------------------------------------------------------------- /src/Top/Internal/Algorithms/Glyphs/MyRectangle.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Internal/Algorithms/Glyphs/MyRectangle.cs -------------------------------------------------------------------------------- /src/Top/Internal/Algorithms/Glyphs/SquareLine.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Internal/Algorithms/Glyphs/SquareLine.cs -------------------------------------------------------------------------------- /src/Top/Internal/Algorithms/Glyphs/StackItem.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Internal/Algorithms/Glyphs/StackItem.cs -------------------------------------------------------------------------------- /src/Top/Internal/Algorithms/Glyphs/SwerveLine.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Internal/Algorithms/Glyphs/SwerveLine.cs -------------------------------------------------------------------------------- /src/Top/Internal/ViewTypes/TextEditorViewType.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Internal/ViewTypes/TextEditorViewType.cs -------------------------------------------------------------------------------- /src/Top/Gui/OptionPanels/BehaviorTextEditorPanel.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Gui/OptionPanels/BehaviorTextEditorPanel.cs -------------------------------------------------------------------------------- /src/Top/Internal/Algorithms/Glyphs/LinkLineNode.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Internal/Algorithms/Glyphs/LinkLineNode.cs -------------------------------------------------------------------------------- /src/Top/Internal/Algorithms/Iterators/IIterator.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Internal/Algorithms/Iterators/IIterator.cs -------------------------------------------------------------------------------- /src/NetFocus.Components.AddIns2.0/DefaultAddInTree.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/NetFocus.Components.AddIns2.0/DefaultAddInTree.cs -------------------------------------------------------------------------------- /src/Top/Gui/Dialogs/AlgorithmDialogs/BiTreeDialog.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Gui/Dialogs/AlgorithmDialogs/BiTreeDialog.cs -------------------------------------------------------------------------------- /src/Top/Gui/Dialogs/AlgorithmDialogs/IndexBFDialog.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Gui/Dialogs/AlgorithmDialogs/IndexBFDialog.cs -------------------------------------------------------------------------------- /src/Top/Gui/Dialogs/AlgorithmDialogs/InitDataForm.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Gui/Dialogs/AlgorithmDialogs/InitDataForm.cs -------------------------------------------------------------------------------- /src/Top/Internal/Algorithms/Glyphs/BiTreeLineNode.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Internal/Algorithms/Glyphs/BiTreeLineNode.cs -------------------------------------------------------------------------------- /src/Top/Internal/Algorithms/Glyphs/LinkCircleNode.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Internal/Algorithms/Glyphs/LinkCircleNode.cs -------------------------------------------------------------------------------- /src/Top/Internal/Algorithms/Glyphs/VerticalPointer.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Internal/Algorithms/Glyphs/VerticalPointer.cs -------------------------------------------------------------------------------- /src/Top/Internal/Algorithms/Iterators/ArrayIterator.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Internal/Algorithms/Iterators/ArrayIterator.cs -------------------------------------------------------------------------------- /src/Top/Internal/Algorithms/Iterators/NullIterator.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Internal/Algorithms/Iterators/NullIterator.cs -------------------------------------------------------------------------------- /src/Top/Internal/Algorithms/Iterators/StackIterator.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Internal/Algorithms/Iterators/StackIterator.cs -------------------------------------------------------------------------------- /data/options/DataStructure-Tools.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Notepad 4 | 记事本 5 | 6 | -------------------------------------------------------------------------------- /src/NetFocus.Components.AddIns2.0/AddInTreeSingleton.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/NetFocus.Components.AddIns2.0/AddInTreeSingleton.cs -------------------------------------------------------------------------------- /src/NetFocus.Components.AddIns2.0/Codons/CodonFactory.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/NetFocus.Components.AddIns2.0/Codons/CodonFactory.cs -------------------------------------------------------------------------------- /src/Top/Gui/Dialogs/AlgorithmDialogs/BinSearchDialog.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Gui/Dialogs/AlgorithmDialogs/BinSearchDialog.cs -------------------------------------------------------------------------------- /src/Top/Gui/Dialogs/AlgorithmDialogs/BubbleSortDialog.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Gui/Dialogs/AlgorithmDialogs/BubbleSortDialog.cs -------------------------------------------------------------------------------- /src/Top/Gui/Dialogs/AlgorithmDialogs/CreateListDialog.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Gui/Dialogs/AlgorithmDialogs/CreateListDialog.cs -------------------------------------------------------------------------------- /src/Top/Gui/Dialogs/AlgorithmDialogs/InsertSortDialog.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Gui/Dialogs/AlgorithmDialogs/InsertSortDialog.cs -------------------------------------------------------------------------------- /src/Top/Gui/Dialogs/AlgorithmDialogs/ListDeleteDialog.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Gui/Dialogs/AlgorithmDialogs/ListDeleteDialog.cs -------------------------------------------------------------------------------- /src/Top/Gui/Dialogs/AlgorithmDialogs/ListInsertDialog.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Gui/Dialogs/AlgorithmDialogs/ListInsertDialog.cs -------------------------------------------------------------------------------- /src/Top/Gui/Dialogs/AlgorithmDialogs/SelectSortDialog.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Gui/Dialogs/AlgorithmDialogs/SelectSortDialog.cs -------------------------------------------------------------------------------- /src/Top/Gui/Dialogs/AlgorithmDialogs/SeqSearchDialog.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Gui/Dialogs/AlgorithmDialogs/SeqSearchDialog.cs -------------------------------------------------------------------------------- /src/Top/Internal/Algorithms/AlgorithmObjects/IndexBF.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Internal/Algorithms/AlgorithmObjects/IndexBF.cs -------------------------------------------------------------------------------- /src/NetFocus.Components.AddIns2.0/DefaultAddinTreeNode.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/NetFocus.Components.AddIns2.0/DefaultAddinTreeNode.cs -------------------------------------------------------------------------------- /src/Top/Gui/Dialogs/AlgorithmDialogs/OneQuickPassDialog.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Gui/Dialogs/AlgorithmDialogs/OneQuickPassDialog.cs -------------------------------------------------------------------------------- /src/Top/Gui/Dialogs/AlgorithmDialogs/SequenceMergeDialog.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Gui/Dialogs/AlgorithmDialogs/SequenceMergeDialog.cs -------------------------------------------------------------------------------- /src/Top/Internal/Algorithms/AlgorithmObjects/BSTSearch.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Internal/Algorithms/AlgorithmObjects/BSTSearch.cs -------------------------------------------------------------------------------- /src/Top/Internal/Algorithms/AlgorithmObjects/BinSearch.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Internal/Algorithms/AlgorithmObjects/BinSearch.cs -------------------------------------------------------------------------------- /src/Top/Internal/Algorithms/AlgorithmObjects/BubbleSort.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Internal/Algorithms/AlgorithmObjects/BubbleSort.cs -------------------------------------------------------------------------------- /src/Top/Internal/Algorithms/AlgorithmObjects/CreateList.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Internal/Algorithms/AlgorithmObjects/CreateList.cs -------------------------------------------------------------------------------- /src/Top/Internal/Algorithms/AlgorithmObjects/IAlgorithm.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Internal/Algorithms/AlgorithmObjects/IAlgorithm.cs -------------------------------------------------------------------------------- /src/Top/Internal/Algorithms/AlgorithmObjects/InsertSort.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Internal/Algorithms/AlgorithmObjects/InsertSort.cs -------------------------------------------------------------------------------- /src/Top/Internal/Algorithms/AlgorithmObjects/ListDelete.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Internal/Algorithms/AlgorithmObjects/ListDelete.cs -------------------------------------------------------------------------------- /src/Top/Internal/Algorithms/AlgorithmObjects/ListInsert.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Internal/Algorithms/AlgorithmObjects/ListInsert.cs -------------------------------------------------------------------------------- /src/Top/Internal/Algorithms/AlgorithmObjects/SelectSort.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Internal/Algorithms/AlgorithmObjects/SelectSort.cs -------------------------------------------------------------------------------- /src/Top/Internal/Algorithms/AlgorithmObjects/SeqSearch.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Internal/Algorithms/AlgorithmObjects/SeqSearch.cs -------------------------------------------------------------------------------- /src/Top/Internal/Algorithms/Iterators/NodeListIterator.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Internal/Algorithms/Iterators/NodeListIterator.cs -------------------------------------------------------------------------------- /src/Top/Internal/Algorithms/StatusObjects/BiTreeStatus.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Internal/Algorithms/StatusObjects/BiTreeStatus.cs -------------------------------------------------------------------------------- /src/Top/Internal/Algorithms/StatusObjects/IndexBFStatus.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Internal/Algorithms/StatusObjects/IndexBFStatus.cs -------------------------------------------------------------------------------- /src/Top/Gui/Dialogs/AlgorithmDialogs/SequenceDeleteDialog.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Gui/Dialogs/AlgorithmDialogs/SequenceDeleteDialog.cs -------------------------------------------------------------------------------- /src/Top/Gui/Dialogs/AlgorithmDialogs/SequenceInsertDialog.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Gui/Dialogs/AlgorithmDialogs/SequenceInsertDialog.cs -------------------------------------------------------------------------------- /src/Top/Internal/Algorithms/AlgorithmObjects/OneQuickPass.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Internal/Algorithms/AlgorithmObjects/OneQuickPass.cs -------------------------------------------------------------------------------- /src/Top/Internal/Algorithms/AlgorithmObjects/SequenceMerge.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Internal/Algorithms/AlgorithmObjects/SequenceMerge.cs -------------------------------------------------------------------------------- /src/Top/Internal/Algorithms/StatusObjects/BinSearchStatus.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Internal/Algorithms/StatusObjects/BinSearchStatus.cs -------------------------------------------------------------------------------- /src/Top/Internal/Algorithms/StatusObjects/BubbleSortStatus.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Internal/Algorithms/StatusObjects/BubbleSortStatus.cs -------------------------------------------------------------------------------- /src/Top/Internal/Algorithms/StatusObjects/CreateListStatus.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Internal/Algorithms/StatusObjects/CreateListStatus.cs -------------------------------------------------------------------------------- /src/Top/Internal/Algorithms/StatusObjects/InsertSortStatus.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Internal/Algorithms/StatusObjects/InsertSortStatus.cs -------------------------------------------------------------------------------- /src/Top/Internal/Algorithms/StatusObjects/ListDeleteStatus.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Internal/Algorithms/StatusObjects/ListDeleteStatus.cs -------------------------------------------------------------------------------- /src/Top/Internal/Algorithms/StatusObjects/ListInsertStatus.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Internal/Algorithms/StatusObjects/ListInsertStatus.cs -------------------------------------------------------------------------------- /src/Top/Internal/Algorithms/StatusObjects/QuickSortStatus.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Internal/Algorithms/StatusObjects/QuickSortStatus.cs -------------------------------------------------------------------------------- /src/Top/Internal/Algorithms/StatusObjects/SelectSortStatus.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Internal/Algorithms/StatusObjects/SelectSortStatus.cs -------------------------------------------------------------------------------- /src/Top/Internal/Algorithms/StatusObjects/SeqSearchStatus.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Internal/Algorithms/StatusObjects/SeqSearchStatus.cs -------------------------------------------------------------------------------- /src/NetFocus.Components.AddIns2.0/Conditions/ConditionBuilder.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/NetFocus.Components.AddIns2.0/Conditions/ConditionBuilder.cs -------------------------------------------------------------------------------- /src/NetFocus.Components.AddIns2.0/Conditions/ConditionFactory.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/NetFocus.Components.AddIns2.0/Conditions/ConditionFactory.cs -------------------------------------------------------------------------------- /src/Top/Internal/Algorithms/AlgorithmObjects/AlgorithmManager.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Internal/Algorithms/AlgorithmObjects/AlgorithmManager.cs -------------------------------------------------------------------------------- /src/Top/Internal/Algorithms/AlgorithmObjects/BiTreeGenerator.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Internal/Algorithms/AlgorithmObjects/BiTreeGenerator.cs -------------------------------------------------------------------------------- /src/Top/Internal/Algorithms/AlgorithmObjects/InOrderTraverse.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Internal/Algorithms/AlgorithmObjects/InOrderTraverse.cs -------------------------------------------------------------------------------- /src/Top/Internal/Algorithms/AlgorithmObjects/PreOrderTraverse.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Internal/Algorithms/AlgorithmObjects/PreOrderTraverse.cs -------------------------------------------------------------------------------- /src/Top/Internal/Algorithms/AlgorithmObjects/SequenceDelete.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Internal/Algorithms/AlgorithmObjects/SequenceDelete.cs -------------------------------------------------------------------------------- /src/Top/Internal/Algorithms/AlgorithmObjects/SequenceInsert.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Internal/Algorithms/AlgorithmObjects/SequenceInsert.cs -------------------------------------------------------------------------------- /src/Top/Internal/Algorithms/Iterators/BiTreeInOrderIterator.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Internal/Algorithms/Iterators/BiTreeInOrderIterator.cs -------------------------------------------------------------------------------- /src/Top/Internal/Algorithms/Iterators/BiTreePostOrderIterator.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Internal/Algorithms/Iterators/BiTreePostOrderIterator.cs -------------------------------------------------------------------------------- /src/Top/Internal/Algorithms/Iterators/BiTreePreOrderIterator.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Internal/Algorithms/Iterators/BiTreePreOrderIterator.cs -------------------------------------------------------------------------------- /src/Top/Internal/Algorithms/StatusObjects/SequenceMergeStatus.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Internal/Algorithms/StatusObjects/SequenceMergeStatus.cs -------------------------------------------------------------------------------- /src/Top/Internal/Algorithms/StatusObjects/StatusItemControl.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Internal/Algorithms/StatusObjects/StatusItemControl.cs -------------------------------------------------------------------------------- /src/Top/Internal/Algorithms/AlgorithmObjects/AbstractAlgorithm.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Internal/Algorithms/AlgorithmObjects/AbstractAlgorithm.cs -------------------------------------------------------------------------------- /src/Top/Internal/Algorithms/AlgorithmObjects/PostOrderTraverse.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Internal/Algorithms/AlgorithmObjects/PostOrderTraverse.cs -------------------------------------------------------------------------------- /src/Top/Internal/Algorithms/StatusObjects/SequenceDeleteStatus.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Internal/Algorithms/StatusObjects/SequenceDeleteStatus.cs -------------------------------------------------------------------------------- /src/Top/Internal/Algorithms/StatusObjects/SequenceInsertStatus.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Internal/Algorithms/StatusObjects/SequenceInsertStatus.cs -------------------------------------------------------------------------------- /src/NetFocus.Components.AddIns2.0/Conditions/ConditionCollection.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/NetFocus.Components.AddIns2.0/Conditions/ConditionCollection.cs -------------------------------------------------------------------------------- /src/TextEditor/Document/Strategies/HighlightingStrategy/NextMarker.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/TextEditor/Document/Strategies/HighlightingStrategy/NextMarker.cs -------------------------------------------------------------------------------- /src/TextEditor/Document/Strategies/HighlightingStrategy/PrevMarker.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/TextEditor/Document/Strategies/HighlightingStrategy/PrevMarker.cs -------------------------------------------------------------------------------- /src/NetFocus.Components.AddIns2.0/Conditions/ConditionBuilderCollection.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/NetFocus.Components.AddIns2.0/Conditions/ConditionBuilderCollection.cs -------------------------------------------------------------------------------- /src/TextEditor/Document/Strategies/HighlightingStrategy/FontContainer.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/TextEditor/Document/Strategies/HighlightingStrategy/FontContainer.cs -------------------------------------------------------------------------------- /src/TextEditor/Document/Strategies/HighlightingStrategy/HighlightColor.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/TextEditor/Document/Strategies/HighlightingStrategy/HighlightColor.cs -------------------------------------------------------------------------------- /src/Top/Gui/OptionPanels/HighlightingEditorPanel/EditHighlightingPanel.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Gui/OptionPanels/HighlightingEditorPanel/EditHighlightingPanel.cs -------------------------------------------------------------------------------- /src/TextEditor/Document/Strategies/HighlightingStrategy/HighlightRuleSet.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/TextEditor/Document/Strategies/HighlightingStrategy/HighlightRuleSet.cs -------------------------------------------------------------------------------- /src/TextEditor/Document/Strategies/HighlightingStrategy/HighlightingManager.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/TextEditor/Document/Strategies/HighlightingStrategy/HighlightingManager.cs -------------------------------------------------------------------------------- /src/Top/Gui/OptionPanels/HighlightingEditorPanel/NodePanels/NodeOptionPanel.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/Top/Gui/OptionPanels/HighlightingEditorPanel/NodePanels/NodeOptionPanel.cs -------------------------------------------------------------------------------- /src/TextEditor/Document/Strategies/HighlightingStrategy/DefaultHighlightingStrategy.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tangxuehua/DataStructure/HEAD/src/TextEditor/Document/Strategies/HighlightingStrategy/DefaultHighlightingStrategy.cs -------------------------------------------------------------------------------- /src/HelpFileSource/DataStructure0.1.hhk: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 9 | 10 | -------------------------------------------------------------------------------- /data/resources/algorithms/InsertSort.c: -------------------------------------------------------------------------------- 1 | void InsertSort(SSTable R[],int n){ 2 | int i,j; 3 | for(i = 2;i <= n;i++){ 4 | R[0] = R[i]; j = i - 1; 5 | while(R[0].key < R[j].key){ 6 | R[j+1] = R[j]; 7 | j--; 8 | } 9 | R[j+1] = R[0]; 10 | } 11 | return; 12 | } 13 | -------------------------------------------------------------------------------- /src/Base/Commands/ISubmenuBuilder.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Reflection; 4 | using System.Windows.Forms; 5 | 6 | using DevComponents.DotNetBar; 7 | 8 | 9 | namespace NetFocus.DataStructure.Commands 10 | { 11 | public interface ISubmenuBuilder 12 | { 13 | ButtonItem[] BuildSubmenu(object owner); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Base/Gui/Components/IOwnerState.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Xml; 4 | 5 | using NetFocus.DataStructure.Gui; 6 | using NetFocus.Components.AddIns.Attributes; 7 | 8 | namespace NetFocus.DataStructure.Gui.Components 9 | { 10 | public interface IOwnerState 11 | { 12 | System.Enum InternalState 13 | { 14 | get; 15 | } 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /src/NetFocus.Components.AddIns2.0/Exceptions/CodonNotFoundException.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Collections; 4 | using System.Xml; 5 | 6 | namespace NetFocus.Components.AddIns.Exceptions 7 | { 8 | public class CodonNotFoundException : System.Exception 9 | { 10 | public CodonNotFoundException(string message) : base(message) 11 | { 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/NetFocus.Components.AddIns2.0/Exceptions/ConditionNotFoundException.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Collections; 4 | using System.Xml; 5 | 6 | namespace NetFocus.Components.AddIns.Exceptions 7 | { 8 | public class ConditionNotFoundException : System.Exception 9 | { 10 | public ConditionNotFoundException(string message) : base(message) 11 | { 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/Core/PathAttribute.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Reflection; 4 | 5 | namespace NetFocus.Components.AddIns.Attributes 6 | { 7 | [AttributeUsage(AttributeTargets.Field, Inherited=true)] 8 | public class PathAttribute : Attribute 9 | { 10 | /// 11 | /// Constructs a new instance. 12 | /// 13 | public PathAttribute() 14 | { 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/Base/Commands/IMenuCommand.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Reflection; 4 | using System.Windows.Forms; 5 | 6 | 7 | namespace NetFocus.DataStructure.Commands 8 | { 9 | public interface IMenuCommand : ICommand 10 | { 11 | bool IsEnabled { 12 | get; 13 | set; 14 | } 15 | 16 | bool IsChecked { 17 | get; 18 | set; 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/Top/Gui/Views/IEditable.cs: -------------------------------------------------------------------------------- 1 | 2 | namespace NetFocus.DataStructure.Gui 3 | { 4 | public interface IEditable 5 | { 6 | IClipboardHandler ClipboardHandler { 7 | get; 8 | } 9 | 10 | bool EnableUndo { 11 | get; 12 | } 13 | 14 | bool EnableRedo { 15 | get; 16 | } 17 | 18 | string Text { 19 | get; 20 | set; 21 | } 22 | 23 | void Undo(); 24 | void Redo(); 25 | 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/NetFocus.Components.AddIns2.0/Attributes/PathAttribute.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Reflection; 4 | 5 | namespace NetFocus.Components.AddIns.Attributes 6 | { 7 | [AttributeUsage(AttributeTargets.Field, Inherited=true)] 8 | public class PathAttribute : Attribute 9 | { 10 | /// 11 | /// Constructs a new instance. 12 | /// 13 | public PathAttribute() 14 | { 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/TextEditor/Document/Strategies/FoldingStrategy/ParserFoldingStrategy.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Drawing; 4 | using System.Collections; 5 | 6 | namespace NetFocus.DataStructure.TextEditor.Document 7 | { 8 | public class ParserFoldingStrategy : IFoldingStrategy 9 | { 10 | public ArrayList GenerateFoldMarkers(IDocument document, string fileName, object parseInformation) 11 | { 12 | return null; 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/NetFocus.Components.AddIns2.0/Exceptions/AddInLoadException.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | 4 | namespace NetFocus.Components.AddIns.Exceptions 5 | { 6 | /// 7 | /// Is thrown when the AddInTree could not find the requested path. 8 | /// 9 | public class AddInLoadException : Exception 10 | { 11 | /// 12 | /// Constructs a new 13 | /// 14 | public AddInLoadException(string reason) : base(reason) 15 | { 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/TextEditor/Undo/IUndoableOperation.cs: -------------------------------------------------------------------------------- 1 | 2 | namespace NetFocus.DataStructure.TextEditor.Undo 3 | { 4 | /// 5 | /// This Interface describes a the basic Undo/Redo operation, 6 | /// all Undo Operations must implement this interface. 7 | /// 8 | public interface IUndoableOperation 9 | { 10 | /// 11 | /// Undo the last operation 12 | /// 13 | void Undo(); 14 | 15 | /// 16 | /// Redo the last operation 17 | /// 18 | void Redo(); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/NetFocus.Components.AddIns2.0/Exceptions/AddInSignatureException.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | 4 | namespace NetFocus.Components.AddIns.Exceptions 5 | { 6 | /// 7 | /// Is thrown when the xml has a false format. 8 | /// 9 | public class AddInSignatureException : Exception 10 | { 11 | /// 12 | /// Constructs a new 13 | /// 14 | public AddInSignatureException(string msg) : base("signature failure : " + msg) 15 | { 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/Base/Internal/Services/IStatusBarService.cs: -------------------------------------------------------------------------------- 1 | using System.Drawing; 2 | using System.Windows.Forms; 3 | 4 | namespace NetFocus.DataStructure.Services 5 | { 6 | public interface IStatusBarService 7 | { 8 | 9 | Control Control { 10 | get; 11 | } 12 | 13 | void ShowErrorMessage(string message); 14 | 15 | void SetMessage(string message); 16 | void SetMessage(Image image, string message); 17 | 18 | void SetCaretPosition(int x, int y, int charOffset); 19 | void SetInsertMode(bool insertMode); 20 | 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/NetFocus.Components.AddIns2.0/Exceptions/AddInTreeFormatException.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | 4 | namespace NetFocus.Components.AddIns.Exceptions 5 | { 6 | /// 7 | /// Is thrown when the xml has a false format. 8 | /// 9 | public class AddInTreeFormatException : Exception 10 | { 11 | /// 12 | /// Constructs a new 13 | /// 14 | public AddInTreeFormatException(string msg) : base("error reading the addin xml : " + msg) 15 | { 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/NetFocus.Components.AddIns2.0/Attributes/ConditionAttribute.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Reflection; 4 | 5 | namespace NetFocus.Components.AddIns.Attributes 6 | { 7 | /// 8 | /// Indicates that class represents a condition. 9 | /// 10 | [AttributeUsage(AttributeTargets.Class, Inherited=false, AllowMultiple=false)] 11 | public class ConditionAttribute : Attribute 12 | { 13 | /// 14 | /// Creates a new instance. 15 | /// 16 | public ConditionAttribute() 17 | { 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/NetFocus.Components.AddIns2.0/Exceptions/TreePathNotFoundException.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | 4 | namespace NetFocus.Components.AddIns.Exceptions 5 | { 6 | /// 7 | /// Is thrown when the AddInTree could not find the requested path. 8 | /// 9 | public class TreePathNotFoundException : Exception 10 | { 11 | /// 12 | /// Constructs a new 13 | /// 14 | public TreePathNotFoundException(string path) : base("Treepath not found : " + path) 15 | { 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/NetFocus.Components.AddIns2.0/Exceptions/TypeNotFoundException.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | 4 | namespace NetFocus.Components.AddIns.Exceptions 5 | { 6 | /// 7 | /// Is thrown when the AddInTree could not create a specified object. 8 | /// 9 | public class TypeNotFoundException : Exception 10 | { 11 | /// 12 | /// Constructs a new 13 | /// 14 | public TypeNotFoundException(string typeName) : base("Unable to create object from type : " + typeName) 15 | { 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/Top/Gui/Views/IPositionable.cs: -------------------------------------------------------------------------------- 1 | 2 | namespace NetFocus.DataStructure.Gui 3 | { 4 | /// 5 | /// If a IViewContent object is from the type IPositionable it signals 6 | /// that it's a TextEditor which could set the caret to a position inside 7 | /// a file. 8 | /// 9 | public interface IPositionable 10 | { 11 | /// 12 | /// Sets the 'caret' to the position pos, where pos.Y is the line (starting from 0). 13 | /// And pos.X is the column (starting from 0 too). 14 | /// 15 | void JumpTo(int line, int column); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/Core/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | 2 | using System.Reflection; 3 | using System.Runtime.CompilerServices; 4 | 5 | [assembly: AssemblyTitle("SharpDevelop")] 6 | [assembly: AssemblyDescription("free C# IDE")] 7 | [assembly: AssemblyConfiguration("")] 8 | [assembly: AssemblyCompany("")] 9 | [assembly: AssemblyProduct("SharpDevelop")] 10 | [assembly: AssemblyCopyright("Mike Krueger 2000")] 11 | [assembly: AssemblyTrademark("")] 12 | [assembly: AssemblyCulture("")] 13 | 14 | [assembly: AssemblyVersion("0.92.1.1")] 15 | 16 | [assembly: AssemblyDelaySign(false)] 17 | [assembly: AssemblyKeyFile("")] 18 | -------------------------------------------------------------------------------- /src/NetFocus.Components.AddIns2.0/Exceptions/DuplicateCodonException.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | 4 | namespace NetFocus.Components.AddIns.Exceptions 5 | { 6 | /// 7 | /// Is thrown when the AddInTree could not find the requested path. 8 | /// 9 | public class DuplicateCodonException : Exception 10 | { 11 | /// 12 | /// Constructs a new instance. 13 | /// 14 | public DuplicateCodonException(string codon) : base("there already exists a codon with name : " + codon) 15 | { 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/TextEditor/Document/ISegment.cs: -------------------------------------------------------------------------------- 1 | 2 | using NetFocus.DataStructure.TextEditor.Undo; 3 | 4 | namespace NetFocus.DataStructure.TextEditor.Document 5 | { 6 | /// 7 | /// This interface is used to describe a span inside a text sequence 8 | /// 9 | public interface ISegment 10 | { 11 | /// 12 | /// The offset where the span begins 13 | /// 14 | int Offset { 15 | get; 16 | set; 17 | } 18 | 19 | /// 20 | /// The length of the span 21 | /// 22 | int Length { 23 | get; 24 | set; 25 | } 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /src/TextEditor/Document/Strategies/FoldingStrategy/IFoldingStrategy.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Drawing; 4 | using System.Collections; 5 | 6 | namespace NetFocus.DataStructure.TextEditor.Document 7 | { 8 | /// 9 | /// This interface is used for the folding capabilities 10 | /// of the textarea. 11 | /// 12 | public interface IFoldingStrategy 13 | { 14 | /// 15 | /// Calculates the fold level of a specific line. 16 | /// 17 | ArrayList GenerateFoldMarkers(IDocument document, string fileName, object parseInformation); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/Top/Gui/Views/IPrintable.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Drawing.Printing; 4 | 5 | namespace NetFocus.DataStructure.Gui 6 | { 7 | /// 8 | /// If a IViewContent object is from the type IPrintable it signals 9 | /// that it's contents could be printed to a printer, fax etc. 10 | /// 11 | public interface IPrintable 12 | { 13 | /// 14 | /// Returns the PrintDocument for this object, see the .NET reference 15 | /// for more information about printing. 16 | /// 17 | PrintDocument PrintDocument { 18 | get; 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/Base/Gui/Components/SdMenuCommand.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Drawing; 4 | using System.Diagnostics; 5 | using System.Drawing.Text; 6 | using System.Drawing.Imaging; 7 | using System.Windows.Forms; 8 | 9 | using DevComponents.DotNetBar; 10 | 11 | namespace NetFocus.DataStructure.Gui.Components 12 | { 13 | public class SdMenuCommand : ButtonItem 14 | { 15 | public SdMenuCommand(string label) 16 | { 17 | this.Text = label; 18 | } 19 | public SdMenuCommand(string label, EventHandler handler) 20 | { 21 | this.Click += handler; 22 | this.Text = label; 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/Top/Gui/XmlForms/IObjectCreator.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Xml; 4 | using System.Collections; 5 | using System.Drawing; 6 | using System.Reflection; 7 | using System.Windows.Forms; 8 | 9 | namespace NetFocus.DataStructure.Gui.XmlForms { 10 | 11 | /// 12 | /// This interface is used to create the objects which are given by name in 13 | /// the xml definition. 14 | /// 15 | public interface IObjectCreator 16 | { 17 | /// 18 | /// Creates a new instance of object name. 19 | /// 20 | object CreateObject(string name); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/Base/Gui/Components/AxStatusBar.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Collections; 4 | using System.Drawing; 5 | using System.Windows.Forms; 6 | 7 | namespace NetFocus.DataStructure.Gui.Components 8 | { 9 | public class AxStatusBar : System.Windows.Forms.StatusBar 10 | { 11 | public AxStatusBar() 12 | { 13 | } 14 | protected override void OnDrawItem(StatusBarDrawItemEventArgs sbdievent) 15 | { 16 | if (sbdievent.Panel is AxStatusBarPanel) { 17 | ((AxStatusBarPanel)sbdievent.Panel).DrawPanel(sbdievent); 18 | } else { 19 | base.OnDrawItem(sbdievent); 20 | } 21 | } 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /addins/BrowseAddinPad.addin: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/NetFocus.Components.AddIns2.0/Exceptions/AddInInitializeException.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | 4 | namespace NetFocus.Components.AddIns.Exceptions 5 | { 6 | /// 7 | /// Is thrown when the AddInTree could not find the requested path. 8 | /// 9 | public class AddInInitializeException : Exception 10 | { 11 | /// 12 | /// Constructs a new 13 | /// 14 | public AddInInitializeException(string fileName, Exception e) : base("Could not load add-in file : " + fileName + "\n exception got :" + e.ToString()) 15 | { 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/Base/Internal/Codons/AutoStartCodon.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Diagnostics; 4 | 5 | using NetFocus.Components.AddIns.Codons; 6 | using NetFocus.Components.AddIns.Attributes; 7 | using NetFocus.Components.AddIns.Conditions; 8 | 9 | namespace NetFocus.DataStructure.AddIns.Codons 10 | { 11 | [Codon("Autostart")] 12 | public class AutostartCodon : AbstractCodon 13 | { 14 | 15 | public override object BuildItem(object owner, ArrayList subItems, ConditionCollection conditions) 16 | { 17 | Debug.Assert(Class != null && Class.Length > 0); 18 | return AddIn.CreateObject(Class); 19 | } 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /src/Base/Internal/Codons/ServiceCodon.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Diagnostics; 4 | 5 | using NetFocus.Components.AddIns.Codons; 6 | using NetFocus.Components.AddIns.Attributes; 7 | using NetFocus.Components.AddIns.Conditions; 8 | 9 | namespace NetFocus.DataStructure.AddIns.Codons 10 | { 11 | [Codon("Service")] 12 | public class ServiceCodon : AbstractCodon 13 | { 14 | 15 | public override object BuildItem(object owner, ArrayList subItems, ConditionCollection conditions) 16 | { 17 | Debug.Assert(Class != null && Class.Length > 0); 18 | return AddIn.CreateObject(Class); 19 | } 20 | 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/Top/Gui/Views/IClipboardHandler.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | 4 | namespace NetFocus.DataStructure.Gui 5 | { 6 | public interface IClipboardHandler 7 | { 8 | bool EnableCut { 9 | get; 10 | } 11 | bool EnableCopy { 12 | get; 13 | } 14 | bool EnablePaste { 15 | get; 16 | } 17 | bool EnableDelete { 18 | get; 19 | } 20 | bool EnableSelectAll { 21 | get; 22 | } 23 | 24 | void Cut(object sender, EventArgs e); 25 | void Copy(object sender, EventArgs e); 26 | void Paste(object sender, EventArgs e); 27 | void Delete(object sender, EventArgs e); 28 | void SelectAll(object sender, EventArgs e); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/NetFocus.Components.AddIns2.0/Exceptions/ConditionWithoutRequiredAttributesException.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | 4 | namespace NetFocus.Components.AddIns.Exceptions 5 | { 6 | /// 7 | /// Is thrown when the AddInTree could not find the requested path. 8 | /// 9 | public class ConditionWithoutRequiredAttributesException : Exception 10 | { 11 | /// 12 | /// Constructs a new 13 | /// 14 | public ConditionWithoutRequiredAttributesException() : base("conditions need at least one required attribute to be identified.") 15 | { 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /data/resources/templates/EmptyTextFile.xft: -------------------------------------------------------------------------------- 1 | 2 | 19 | -------------------------------------------------------------------------------- /src/TextEditor/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | 2 | using System.Reflection; 3 | using System.Runtime.CompilerServices; 4 | 5 | [assembly: AssemblyTitle("NetFocus.DataStructure.TextEditor")] 6 | [assembly: AssemblyDescription("A .NET text editor control")] 7 | [assembly: AssemblyConfiguration("")] 8 | [assembly: AssemblyCompany("NetFocus.net")] 9 | [assembly: AssemblyProduct("NetFocus.DataStructure.TextEditor")] 10 | [assembly: AssemblyCopyright("NetFocus")] 11 | [assembly: AssemblyTrademark("")] 12 | [assembly: AssemblyCulture("")] 13 | 14 | [assembly: AssemblyVersion("1.0.3.1768")] 15 | 16 | [assembly: AssemblyDelaySign(false)] 17 | [assembly: AssemblyKeyFile("")] 18 | [assembly: AssemblyKeyName("")] 19 | -------------------------------------------------------------------------------- /src/Base/Commands/AbstractMenuCommand.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Collections; 4 | using System.CodeDom.Compiler; 5 | using System.Windows.Forms; 6 | 7 | namespace NetFocus.DataStructure.Commands 8 | { 9 | public abstract class AbstractMenuCommand : AbstractCommand, IMenuCommand 10 | { 11 | bool isEnabled = true; 12 | bool isChecked = false; 13 | 14 | public virtual bool IsEnabled { 15 | get { 16 | return isEnabled; 17 | } 18 | set { 19 | isEnabled = value; 20 | } 21 | } 22 | 23 | public virtual bool IsChecked { 24 | get { 25 | return isChecked; 26 | } 27 | set { 28 | isChecked = value; 29 | } 30 | } 31 | 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/Base/Commands/ICommand.cs: -------------------------------------------------------------------------------- 1 | 2 | 3 | using System; 4 | using System.Collections; 5 | using System.CodeDom.Compiler; 6 | using System.Windows.Forms; 7 | 8 | namespace NetFocus.DataStructure.Commands 9 | { 10 | /// 11 | /// A basic command interface. A command has simply an owner which "runs" the command 12 | /// and a Run method which invokes the command. 13 | /// 14 | public interface ICommand 15 | { 16 | 17 | /// 18 | /// Returns the owner of the command. 19 | /// 20 | object Owner { 21 | get; 22 | set; 23 | } 24 | 25 | /// 26 | /// Invokes the command. 27 | /// 28 | void Run(); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /data/resources/templates/EmptyCFile.xft: -------------------------------------------------------------------------------- 1 | 2 | 21 | -------------------------------------------------------------------------------- /data/resources/templates/EmptyVBFile.xft: -------------------------------------------------------------------------------- 1 | 2 | 21 | -------------------------------------------------------------------------------- /data/resources/templates/EmptyCSharpFile.xft: -------------------------------------------------------------------------------- 1 | 2 | 21 | -------------------------------------------------------------------------------- /data/resources/templates/EmptyC++File.xft: -------------------------------------------------------------------------------- 1 | 2 | 21 | -------------------------------------------------------------------------------- /data/resources/templates/EmptyXMLFile.xft: -------------------------------------------------------------------------------- 1 | 2 | 21 | -------------------------------------------------------------------------------- /src/StartUp/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/Top/Gui/OptionPanels/IDialogPanelDescriptor.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Collections; 4 | 5 | namespace NetFocus.DataStructure.Gui.Dialogs.OptionPanels 6 | { 7 | public interface IDialogPanelDescriptor 8 | { 9 | /// 10 | /// Returns the ID of the dialog panel codon 11 | /// 12 | string ID { 13 | get; 14 | } 15 | 16 | /// 17 | /// Returns the label of the dialog panel 18 | /// 19 | string Label { 20 | get; 21 | set; 22 | } 23 | 24 | ArrayList DialogPanelDescriptors { 25 | get; 26 | set; 27 | } 28 | 29 | /// 30 | /// Returns the dialog panel object 31 | /// 32 | IDialogPanel DialogPanel { 33 | get; 34 | set; 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/Base/Commands/AbstractCommand.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Collections; 4 | using System.CodeDom.Compiler; 5 | using System.Windows.Forms; 6 | 7 | namespace NetFocus.DataStructure.Commands 8 | { 9 | /// 10 | /// Abstract implementation of the interface. 11 | /// 12 | public abstract class AbstractCommand : ICommand 13 | { 14 | object owner = null; 15 | 16 | /// 17 | /// Returns the owner of the command. 18 | /// 19 | public virtual object Owner { 20 | get { 21 | return owner; 22 | } 23 | set { 24 | owner = value; 25 | } 26 | } 27 | 28 | /// 29 | /// Invokes the command. 30 | /// 31 | public abstract void Run(); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /data/resources/templates/EmptyHTMLFile.xft: -------------------------------------------------------------------------------- 1 | 2 | 28 | -------------------------------------------------------------------------------- /src/Base/Gui/IMementoCapable.cs: -------------------------------------------------------------------------------- 1 | 2 | using NetFocus.DataStructure.Properties; 3 | 4 | namespace NetFocus.DataStructure.Gui 5 | { 6 | /// 7 | /// This interface flags an object beeing "mementocapable". This means that the 8 | /// state of the object could be saved to an object 9 | /// and set an object from the same class. 10 | /// This is used to save and restore the state of GUI objects. 11 | /// 12 | public interface IMementoCapable 13 | { 14 | /// 15 | /// Creates a new memento from the state. 16 | /// 17 | IXmlConvertable CreateMemento(); 18 | 19 | /// 20 | /// Sets the state to the given memento. 21 | /// 22 | void SetMemento(IXmlConvertable memento); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/Core/CodonNameAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Reflection; 3 | 4 | namespace NetFocus.Components.AddIns.Attributes 5 | { 6 | /// 7 | /// Indicates that class represents a codon. 8 | /// 9 | [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)] 10 | public class CodonNameAttribute : Attribute 11 | { 12 | string name; 13 | 14 | /// 15 | /// Creates a new instance. 16 | /// 17 | public CodonNameAttribute(string name) 18 | { 19 | this.name = name; 20 | } 21 | 22 | /// 23 | /// Returns the name of the codon. 24 | /// 25 | public string Name { 26 | get { 27 | return name; 28 | } 29 | set { 30 | name = value; 31 | } 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /data/resources/templates/EmptyJavaFile.xft: -------------------------------------------------------------------------------- 1 | 2 | 21 | -------------------------------------------------------------------------------- /data/resources/templates/EmptyXSLTFile.xft: -------------------------------------------------------------------------------- 1 | 2 | 23 | -------------------------------------------------------------------------------- /src/NetFocus.Components.AddIns2.0/Attributes/CodonAttribute.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Reflection; 4 | 5 | namespace NetFocus.Components.AddIns.Attributes 6 | { 7 | /// 8 | /// Indicates that class represents a codon. 9 | /// 10 | [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)] 11 | public class CodonAttribute : Attribute 12 | { 13 | string type; 14 | 15 | /// 16 | /// Creates a new instance. 17 | /// 18 | public CodonAttribute(string type) 19 | { 20 | this.type = type; 21 | } 22 | 23 | /// 24 | /// Returns the name of the codon. 25 | /// 26 | public string Type { 27 | get { 28 | return type; 29 | } 30 | set { 31 | type = value; 32 | } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/Core/XmlMemberAttributeAttribute.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Reflection; 4 | 5 | namespace NetFocus.Components.AddIns.Attributes 6 | { 7 | /// 8 | /// Indicates that field should be treated as a xml attribute. 9 | /// 10 | [AttributeUsage(AttributeTargets.Field, Inherited=true)] 11 | public class XmlMemberAttributeAttribute : Attribute 12 | { 13 | string name; 14 | bool isRequired; 15 | 16 | public XmlMemberAttributeAttribute(string name) 17 | { 18 | this.name = name; 19 | isRequired = false; 20 | } 21 | 22 | public string Name { 23 | get { 24 | return name; 25 | } 26 | set { 27 | name = value; 28 | } 29 | } 30 | 31 | public bool IsRequired { 32 | get { 33 | return isRequired; 34 | } 35 | set { 36 | isRequired = value; 37 | } 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/NetFocus.Components.AddIns2.0/Attributes/XmlMemberAttributeAttribute.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Reflection; 4 | 5 | namespace NetFocus.Components.AddIns.Attributes 6 | { 7 | /// 8 | /// Indicates that field should be treated as a xml attribute. 9 | /// 10 | [AttributeUsage(AttributeTargets.Field, Inherited=true)] 11 | public class XmlMemberAttributeAttribute : Attribute 12 | { 13 | string name; 14 | bool isRequired; 15 | 16 | public XmlMemberAttributeAttribute(string name) 17 | { 18 | this.name = name; 19 | isRequired = false; 20 | } 21 | 22 | public string Name { 23 | get { 24 | return name; 25 | } 26 | set { 27 | name = value; 28 | } 29 | } 30 | 31 | public bool IsRequired { 32 | get { 33 | return isRequired; 34 | } 35 | set { 36 | isRequired = value; 37 | } 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/NetFocus.Components.AddIns2.0/Conditions/ICondition.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Xml; 4 | 5 | namespace NetFocus.Components.AddIns.Conditions 6 | { 7 | /// 8 | /// Default actions, when a condition is failed. 9 | /// 10 | public enum ConditionFailedAction { 11 | Nothing, 12 | Exclude, 13 | Disable 14 | } 15 | 16 | 17 | /// 18 | /// The ICondition interface describes the basic funcionality 19 | /// a condition must have. 20 | /// 21 | public interface ICondition 22 | { 23 | /// 24 | /// Returns the action which occurs, when this condition fails. 25 | /// 26 | ConditionFailedAction FailedAction { 27 | get; 28 | set; 29 | } 30 | 31 | /// 32 | /// Returns true, when the condition is valid otherwise false. 33 | /// 34 | bool IsValid(object caller); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/NetFocus.Components.AddIns2.0/Exceptions/DuplicateConditionException.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Collections.Specialized; 4 | 5 | namespace NetFocus.Components.AddIns.Exceptions 6 | { 7 | /// 8 | /// Is thrown when the AddInTree could not find the requested path. 9 | /// 10 | public class DuplicateConditionException : Exception 11 | { 12 | /// 13 | /// Constructs a new 14 | /// 15 | public DuplicateConditionException(StringCollection attributes) : base("there already exists a condition with the required attributes : " + GenAttrList(attributes)) 16 | { 17 | } 18 | 19 | static string GenAttrList(StringCollection attributes) 20 | { 21 | string tmp = ""; 22 | foreach (string attrib in attributes) { 23 | tmp += " " + attrib; 24 | } 25 | return tmp; 26 | } 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/NetFocus.Components.AddIns2.0/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // 4 | // 5 | // 6 | // 7 | using System; 8 | using System.Reflection; 9 | using System.Runtime.CompilerServices; 10 | 11 | [assembly:CLSCompliant(true)] 12 | 13 | [assembly: AssemblyTitle("NetFocus.Components.AddIn")] 14 | [assembly: AssemblyDescription("")] 15 | [assembly: AssemblyConfiguration("")] 16 | [assembly: AssemblyCompany("")] 17 | [assembly: AssemblyProduct("NetFocus.Components.AddIn")] 18 | [assembly: AssemblyCopyright("")] 19 | [assembly: AssemblyTrademark("")] 20 | [assembly: AssemblyCulture("")] 21 | 22 | [assembly: AssemblyVersion("2.0.0.0")] 23 | 24 | //[assembly: AssemblyDelaySign(false)] 25 | //[assembly: AssemblyKeyFile("..\\src\\Main\\Core\\CoreKey.key")] 26 | -------------------------------------------------------------------------------- /doc/help/HelpConv.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/TextEditor/Document/AbstractSegment.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using NetFocus.DataStructure.TextEditor.Undo; 4 | 5 | namespace NetFocus.DataStructure.TextEditor.Document 6 | { 7 | /// 8 | /// This interface is used to describe a span inside a text sequence 9 | /// 10 | public class AbstractSegment : ISegment 11 | { 12 | protected int offset = -1; 13 | protected int length = -1; 14 | 15 | public virtual int Offset { 16 | get { 17 | return offset; 18 | } 19 | set { 20 | offset = value; 21 | } 22 | } 23 | 24 | public virtual int Length { 25 | get { 26 | return length; 27 | } 28 | set { 29 | length = value; 30 | } 31 | } 32 | 33 | public override string ToString() 34 | { 35 | return String.Format("[AbstractSegment: Offset = {0}, Length = {1}]", 36 | Offset, 37 | Length); 38 | } 39 | 40 | 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/Top/Gui/OptionPanels/IDialogPanel.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Collections; 4 | using System.CodeDom.Compiler; 5 | using System.Windows.Forms; 6 | 7 | using NetFocus.Components.AddIns; 8 | using NetFocus.Components.AddIns.Codons; 9 | using NetFocus.DataStructure.Properties; 10 | 11 | 12 | namespace NetFocus.DataStructure.Gui.Dialogs.OptionPanels 13 | { 14 | public enum DialogMessage { 15 | OK, 16 | Cancel, 17 | Help, 18 | Next, 19 | Prev, 20 | Finish, 21 | Activated 22 | } 23 | 24 | public interface IDialogPanel 25 | { 26 | object CustomizationObject { 27 | get; 28 | set; 29 | } 30 | 31 | Control Control { 32 | get; 33 | } 34 | 35 | bool EnableFinish { 36 | get; 37 | } 38 | 39 | /// 40 | /// true, if the DialogMessage could be executed. 41 | /// 42 | bool ReceiveDialogMessage(DialogMessage message); 43 | 44 | event EventHandler EnableFinishChanged; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/Base/Internal/Codons/ViewTypeCodon.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Collections; 4 | using System.Diagnostics; 5 | 6 | using NetFocus.DataStructure.Gui; 7 | using NetFocus.Components.AddIns.Codons; 8 | using NetFocus.Components.AddIns.Attributes; 9 | using NetFocus.Components.AddIns.Conditions; 10 | 11 | namespace NetFocus.DataStructure.AddIns.Codons 12 | { 13 | [Codon("ViewType")] 14 | public class ViewTypeCodon : AbstractCodon 15 | { 16 | [XmlMemberArrayAttribute("supportedformats")] 17 | string[] supportedFormats; 18 | 19 | public string[] SupportedFormats { 20 | get { 21 | return supportedFormats; 22 | } 23 | set { 24 | supportedFormats = value; 25 | } 26 | } 27 | 28 | public override object BuildItem(object owner, ArrayList subItems, ConditionCollection conditions) 29 | { 30 | Debug.Assert(Class != null && Class.Length > 0); 31 | 32 | return (IViewType)AddIn.CreateObject(Class); 33 | 34 | } 35 | 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/TextEditor/Actions/ClipBoardActions.cs: -------------------------------------------------------------------------------- 1 | 2 | using System.Drawing; 3 | using System.Windows.Forms; 4 | using System; 5 | 6 | using NetFocus.DataStructure.TextEditor.Document; 7 | 8 | namespace NetFocus.DataStructure.TextEditor.Actions 9 | { 10 | public class Cut : AbstractEditAction 11 | { 12 | public override void Execute(TextArea textArea) 13 | { 14 | if (textArea.Document.ReadOnly) { 15 | return; 16 | } 17 | textArea.ClipboardHandler.Cut(null, null); 18 | } 19 | } 20 | 21 | public class Copy : AbstractEditAction 22 | { 23 | public override void Execute(TextArea textArea) 24 | { 25 | textArea.AutoClearSelection = false; 26 | textArea.ClipboardHandler.Copy(null, null); 27 | } 28 | } 29 | 30 | public class Paste : AbstractEditAction 31 | { 32 | public override void Execute(TextArea textArea) 33 | { 34 | if (textArea.Document.ReadOnly) { 35 | return; 36 | } 37 | textArea.ClipboardHandler.Paste(null, null); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/NetFocus.Components.AddIns2.0/Conditions/AbstractCondition.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Xml; 4 | 5 | using NetFocus.Components.AddIns.Attributes; 6 | 7 | namespace NetFocus.Components.AddIns.Conditions 8 | { 9 | /// 10 | /// This is a abstract implementation of the interface. 11 | /// 12 | public abstract class AbstractCondition : ICondition 13 | { 14 | [XmlMemberAttribute("FailedAction")] 15 | ConditionFailedAction failedAction = ConditionFailedAction.Exclude; 16 | 17 | /// 18 | /// Returns the action, if the condition is failed. 19 | /// 20 | public ConditionFailedAction FailedAction { 21 | get { 22 | return failedAction; 23 | } 24 | set { 25 | failedAction = value; 26 | } 27 | } 28 | 29 | /// 30 | /// Inheriting classes need to overwrite this method. 31 | /// 32 | /// interface. 33 | public abstract bool IsValid(object caller); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/Base/Internal/Codons/PadCodon.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Reflection; 4 | using System.Diagnostics; 5 | 6 | using NetFocus.DataStructure.Gui; 7 | using NetFocus.Components.AddIns.Codons; 8 | using NetFocus.Components.AddIns.Attributes; 9 | using NetFocus.Components.AddIns.Conditions; 10 | 11 | namespace NetFocus.DataStructure.AddIns.Codons 12 | { 13 | [Codon("Pad")] 14 | public class PadCodon : AbstractCodon 15 | { 16 | [XmlMemberArrayAttribute("shortcut", Separator = new char[]{ '|'})] 17 | string[] shortcut = null; 18 | 19 | public string[] Shortcut { 20 | get { 21 | return shortcut; 22 | } 23 | set { 24 | shortcut = value; 25 | } 26 | } 27 | 28 | public override object BuildItem(object owner, ArrayList subItems, ConditionCollection conditions) 29 | { 30 | Debug.Assert(Class != null && Class.Length > 0); 31 | IPadContent pad = AddIn.CreateObject(Class) as IPadContent; 32 | pad.Shortcut = shortcut; 33 | 34 | return pad; 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/Top/Internal/ViewTypes/BrowserViewType.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Drawing; 4 | using System.Windows.Forms; 5 | using System.Drawing.Printing; 6 | 7 | using NetFocus.DataStructure.Properties; 8 | using NetFocus.Components.AddIns.Codons; 9 | using NetFocus.DataStructure.Gui; 10 | using NetFocus.DataStructure.Gui.Views; 11 | 12 | namespace NetFocus.DataStructure.ViewTypes 13 | { 14 | public class BrowserViewType : IViewType 15 | { 16 | public bool CanCreateContentForFile(string fileName) 17 | { 18 | return fileName.StartsWith("http") || fileName.StartsWith("ftp"); 19 | } 20 | 21 | public bool CanCreateContentForLanguage(string language) 22 | { 23 | return false; 24 | } 25 | 26 | public IViewContent CreateContentForFile(string fileName) 27 | { 28 | HtmlView htmlView = new HtmlView(); 29 | 30 | htmlView.LoadFile(fileName); 31 | 32 | return htmlView; 33 | } 34 | 35 | public IViewContent CreateContentForLanguage(string language, string content) 36 | { 37 | return null; 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/Top/Commands/FileTabStripCommands.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using System.Threading; 4 | using System.Drawing; 5 | using System.Drawing.Printing; 6 | using System.Collections; 7 | using System.ComponentModel; 8 | using System.Windows.Forms; 9 | using System.Diagnostics; 10 | 11 | using NetFocus.Components.AddIns; 12 | 13 | using NetFocus.DataStructure.Properties; 14 | using NetFocus.Components.AddIns.Codons; 15 | using NetFocus.DataStructure.Services; 16 | using NetFocus.DataStructure.Gui; 17 | using NetFocus.DataStructure.Gui.Dialogs; 18 | using NetFocus.DataStructure.Gui.Components; 19 | 20 | 21 | namespace NetFocus.DataStructure.Commands.TabStrip 22 | { 23 | 24 | public class CopyPathName : AbstractMenuCommand 25 | { 26 | public override void Run() 27 | { 28 | OpenFileTab tab = (OpenFileTab)Owner; 29 | 30 | IViewContent content = tab.ClickedView; 31 | 32 | if (content != null && content.ContentName != null) 33 | { 34 | Clipboard.SetDataObject(new DataObject(DataFormats.Text, content.ContentName)); 35 | } 36 | } 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /src/BrowseAddinTree/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // 有关程序集的常规信息通过下列属性集 6 | // 控制。更改这些属性值可修改 7 | // 与程序集关联的信息。 8 | [assembly: AssemblyTitle("ExampleAddin1")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("ExampleAddin1")] 13 | [assembly: AssemblyCopyright("版权所有 (C) 2011")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // 将 ComVisible 设置为 false 使此程序集中的类型 18 | // 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型, 19 | // 则将该类型上的 ComVisible 属性设置为 true。 20 | [assembly: ComVisible(false)] 21 | 22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID 23 | [assembly: Guid("dc949735-278e-419f-9099-bf1ff096f387")] 24 | 25 | // 程序集的版本信息由下面四个值组成: 26 | // 27 | // 主版本 28 | // 次版本 29 | // 内部版本号 30 | // 修订号 31 | // 32 | // 可以指定所有这些值,也可以使用“修订号”和“内部版本号”的默认值, 33 | // 方法是按如下所示使用“*”: 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /src/TextEditor/Undo/UndoQueue.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Diagnostics; 4 | using System.Collections; 5 | 6 | namespace NetFocus.DataStructure.TextEditor.Undo 7 | { 8 | /// 9 | /// This class stacks the last x operations from the undostack and makes 10 | /// one undo/redo operation from it. 11 | /// 12 | public class UndoQueue : IUndoableOperation 13 | { 14 | ArrayList undolist = new ArrayList(); 15 | 16 | public UndoQueue(UndoStack stack, int numops) 17 | { 18 | if (stack == null) { 19 | throw new ArgumentNullException("stack"); 20 | } 21 | 22 | for (int i = 0; i < numops; ++i) { 23 | if (stack._UndoStack.Count > 0) { 24 | undolist.Add(stack._UndoStack.Pop()); 25 | } 26 | } 27 | } 28 | public void Undo() 29 | { 30 | for (int i = 0; i < undolist.Count; ++i) { 31 | ((IUndoableOperation)undolist[i]).Undo(); 32 | } 33 | } 34 | 35 | public void Redo() 36 | { 37 | for (int i = undolist.Count - 1 ; i >= 0 ; --i) { 38 | ((IUndoableOperation)undolist[i]).Redo(); 39 | } 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/Top/Gui/XmlForms/DataStructureObjectCreator.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Xml; 4 | using System.Collections; 5 | using System.Drawing; 6 | using System.Drawing.Text; 7 | using System.Reflection; 8 | using System.Windows.Forms; 9 | using NetFocus.DataStructure.Services; 10 | using NetFocus.DataStructure.Gui.XmlForms; 11 | 12 | namespace NetFocus.DataStructure.Gui.XmlForms 13 | { 14 | public class DataStructureObjectCreator : DefaultObjectCreator 15 | { 16 | static PropertyService propertyService = (PropertyService)ServiceManager.Services.GetService(typeof(PropertyService)); 17 | public override object CreateObject(string name) 18 | { 19 | object o = base.CreateObject(name); 20 | if (o != null) { 21 | try { 22 | PropertyInfo propertyInfo = o.GetType().GetProperty("FlatStyle"); 23 | if (propertyInfo != null) { 24 | if (o is Label) { 25 | propertyInfo.SetValue(o, FlatStyle.Standard, null); 26 | } else { 27 | propertyInfo.SetValue(o, FlatStyle.System, null); 28 | } 29 | } 30 | } catch (Exception) {} 31 | } 32 | return o; 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/TextEditor/Document/Strategies/HighlightingStrategy/IHighlightingStrategy.cs: -------------------------------------------------------------------------------- 1 | 2 | 3 | using System; 4 | using System.Collections; 5 | using System.Drawing; 6 | using System.Text; 7 | 8 | namespace NetFocus.DataStructure.TextEditor.Document 9 | { 10 | /// 11 | /// A highlighting strategy for a buffer. 12 | /// 13 | public interface IHighlightingStrategy 14 | { 15 | /// 16 | /// The name of the highlighting strategy, must be unique 17 | /// 18 | string Name { 19 | get; 20 | } 21 | 22 | /// 23 | /// The file extenstions on which this highlighting strategy gets 24 | /// used 25 | /// 26 | string[] Extensions { 27 | set; 28 | get; 29 | } 30 | 31 | Hashtable Properties { 32 | get; 33 | } 34 | 35 | HighlightColor GetEnvironmentColorForName(string name); 36 | 37 | HighlightRuleSet GetRuleSetForSpan(Span span); 38 | 39 | 40 | HighlightColor GetColor(IDocument document, LineSegment keyWord, int index, int length); 41 | 42 | 43 | void MarkTokens(IDocument document); 44 | 45 | void MarkTokens(IDocument document, ArrayList lines); 46 | 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/TextEditor/Document/SelectionManager/ISelection.cs: -------------------------------------------------------------------------------- 1 | 2 | using System.Drawing; 3 | using NetFocus.DataStructure.TextEditor.Undo; 4 | 5 | namespace NetFocus.DataStructure.TextEditor.Document 6 | { 7 | /// 8 | /// An interface representing a portion of the current selection. 9 | /// 10 | public interface ISelection 11 | { 12 | Point StartPosition { 13 | get; 14 | set; 15 | } 16 | 17 | Point EndPosition { 18 | get; 19 | set; 20 | } 21 | 22 | int Offset { 23 | get; 24 | } 25 | 26 | int EndOffset { 27 | get; 28 | } 29 | 30 | int Length { 31 | get; 32 | } 33 | 34 | /// 35 | /// Returns true, if the selection is rectangular 36 | /// 37 | bool IsRectangularSelection { 38 | get; 39 | } 40 | 41 | /// 42 | /// Returns true, if the selection is empty 43 | /// 44 | bool IsEmpty { 45 | get; 46 | } 47 | 48 | /// 49 | /// The text which is selected by this selection. 50 | /// 51 | string SelectedText { 52 | get; 53 | } 54 | 55 | bool ContainsOffset(int offset); 56 | 57 | bool ContainsPosition(Point position); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/Top/Gui/OptionPanels/HighlightingEditorPanel/Nodes/SpansNode.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Windows.Forms; 4 | using System.Drawing; 5 | using System.Xml; 6 | 7 | using NetFocus.DataStructure.TextEditor.Document; 8 | using NetFocus.DataStructure.Services; 9 | using NetFocus.DataStructure.Properties; 10 | using NetFocus.DataStructure.Gui.Dialogs; 11 | using NetFocus.DataStructure.Gui.OptionPanels.HighlightingEditor.Panels; 12 | 13 | namespace NetFocus.DataStructure.Gui.OptionPanels.HighlightingEditor.Nodes 14 | { 15 | 16 | class SpansNode : AbstractNode 17 | { 18 | public SpansNode(XmlElement el) 19 | { 20 | Text = ResNodeName("Spans"); 21 | 22 | OptionPanel = new SpansOptionPanel(this); 23 | if (el == null) return; 24 | 25 | XmlNodeList nodes = el.GetElementsByTagName("Span"); 26 | foreach (XmlElement el2 in nodes) 27 | { 28 | Nodes.Add(new SpanNode(el2)); 29 | } 30 | 31 | } 32 | 33 | public override void UpdateNodeText() 34 | { 35 | } 36 | 37 | public override string ToXml() 38 | { 39 | string ret = ""; 40 | foreach (SpanNode node in Nodes) 41 | { 42 | ret += node.ToXml(); 43 | } 44 | return ret; 45 | } 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /src/TextEditor/Gui/HRuler.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Drawing; 4 | using System.Windows.Forms; 5 | 6 | namespace NetFocus.DataStructure.TextEditor 7 | { 8 | /// 9 | /// Description of HRuler. 10 | /// 11 | public class HRuler : UserControl 12 | { 13 | TextArea textArea; 14 | 15 | public HRuler(TextArea textArea) 16 | { 17 | this.textArea = textArea; 18 | } 19 | 20 | protected override void OnPaint(System.Windows.Forms.PaintEventArgs e) 21 | { 22 | Graphics g = e.Graphics; 23 | int num = 0; 24 | for (float x = textArea.TextViewMargin.DrawingRectangle.Left; x < textArea.TextViewMargin.DrawingRectangle.Right; x += textArea.TextViewMargin.GetWidth(' ')) { 25 | int offset = (Height * 2) / 3; 26 | if (num % 5 == 0) { 27 | offset = (Height * 4) / 5; 28 | } 29 | 30 | if (num % 10 == 0) { 31 | offset = 1; 32 | } 33 | ++num; 34 | g.DrawLine(Pens.Black,(int)x, offset, (int)x, Height - offset); 35 | } 36 | } 37 | 38 | protected override void OnPaintBackground(System.Windows.Forms.PaintEventArgs e) 39 | { 40 | e.Graphics.FillRectangle(Brushes.White,new Rectangle(0, 0, Width, Height)); 41 | 42 | } 43 | 44 | 45 | 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/TextEditor/Document/Strategies/HighlightingStrategy/SyntaxMode.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.IO; 4 | using System.Collections; 5 | using System.Windows.Forms; 6 | using System.Xml; 7 | 8 | namespace NetFocus.DataStructure.TextEditor.Document 9 | { 10 | public class SyntaxMode 11 | { 12 | string fileName; 13 | string name; 14 | string[] extensions; 15 | 16 | public string FileName { 17 | get { 18 | return fileName; 19 | } 20 | set { 21 | fileName = value; 22 | } 23 | } 24 | 25 | public string Name { 26 | get { 27 | return name; 28 | } 29 | set { 30 | name = value; 31 | } 32 | } 33 | 34 | public string[] Extensions { 35 | get { 36 | return extensions; 37 | } 38 | set { 39 | extensions = value; 40 | } 41 | } 42 | 43 | 44 | public SyntaxMode(string fileName, string name, string extensions) 45 | { 46 | this.fileName = fileName; 47 | this.name = name; 48 | this.extensions = extensions.Split(';', '|', ','); 49 | } 50 | 51 | public SyntaxMode(string fileName, string name, string[] extensions) 52 | { 53 | this.fileName = fileName; 54 | this.name = name; 55 | this.extensions = extensions; 56 | } 57 | 58 | 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/Top/Gui/OptionPanels/HighlightingEditorPanel/Nodes/RuleSetsNode.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Windows.Forms; 4 | using System.Drawing; 5 | using System.Xml; 6 | 7 | using NetFocus.DataStructure.TextEditor.Document; 8 | using NetFocus.DataStructure.Services; 9 | using NetFocus.DataStructure.Properties; 10 | using NetFocus.DataStructure.Gui.Dialogs; 11 | using NetFocus.DataStructure.Gui.OptionPanels.HighlightingEditor.Panels; 12 | 13 | namespace NetFocus.DataStructure.Gui.OptionPanels.HighlightingEditor.Nodes 14 | { 15 | 16 | class RuleSetsNode : AbstractNode 17 | { 18 | public RuleSetsNode(XmlElement el) 19 | { 20 | Text = ResNodeName("RuleSets"); 21 | 22 | OptionPanel = new RuleSetsOptionPanel(this); 23 | if (el == null) return; 24 | 25 | XmlNodeList nodes = el.GetElementsByTagName("RuleSet"); 26 | 27 | foreach (XmlElement element in nodes) 28 | { 29 | Nodes.Add(new RuleSetNode(element)); 30 | } 31 | 32 | } 33 | 34 | public override void UpdateNodeText() 35 | { 36 | } 37 | 38 | public override string ToXml() 39 | { 40 | string ret = "\t\n"; 41 | foreach (RuleSetNode node in Nodes) 42 | { 43 | ret += node.ToXml(); 44 | } 45 | ret += "\t\n\n"; 46 | return ret; 47 | } 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /src/NetFocus.Components.AddIns2.0/Conditions/CompareCondition.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Xml; 4 | 5 | using NetFocus.Components.AddIns.Attributes; 6 | 7 | 8 | namespace NetFocus.Components.AddIns.Conditions 9 | { 10 | /// 11 | /// This condition compares two strings using the stringParserService 12 | /// for the two strings to compare. 13 | /// 14 | [ConditionAttribute()] 15 | public class CompareCondition : AbstractCondition 16 | { 17 | [XmlMemberAttribute("string", IsRequired=true)] 18 | string s1; 19 | 20 | [XmlMemberAttribute("equals", IsRequired=true)] 21 | string s2; 22 | 23 | /// 24 | /// Returns the first string to compare. 25 | /// 26 | public string String1 { 27 | get { 28 | return s1; 29 | } 30 | set { 31 | s1 = value; 32 | } 33 | } 34 | 35 | /// 36 | /// Returns the second string to compare. 37 | /// 38 | public string String2 { 39 | get { 40 | return s2; 41 | } 42 | set { 43 | s2 = value; 44 | } 45 | } 46 | 47 | /// 48 | /// Returns true, if both stringParserService expanded 49 | /// strings are equal. 50 | /// 51 | public override bool IsValid(object owner) 52 | { 53 | return s1 == s2; 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/Top/Gui/OptionPanels/HighlightingEditorPanel/Nodes/KeywordListsNode.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Windows.Forms; 4 | using System.Drawing; 5 | using System.Xml; 6 | 7 | using NetFocus.DataStructure.TextEditor.Document; 8 | using NetFocus.DataStructure.Services; 9 | using NetFocus.DataStructure.Properties; 10 | using NetFocus.DataStructure.Gui.Dialogs; 11 | using NetFocus.DataStructure.Gui.OptionPanels.HighlightingEditor.Panels; 12 | 13 | namespace NetFocus.DataStructure.Gui.OptionPanels.HighlightingEditor.Nodes 14 | { 15 | 16 | class KeywordListsNode : AbstractNode 17 | { 18 | public KeywordListsNode(XmlElement el) 19 | { 20 | Text = ResNodeName("KeywordLists"); 21 | OptionPanel = new KeywordListsOptionPanel(this); 22 | 23 | if (el == null) return; 24 | 25 | XmlNodeList nodes = el.GetElementsByTagName("KeyWords"); 26 | if (nodes == null) return; 27 | 28 | foreach (XmlElement el2 in nodes) 29 | { 30 | Nodes.Add(new KeywordListNode(el2)); 31 | } 32 | 33 | } 34 | 35 | public override void UpdateNodeText() 36 | { 37 | } 38 | 39 | public override string ToXml() 40 | { 41 | string ret = ""; 42 | foreach (KeywordListNode node in Nodes) 43 | { 44 | ret += node.ToXml(); 45 | } 46 | return ret; 47 | } 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /src/Top/Gui/OptionPanels/HighlightingEditorPanel/Nodes/MarkersNode.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Windows.Forms; 4 | using System.Drawing; 5 | using System.Xml; 6 | 7 | using NetFocus.DataStructure.TextEditor.Document; 8 | using NetFocus.DataStructure.Services; 9 | using NetFocus.DataStructure.Properties; 10 | using NetFocus.DataStructure.Gui.Dialogs; 11 | using NetFocus.DataStructure.Gui.OptionPanels.HighlightingEditor.Panels; 12 | 13 | namespace NetFocus.DataStructure.Gui.OptionPanels.HighlightingEditor.Nodes 14 | { 15 | 16 | class MarkersNode : AbstractNode 17 | { 18 | public MarkersNode(XmlElement el, bool prev) 19 | { 20 | Text = ResNodeName(prev ? "MarkPreviousWord" : "MarkNextWord"); 21 | 22 | OptionPanel = new MarkersOptionPanel(this, prev); 23 | if (el == null) return; 24 | 25 | XmlNodeList nodes = el.GetElementsByTagName(prev ? "MarkPrevious" : "MarkFollowing"); 26 | 27 | foreach (XmlElement el2 in nodes) 28 | { 29 | Nodes.Add(new MarkerNode(el2, prev)); 30 | } 31 | 32 | } 33 | 34 | public override void UpdateNodeText() 35 | { 36 | } 37 | 38 | public override string ToXml() 39 | { 40 | string ret = ""; 41 | foreach (MarkerNode node in Nodes) 42 | { 43 | ret += node.ToXml(); 44 | } 45 | return ret; 46 | } 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /src/Top/Gui/OptionPanels/HighlightingEditorPanel/Nodes/AbstractNode.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Windows.Forms; 4 | using System.Drawing; 5 | using System.Xml; 6 | using NetFocus.DataStructure.TextEditor.Document; 7 | using NetFocus.DataStructure.Services; 8 | using NetFocus.DataStructure.Gui.OptionPanels.HighlightingEditor.Panels; 9 | 10 | namespace NetFocus.DataStructure.Gui.OptionPanels.HighlightingEditor.Nodes 11 | { 12 | public abstract class AbstractNode : TreeNode 13 | { 14 | NodeOptionPanel optionPanel; 15 | 16 | ResourceService resourceService = (ResourceService)ServiceManager.Services.GetService(typeof(ResourceService)); 17 | 18 | public string ResNodeName(string resName) 19 | { 20 | try { 21 | return resourceService.GetString("Dialog.HighlightingEditor.TreeView." + resName); 22 | } catch { 23 | return resName; 24 | } 25 | } 26 | 27 | public NodeOptionPanel OptionPanel { 28 | get { 29 | return optionPanel; 30 | } 31 | set{ 32 | optionPanel = value; 33 | } 34 | } 35 | 36 | public abstract void UpdateNodeText(); 37 | 38 | public virtual string ToXml() 39 | { 40 | return ""; 41 | } 42 | 43 | 44 | public static string ReplaceXmlChars(string str) 45 | { 46 | return str.Replace("&", "&").Replace("<", "<").Replace(">", ">"); 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/TextEditor/Document/Strategies/TextMarkerStrategy/TextMarker.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Drawing; 4 | using System.Diagnostics; 5 | using System.Collections; 6 | 7 | namespace NetFocus.DataStructure.TextEditor.Document 8 | { 9 | public enum TextMarkerType { 10 | SolidBlock, 11 | Underlined, 12 | WaveLine 13 | } 14 | 15 | /// 16 | /// Description of TextMarker. 17 | /// 18 | public class TextMarker : AbstractSegment 19 | { 20 | TextMarkerType textMarkerType; 21 | Color color; 22 | string toolTip = null; 23 | 24 | public TextMarkerType TextMarkerType { 25 | get { 26 | return textMarkerType; 27 | } 28 | } 29 | 30 | public Color Color { 31 | get { 32 | return color; 33 | } 34 | } 35 | 36 | public string ToolTip { 37 | get { 38 | return toolTip; 39 | } 40 | set { 41 | toolTip = value; 42 | } 43 | } 44 | 45 | public TextMarker(int offset, int length, TextMarkerType textMarkerType) : this(offset, length, textMarkerType, Color.Red) 46 | { 47 | } 48 | 49 | public TextMarker(int offset, int length, TextMarkerType textMarkerType, Color color) 50 | { 51 | this.offset = offset; 52 | this.length = length; 53 | this.textMarkerType = textMarkerType; 54 | this.color = color; 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/Top/Commands/WindowCommands.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Collections; 4 | using System.CodeDom.Compiler; 5 | using System.Windows.Forms; 6 | using NetFocus.DataStructure.Properties; 7 | using NetFocus.Components.AddIns.Codons; 8 | using NetFocus.DataStructure.Gui; 9 | using NetFocus.DataStructure.Gui.Dialogs; 10 | 11 | 12 | namespace NetFocus.DataStructure.Commands 13 | { 14 | public class WindowCascade : AbstractMenuCommand 15 | { 16 | public override void Run() 17 | { 18 | ((Form)WorkbenchSingleton.Workbench).LayoutMdi(MdiLayout.Cascade); 19 | } 20 | } 21 | 22 | public class WindowTileHorizontal : AbstractMenuCommand 23 | { 24 | public override void Run() 25 | { 26 | ((Form)WorkbenchSingleton.Workbench).LayoutMdi(MdiLayout.TileHorizontal); 27 | } 28 | } 29 | 30 | public class WindowTileVertical : AbstractMenuCommand 31 | { 32 | public override void Run() 33 | { 34 | ((Form)WorkbenchSingleton.Workbench).LayoutMdi(MdiLayout.TileVertical); 35 | } 36 | } 37 | 38 | public class WindowArrangeIcons : AbstractMenuCommand 39 | { 40 | public override void Run() 41 | { 42 | ((Form)WorkbenchSingleton.Workbench).LayoutMdi(MdiLayout.ArrangeIcons); 43 | } 44 | } 45 | 46 | public class CloseAllWindows : AbstractMenuCommand 47 | { 48 | public override void Run() 49 | { 50 | WorkbenchSingleton.Workbench.CloseViews(); 51 | } 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /data/modes/BAT-Mode.xshd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /src/Top/Gui/Pads/StackPad.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.ComponentModel.Design; 4 | using System.Drawing; 5 | using System.Drawing.Design; 6 | using System.Windows.Forms; 7 | using System.Globalization; 8 | 9 | using NetFocus.DataStructure.Properties; 10 | using NetFocus.DataStructure.Gui; 11 | using NetFocus.DataStructure.Services; 12 | using NetFocus.DataStructure.Internal.Algorithm; 13 | 14 | 15 | namespace NetFocus.DataStructure.Gui.Pads 16 | { 17 | public class StackPad : AbstractPadContent 18 | { 19 | PictureBox userControl = new PictureBox(); 20 | 21 | public override Control Control 22 | { 23 | get 24 | { 25 | return userControl; 26 | } 27 | } 28 | 29 | public override void RedrawContent() 30 | { 31 | OnTitleChanged(null); 32 | OnIconChanged(null); 33 | } 34 | 35 | void userControl_Resize(object sender,EventArgs e) 36 | { 37 | if(AlgorithmManager.Algorithms.CurrentAlgorithm != null) 38 | { 39 | AlgorithmManager.Algorithms.CurrentAlgorithm.UpdateAnimationPad(); 40 | } 41 | else 42 | { 43 | AlgorithmManager.Algorithms.ClearStackPad(); 44 | } 45 | } 46 | 47 | public StackPad() : base("${res:MainWindow.Windows.StackPadLabel}", "Icons.16x16.OpenFolderBitmap") 48 | { 49 | userControl.BackColor = SystemColors.Control; 50 | userControl.Resize += new EventHandler(userControl_Resize); 51 | } 52 | 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/TextEditor/Actions/IEditAction.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Windows.Forms; 4 | 5 | using NetFocus.DataStructure.TextEditor.Document; 6 | 7 | namespace NetFocus.DataStructure.TextEditor.Actions 8 | { 9 | /// 10 | /// To define a new key for the textarea, you must write a class which 11 | /// implements this interface. 12 | /// 13 | public interface IEditAction 14 | { 15 | /// 16 | /// An array of keys on which this edit action occurs. 17 | /// 18 | Keys[] Keys { 19 | get; 20 | set; 21 | } 22 | 23 | /// 24 | /// When the key which is defined per XML is pressed, this method will be launched. 25 | /// 26 | void Execute(TextArea textArea); 27 | } 28 | 29 | /// 30 | /// To define a new key for the textarea, you must write a class which 31 | /// implements this interface. 32 | /// 33 | public abstract class AbstractEditAction : IEditAction 34 | { 35 | Keys[] keys = null; 36 | 37 | /// 38 | /// An array of keys on which this edit action occurs. 39 | /// 40 | public Keys[] Keys { 41 | get { 42 | return keys; 43 | } 44 | set { 45 | keys = value; 46 | } 47 | } 48 | 49 | /// 50 | /// When the key which is defined per XML is pressed, this method will be launched. 51 | /// 52 | public abstract void Execute(TextArea textArea); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/Core/XmlMemberArraryAttribute.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Reflection; 4 | 5 | namespace NetFocus.Components.AddIns.Attributes 6 | { 7 | /// 8 | /// Indicates that field should be treated as a xml attribute for the codon or condition. 9 | /// The field is treated as a array, separated by ',' example : 10 | /// fileextensions = ".cpp,.cc,.C" 11 | /// 12 | [AttributeUsage(AttributeTargets.Field, Inherited=true)] 13 | public class XmlMemberArrayAttribute : Attribute 14 | { 15 | char[] separator = new char[] { ',' }; 16 | string name; 17 | bool isRequired; 18 | 19 | /// 20 | /// Constructs a new instance. 21 | /// 22 | public XmlMemberArrayAttribute(string name) 23 | { 24 | this.name = name; 25 | isRequired = false; 26 | } 27 | 28 | public char[] Separator { 29 | get { 30 | return separator; 31 | } 32 | set { 33 | separator = value; 34 | } 35 | } 36 | 37 | /// 38 | /// The name of the attribute. 39 | /// 40 | public string Name { 41 | get { 42 | return name; 43 | } 44 | set { 45 | name = value; 46 | } 47 | } 48 | 49 | /// 50 | /// returns true if this attribute is required. 51 | /// 52 | public bool IsRequired { 53 | get { 54 | return isRequired; 55 | } 56 | set { 57 | isRequired = value; 58 | } 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/Top/Gui/OptionPanels/HighlightingEditorPanel/Nodes/DigitsNode.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Windows.Forms; 4 | using System.Drawing; 5 | using System.Xml; 6 | 7 | using NetFocus.DataStructure.TextEditor.Document; 8 | using NetFocus.DataStructure.Services; 9 | using NetFocus.DataStructure.Properties; 10 | using NetFocus.DataStructure.Gui.Dialogs; 11 | using NetFocus.DataStructure.Gui.OptionPanels.HighlightingEditor.Panels; 12 | 13 | namespace NetFocus.DataStructure.Gui.OptionPanels.HighlightingEditor.Nodes 14 | { 15 | 16 | class DigitsNode : AbstractNode 17 | { 18 | EditorHighlightColor highlightColor; 19 | 20 | public EditorHighlightColor HighlightColor 21 | { 22 | get 23 | { 24 | return highlightColor; 25 | } 26 | set 27 | { 28 | highlightColor = value; 29 | } 30 | } 31 | 32 | 33 | public DigitsNode(XmlElement el) 34 | { 35 | if (el != null) 36 | { 37 | highlightColor = new EditorHighlightColor(el); 38 | } 39 | else 40 | { 41 | highlightColor = new EditorHighlightColor(); 42 | } 43 | 44 | Text = ResNodeName("DigitsColor"); 45 | 46 | OptionPanel = new DigitsOptionPanel(this); 47 | } 48 | 49 | 50 | public override void UpdateNodeText() 51 | { 52 | } 53 | 54 | 55 | public override string ToXml() 56 | { 57 | return "\t\n\n"; 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/Base/Gui/IPadContent.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Drawing; 3 | using System.Windows.Forms; 4 | 5 | 6 | namespace NetFocus.DataStructure.Gui 7 | { 8 | /// 9 | /// The IPadContent interface is the basic interface to all "tool" windows in DataStructure 10 | /// 11 | public interface IPadContent : IDisposable 12 | { 13 | /// 14 | /// Returns or Set the title of the pad. 15 | /// 16 | string Title { 17 | get; 18 | } 19 | 20 | /// 21 | /// Returns or Set the icon of the pad. May be null, if the pad has no 22 | /// icon defined. 23 | /// 24 | Bitmap Icon { 25 | get; 26 | } 27 | 28 | /// 29 | /// Returns the menu shortcut for the view menu item. 30 | /// 31 | string[] Shortcut 32 | { 33 | get; 34 | set; 35 | } 36 | 37 | /// 38 | /// Returns the Windows.Control for this pad. 39 | /// 40 | Control Control { 41 | get; 42 | } 43 | 44 | /// 45 | /// Re-initializes all components of the pad. Don't call unless 46 | /// you know what you do. 47 | /// 48 | void RedrawContent(); 49 | /// 50 | /// Is called when the title of this pad has changed. 51 | /// 52 | event EventHandler TitleChanged; 53 | /// 54 | /// Is called when the icon of this pad has changed. 55 | /// 56 | event EventHandler IconChanged; 57 | 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/Top/Gui/Dialogs/SplashScreen.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Windows.Forms; 4 | using System.Drawing; 5 | using System.Reflection; 6 | using System.Resources; 7 | 8 | 9 | namespace NetFocus.DataStructure.Gui.Dialogs { 10 | 11 | public class SplashScreenForm : Form 12 | { 13 | static SplashScreenForm splashScreen = new SplashScreenForm(); 14 | static ArrayList requestedFileList = new ArrayList(); 15 | 16 | public static SplashScreenForm SplashScreen { 17 | get { 18 | return splashScreen; 19 | } 20 | } 21 | 22 | private SplashScreenForm() 23 | { 24 | #if !DEBUG 25 | TopMost = true; 26 | #endif 27 | FormBorderStyle = FormBorderStyle.None; 28 | StartPosition = FormStartPosition.CenterScreen; 29 | ShowInTaskbar = false; 30 | Bitmap bitmap = new Bitmap(Assembly.GetEntryAssembly().GetManifestResourceStream("SplashScreen.png")); 31 | Size = bitmap.Size; 32 | BackgroundImage = bitmap; 33 | } 34 | 35 | 36 | public static string[] GetRequestedFileList() 37 | { 38 | return GetStringArray(requestedFileList); 39 | } 40 | 41 | static string[] GetStringArray(ArrayList list) 42 | { 43 | return (string[])list.ToArray(typeof(string)); 44 | } 45 | 46 | public static void SetCommandLineArgs(string[] args) 47 | { 48 | requestedFileList.Clear(); 49 | 50 | foreach (string arg in args) 51 | { 52 | requestedFileList.Add(arg); 53 | } 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/NetFocus.Components.AddIns2.0/Attributes/XmlMemberArraryAttribute.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Reflection; 4 | 5 | namespace NetFocus.Components.AddIns.Attributes 6 | { 7 | /// 8 | /// Indicates that field should be treated as a xml attribute for the codon or condition. 9 | /// The field is treated as a array, separated by ',' example : 10 | /// fileextensions = ".cpp,.cc,.C" 11 | /// 12 | [AttributeUsage(AttributeTargets.Field, Inherited=true)] 13 | public class XmlMemberArrayAttribute : Attribute 14 | { 15 | char[] separator = new char[] { ',' }; 16 | string name; 17 | bool isRequired; 18 | 19 | /// 20 | /// Constructs a new instance. 21 | /// 22 | public XmlMemberArrayAttribute(string name) 23 | { 24 | this.name = name; 25 | isRequired = false; 26 | } 27 | 28 | public char[] Separator { 29 | get { 30 | return separator; 31 | } 32 | set { 33 | separator = value; 34 | } 35 | } 36 | 37 | /// 38 | /// The name of the attribute. 39 | /// 40 | public string Name { 41 | get { 42 | return name; 43 | } 44 | set { 45 | name = value; 46 | } 47 | } 48 | 49 | /// 50 | /// returns true if this attribute is required. 51 | /// 52 | public bool IsRequired { 53 | get { 54 | return isRequired; 55 | } 56 | set { 57 | isRequired = value; 58 | } 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/Base/Internal/Codons/FileFilterCodon.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Reflection; 4 | using System.Windows.Forms; 5 | 6 | using NetFocus.Components.AddIns.Codons; 7 | using NetFocus.Components.AddIns.Attributes; 8 | using NetFocus.DataStructure.Services; 9 | using NetFocus.Components.AddIns.Conditions; 10 | 11 | 12 | namespace NetFocus.DataStructure.AddIns.Codons 13 | { 14 | [Codon("FileFilter")] 15 | public class FileFilterCodon : AbstractCodon 16 | { 17 | [XmlMemberAttribute("name", IsRequired=true)] 18 | string filtername = null; 19 | 20 | [XmlMemberArrayAttribute("extensions", IsRequired=true)] 21 | string[] extensions = null; 22 | 23 | public string FilterName { 24 | get { 25 | return filtername; 26 | } 27 | set { 28 | filtername = value; 29 | } 30 | } 31 | 32 | public string[] Extensions { 33 | get { 34 | return extensions; 35 | } 36 | set { 37 | extensions = value; 38 | } 39 | } 40 | 41 | public override object BuildItem(object owner, ArrayList subItems, ConditionCollection conditions) 42 | { 43 | if (subItems.Count > 0) { 44 | throw new ApplicationException("more than one level of file filters don't make sense!"); 45 | } 46 | StringParserService stringParserService = (StringParserService)ServiceManager.Services.GetService(typeof(StringParserService)); 47 | 48 | return stringParserService.Parse(filtername) + "|" + String.Join(";", extensions); 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /data/resources/panels/HighlightingEditor/OptionPanel.xfrm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /src/Top/Commands/ToolsCommands.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Collections; 4 | using System.CodeDom.Compiler; 5 | using System.Windows.Forms; 6 | 7 | using NetFocus.DataStructure.Services; 8 | using NetFocus.Components.AddIns; 9 | using NetFocus.DataStructure.Properties; 10 | using NetFocus.Components.AddIns.Codons; 11 | 12 | using NetFocus.DataStructure.Gui; 13 | using NetFocus.DataStructure.Gui.Dialogs; 14 | 15 | namespace NetFocus.DataStructure.Commands 16 | { 17 | public class OptionsCommand : AbstractMenuCommand 18 | { 19 | public override void Run() 20 | { 21 | PropertyService propertyService = (PropertyService)ServiceManager.Services.GetService(typeof(PropertyService)); 22 | IProperties proterties = (IProperties)propertyService.GetProperty("NetFocus.DataStructure.TextEditor.Document.DefaultDocumentProperties", new DefaultProperties()); 23 | IAddInTreeNode treeNode = AddInTreeSingleton.AddInTree.GetTreeNode("/DataStructure/Dialogs/OptionsDialog"); 24 | using (TreeViewOptions optionsDialog = new TreeViewOptions(proterties,treeNode)) { 25 | optionsDialog.FormBorderStyle = FormBorderStyle.FixedDialog; 26 | 27 | optionsDialog.Owner = (Form)WorkbenchSingleton.Workbench; 28 | optionsDialog.ShowDialog(); 29 | } 30 | } 31 | } 32 | 33 | public class ToggleFullscreenCommand : AbstractMenuCommand 34 | { 35 | public override void Run() 36 | { 37 | ((DefaultWorkbench)WorkbenchSingleton.Workbench).FullScreen = !((DefaultWorkbench)WorkbenchSingleton.Workbench).FullScreen; 38 | } 39 | } 40 | 41 | 42 | } 43 | -------------------------------------------------------------------------------- /src/TextEditor/Document/SelectionManager/ColumnRange.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Drawing; 4 | using System.Collections; 5 | using System.Text; 6 | using NetFocus.DataStructure.TextEditor.Undo; 7 | 8 | 9 | namespace NetFocus.DataStructure.TextEditor.Document 10 | { 11 | public class ColumnRange 12 | { 13 | public static readonly ColumnRange NoColumn = new ColumnRange(-2, -2); 14 | public static readonly ColumnRange WholeColumn = new ColumnRange(-1, -1); 15 | 16 | int startColumn; 17 | int endColumn; 18 | 19 | public int StartColumn { 20 | get { 21 | return startColumn; 22 | } 23 | set { 24 | startColumn = value; 25 | } 26 | } 27 | 28 | public int EndColumn { 29 | get { 30 | return endColumn; 31 | } 32 | set { 33 | endColumn = value; 34 | } 35 | } 36 | 37 | 38 | public ColumnRange(int startColumn, int endColumn) 39 | { 40 | this.startColumn = startColumn; 41 | this.endColumn = endColumn; 42 | 43 | } 44 | 45 | 46 | public override int GetHashCode() 47 | { 48 | return startColumn + (endColumn << 16); 49 | } 50 | 51 | public override bool Equals(object obj) 52 | { 53 | if (obj is ColumnRange) { 54 | return ((ColumnRange)obj).startColumn == startColumn && 55 | ((ColumnRange)obj).endColumn == endColumn; 56 | 57 | } 58 | return false; 59 | } 60 | 61 | public override string ToString() 62 | { 63 | return String.Format("[ColumnRange: StartColumn={0}, EndColumn={1}]", startColumn, endColumn); 64 | } 65 | 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /src/Core/IAddInTreeNode.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Collections; 4 | using System.Collections.Specialized; 5 | using System.IO; 6 | using System.Reflection; 7 | using System.Xml; 8 | 9 | using NetFocus.Components.AddIns.Codons; 10 | 11 | namespace NetFocus.Components.AddIns 12 | { 13 | /// 14 | /// This interface represents a tree node in the 15 | /// 16 | public interface IAddInTreeNode 17 | { 18 | /// 19 | /// A hash table containing the child nodes. Where the key is the 20 | /// node name and the value is a object. 21 | /// 22 | Hashtable ChildNodes { 23 | get; 24 | } 25 | 26 | /// 27 | /// A codon defined in this node, or null if no codon 28 | /// was defined. 29 | /// 30 | ICodon Codon { 31 | get; 32 | } 33 | 34 | /// 35 | /// Builds all child items of this node using the BuildItem 36 | /// method of each codon in the child tree. 37 | /// 38 | /// 39 | /// An ArrayList that contains the build sub items that 40 | /// this node contains 41 | /// 42 | ArrayList BuildChildItems(object caller); 43 | 44 | /// 45 | /// Builds one child item of this node using the BuildItem 46 | /// method of the codon in the child tree. The sub item with the ID 47 | /// childItemID will be build. 48 | /// 49 | object BuildChildItem(string childItemID, object caller); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/Top/Gui/OptionPanels/HighlightingEditorPanel/NodePanels/SchemeOptionPanel.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Windows.Forms; 4 | using System.Drawing; 5 | using System.Collections; 6 | using System.Xml; 7 | using System.Xml.Schema; 8 | using NetFocus.DataStructure.Gui.OptionPanels.HighlightingEditor.Nodes; 9 | 10 | namespace NetFocus.DataStructure.Gui.OptionPanels.HighlightingEditor.Panels 11 | { 12 | class SchemeOptionPanel : NodeOptionPanel 13 | { 14 | private System.Windows.Forms.TextBox extBox; 15 | private System.Windows.Forms.TextBox nameBox; 16 | 17 | public SchemeOptionPanel(SchemeNode parent) : base(parent) 18 | { 19 | SetupFromXmlFile(System.IO.Path.Combine(PropertyService.DataDirectory, 20 | @"resources\panels\HighlightingEditor\Scheme.xfrm")); 21 | nameBox = (TextBox)ControlDictionary["nameBox"]; 22 | extBox = (TextBox)ControlDictionary["extBox"]; 23 | } 24 | 25 | public override void StoreSettings() 26 | { 27 | SchemeNode node = (SchemeNode)parentNode; 28 | node.Name = nameBox.Text; 29 | node.Extensions = extBox.Text.Split(';'); 30 | } 31 | 32 | public override void LoadSettings() 33 | { 34 | SchemeNode node = (SchemeNode)parentNode; 35 | nameBox.Text = node.Name; 36 | extBox.Text = String.Join(";", node.Extensions); 37 | } 38 | 39 | public override bool ValidateSettings() 40 | { 41 | if (nameBox.Text == "") { 42 | ValidationMessage("${res:Dialog.HighlightingEditor.Scheme.NameEmpty}"); 43 | return false; 44 | } 45 | 46 | return true; 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/Top/Gui/OptionPanels/HighlightingEditorPanel/Nodes/PropertiesNode.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Windows.Forms; 4 | using System.Drawing; 5 | using System.Xml; 6 | 7 | using NetFocus.DataStructure.TextEditor.Document; 8 | using NetFocus.DataStructure.Services; 9 | using NetFocus.DataStructure.Properties; 10 | using NetFocus.DataStructure.Gui.Dialogs; 11 | using NetFocus.DataStructure.Gui.OptionPanels.HighlightingEditor.Panels; 12 | 13 | namespace NetFocus.DataStructure.Gui.OptionPanels.HighlightingEditor.Nodes 14 | { 15 | 16 | class PropertiesNode : AbstractNode 17 | { 18 | public Hashtable Properties = new Hashtable(); 19 | 20 | public PropertiesNode(XmlElement el) 21 | { 22 | Text = ResNodeName("Properties"); 23 | OptionPanel = new PropertiesOptionPanel(this); 24 | 25 | if (el == null) return; 26 | 27 | foreach (XmlElement el2 in el.ChildNodes) 28 | { 29 | if (el2.Attributes["name"] == null || el2.Attributes["value"] == null) continue; 30 | Properties.Add(el2.Attributes["name"].InnerText, el2.Attributes["value"].InnerText); 31 | } 32 | 33 | } 34 | 35 | public override void UpdateNodeText() 36 | { 37 | } 38 | 39 | public override string ToXml() 40 | { 41 | string ret = "\t\n"; 42 | foreach (DictionaryEntry de in Properties) 43 | { 44 | ret += "\t\t\n"; 46 | } 47 | ret += "\t\n\n"; 48 | return ret; 49 | } 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /src/TextEditor/Document/DocumentFactory.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.IO; 4 | using System.Threading; 5 | 6 | 7 | namespace NetFocus.DataStructure.TextEditor.Document 8 | { 9 | public class DocumentFactory 10 | { 11 | /// 12 | /// Creates a new object. 13 | /// 14 | public IDocument CreateDefaultDocument() 15 | { 16 | DefaultDocument doc = new DefaultDocument(); 17 | doc.TextBufferStrategy = new GapTextBufferStrategy(); 18 | //doc.TextBufferStrategy = new StringTextBufferStrategy(); 19 | doc.FormattingStrategy = new DefaultFormattingStrategy(); 20 | doc.LineManager = new DefaultLineManager(doc, null);//因为这里是创建默认的文档,所以还不知道要什么样的高亮度显示策略.所以这里用null作为参数. 21 | doc.FoldingManager = new FoldingManager(doc, doc.LineManager); 22 | doc.FoldingManager.FoldingStrategy = new ParserFoldingStrategy(); 23 | doc.TextMarkerStrategy = new TextMarkerStrategy(doc); 24 | doc.BookmarkManager = new BookmarkManager(doc.LineManager); 25 | return doc; 26 | } 27 | 28 | /// 29 | /// Creates a new document from the given file 30 | /// 31 | public IDocument CreateFromFile(string fileName) 32 | { 33 | //先创建一个默认的文档,然后读取文件的内容到该文档对象中,最后返回该文档对象. 34 | IDocument document = CreateDefaultDocument(); 35 | StreamReader stream = new StreamReader(fileName, System.Text.Encoding.GetEncoding(Thread.CurrentThread.CurrentCulture.TextInfo.ANSICodePage)); 36 | document.TextContent = stream.ReadToEnd(); 37 | stream.Close(); 38 | return document; 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/Top/Gui/Pads/PropertyPad.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Collections; 4 | using System.ComponentModel.Design; 5 | using System.Drawing; 6 | using System.Drawing.Design; 7 | using System.Windows.Forms; 8 | 9 | using NetFocus.DataStructure.Properties; 10 | using NetFocus.DataStructure.Gui; 11 | using NetFocus.DataStructure.Services; 12 | using NetFocus.DataStructure.Internal.Algorithm; 13 | 14 | namespace NetFocus.DataStructure.Gui.Pads 15 | { 16 | public class PropertyPad : AbstractPadContent 17 | { 18 | static PropertyGrid grid = null; 19 | static string title = ((ResourceService)ServiceManager.Services.GetService(typeof(ResourceService))).GetString("MainWindow.Windows.PropertiesScoutLabel"); 20 | 21 | public override Control Control 22 | { 23 | get { 24 | return grid; 25 | } 26 | } 27 | 28 | 29 | void PropertyChanged(object sender, PropertyValueChangedEventArgs e) 30 | { 31 | AlgorithmManager.Algorithms.CurrentAlgorithm.UpdateGraphAppearance(); 32 | IPadContent animationPad = WorkbenchSingleton.Workbench.GetPad(typeof(AnimationPad)); 33 | AlgorithmManager.Algorithms.CurrentAlgorithm.UpdateAnimationPad(); 34 | } 35 | 36 | 37 | public PropertyPad() : base(title,"Icons.16x16.PropertiesIcon") 38 | { 39 | grid = new PropertyGrid(); 40 | grid.PropertyValueChanged += new PropertyValueChangedEventHandler(PropertyChanged); 41 | grid.ToolbarVisible = false; 42 | grid.PropertySort = PropertySort.Alphabetical; 43 | grid.ViewForeColor = Color.Navy; 44 | grid.HelpForeColor = Color.Navy; 45 | } 46 | 47 | 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/Base/Internal/Services/ViewTypeService.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Xml; 3 | using System.IO; 4 | using System.Collections; 5 | using System.Reflection; 6 | using System.CodeDom.Compiler; 7 | using System.Windows.Forms; 8 | 9 | using NetFocus.Components.AddIns; 10 | using NetFocus.DataStructure.AddIns.Codons; 11 | using NetFocus.DataStructure.Gui; 12 | 13 | namespace NetFocus.DataStructure.Services 14 | { 15 | /// 16 | /// This class handles the installed view types 17 | /// and provides a simple access point to these viewTypes. 18 | /// 19 | public class ViewTypeService : AbstractService 20 | { 21 | readonly static string viewTypesPath = "/DataStructure/Workbench/ViewTypes"; 22 | IViewType[] viewTypes = null; 23 | 24 | public ViewTypeService() 25 | { 26 | //first,get all the displayBinding condons 27 | viewTypes = (IViewType[])AddInTreeSingleton.AddInTree.GetTreeNode(viewTypesPath).BuildChildItems(this).ToArray(typeof(IViewType)); 28 | } 29 | 30 | 31 | public IViewType GetViewTypePerFileName(string filename) 32 | { 33 | foreach (IViewType viewType in viewTypes) 34 | { 35 | if (viewType.CanCreateContentForFile(filename)) 36 | { 37 | return viewType; 38 | } 39 | } 40 | return null; 41 | } 42 | 43 | 44 | public IViewType GetViewTypePerLanguageName(string languagename) 45 | { 46 | foreach (IViewType viewType in viewTypes) 47 | { 48 | if (viewType.CanCreateContentForLanguage(languagename)) 49 | { 50 | return viewType; 51 | } 52 | } 53 | return null; 54 | } 55 | 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/Base/Internal/Services/IMessageService.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.IO; 4 | using System.Windows.Forms; 5 | using System.Collections; 6 | using System.Threading; 7 | using System.Resources; 8 | using System.Drawing; 9 | using System.Diagnostics; 10 | using System.Reflection; 11 | using System.Xml; 12 | 13 | 14 | namespace NetFocus.DataStructure.Services 15 | { 16 | /// 17 | /// This interface must be implemented by all services. 18 | /// 19 | public interface IMessageService 20 | { 21 | void ShowError(Exception ex); 22 | void ShowError(string message); 23 | void ShowError(Exception ex, string message); 24 | void ShowErrorFormatted(string formatstring, params string[] formatitems); 25 | 26 | void ShowWarning(string message); 27 | void ShowWarningFormatted(string formatstring, params string[] formatitems); 28 | 29 | void ShowMessage(string message); 30 | void ShowMessage(string message, string caption); 31 | void ShowMessageFormatted(string formatstring, params string[] formatitems); 32 | void ShowMessageFormatted(string caption, string formatstring, params string[] formatitems); 33 | 34 | bool AskQuestion(string question); 35 | bool AskQuestionFormatted(string formatstring, params string[] formatitems); 36 | bool AskQuestion(string question, string caption); 37 | bool AskQuestionFormatted(string caption, string formatstring, params string[] formatitems); 38 | 39 | /// 40 | /// returns the number of the chosen button 41 | /// 42 | int ShowCustomDialog(string caption, string dialogText,params string[] buttontexts); 43 | 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/Top/Gui/XmlForms/DefaultObjectCreator.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Xml; 4 | using System.Collections; 5 | using System.Drawing; 6 | using System.Reflection; 7 | using System.Windows.Forms; 8 | 9 | namespace NetFocus.DataStructure.Gui.XmlForms { 10 | 11 | /// 12 | /// Default implementation of the IObjectCreator interface. 13 | /// 14 | public class DefaultObjectCreator : IObjectCreator 15 | { 16 | public virtual object CreateObject(string name) 17 | { 18 | try { 19 | // try to create System.Windows.Forms.* objects 20 | object newObject = typeof(Control).Assembly.CreateInstance(name); 21 | 22 | // try to create System.Drawing.* objects 23 | if (newObject == null) { 24 | newObject = typeof(Point).Assembly.CreateInstance(name); 25 | } 26 | 27 | // try to create System.* objects 28 | if (newObject == null) { 29 | newObject = typeof(String).Assembly.CreateInstance(name); 30 | } 31 | 32 | // try to create the object from some assembly which is currently 33 | // loaded by the running application. 34 | if (newObject == null) { 35 | Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies(); 36 | 37 | foreach (Assembly assembly in assemblies) { 38 | newObject = assembly.CreateInstance(name); 39 | if (newObject != null) { 40 | break; 41 | } 42 | } 43 | } 44 | 45 | if (newObject is Control) { 46 | ((Control)newObject).SuspendLayout(); 47 | } 48 | 49 | return newObject; 50 | } catch (Exception) { 51 | return null; 52 | } 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/Core/ICodon.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Collections; 4 | using System.Reflection; 5 | using System.Xml; 6 | 7 | 8 | namespace NetFocus.Components.AddIns.Codons 9 | { 10 | /// 11 | /// The ICodon interface describes the basic funcionality 12 | /// a codon must have. 13 | /// 14 | public interface ICodon 15 | { 16 | /// 17 | /// returns the add-in in which this codon object was declared 18 | /// 19 | AddIn AddIn { 20 | get; 21 | set; 22 | } 23 | 24 | /// 25 | /// returns the name of the xml node of this codon. (it is the same 26 | /// for each codon type) 27 | /// 28 | string Name { 29 | get; 30 | } 31 | 32 | /// 33 | /// returns the ID of this codon object. 34 | /// 35 | string ID { 36 | get; 37 | } 38 | 39 | /// 40 | /// returns the Class which is used in the action corresponding to 41 | /// this codon (may return null, if no action for this codon is 42 | /// given) 43 | /// 44 | string Class { 45 | get; 46 | } 47 | 48 | /// 49 | /// Insert this codon after the codons defined in this string array 50 | /// 51 | string[] InsertAfter { 52 | get; 53 | set; 54 | } 55 | 56 | /// 57 | /// Insert this codon before the codons defined in this string array 58 | /// 59 | string[] InsertBefore { 60 | get; 61 | } 62 | 63 | /// 64 | /// Creates an item with the specified sub items and the current 65 | /// Condition status for this item. 66 | /// 67 | object BuildItem(object owner, ArrayList subItems); 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /src/Top/Internal/Codons/DialogPanelCodon.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Collections; 4 | using System.Reflection; 5 | using NetFocus.Components.AddIns.Attributes; 6 | using NetFocus.Components.AddIns.Codons; 7 | using NetFocus.DataStructure.Services; 8 | using NetFocus.DataStructure.Gui.Dialogs.OptionPanels; 9 | using NetFocus.Components.AddIns.Conditions; 10 | 11 | namespace NetFocus.DataStructure.AddIns.Codons 12 | { 13 | [Codon("DialogPanel")] 14 | public class DialogPanelCodon : AbstractCodon 15 | { 16 | [XmlMemberAttribute("label", IsRequired=true)] 17 | string label = null; 18 | 19 | public string Label { 20 | get { 21 | return label; 22 | } 23 | set { 24 | label = value; 25 | } 26 | } 27 | 28 | /// 29 | /// Creates an item with the specified sub items. And the current 30 | /// Condition status for this item. 31 | /// 32 | public override object BuildItem(object owner, ArrayList subItems, ConditionCollection conditions) 33 | { 34 | IDialogPanelDescriptor newItem = null; 35 | StringParserService stringParserService = (StringParserService)ServiceManager.Services.GetService(typeof(StringParserService)); 36 | 37 | if (subItems == null || subItems.Count == 0) { 38 | if (Class != null) { 39 | newItem = new DefaultDialogPanelDescriptor(ID, stringParserService.Parse(Label), (IDialogPanel)AddIn.CreateObject(Class)); 40 | } else { 41 | newItem = new DefaultDialogPanelDescriptor(ID, stringParserService.Parse(Label)); 42 | } 43 | } else { 44 | newItem = new DefaultDialogPanelDescriptor(ID, stringParserService.Parse(Label), subItems); 45 | } 46 | return newItem; 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/Base/Internal/Codons/IconCodon.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Collections; 4 | using System.Reflection; 5 | using System.Windows.Forms; 6 | 7 | using NetFocus.Components.AddIns.Codons; 8 | using NetFocus.Components.AddIns.Attributes; 9 | using NetFocus.Components.AddIns.Conditions; 10 | 11 | namespace NetFocus.DataStructure.AddIns.Codons 12 | { 13 | [Codon("Icon")] 14 | public class IconCodon : AbstractCodon 15 | { 16 | [PathAttribute()] 17 | [XmlMemberAttribute("location")] 18 | string location = null; 19 | 20 | [XmlMemberAttributeAttribute("language")] 21 | string language = null; 22 | 23 | [XmlMemberAttributeAttribute("resource")] 24 | string resource = null; 25 | 26 | [XmlMemberArrayAttribute("extensions")] 27 | string[] extensions = null; 28 | 29 | 30 | public string Language { 31 | get { 32 | return language; 33 | } 34 | set { 35 | language = value; 36 | } 37 | } 38 | 39 | public string Location { 40 | get { 41 | return location; 42 | } 43 | set { 44 | location = value; 45 | } 46 | } 47 | 48 | public string Resource 49 | { 50 | get 51 | { 52 | return resource; 53 | } 54 | set 55 | { 56 | resource = value; 57 | } 58 | } 59 | 60 | public string[] Extensions { 61 | get { 62 | return extensions; 63 | } 64 | set { 65 | extensions = value; 66 | } 67 | } 68 | 69 | public override object BuildItem(object owner, ArrayList subItems, ConditionCollection conditions) 70 | { 71 | if (subItems.Count > 0) { 72 | throw new ApplicationException("more than one level of icons don't make sense!"); 73 | } 74 | 75 | return this; 76 | } 77 | 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /src/Top/Gui/OptionPanels/DefaultDialogPanelDescriptor.cs: -------------------------------------------------------------------------------- 1 | 2 | 3 | using System; 4 | using System.Collections; 5 | using System.CodeDom.Compiler; 6 | 7 | using NetFocus.Components.AddIns; 8 | using NetFocus.Components.AddIns.Codons; 9 | 10 | using NetFocus.DataStructure.Properties; 11 | 12 | 13 | namespace NetFocus.DataStructure.Gui.Dialogs.OptionPanels 14 | { 15 | public class DefaultDialogPanelDescriptor : IDialogPanelDescriptor 16 | { 17 | string id = String.Empty; 18 | string label = String.Empty; 19 | ArrayList dialogPanelDescriptors = null; 20 | IDialogPanel dialogPanel = null; 21 | 22 | public string ID { 23 | get { 24 | return id; 25 | } 26 | } 27 | 28 | public string Label { 29 | get { 30 | return label; 31 | } 32 | set { 33 | label = value; 34 | } 35 | } 36 | 37 | public ArrayList DialogPanelDescriptors { 38 | get { 39 | return dialogPanelDescriptors; 40 | } 41 | set { 42 | dialogPanelDescriptors = value; 43 | } 44 | } 45 | 46 | public IDialogPanel DialogPanel { 47 | get { 48 | return dialogPanel; 49 | } 50 | set { 51 | dialogPanel = value; 52 | } 53 | } 54 | 55 | public DefaultDialogPanelDescriptor(string id, string label) 56 | { 57 | this.id = id; 58 | this.label = label; 59 | } 60 | 61 | public DefaultDialogPanelDescriptor(string id, string label, ArrayList dialogPanelDescriptors) : this(id, label) 62 | { 63 | this.dialogPanelDescriptors = dialogPanelDescriptors; 64 | } 65 | 66 | public DefaultDialogPanelDescriptor(string id, string label, IDialogPanel dialogPanel) : this(id, label) 67 | { 68 | this.dialogPanel = dialogPanel; 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /src/TextEditor/Actions/FoldActions.cs: -------------------------------------------------------------------------------- 1 | 2 | using System.Collections; 3 | using System.Drawing; 4 | using System.Windows.Forms; 5 | using System; 6 | 7 | using NetFocus.DataStructure.TextEditor.Document; 8 | 9 | namespace NetFocus.DataStructure.TextEditor.Actions 10 | { 11 | public class ToggleFolding : AbstractEditAction 12 | { 13 | public override void Execute(TextArea textArea) 14 | { 15 | ArrayList foldMarkers = textArea.Document.FoldingManager.GetFoldingsWithStart(textArea.Caret.Line); 16 | foreach (FoldMarker fm in foldMarkers) { 17 | fm.IsFolded = !fm.IsFolded; 18 | } 19 | textArea.Refresh(); 20 | textArea.Document.FoldingManager.NotifyFoldingsChanged(EventArgs.Empty); 21 | } 22 | } 23 | 24 | public class ToggleAllFoldings : AbstractEditAction 25 | { 26 | public override void Execute(TextArea textArea) 27 | { 28 | bool doFold = true; 29 | foreach (FoldMarker fm in textArea.Document.FoldingManager.FoldMarker) { 30 | if (fm.IsFolded) { 31 | doFold = false; 32 | break; 33 | } 34 | } 35 | foreach (FoldMarker fm in textArea.Document.FoldingManager.FoldMarker) { 36 | fm.IsFolded = doFold; 37 | } 38 | textArea.Refresh(); 39 | textArea.Document.FoldingManager.NotifyFoldingsChanged(EventArgs.Empty); 40 | } 41 | } 42 | 43 | public class ShowDefinitionsOnly : AbstractEditAction 44 | { 45 | public override void Execute(TextArea textArea) 46 | { 47 | foreach (FoldMarker fm in textArea.Document.FoldingManager.FoldMarker) { 48 | fm.IsFolded = fm.FoldType == FoldType.MemberBody || fm.FoldType == FoldType.Region; 49 | } 50 | textArea.Refresh(); 51 | textArea.Document.FoldingManager.NotifyFoldingsChanged(EventArgs.Empty); 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/Top/Internal/Codons/AlgorithmCodon.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Diagnostics; 4 | 5 | using NetFocus.DataStructure.Internal.Algorithm; 6 | using NetFocus.Components.AddIns.Attributes; 7 | using NetFocus.Components.AddIns.Codons; 8 | using NetFocus.Components.AddIns.Conditions; 9 | 10 | namespace NetFocus.DataStructure.AddIns.Codons 11 | { 12 | [Codon("Algorithm")] 13 | public class AlgorithmCodon : AbstractCodon 14 | { 15 | [XmlMemberArrayAttribute("codeFiles", IsRequired=true)] 16 | string[] codeFiles = null; 17 | 18 | [XmlMemberArrayAttribute("lastLines", IsRequired=true)] 19 | string[] lastLines; 20 | 21 | int[] lastLines1; 22 | 23 | public string[] CodeFiles { 24 | get{ 25 | return codeFiles; 26 | } 27 | set{ 28 | codeFiles = value; 29 | } 30 | } 31 | public string[] LastLines { 32 | get{ 33 | return lastLines; 34 | } 35 | set{ 36 | lastLines = value; 37 | } 38 | } 39 | void AssignValues() 40 | { 41 | lastLines1 = new int[lastLines.Length]; 42 | for(int i = 0;i < lastLines.Length;i++) 43 | { 44 | lastLines1[i] = Convert.ToInt32(lastLines[i]); 45 | } 46 | } 47 | /// 48 | /// Creates an item with the specified sub items. And the current 49 | /// Condition status for this item. 50 | /// 51 | public override object BuildItem(object owner, ArrayList subItems, ConditionCollection conditions) 52 | { 53 | Debug.Assert(Class != null && Class.Length > 0); 54 | IAlgorithm algorithm = (IAlgorithm)AddIn.CreateObject(Class); 55 | algorithm.CodeFiles = codeFiles; 56 | AssignValues(); 57 | algorithm.LastLines = lastLines1; 58 | return algorithm; 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/Base/Internal/Codons/ToolbarItemCodon.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Reflection; 4 | using System.Windows.Forms; 5 | 6 | using NetFocus.Components.AddIns.Codons; 7 | using NetFocus.Components.AddIns.Attributes; 8 | using NetFocus.Components.AddIns.Conditions; 9 | 10 | namespace NetFocus.DataStructure.AddIns.Codons 11 | { 12 | [Codon("ToolbarItem")] 13 | public class ToolbarItemCodon : AbstractCodon 14 | { 15 | [XmlMemberAttribute("icon")] 16 | string icon = null; 17 | [XmlMemberAttribute("text")] 18 | string text = null; 19 | [XmlMemberAttributeAttribute("tooltip")] 20 | string toolTip = null; 21 | [XmlMemberAttribute("begingroup")] 22 | string beginGroup = null; 23 | 24 | bool enabled = true; 25 | 26 | public string ToolTip 27 | { 28 | get 29 | { 30 | return toolTip; 31 | } 32 | set 33 | { 34 | toolTip = value; 35 | } 36 | } 37 | 38 | public string Icon 39 | { 40 | get 41 | { 42 | return icon; 43 | } 44 | set 45 | { 46 | icon = value; 47 | } 48 | } 49 | public string Text 50 | { 51 | get 52 | { 53 | return text; 54 | } 55 | set 56 | { 57 | text = value; 58 | } 59 | } 60 | public string BeginGroup 61 | { 62 | get 63 | { 64 | return beginGroup; 65 | } 66 | set 67 | { 68 | beginGroup = value; 69 | } 70 | } 71 | 72 | 73 | public bool Enabled 74 | { 75 | get 76 | { 77 | return enabled; 78 | } 79 | set 80 | { 81 | enabled = value; 82 | } 83 | } 84 | public override object BuildItem(object owner, ArrayList subItems, ConditionCollection conditions) 85 | { 86 | return this; 87 | } 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /src/Base/Gui/IDisplayBinding.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.IO; 4 | 5 | namespace NetFocus.DataStructure.Gui 6 | { 7 | /// 8 | /// This class defines the DataStructure display binding interface, it is a factory 9 | /// structure, which creates IViewContents. 10 | /// 11 | public interface IViewType 12 | { 13 | /// 14 | /// This function determines, if this display binding is able to create 15 | /// an IViewContent for the file given by fileName. 16 | /// 17 | /// 18 | /// true, if this display binding is able to create 19 | /// an IViewContent for the file given by fileName. 20 | /// false otherwise 21 | /// 22 | bool CanCreateContentForFile(string fileName); 23 | 24 | /// 25 | /// Creates a new IViewContent object for the file fileName 26 | /// 27 | /// 28 | /// A newly created IViewContent object. 29 | /// 30 | IViewContent CreateContentForFile(string fileName); 31 | 32 | /// 33 | /// This function determines, if this display binding is able to create 34 | /// an IViewContent for the language given by languageName. 35 | /// 36 | /// 37 | /// true, if this display binding is able to create 38 | /// an IViewContent for the language given by languageName. 39 | /// false otherwise 40 | /// 41 | bool CanCreateContentForLanguage(string languageName); 42 | 43 | /// 44 | /// Creates a new IViewContent object for the language given by 45 | /// languageName with the content given by content 46 | /// 47 | /// 48 | /// A newly created IViewContent object. 49 | /// 50 | IViewContent CreateContentForLanguage(string languageName, string content); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/TextEditor/Actions/BookmarkActions.cs: -------------------------------------------------------------------------------- 1 | 2 | using System.Drawing; 3 | using System.Windows.Forms; 4 | using System; 5 | 6 | using NetFocus.DataStructure.TextEditor.Document; 7 | 8 | 9 | namespace NetFocus.DataStructure.TextEditor.Actions 10 | { 11 | public class ToggleBookmark : AbstractEditAction 12 | { 13 | public override void Execute(TextArea textArea) 14 | { 15 | textArea.Document.BookmarkManager.ToggleMarkAt(textArea.Caret.Line); 16 | textArea.Document.RequestUpdate(new TextAreaUpdate(TextAreaUpdateType.SingleLine, textArea.Caret.Line)); 17 | textArea.Document.OnUpdateCommited(); 18 | 19 | } 20 | } 21 | 22 | public class GotoPrevBookmark : AbstractEditAction 23 | { 24 | public override void Execute(TextArea textArea) 25 | { 26 | int lineNumber = textArea.Document.BookmarkManager.GetPrevMark(textArea.Caret.Line); 27 | if (lineNumber >= 0 && lineNumber < textArea.Document.TotalNumberOfLines) { 28 | textArea.Caret.Line = lineNumber; 29 | } 30 | textArea.SelectionManager.ClearSelection(); 31 | } 32 | } 33 | 34 | public class GotoNextBookmark : AbstractEditAction 35 | { 36 | public override void Execute(TextArea textArea) 37 | { 38 | int lineNumber = textArea.Document.BookmarkManager.GetNextMark(textArea.Caret.Line); 39 | if (lineNumber >= 0 && lineNumber < textArea.Document.TotalNumberOfLines) { 40 | textArea.Caret.Line = lineNumber; 41 | } 42 | textArea.SelectionManager.ClearSelection(); 43 | } 44 | } 45 | 46 | public class ClearAllBookmarks : AbstractEditAction 47 | { 48 | public override void Execute(TextArea textArea) 49 | { 50 | textArea.Document.BookmarkManager.Clear(); 51 | textArea.Document.RequestUpdate(new TextAreaUpdate(TextAreaUpdateType.WholeTextArea)); 52 | textArea.Document.OnUpdateCommited(); 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/TextEditor/Others/BrushRegistry.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Windows.Forms; 4 | using System.Collections; 5 | using System.ComponentModel; 6 | using System.Drawing; 7 | using System.Drawing.Drawing2D; 8 | using System.Drawing.Text; 9 | using NetFocus.DataStructure.TextEditor.Document; 10 | 11 | namespace NetFocus.DataStructure.TextEditor 12 | { 13 | /// 14 | /// Contains brushes/pens for the text editor to speed up drawing. Re-Creation of brushes and pens 15 | /// seems too costly. 16 | /// 17 | public class BrushRegistry 18 | { 19 | static Hashtable brushes = new Hashtable(); 20 | static Hashtable pens = new Hashtable(); 21 | static Hashtable dotPens = new Hashtable(); 22 | 23 | public static Brush GetBrush(Color color) 24 | { 25 | if (!brushes.Contains(color)) { 26 | Brush newBrush = new SolidBrush(color); 27 | brushes.Add(color, newBrush); 28 | return newBrush; 29 | } 30 | return brushes[color] as Brush; 31 | } 32 | 33 | public static Pen GetPen(Color color) 34 | { 35 | if (!pens.Contains(color)) { 36 | Pen newPen = new Pen(color); 37 | pens.Add(color, newPen); 38 | return newPen; 39 | } 40 | return pens[color] as Pen; 41 | } 42 | 43 | public static Pen GetDotPen(Color bgColor, Color fgColor) 44 | { 45 | bool containsBgColor = dotPens.Contains(bgColor); 46 | if (!containsBgColor || !((Hashtable)dotPens[bgColor]).Contains(fgColor)) { 47 | if (!containsBgColor) { 48 | dotPens[bgColor] = new Hashtable(); 49 | } 50 | 51 | HatchBrush hb = new HatchBrush(HatchStyle.Percent50, bgColor, fgColor); 52 | Pen newPen = new Pen(hb); 53 | ((Hashtable)dotPens[bgColor])[fgColor] = newPen; 54 | return newPen; 55 | } 56 | return ((Hashtable)dotPens[bgColor])[fgColor] as Pen; 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/Base/Gui/DefaultWorkbench.resx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | text/microsoft-resx 32 | 33 | 34 | 1.0.0.0 35 | 36 | 37 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 38 | 39 | 40 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 41 | 42 | 43 | -------------------------------------------------------------------------------- /src/Top/Gui/Dialogs/InputBox.resx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | text/microsoft-resx 32 | 33 | 34 | 1.0.0.0 35 | 36 | 37 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 38 | 39 | 40 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 41 | 42 | 43 | -------------------------------------------------------------------------------- /src/Top/Gui/Dialogs/SplashScreen.resx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | text/microsoft-resx 32 | 33 | 34 | 1.0.0.0 35 | 36 | 37 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 38 | 39 | 40 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 41 | 42 | 43 | -------------------------------------------------------------------------------- /src/Top/Gui/Dialogs/TreeViewOptions.resx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | text/microsoft-resx 32 | 33 | 34 | 1.0.0.0 35 | 36 | 37 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 38 | 39 | 40 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 41 | 42 | 43 | -------------------------------------------------------------------------------- /src/Top/Gui/Dialogs/CommonAboutDialog.resx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | text/microsoft-resx 32 | 33 | 34 | 1.0.0.0 35 | 36 | 37 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 38 | 39 | 40 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 41 | 42 | 43 | -------------------------------------------------------------------------------- /src/Base/Internal/Services/SaveErrorChooseDialog.resx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | text/microsoft-resx 32 | 33 | 34 | 1.0.0.0 35 | 36 | 37 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 38 | 39 | 40 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 41 | 42 | 43 | -------------------------------------------------------------------------------- /src/Top/Gui/Dialogs/AlgorithmDialogs/InitDataForm.resx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | text/microsoft-resx 32 | 33 | 34 | 1.0.0.0 35 | 36 | 37 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 38 | 39 | 40 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 41 | 42 | 43 | -------------------------------------------------------------------------------- /src/Top/Internal/Algorithms/StatusObjects/StatusItemControl.resx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | text/microsoft-resx 32 | 33 | 34 | 1.0.0.0 35 | 36 | 37 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 38 | 39 | 40 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 41 | 42 | 43 | -------------------------------------------------------------------------------- /src/NetFocus.Components.AddIns2.0/Conditions/ComplexConditions.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Diagnostics; 4 | using System.Xml; 5 | 6 | namespace NetFocus.Components.AddIns.Conditions 7 | { 8 | /// 9 | /// Negates a condition 10 | /// 11 | public class NegatedCondition : AbstractCondition 12 | { 13 | ConditionCollection conditions; 14 | public NegatedCondition(ConditionCollection conditions) 15 | { 16 | this.conditions = conditions; 17 | } 18 | 19 | public override bool IsValid(object owner) 20 | { 21 | System.Diagnostics.Debug.Assert(conditions.Count == 1); 22 | return !conditions[0].IsValid(owner); 23 | } 24 | } 25 | 26 | /// 27 | /// Gives back the and result of two conditions. 28 | /// 29 | public class AndCondition : AbstractCondition 30 | { 31 | ConditionCollection conditions; 32 | public AndCondition(ConditionCollection conditions) 33 | { 34 | this.conditions = conditions; 35 | } 36 | 37 | public override bool IsValid(object owner) 38 | { 39 | System.Diagnostics.Debug.Assert(conditions.Count > 1); 40 | 41 | bool valid = true; 42 | 43 | foreach (ICondition condition in conditions) { 44 | valid &= condition.IsValid(owner); 45 | } 46 | 47 | return valid; 48 | } 49 | } 50 | 51 | /// 52 | /// Gives back the or result of two conditions. 53 | /// 54 | public class OrCondition : AbstractCondition 55 | { 56 | ConditionCollection conditions; 57 | public OrCondition(ConditionCollection conditions) 58 | { 59 | this.conditions = conditions; 60 | } 61 | 62 | public override bool IsValid(object owner) 63 | { 64 | System.Diagnostics.Debug.Assert(conditions.Count > 1); 65 | bool valid = false; 66 | 67 | foreach (ICondition condition in conditions) { 68 | valid |= condition.IsValid(owner); 69 | } 70 | 71 | return valid; 72 | } 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /src/NetFocus.Components.AddIns2.0/Codons/CodonBuilder.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Reflection; 4 | 5 | using NetFocus.Components.AddIns.Exceptions; 6 | using NetFocus.Components.AddIns.Attributes; 7 | 8 | namespace NetFocus.Components.AddIns.Codons 9 | { 10 | /// 11 | /// The condition builder builds a new codon 12 | /// 13 | public class CodonBuilder 14 | { 15 | Assembly assembly; 16 | string className; 17 | string codonType; 18 | 19 | /// 20 | /// Initializes a new CodonBuilder instance with beeing 21 | /// className the name of the condition class and assembly 22 | /// in which the class is defined. 23 | /// 24 | public CodonBuilder(string className, Assembly assembly) 25 | { 26 | this.assembly = assembly; 27 | this.className = className; 28 | 29 | // get codon name from attribute 30 | CodonAttribute codonTypeAttribute = (CodonAttribute)Attribute.GetCustomAttribute(assembly.GetType(ClassName), typeof(CodonAttribute)); 31 | codonType = codonTypeAttribute.Type; 32 | } 33 | 34 | /// 35 | /// Returns the className the name of the condition class; 36 | /// 37 | public string ClassName { 38 | get { 39 | return className; 40 | } 41 | } 42 | 43 | /// 44 | /// Returns the type of the codon 45 | /// 46 | public string CodonType { 47 | get { 48 | return codonType; 49 | } 50 | } 51 | 52 | /// 53 | /// Returns a newly build ICodon object. 54 | /// 55 | public ICodon BuildCodon(AddIn addIn) 56 | { 57 | ICodon codon; 58 | try { 59 | // create instance (ignore case) 60 | codon = (ICodon)assembly.CreateInstance(ClassName, true); 61 | 62 | // set default values 63 | codon.AddIn = addIn; 64 | } catch (Exception) { 65 | codon = null; 66 | } 67 | return codon; 68 | } 69 | 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /src/NetFocus.Components.AddIns2.0/IAddInTreeNode.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Collections; 4 | using System.Collections.Specialized; 5 | using System.IO; 6 | using System.Reflection; 7 | using System.Xml; 8 | 9 | using NetFocus.Components.AddIns.Conditions; 10 | using NetFocus.Components.AddIns.Codons; 11 | 12 | namespace NetFocus.Components.AddIns 13 | { 14 | /// 15 | /// This interface represents a tree node in the 16 | /// 17 | public interface IAddInTreeNode 18 | { 19 | /// 20 | /// A hash table containing the child nodes. Where the key is the 21 | /// node name and the value is a object. 22 | /// 23 | Hashtable ChildNodes { 24 | get; 25 | } 26 | 27 | IAddInTreeNode Parent { get; set; } 28 | 29 | /// 30 | /// A codon defined in this node, or null if no codon 31 | /// was defined. 32 | /// 33 | ICodon Codon { 34 | get; 35 | } 36 | 37 | string Path { get; } 38 | 39 | string GetFullPath(); 40 | 41 | /// 42 | /// All conditions for this TreeNode. 43 | /// 44 | ConditionCollection ConditionCollection { 45 | get; 46 | } 47 | 48 | /// 49 | /// Builds all child items of this node using the BuildItem 50 | /// method of each codon in the child tree. 51 | /// 52 | /// 53 | /// An ArrayList that contains the build sub items that 54 | /// this node contains 55 | /// 56 | ArrayList BuildChildItems(object caller); 57 | /// 58 | /// Builds one child item of this node using the BuildItem 59 | /// method of the codon in the child tree. The sub item with the ID 60 | /// childItemID will be build. 61 | /// 62 | object BuildChildItem(string childItemID, object caller); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /src/Core/IAddInTree.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Collections; 4 | using System.Collections.Specialized; 5 | using System.IO; 6 | using System.Reflection; 7 | using System.Xml; 8 | 9 | using NetFocus.Components.AddIns.Codons; 10 | 11 | namespace NetFocus.Components.AddIns 12 | { 13 | /// 14 | /// This is the basic interface to add-in tree. You can always get 15 | /// a valid IAddInTree object in the 16 | /// class. 17 | /// 18 | public interface IAddInTree 19 | { 20 | /// 21 | /// Returns the default codon factory. ICodon objects 22 | /// are created only with this factory during the tree 23 | /// construction process. 24 | /// 25 | CodonFactory CodonFactory { 26 | get; 27 | } 28 | 29 | /// 30 | /// Returns a collection of all loaded add-ins. 31 | /// 32 | AddInCollection AddIns { 33 | get; 34 | } 35 | 36 | /// 37 | /// Returns a TreeNode corresponding to path. 38 | /// 39 | /// 40 | /// The path. 41 | /// 42 | /// 43 | /// When the path path does not point to a codon 44 | /// in the tree. 45 | /// 46 | IAddInTreeNode GetTreeNode(string path); 47 | 48 | /// 49 | /// Inserts an AddIn into the AddInTree. 50 | /// 51 | void InsertAddIn(AddIn addIn); 52 | 53 | /// 54 | /// Removes an AddIn from the AddInTree. 55 | /// 56 | void RemoveAddIn(AddIn addIn); 57 | 58 | /// 59 | /// This method does load all codons and conditions in the given assembly. 60 | /// It will create builders for them which could be used by the factories 61 | /// to create the codon and condition objects. 62 | /// 63 | Assembly LoadAssembly(string assemblyFile); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /src/Base/Gui/Components/AxStatusBarPanel.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Collections; 4 | using System.Drawing; 5 | using System.Windows.Forms; 6 | 7 | namespace NetFocus.DataStructure.Gui.Components 8 | { 9 | public class AxStatusBarPanel : StatusBarPanel//StatusBar中的一个Panel 10 | { 11 | StringFormat sFormat = new StringFormat(); 12 | 13 | public AxStatusBarPanel() 14 | { 15 | Style = StatusBarPanelStyle.OwnerDraw;//自己绘制. 16 | BorderStyle = StatusBarPanelBorderStyle.None;//不显示边框. 17 | } 18 | 19 | //绘制面板的边框. 20 | protected virtual void DrawBorder(StatusBarDrawItemEventArgs drawEventArgs) 21 | { 22 | drawEventArgs.Graphics.DrawRectangle(SystemPens.ControlDark, 23 | new Rectangle(drawEventArgs.Bounds.X, 24 | drawEventArgs.Bounds.Y, 25 | drawEventArgs.Bounds.Width - 1, 26 | drawEventArgs.Bounds.Height - 1)); 27 | } 28 | 29 | 30 | public virtual void DrawPanel(StatusBarDrawItemEventArgs drawEventArgs) 31 | { 32 | Graphics g = drawEventArgs.Graphics; 33 | switch (Alignment) {//判断文本的对其方式. 34 | case HorizontalAlignment.Left: 35 | sFormat.Alignment = StringAlignment.Near; 36 | break; 37 | case HorizontalAlignment.Center: 38 | sFormat.Alignment = StringAlignment.Center; 39 | break; 40 | case HorizontalAlignment.Right: 41 | sFormat.Alignment = StringAlignment.Far; 42 | break; 43 | } 44 | g.DrawString(Text, 45 | drawEventArgs.Font, 46 | SystemBrushes.ControlText, 47 | drawEventArgs.Bounds, 48 | sFormat); 49 | DrawBorder(drawEventArgs); 50 | } 51 | 52 | 53 | protected override void Dispose(bool disposing) 54 | { 55 | if (disposing) { 56 | sFormat.Dispose(); 57 | } 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/Core/InternalFileService.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Specialized; 4 | using System.IO; 5 | using System.Windows.Forms; 6 | using System.Text; 7 | 8 | namespace NetFocus.Components.AddIns 9 | { 10 | /// 11 | /// this class is used to provide some simple file operation services,like save or searchDirections 12 | /// 13 | public class InternalFileService 14 | { 15 | public string GetDirectoryNameWithSeparator(string directoryName) 16 | { 17 | if (directoryName.EndsWith(Path.DirectorySeparatorChar.ToString())) 18 | { 19 | return directoryName; 20 | } 21 | return directoryName + Path.DirectorySeparatorChar; 22 | } 23 | 24 | 25 | public StringCollection SearchDirectory(string directory, string filemask) 26 | { 27 | return SearchDirectory(directory, filemask, true); 28 | } 29 | 30 | 31 | public StringCollection SearchDirectory(string directory, string filemask, bool searchSubdirectories) 32 | { 33 | StringCollection collection = new StringCollection(); 34 | SearchDirectory(directory, filemask, collection, searchSubdirectories); 35 | return collection; 36 | } 37 | 38 | 39 | void SearchDirectory(string directory, string filemask, StringCollection collection, bool searchSubdirectories) 40 | { 41 | try 42 | { 43 | string[] file = Directory.GetFiles(directory, filemask); 44 | foreach (string f in file) 45 | { 46 | collection.Add(f); 47 | } 48 | 49 | if (searchSubdirectories) 50 | { 51 | string[] dir = Directory.GetDirectories(directory); 52 | foreach (string d in dir) 53 | { 54 | SearchDirectory(d, filemask, collection, searchSubdirectories); 55 | } 56 | } 57 | } 58 | catch (Exception e) 59 | { 60 | MessageBox.Show("Can't access directory " + directory + " reason:\n" + e.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); 61 | } 62 | } 63 | 64 | 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /src/NetFocus.Components.AddIns2.0/InternalFileService.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Specialized; 4 | using System.IO; 5 | using System.Windows.Forms; 6 | using System.Text; 7 | 8 | namespace NetFocus.Components.AddIns 9 | { 10 | /// 11 | /// this class is used to provide some simple file operation services,like save or searchDirections 12 | /// 13 | public class InternalFileService 14 | { 15 | public string GetDirectoryNameWithSeparator(string directoryName) 16 | { 17 | if (directoryName.EndsWith(Path.DirectorySeparatorChar.ToString())) 18 | { 19 | return directoryName; 20 | } 21 | return directoryName + Path.DirectorySeparatorChar; 22 | } 23 | 24 | 25 | public StringCollection SearchDirectory(string directory, string filemask) 26 | { 27 | return SearchDirectory(directory, filemask, true); 28 | } 29 | 30 | 31 | public StringCollection SearchDirectory(string directory, string filemask, bool searchSubdirectories) 32 | { 33 | StringCollection collection = new StringCollection(); 34 | SearchDirectory(directory, filemask, collection, searchSubdirectories); 35 | return collection; 36 | } 37 | 38 | 39 | void SearchDirectory(string directory, string filemask, StringCollection collection, bool searchSubdirectories) 40 | { 41 | try 42 | { 43 | string[] file = Directory.GetFiles(directory, filemask); 44 | foreach (string f in file) 45 | { 46 | collection.Add(f); 47 | } 48 | 49 | if (searchSubdirectories) 50 | { 51 | string[] dir = Directory.GetDirectories(directory); 52 | foreach (string d in dir) 53 | { 54 | SearchDirectory(d, filemask, collection, searchSubdirectories); 55 | } 56 | } 57 | } 58 | catch (Exception e) 59 | { 60 | MessageBox.Show("Can't access directory " + directory + " reason:\n" + e.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); 61 | } 62 | } 63 | 64 | 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /src/Base/Internal/Services/IFileService.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Diagnostics; 4 | using System.IO; 5 | using System.Xml; 6 | 7 | using NetFocus.DataStructure.Gui; 8 | 9 | namespace NetFocus.DataStructure.Services 10 | { 11 | /// 12 | /// This interface describes the basic functions of the 13 | /// DataStructure file service. 14 | /// 15 | public interface IFileService 16 | { 17 | /// 18 | /// gets the RecentOpenMemeto object. 19 | /// 20 | RecentOpenMemeto RecentOpenMemeto { 21 | get; 22 | } 23 | 24 | /// 25 | /// Opens the file fileName in DataStructure (shows the file in 26 | /// the workbench window) 27 | /// 28 | void OpenFile(string fileName); 29 | 30 | /// 31 | /// Opens a new file with a given name, language and file content 32 | /// in the workbench window. 33 | /// 34 | void NewFile(string defaultName, string language, string content); 35 | 36 | /// 37 | /// Gets an opened file by name, returns null, if the file is not open. 38 | /// 39 | IViewContent GetOpenFile(string fileName); 40 | 41 | /// 42 | /// Removes a file physically 43 | /// CAUTION : Use only this file for a remove operation, because it is important 44 | /// to know for other parts of the IDE when a file is removed. 45 | /// 46 | void RemoveFile(string fileName); 47 | 48 | /// 49 | /// Renames a file physically 50 | /// CAUTION : Use only this file for a rename operation, because it is important 51 | /// to know for other parts of the IDE when a file is renamed. 52 | /// 53 | void RenameFile(string oldName, string newName); 54 | 55 | /// 56 | /// Is called, when a file is renamed. 57 | /// 58 | event FileEventHandler FileRenamed; 59 | 60 | /// 61 | /// Is called, when a file is removed. 62 | /// 63 | event FileEventHandler FileRemoved; 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /src/TextEditor/Document/BookmarkManager/IBookMarkManager.cs: -------------------------------------------------------------------------------- 1 | 2 | 3 | using System; 4 | using System.Collections; 5 | 6 | namespace NetFocus.DataStructure.TextEditor.Document 7 | { 8 | /// 9 | /// This class handles the bookmarks for a buffer 10 | /// 11 | public interface IBookMarkManager 12 | { 13 | /// 14 | /// Contains all bookmarks as int values 15 | /// 16 | ArrayList Marks { 17 | get; 18 | } 19 | 20 | /// 21 | /// The lowest mark, if no marks exists it returns -1 22 | /// 23 | int FirstMark { 24 | get; 25 | } 26 | 27 | /// 28 | /// The highest mark, if no marks exists it returns -1 29 | /// 30 | int LastMark { 31 | get; 32 | } 33 | 34 | /// 35 | /// Sets the mark at the line lineNr if it is not set, if the 36 | /// line is already marked the mark is cleared. 37 | /// 38 | void ToggleMarkAt(int lineNr); 39 | 40 | /// 41 | /// Returns true if the line lineNr is marked 42 | /// 43 | bool IsMarked(int lineNr); 44 | 45 | /// 46 | /// Clears all bookmarks 47 | /// 48 | void Clear(); 49 | 50 | /// 51 | /// returns first mark higher than lineNr 52 | /// 53 | /// 54 | /// returns the next mark > cur, if it not exists it returns FirstMark() 55 | /// 56 | int GetNextMark(int lineNr); 57 | 58 | /// 59 | /// returns first mark lower than lineNr 60 | /// 61 | /// 62 | /// returns the next mark lower than cur, if it not exists it returns LastMark() 63 | /// 64 | int GetPrevMark(int lineNr); 65 | 66 | 67 | /// 68 | /// Is fired before the bookmarks change 69 | /// 70 | event EventHandler BeforeChanged; 71 | 72 | /// 73 | /// Is fired after the bookmarks change 74 | /// 75 | event EventHandler Changed; 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /src/NetFocus.Components.AddIns2.0/Codons/ICodon.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Collections; 4 | using System.Reflection; 5 | using System.Xml; 6 | using NetFocus.Components.AddIns.Conditions; 7 | 8 | namespace NetFocus.Components.AddIns.Codons 9 | { 10 | /// 11 | /// The ICodon interface describes the basic funcionality 12 | /// a codon must have. 13 | /// 14 | public interface ICodon 15 | { 16 | /// 17 | /// returns the add-in in which this codon object was declared 18 | /// 19 | AddIn AddIn { 20 | get; 21 | set; 22 | } 23 | 24 | /// 25 | /// returns the type of the xml node of this codon. (it is the same 26 | /// for each codon type) 27 | /// 28 | string CodonType { 29 | get; 30 | } 31 | 32 | /// 33 | /// returns true, if the codon handles the condition status on it's own, if 34 | /// set to false (default) disabled codons are filtered out during build 35 | /// 36 | bool HandleConditions { 37 | get; 38 | } 39 | 40 | /// 41 | /// returns the ID of this codon object. 42 | /// 43 | string ID { 44 | get; 45 | } 46 | 47 | /// 48 | /// returns the Class which is used in the action corresponding to 49 | /// this codon (may return null, if no action for this codon is 50 | /// given) 51 | /// 52 | string Class { 53 | get; 54 | } 55 | 56 | /// 57 | /// Insert this codon after the codons defined in this string array 58 | /// 59 | string[] InsertAfter { 60 | get; 61 | set; 62 | } 63 | 64 | /// 65 | /// Insert this codon before the codons defined in this string array 66 | /// 67 | string[] InsertBefore { 68 | get; 69 | } 70 | 71 | /// 72 | /// Creates an item with the specified sub items and the current 73 | /// Conditions for this item. 74 | /// 75 | object BuildItem(object owner, ArrayList subItems, ConditionCollection conditions); 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /src/Base/Internal/Codons/ToolbarCodon.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Reflection; 4 | using System.Windows.Forms; 5 | 6 | using NetFocus.Components.AddIns.Codons; 7 | using NetFocus.Components.AddIns.Attributes; 8 | using NetFocus.Components.AddIns.Conditions; 9 | 10 | namespace NetFocus.DataStructure.AddIns.Codons 11 | { 12 | [Codon("Toolbar")] 13 | public class ToolbarCodon : AbstractCodon 14 | { 15 | [XmlMemberAttribute("icon")] 16 | string icon = null; 17 | [XmlMemberAttribute("text")] 18 | string text = null; 19 | [XmlMemberAttributeAttribute("tooltip")] 20 | string toolTip = null; 21 | [XmlMemberAttribute("begingroup")] 22 | string beginGroup = null; 23 | 24 | ArrayList subItems = null; 25 | 26 | bool enabled = true; 27 | 28 | public string ToolTip 29 | { 30 | get 31 | { 32 | return toolTip; 33 | } 34 | set 35 | { 36 | toolTip = value; 37 | } 38 | } 39 | 40 | public string Icon 41 | { 42 | get 43 | { 44 | return icon; 45 | } 46 | set 47 | { 48 | icon = value; 49 | } 50 | } 51 | public string Text 52 | { 53 | get 54 | { 55 | return text; 56 | } 57 | set 58 | { 59 | text = value; 60 | } 61 | } 62 | public string BeginGroup 63 | { 64 | get 65 | { 66 | return beginGroup; 67 | } 68 | set 69 | { 70 | beginGroup = value; 71 | } 72 | } 73 | 74 | public ArrayList SubItems 75 | { 76 | get 77 | { 78 | return subItems; 79 | } 80 | set 81 | { 82 | subItems = value; 83 | } 84 | } 85 | 86 | public bool Enabled 87 | { 88 | get 89 | { 90 | return enabled; 91 | } 92 | set 93 | { 94 | enabled = value; 95 | } 96 | } 97 | public override object BuildItem(object owner, ArrayList subItems, ConditionCollection conditions) 98 | { 99 | this.subItems = subItems; 100 | return this; 101 | } 102 | } 103 | } 104 | -------------------------------------------------------------------------------- /src/Base/Internal/Services/DefaultStatusBarService.cs: -------------------------------------------------------------------------------- 1 | 2 | using System; 3 | using System.Diagnostics; 4 | using System.Drawing; 5 | using System.Windows.Forms; 6 | 7 | using NetFocus.DataStructure.Gui.Components; 8 | 9 | 10 | namespace NetFocus.DataStructure.Services 11 | { 12 | public class DefaultStatusBarService : AbstractService, IStatusBarService 13 | { 14 | SdStatusBar statusBar = null; 15 | StringParserService stringParserService = (StringParserService)ServiceManager.Services.GetService(typeof(StringParserService)); 16 | string lastMessage = ""; 17 | 18 | public DefaultStatusBarService() 19 | { 20 | statusBar = new SdStatusBar(this); 21 | } 22 | 23 | 24 | public void Dispose() 25 | { 26 | if (statusBar != null) 27 | { 28 | statusBar.Dispose(); 29 | statusBar = null; 30 | } 31 | } 32 | 33 | 34 | public Control Control 35 | { 36 | get 37 | { 38 | Debug.Assert(statusBar != null); 39 | return statusBar; 40 | } 41 | } 42 | 43 | 44 | public void SetCaretPosition(int x, int y, int charOffset) 45 | { 46 | if(x !=0 && y != 0) 47 | { 48 | statusBar.CursorStatusBarPanel.Text = String.Format("行 {0,-5} 列 {1,-5}", y, x); 49 | } 50 | else 51 | { 52 | statusBar.CursorStatusBarPanel.Text = ""; 53 | } 54 | } 55 | 56 | 57 | public void SetInsertMode(bool insertMode) 58 | { 59 | statusBar.ModeStatusBarPanel.Text = insertMode ? "INS" : "OVR"; 60 | } 61 | 62 | 63 | public void ShowErrorMessage(string message) 64 | { 65 | Debug.Assert(statusBar != null); 66 | statusBar.ShowErrorMessage(stringParserService.Parse(message)); 67 | } 68 | 69 | 70 | public void SetMessage(string message) 71 | { 72 | Debug.Assert(statusBar != null); 73 | lastMessage = message; 74 | statusBar.SetMessage(stringParserService.Parse(message)); 75 | } 76 | 77 | 78 | public void SetMessage(Image image, string message) 79 | { 80 | Debug.Assert(statusBar != null); 81 | statusBar.SetMessage(image, stringParserService.Parse(message)); 82 | } 83 | 84 | 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /src/TextEditor/Document/Strategies/TextBufferStrategy/StringTextBufferStrategy.cs: -------------------------------------------------------------------------------- 1 | 2 | 3 | using System; 4 | using System.IO; 5 | using System.Diagnostics; 6 | using NetFocus.DataStructure.TextEditor.Undo; 7 | 8 | namespace NetFocus.DataStructure.TextEditor.Document 9 | { 10 | /// 11 | /// Simple implementation of the ITextBuffer interface implemented using a 12 | /// string. 13 | /// Only for fall-back purposes. 14 | /// 15 | public class StringTextBufferStrategy : ITextBufferStrategy 16 | { 17 | string storedText = ""; 18 | 19 | public int Length { 20 | get { 21 | return storedText.Length; 22 | } 23 | } 24 | 25 | public void Insert(int offset, string text) 26 | { 27 | if (text != null) { 28 | storedText = storedText.Insert(offset, text); 29 | } 30 | } 31 | 32 | public void Remove(int offset, int length) 33 | { 34 | storedText = storedText.Remove(offset, length); 35 | } 36 | 37 | public void Replace(int offset, int length, string text) 38 | { 39 | Remove(offset, length); 40 | Insert(offset, text); 41 | } 42 | 43 | public string GetText(int offset, int length) 44 | { 45 | if (length == 0) { 46 | return ""; 47 | } 48 | return storedText.Substring(offset, Math.Min(length, storedText.Length - offset)); 49 | } 50 | 51 | public char GetCharAt(int offset) 52 | { 53 | if (offset == Length) { 54 | return '\0'; 55 | } 56 | return storedText[offset]; 57 | } 58 | 59 | public void SetContent(string text) 60 | { 61 | storedText = text; 62 | } 63 | 64 | public StringTextBufferStrategy() 65 | { 66 | } 67 | 68 | StringTextBufferStrategy(string fileName) 69 | { 70 | StreamReader streamReader = File.OpenText(fileName); 71 | SetContent(streamReader.ReadToEnd()); 72 | streamReader.Close(); 73 | } 74 | 75 | public static ITextBufferStrategy CreateTextBufferFromFile(string fileName) 76 | { 77 | if (!File.Exists(fileName)) { 78 | throw new System.IO.FileNotFoundException(fileName); 79 | } 80 | return new StringTextBufferStrategy(fileName); 81 | } 82 | } 83 | } 84 | --------------------------------------------------------------------------------