├── .github
├── dependabot.yml
└── workflows
│ ├── dotnet-desktop-installer.yml
│ └── dotnet-desktop.yml
├── .gitignore
├── CustomControls
├── ComboBoxCustomSearch.cs
├── CustomControls.csproj
├── CustomControls.xml
├── ImageButton.Designer.cs
├── ImageButton.cs
└── ImageButton.resx
├── InstallerBaseWixSharp
├── #APPLICATION#.wxl
├── App.config
├── ApplicationSide
│ └── WaitForProcess.cs
├── Files
│ ├── Dialogs
│ │ ├── AssociationsDialog.Designer.cs
│ │ ├── AssociationsDialog.cs
│ │ ├── AssociationsDialog.resx
│ │ ├── DialogClasses
│ │ │ └── FileAssociation.cs
│ │ ├── ProgressDialog.Designer.cs
│ │ ├── ProgressDialog.cs
│ │ ├── ProgressDialog.resx
│ │ ├── RunProgramDialog.Designer.cs
│ │ ├── RunProgramDialog.cs
│ │ └── RunProgramDialog.resx
│ ├── FileResources
│ │ └── replace_this_ico.ico
│ ├── Localization
│ │ ├── FormDialogSelectLanguage.Designer.cs
│ │ ├── FormDialogSelectLanguage.cs
│ │ ├── FormDialogSelectLanguage.resx
│ │ ├── LocalizationAttribute.cs
│ │ ├── SupportedLanguages.cs
│ │ ├── TabDeliLocalization
│ │ │ ├── TabDeliLocalization.cs
│ │ │ └── tabdeli_messages.txt
│ │ ├── WixUI_en-US.wxl
│ │ └── WixUI_fi-FI.wxl
│ ├── MIT.License.rtf
│ ├── PInvoke
│ │ └── ProcessExtensions.cs
│ ├── Utilities
│ │ ├── ApplicationName.ps1
│ │ └── launch.json
│ ├── install_side.png
│ ├── install_top.png
│ └── replace_this_logo.png
├── InstallerBaseWixSharp.csproj
├── Program.cs
├── ProjectLocalizationHelper.cs
├── Properties
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ └── Resources.resx
├── Registry
│ ├── CommonCalls.cs
│ ├── RegistryFileAssociation.cs
│ └── RegistryStarAssociation.cs
└── nuget-package-logo.ico
├── LICENSE
├── PluginTemplate
├── FodyWeavers.xml
├── FodyWeavers.xsd
├── PluginTemplate.csproj
├── PluginTemplate.licenseheader
├── Properties
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ └── Resources.resx
├── Resources
│ ├── VPKSoft.ico
│ ├── VPKSoftLogo_App.png
│ └── tab_deli_localization.txt
└── SamplePlugin.cs
├── README.md
├── ScriptNotepad.sln
├── ScriptNotepad.sln.DotSettings
├── ScriptNotepad.sln.licenseheader
├── ScriptNotepad
├── App.config
├── Database
│ ├── DirectAccess
│ │ └── CheckFluentMigrator.cs
│ ├── Entity
│ │ ├── Context
│ │ │ └── ScriptNotepadDbContext.cs
│ │ ├── Entities
│ │ │ ├── CodeSnippet.cs
│ │ │ ├── FileContent.cs
│ │ │ ├── FileSave.cs
│ │ │ ├── FileSession.cs
│ │ │ ├── MiscellaneousParameter.cs
│ │ │ ├── MiscellaneousTextEntry.cs
│ │ │ ├── Plugin.cs
│ │ │ ├── RecentFile.cs
│ │ │ ├── SearchAndReplaceHistory.cs
│ │ │ └── SoftwareLicense.cs
│ │ ├── Enumerations
│ │ │ ├── CodeSnippetLanguage.cs
│ │ │ ├── MiscellaneousTextType.cs
│ │ │ ├── ScriptSnippetType.cs
│ │ │ ├── SearchAndReplaceSearchType.cs
│ │ │ └── SearchAndReplaceType.cs
│ │ ├── IEntity.cs
│ │ └── Migrations
│ │ │ ├── 01_InitialMigration.cs
│ │ │ ├── 02_FoldSave.cs
│ │ │ ├── 03_FixEmptySession.cs
│ │ │ └── ExecuteDatabaseMigrate.cs
│ └── Helpers
│ │ └── DatabaseUtilities.cs
├── DialogForms
│ ├── FormDialogQueryEncoding.Designer.cs
│ ├── FormDialogQueryEncoding.cs
│ ├── FormDialogQueryEncoding.resx
│ ├── FormDialogQueryJumpLocation.Designer.cs
│ ├── FormDialogQueryJumpLocation.cs
│ ├── FormDialogQueryJumpLocation.resx
│ ├── FormDialogQueryNumber.Designer.cs
│ ├── FormDialogQueryNumber.cs
│ ├── FormDialogQueryNumber.resx
│ ├── FormDialogRenameNewFile.Designer.cs
│ ├── FormDialogRenameNewFile.cs
│ ├── FormDialogRenameNewFile.resx
│ ├── FormDialogScriptLoad.Designer.cs
│ ├── FormDialogScriptLoad.cs
│ ├── FormDialogScriptLoad.resx
│ ├── FormDialogSelectFileTab.Designer.cs
│ ├── FormDialogSelectFileTab.cs
│ └── FormDialogSelectFileTab.resx
├── Editor
│ ├── EntityHelpers
│ │ ├── DataHolders
│ │ │ ├── DataHolderIndexer.cs
│ │ │ └── FileSaveData.cs
│ │ ├── FileSaveHelper.cs
│ │ ├── FileSessionHelper.cs
│ │ └── RecentFileHelper.cs
│ └── Utility
│ │ ├── AssemblyVersion.cs
│ │ ├── DocumentReload.cs
│ │ └── ModelHelpers
│ │ ├── FileHistoryHelper.cs
│ │ ├── FileSaveHelper.cs
│ │ ├── FileSessionHelper.cs
│ │ ├── MiscellaneousTextEntryHelper.cs
│ │ ├── PluginHelper.cs
│ │ └── SearchAndReplaceHistoryHelper.cs
├── FodyWeavers.xml
├── FodyWeavers.xsd
├── FormHexEdit.Designer.cs
├── FormHexEdit.cs
├── FormHexEdit.resx
├── FormMain.Designer.cs
├── FormMain.cs
├── FormMain.resx
├── Gists
│ └── MessageHelper.cs
├── IOPermission
│ └── FileIOPermission.cs
├── Icons
│ ├── astonished.ico
│ ├── notepad0.ico
│ ├── notepad1.ico
│ ├── notepad2.ico
│ ├── notepad3.ico
│ ├── notepad4.ico
│ ├── notepad5.ico
│ ├── notepad6.ico
│ └── notepad7.ico
├── Installer
│ ├── DotNetChecker.nsh
│ ├── languages.ico
│ ├── license.txt
│ ├── make_installer.bat
│ ├── setup_scriptnotepad.nsi
│ └── un_icon.ico
├── Localization
│ ├── ExternalLibraryLoader
│ │ └── ExternalSpellChecker.cs
│ ├── Forms
│ │ ├── FormLocalizationHelper.Designer.cs
│ │ ├── FormLocalizationHelper.cs
│ │ └── FormLocalizationHelper.resx
│ ├── Hunspell
│ │ ├── HunspellData.cs
│ │ └── HunspellDictionaryCrawler.cs
│ ├── IStaticMessageProvider.cs
│ ├── Messages.Designer.cs
│ ├── Messages.resx
│ ├── Notepad++LanguageNames.txt
│ ├── SQLiteDatabase
│ │ ├── CopyLang.bat
│ │ └── lang.sqlite
│ ├── StaticLocalizeFileDialog.cs
│ ├── StaticMessageLocalizationProvider.cs
│ └── StatusStripTexts.cs
├── PluginHandling
│ ├── FormPluginManage.Designer.cs
│ ├── FormPluginManage.cs
│ ├── FormPluginManage.resx
│ ├── PluginDirectoryRoaming.cs
│ └── PluginInitializer.cs
├── Program.cs
├── Properties
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ ├── Resources.resx
│ ├── Settings.Designer.cs
│ └── Settings.settings
├── Resources
│ ├── About.png
│ ├── CSharp.png
│ ├── Copy.png
│ ├── Delete.png
│ ├── Down_2.png
│ ├── Erase.png
│ ├── Fast-rewind.png
│ ├── Find.png
│ ├── History.png
│ ├── New document.png
│ ├── Paste.png
│ ├── Play.png
│ ├── Playback.png
│ ├── Redo.png
│ ├── Save.png
│ ├── SaveAs.png
│ ├── SaveWithDialog.png
│ ├── Script.png
│ ├── Undo.png
│ ├── Up.png
│ ├── arrow-down-2.png
│ ├── arrow-up-2.png
│ ├── arrow_left.png
│ ├── arrow_right.png
│ ├── astonished.png
│ ├── book_next.png
│ ├── book_previous.png
│ ├── close_small.png
│ ├── database-go.png
│ ├── default.png
│ ├── diff_icon.png
│ ├── discard_changes.png
│ ├── duplicate_lines.png
│ ├── edit-cut-red.png
│ ├── education-languages.png
│ ├── find_replace.png
│ ├── find_tab.png
│ ├── folder-database.png
│ ├── folder-find.png
│ ├── folder-page.png
│ ├── format-text-uppercase.png
│ ├── jump_first.png
│ ├── jump_last.png
│ ├── krename.png
│ ├── list-add-5.png
│ ├── mark_words.png
│ ├── media-playback-start.png
│ ├── open_no_bom.png
│ ├── open_unknown_encoding.png
│ ├── paragraph.png
│ ├── plugin-add.png
│ ├── plugin-delete.png
│ ├── plugin-error.png
│ ├── plugin-go.png
│ ├── preferences-plugin.png
│ ├── preferences.png
│ ├── print_preview.png
│ ├── printer.png
│ ├── reload_disk.png
│ ├── save_all.png
│ ├── save_all_plus.png
│ ├── session-properties.png
│ ├── sort_alphabet.png
│ ├── spell_check.png
│ ├── split_view.png
│ ├── style.png
│ ├── swap_view.png
│ ├── tab_arrow.png
│ ├── tab_strikethrough.png
│ ├── textfield-rename.png
│ ├── unicode.png
│ ├── up_down.png
│ ├── word_wrap.png
│ ├── word_wrap2.png
│ ├── word_wrapped.png
│ ├── zoom_in.png
│ └── zoom_out.png
├── ScriptNotepad.csproj
├── Settings
│ ├── FormDialogCustomSpellCheckerInfo.Designer.cs
│ ├── FormDialogCustomSpellCheckerInfo.cs
│ ├── FormDialogCustomSpellCheckerInfo.resx
│ ├── FormSettings.Designer.cs
│ ├── FormSettings.cs
│ ├── FormSettings.resx
│ ├── Settings.cs
│ ├── SettingsOld.cs
│ └── XmlNotepadPlusMarks
│ │ └── MarkColorsHelper.cs
├── Test
│ ├── FormTestThingDialog.Designer.cs
│ ├── FormTestThingDialog.cs
│ ├── FormTestThingDialog.resx
│ ├── FormTestThings.Designer.cs
│ ├── FormTestThings.cs
│ └── FormTestThings.resx
├── UtilityClasses
│ ├── ApplicationHelpers
│ │ └── ApplicationActivateDeactivate.cs
│ ├── Assembly
│ │ └── TestFileIsAssembly.cs
│ ├── Clipboard
│ │ └── ClipboardTextHelper.cs
│ ├── CodeDom
│ │ ├── CSCodeDOMScriptRunnerLines.cs
│ │ ├── CSCodeDOMScriptRunnerText.cs
│ │ ├── CsScriptRunnerText.cs
│ │ ├── FormScript.Designer.cs
│ │ ├── FormScript.cs
│ │ ├── FormScript.resx
│ │ ├── IScriptRunner.cs
│ │ ├── RoslynGlobals.cs
│ │ └── RoslynScriptRunner.cs
│ ├── ColorHelpers
│ │ ├── FormPickAColor.Designer.cs
│ │ ├── FormPickAColor.cs
│ │ └── FormPickAColor.resx
│ ├── Common
│ │ ├── DataToolStripMenuItem.cs
│ │ └── StatusStripComboItem.cs
│ ├── DateTimeUtilities
│ │ └── DateTimeHelpers.cs
│ ├── Encodings
│ │ ├── CharacterSets
│ │ │ ├── CharacterSetComboBuilder.cs
│ │ │ ├── CharacterSetMenuBuilder.cs
│ │ │ └── EncodingCharacterSet.cs
│ │ ├── DetectEncoding.cs
│ │ ├── EncodingData.cs
│ │ ├── EncodingExceptionEventArgs.cs
│ │ ├── EncodingHelpers.cs
│ │ ├── FileEncoding.cs
│ │ └── TryMakeEncoding.cs
│ ├── ErrorHandling
│ │ └── ErrorHandlingBase.cs
│ ├── EventArguments
│ │ └── MainFormSizeEventArgs.cs
│ ├── ExternalProcessInteraction
│ │ ├── ApplicationProcess.cs
│ │ ├── CommandPromptInteraction.cs
│ │ └── WindowsExplorerInteraction.cs
│ ├── GraphicUtils
│ │ └── FontFamilyHelpers.cs
│ ├── IO
│ │ ├── DirectoryCrawler.cs
│ │ └── DirectoryCrawlerEventArgs.cs
│ ├── Installer
│ │ └── WaitForProcess.cs
│ ├── Keyboard
│ │ ├── KeySendList.ExcludeLicense.cs
│ │ └── KeyboardHelpers.cs
│ ├── KeyboardShortcutHelper
│ │ └── KeyboardMultiCombination.cs
│ ├── LinesAndBinary
│ │ └── FileLineType.cs
│ ├── MathUtils
│ │ └── MathUtils.cs
│ ├── MenuHelpers
│ │ ├── ContextMenuStyles.cs
│ │ ├── RecentFilesMenuBuilder.cs
│ │ ├── TabMenuBuilder.cs
│ │ └── WinFormsFormMenuBuilder.cs
│ ├── MiscForms
│ │ ├── FormFileDiffView.Designer.cs
│ │ ├── FormFileDiffView.cs
│ │ ├── FormFileDiffView.resx
│ │ ├── FormSnippetRunner.Designer.cs
│ │ ├── FormSnippetRunner.cs
│ │ └── FormSnippetRunner.resx
│ ├── Process
│ │ └── ProcessElevation.cs
│ ├── ProgrammingLanguages
│ │ ├── ProgrammingLanguageHelper.cs
│ │ └── ProgrammingLanguageMenuClickEventArgs.cs
│ ├── ScintillaHelpers
│ │ ├── ScintillaFold.cs
│ │ └── ScintillaLines.cs
│ ├── ScintillaNETUtils
│ │ └── ScintillaContextMenu.cs
│ ├── ScintillaUtils
│ │ ├── SelectionReplace.cs
│ │ └── SetStyleBraceMatch.cs
│ ├── SearchAndReplace
│ │ ├── FormDialogSearchReplaceProgress.Designer.cs
│ │ ├── FormDialogSearchReplaceProgress.cs
│ │ ├── FormDialogSearchReplaceProgress.resx
│ │ ├── FormDialogSearchReplaceProgressFiles.Designer.cs
│ │ ├── FormDialogSearchReplaceProgressFiles.cs
│ │ ├── FormDialogSearchReplaceProgressFiles.resx
│ │ ├── FormSearchAndReplace.Designer.cs
│ │ ├── FormSearchAndReplace.cs
│ │ ├── FormSearchAndReplace.resx
│ │ ├── FormSearchResultTree.Designer.cs
│ │ ├── FormSearchResultTree.cs
│ │ ├── FormSearchResultTree.resx
│ │ ├── Misc
│ │ │ ├── HighLight.cs
│ │ │ └── SearchResultTreeViewClickEventArgs.cs
│ │ ├── ProgressRequestActionEventArgs.cs
│ │ └── ScintillaDocumentEventArgs.cs
│ ├── Session
│ │ ├── FormDialogSessionManage.Designer.cs
│ │ ├── FormDialogSessionManage.cs
│ │ └── FormDialogSessionManage.resx
│ ├── SessionHelpers
│ │ ├── CloseFormUtils.cs
│ │ └── SessionMenuBuilder.cs
│ ├── SpellCheck
│ │ └── TabbedDocumentSpellCheck.cs
│ ├── StreamHelpers
│ │ └── StreamStringHelpers.cs
│ ├── TextManipulation
│ │ ├── Base64Convert.cs
│ │ ├── BaseClasses
│ │ │ ├── TextLinesManipulationCommandBase.cs
│ │ │ ├── TextManipulationCallbackBase.cs
│ │ │ └── TextManipulationCommandBase.cs
│ │ ├── DuplicateLines.cs
│ │ ├── Interfaces
│ │ │ ├── IMethodName.cs
│ │ │ ├── ITextLinesManipulationCommand.cs
│ │ │ ├── ITextManipulationCallback.cs
│ │ │ └── ITextManipulationCommand.cs
│ │ ├── Json
│ │ │ ├── JsonMultilineConvert.cs
│ │ │ └── JsonSingleLineConvert.cs
│ │ ├── JsonPrettify.cs
│ │ ├── ScintillaLinesToStringList.cs
│ │ ├── StringHelpers.cs
│ │ ├── TextSorting
│ │ │ ├── FormDialogQuerySortTextStyle.Designer.cs
│ │ │ ├── FormDialogQuerySortTextStyle.cs
│ │ │ ├── FormDialogQuerySortTextStyle.resx
│ │ │ └── SortLines.cs
│ │ ├── Xml
│ │ │ ├── XmlMultilineConvert.cs
│ │ │ ├── XmlSingleLineConvert.cs
│ │ │ └── XmlTidy.cs
│ │ ├── XmlPrettify.cs
│ │ └── base64
│ │ │ ├── Base64ToString.cs
│ │ │ └── StringToBase64.cs
│ └── TextManipulationUtils
│ │ └── WordWrapToSize.cs
├── VPKSoft.ico
├── WindowsRegistry
│ └── OpenWith.reg
└── notepad7.ico
├── ScriptNotepadOldDatabaseEntity
├── ScriptNotepadOldDatabaseEntity.csproj
└── ScriptNotepadOldDbContext.cs
├── ScriptNotepad_icon.png
├── dictionaries
└── en
│ ├── en_US.aff
│ └── en_US.dic
└── todo_list.txt
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | version: 2
2 | updates:
3 | - package-ecosystem: nuget
4 | directory: "/"
5 | schedule:
6 | interval: daily
7 | time: "03:00"
8 | open-pull-requests-limit: 10
9 | ignore:
10 | - dependency-name: FluentMigrator
11 | versions:
12 | - 3.2.15
13 | - dependency-name: FluentMigrator.Runner.SqlServerCe
14 | versions:
15 | - 3.2.15
16 | - dependency-name: FluentMigrator.Extensions.SqlServer
17 | versions:
18 | - 3.2.15
19 | - dependency-name: FluentMigrator.Runner.Oracle
20 | versions:
21 | - 3.2.15
22 | - dependency-name: FluentMigrator.Extensions.Postgres
23 | versions:
24 | - 3.2.15
25 | - dependency-name: FluentMigrator.Runner.Postgres
26 | versions:
27 | - 3.2.15
28 | - dependency-name: FluentMigrator.Runner.Hana
29 | versions:
30 | - 3.2.15
31 | - dependency-name: FluentMigrator.Runner.SqlServer
32 | versions:
33 | - 3.2.15
34 | - dependency-name: FluentMigrator.Runner.Redshift
35 | versions:
36 | - 3.2.15
37 | - dependency-name: FluentMigrator.Runner
38 | versions:
39 | - 3.2.15
40 | - dependency-name: VPKSoft.PosLib
41 | versions:
42 | - 1.0.2
43 | - dependency-name: VPKSoft.ConfLib
44 | versions:
45 | - 1.0.4
46 | - dependency-name: VPKSoft.Utils
47 | versions:
48 | - 1.0.7
49 |
--------------------------------------------------------------------------------
/.github/workflows/dotnet-desktop.yml:
--------------------------------------------------------------------------------
1 | name: .NET Desktop
2 |
3 | on:
4 | push:
5 | branches: [ master ]
6 | pull_request:
7 | branches: [ master ]
8 |
9 | jobs:
10 |
11 | build:
12 | environment: WinformsAppBuild
13 | strategy:
14 | matrix:
15 | configuration: [Release]
16 |
17 | runs-on: windows-2022 # For a list of available runner types, refer to
18 | # https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on
19 |
20 | env:
21 | Solution_Name: ScriptNotepad.sln
22 | App_Project_Directory: ScriptNotepad
23 | App_Project_Path: ScriptNotepad\ScriptNotepad.csproj
24 |
25 | steps:
26 | - name: Checkout
27 | uses: actions/checkout@v2
28 | with:
29 | fetch-depth: 0
30 |
31 | # Install the .NET 8 workload
32 | - name: Install .NET
33 | uses: actions/setup-dotnet@v4
34 | with:
35 | dotnet-version: 8.0.x
36 |
37 | # Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild
38 | - name: Setup MSBuild.exe
39 | uses: microsoft/setup-msbuild@v1.1
40 |
41 | # Restore the application to populate the obj folder with RuntimeIdentifiers
42 | - name: Restore the application
43 | run: msbuild $env:App_Project_Path /t:Restore /p:Configuration=$env:Configuration
44 | env:
45 | Configuration: ${{ matrix.configuration }}
46 |
47 | # Build the ScriptNotepad project
48 | - name: Build the ScriptNotepad project
49 | run: msbuild $env:App_Project_Path /p:Configuration=$env:Configuration
50 |
--------------------------------------------------------------------------------
/CustomControls/CustomControls.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | true
5 | net8.0-windows
6 |
7 | Library
8 |
9 | VPKSoft
10 | ScriptNotepad Custom Controls
11 | CustomControls
12 | Custom controls for the ScriptNotepad software.
13 | Copyright © VPKSoft 2022
14 | MIT
15 | https://www.vpksoft.net/2015-03-31-13-33-28/scriptnotepad
16 | ScriptNotepad_icon.png
17 |
18 | https://github.com/VPKSoft/ScriptNotepad
19 | git
20 | custom control winforms
21 | See: https://github.com/VPKSoft/ScriptNotepad
22 |
23 |
24 |
25 | C:\Files\GitHub\ScriptNotepad\CustomControls\CustomControls.xml
26 |
27 |
28 |
29 | C:\Files\GitHub\ScriptNotepad\CustomControls\CustomControls.xml
30 |
31 |
32 |
33 |
34 | True
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/CustomControls/ImageButton.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 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 | text/microsoft-resx
50 |
51 |
52 | 2.0
53 |
54 |
55 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
56 |
57 |
58 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
59 |
60 |
--------------------------------------------------------------------------------
/InstallerBaseWixSharp/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/InstallerBaseWixSharp/Files/FileResources/replace_this_ico.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/InstallerBaseWixSharp/Files/FileResources/replace_this_ico.ico
--------------------------------------------------------------------------------
/InstallerBaseWixSharp/Files/Localization/SupportedLanguages.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/InstallerBaseWixSharp/Files/Localization/SupportedLanguages.cs
--------------------------------------------------------------------------------
/InstallerBaseWixSharp/Files/Localization/TabDeliLocalization/tabdeli_messages.txt:
--------------------------------------------------------------------------------
1 | This is the simple tab-delimited localization file.
2 | As you can see only the "[]" tags and tab delimited key-value pairs matter for the localization.
3 | The tab-delimited text can also include comments, etc. by adding a new tab-delimited field.
4 | [en-US]
5 | txtDeleteLocalApplicationData Delete application data
6 | txtDeleteApplicationDataQuery Delete application settings and other data?
7 | txtStarAssociation Add open with menu
8 | txtStarAssociationQuery Add an open with this application to the file explorer menu?
9 | txtOpenWithShellMenu Open with ScriptNotepad
10 |
11 | [fi-FI]
12 | txtDeleteLocalApplicationData Poista sovelluksen tiedot
13 | txtDeleteApplicationDataQuery Poista sovelluksen asetukset ja muut tiedot?
14 | txtStarAssociation Lisää avaa sovelluksella valikko
15 | txtStarAssociationQuery Lisää avaa tällä sovelluksella valikko resurssien hallinnan valikkoon?
16 | txtOpenWithShellMenu Avaa sovelluksella ScriptNotepad
--------------------------------------------------------------------------------
/InstallerBaseWixSharp/Files/Utilities/ApplicationName.ps1:
--------------------------------------------------------------------------------
1 | <#
2 | MIT License
3 |
4 | Copyright(c) 2020 Petteri Kautonen
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
23 | #>
24 |
25 | $files = Get-ChildItem -Recurse ..\..\* -Include "*.cs", "*.wxl", "*.txt" -Exclude "*.Designer.cs"
26 |
27 | # English (United States);Finnish (Finland)
28 | $languages = "0x00000102;0x00000118"; # see the Files\Localization\SupportedLanguages.cs file..
29 |
30 | $locale_running_ids = $languages -split ";"
31 |
32 | # replace the #APPLICATION# tag in the installer project with specified application name
33 | foreach ($file in $files)
34 | {
35 | Write-Output (-join("Change application name for the file: ", $file.FullName, "..."))
36 | ((Get-Content -path $file.FullName -Raw) -replace '#APPLICATION#','ScriptNotepad') | Set-Content -Path $file.FullName
37 | Write-Output (-join("File handled: ", $file.FullName, "."))
38 | }
39 |
40 | # Enabled the specified languages in the .\Files\Localization\SupportedLanguages.cs files..
41 | $language_enumfile_contents = (Get-Content -path ..\..\Files\Localization\SupportedLanguages.cs -Raw)
42 |
43 | # loop through the localization entries specified by the running id number..
44 | foreach ($locale_running_id in $locale_running_ids)
45 | {
46 | # set the specified language as enabled..
47 | $language_enumfile_contents = $language_enumfile_contents.Replace(-join($locale_running_id, ")]"), -join ($locale_running_id, ", true", ")]"))
48 | }
49 |
50 | # update the .\Files\Localization\SupportedLanguages.cs file contents..
51 | Set-Content -path ..\..\Files\Localization\SupportedLanguages.cs -Value $language_enumfile_contents
--------------------------------------------------------------------------------
/InstallerBaseWixSharp/Files/Utilities/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "0.2.0",
3 | "configurations": [
4 | {
5 | "type": "PowerShell",
6 | "request": "launch",
7 | "name": "PowerShell Launch (current file)",
8 | "script": "${file}",
9 | "args": [],
10 | "cwd": "${file}"
11 | },
12 | {
13 | "type": "PowerShell",
14 | "request": "attach",
15 | "name": "PowerShell Attach to Host Process",
16 | "processId": "${command.PickPSHostProcess}",
17 | "runspaceId": 1
18 | },
19 | {
20 | "type": "PowerShell",
21 | "request": "launch",
22 | "name": "PowerShell Interactive Session",
23 | "cwd": "${workspaceRoot}"
24 | }
25 | ]
26 | }
--------------------------------------------------------------------------------
/InstallerBaseWixSharp/Files/install_side.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/InstallerBaseWixSharp/Files/install_side.png
--------------------------------------------------------------------------------
/InstallerBaseWixSharp/Files/install_top.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/InstallerBaseWixSharp/Files/install_top.png
--------------------------------------------------------------------------------
/InstallerBaseWixSharp/Files/replace_this_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/InstallerBaseWixSharp/Files/replace_this_logo.png
--------------------------------------------------------------------------------
/InstallerBaseWixSharp/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/InstallerBaseWixSharp/Properties/AssemblyInfo.cs
--------------------------------------------------------------------------------
/InstallerBaseWixSharp/nuget-package-logo.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/InstallerBaseWixSharp/nuget-package-logo.ico
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2019 Petteri Kautonen
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/PluginTemplate/FodyWeavers.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/PluginTemplate/FodyWeavers.xsd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | Used to control if the On_PropertyName_Changed feature is enabled.
12 |
13 |
14 |
15 |
16 | Used to change the name of the method that fires the notify event. This is a string that accepts multiple values in a comma separated form.
17 |
18 |
19 |
20 |
21 | Used to control if equality checks should be inserted. If false, equality checking will be disabled for the project.
22 |
23 |
24 |
25 |
26 | Used to control if equality checks should use the Equals method resolved from the base class.
27 |
28 |
29 |
30 |
31 | Used to control if equality checks should use the static Equals method resolved from the base class.
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 | 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.
40 |
41 |
42 |
43 |
44 | A comma-separated list of error codes that can be safely ignored in assembly verification.
45 |
46 |
47 |
48 |
49 | 'false' to turn off automatic generation of the XML Schema file.
50 |
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/PluginTemplate/PluginTemplate.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | net8.0-windows
4 | PluginTemplate
5 | VPKSoft
6 | PluginTemplate
7 | A sample plugin for the ScriptNotepad
8 | Copyright © VPKSoft 2020
9 | 1.0.3.0
10 | 1.0.3.0
11 | latest
12 | bin\$(Configuration)\
13 | true
14 | ::XCOPY /Y "$(TargetPath)" "%25LOCALAPPDATA%25\ScriptNotepad\Plugins" true
15 |
16 | ::XCOPY /Y "$(TargetPath)" "%25LOCALAPPDATA%25\ScriptNotepad\Plugins"
17 |
18 | ::XCOPY /Y "$(TargetPath)" "%25LOCALAPPDATA%25\ScriptNotepad\Plugins"
19 |
20 |
21 |
22 | full
23 |
24 |
25 | pdbonly
26 |
27 |
28 | ::XCOPY /Y "$(TargetPath)" "%25LOCALAPPDATA%25\ScriptNotepad\Plugins"
29 |
30 | MIT
31 | https://www.vpksoft.net/2015-03-31-13-33-28/scriptnotepad
32 | ScriptNotepad_icon.png
33 | https://github.com/VPKSoft/ScriptNotepad
34 | git
35 | 1.0.3
36 | ScriptNotepad plugin template sample
37 |
38 |
39 |
40 |
41 | True
42 | True
43 | Resources.resx
44 |
45 |
46 |
47 |
48 | True
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
--------------------------------------------------------------------------------
/PluginTemplate/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | #region License
2 | /*
3 | MIT License
4 |
5 | Copyright(c) 2020 Petteri Kautonen
6 |
7 | Permission is hereby granted, free of charge, to any person obtaining a copy
8 | of this software and associated documentation files (the "Software"), to deal
9 | in the Software without restriction, including without limitation the rights
10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | copies of the Software, and to permit persons to whom the Software is
12 | furnished to do so, subject to the following conditions:
13 |
14 | The above copyright notice and this permission notice shall be included in all
15 | copies or substantial portions of the Software.
16 |
17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 | SOFTWARE.
24 | */
25 | #endregion
26 |
27 | using System.Reflection;
28 | using System.Runtime.CompilerServices;
29 | using System.Runtime.InteropServices;
30 |
31 | // Setting ComVisible to false makes the types in this assembly not visible
32 | // to COM components. If you need to access a type in this assembly from
33 | // COM, set the ComVisible attribute to true on that type.
34 | [assembly: ComVisible(false)]
35 |
36 | // The following GUID is for the ID of the typelib if this project is exposed to COM
37 | [assembly: Guid("d68a1d7b-390d-4f3c-b38f-3c76fb0752e1")]
38 |
--------------------------------------------------------------------------------
/PluginTemplate/Resources/VPKSoft.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/PluginTemplate/Resources/VPKSoft.ico
--------------------------------------------------------------------------------
/PluginTemplate/Resources/VPKSoftLogo_App.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/PluginTemplate/Resources/VPKSoftLogo_App.png
--------------------------------------------------------------------------------
/PluginTemplate/Resources/tab_deli_localization.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/PluginTemplate/Resources/tab_deli_localization.txt
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # ScriptNotepad
2 | A tabbed notepad/text/code software with scripting support (C#) to manipulate a file's contents. The software is based on the [Scintilla.NET](https://github.com/VPKSoft/ScintillaNET) control.
3 |
4 | ## Features
5 | * Support for multiple programming languages for code folding and highlighing.
6 | * Support for spell checking via Hunspell dictionaries.
7 | * New files are automatically saved into a SQLite database; this software doesn't ask questions while closing.
8 | * Pure C#.
9 | * Open source, well documented source dode; fork, make PR or develop further on your own.
10 | * Localizable directly from the menu for your own language. (new languages are welcome!)
11 | * Highly customizable.
12 | * Possibility to export a code file to HTML.
13 | * Small size (installer: 30MB).
14 | * Session support; you may create a session for etc. one for common files, one for SQL files and so on..
15 | * Currently supported locales: en-US, fi-FI
16 | * Support for plug-ins as .NET assemblies. A sample plugin is included (a modifed ROT-13 algorithm - suprise!).
17 | * A difference (diff) viewer both side-byside and as a list.
18 |
19 | _The main window_
20 | 
21 |
22 | _A script window with a script template_
23 | 
24 |
25 | ### Thanks to
26 | * [JetBrains](https://www.jetbrains.com/?from=ScriptNotepad) for their open source license(s).
27 | * [](https://github.com/VPKSoft/ScriptNotepad/actions/workflows/dotnet-desktop.yml)
28 |
29 |
30 | [](https://www.jetbrains.com/?from=ScriptNotepad)
31 |
32 | ## TODO
33 | * A lot ;-)
34 |
35 | ## Download
36 | [From the releases](https://github.com/VPKSoft/ScriptNotepad/releases)
37 |
--------------------------------------------------------------------------------
/ScriptNotepad.sln.DotSettings:
--------------------------------------------------------------------------------
1 |
2 | True
3 | True
--------------------------------------------------------------------------------
/ScriptNotepad/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/ScriptNotepad/Database/DirectAccess/CheckFluentMigrator.cs:
--------------------------------------------------------------------------------
1 | using System.Data.SQLite;
2 |
3 | namespace ScriptNotepad.Database.DirectAccess;
4 |
5 | ///
6 | /// A class to create the VersionInfo table in case the code-first database already exists.
7 | ///
8 | internal class CheckFluentMigrator
9 | {
10 | ///
11 | /// Marks the first database migration as done.
12 | ///
13 | /// The connection string fot the SQLite database table.
14 | public static void MarkMigration(string connectionString)
15 | {
16 | using var connection = new SQLiteConnection(connectionString);
17 |
18 | connection.Open();
19 |
20 | using SQLiteCommand command = new SQLiteCommand(
21 | "CREATE TABLE IF NOT EXISTS VersionInfo (Version INTEGER NOT NULL, AppliedOn DATETIME, Description TEXT);",
22 | connection);
23 |
24 | command.ExecuteNonQuery();
25 |
26 | command.CommandText = string.Join(Environment.NewLine,
27 | "INSERT INTO VersionInfo (Version, AppliedOn, Description)",
28 | // ReSharper disable once StringLiteralTypo, this is a function name in the SQLite..
29 | "SELECT 20220101103253, strftime('%Y-%m-%dT%H:%M:%S','now'), 'InitialMigration'",
30 | "WHERE NOT EXISTS(SELECT * FROM VersionInfo WHERE Version = 20220101103253)");
31 | command.ExecuteNonQuery();
32 | }
33 | }
--------------------------------------------------------------------------------
/ScriptNotepad/Database/Entity/Entities/CodeSnippet.cs:
--------------------------------------------------------------------------------
1 | #region License
2 | /*
3 | MIT License
4 |
5 | Copyright(c) 2020 Petteri Kautonen
6 |
7 | Permission is hereby granted, free of charge, to any person obtaining a copy
8 | of this software and associated documentation files (the "Software"), to deal
9 | in the Software without restriction, including without limitation the rights
10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | copies of the Software, and to permit persons to whom the Software is
12 | furnished to do so, subject to the following conditions:
13 |
14 | The above copyright notice and this permission notice shall be included in all
15 | copies or substantial portions of the Software.
16 |
17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 | SOFTWARE.
24 | */
25 | #endregion
26 |
27 | #nullable enable
28 |
29 | using System.ComponentModel.DataAnnotations.Schema;
30 | using ScriptNotepad.Database.Entity.Enumerations;
31 |
32 | namespace ScriptNotepad.Database.Entity.Entities;
33 |
34 | ///
35 | /// A class for storing code snippets into the database.
36 | /// Implements the
37 | ///
38 | ///
39 | [Table("CodeSnippets")]
40 | public class CodeSnippet: IEntity
41 | {
42 | ///
43 | /// Gets or sets the identifier for the entity.
44 | ///
45 | public int Id { get; set; }
46 |
47 | ///
48 | /// Gets or sets the script's contents.
49 | ///
50 | public string? ScriptContents { get; set; }
51 |
52 | ///
53 | /// Gets or sets the name of the script.
54 | ///
55 | public string ScriptName { get; set; } = string.Empty;
56 |
57 | ///
58 | /// Gets or sets the date and time when the script was previously modified.
59 | ///
60 | public DateTime Modified { get; set; }
61 |
62 | ///
63 | /// Gets or sets the language type of the script snippet.
64 | ///
65 | public CodeSnippetLanguage ScriptLanguage { get; set; }
66 |
67 | ///
68 | /// Gets or sets the type of the script text manipulation.
69 | ///
70 | public ScriptSnippetType ScriptTextManipulationType { get; set; }
71 |
72 | ///
73 | /// Returns a that represents this instance.
74 | ///
75 | /// A that represents this instance.
76 | public override string ToString()
77 | {
78 | return ScriptName;
79 | }
80 | }
81 |
82 | #nullable restore
83 |
--------------------------------------------------------------------------------
/ScriptNotepad/Database/Entity/Entities/FileContent.cs:
--------------------------------------------------------------------------------
1 | namespace ScriptNotepad.Database.Entity.Entities
2 | {
3 | ///
4 | /// A class representing a single file contents in the database.
5 | /// Implements the
6 | ///
7 | ///
8 | public class FileContent: IEntity
9 | {
10 | ///
11 | /// Gets or sets the identifier for the entity.
12 | ///
13 | public int Id { get; set; }
14 |
15 | ///
16 | /// Gets or sets the binary contents of a file.
17 | ///
18 | public byte[] BinaryContents { get; set; }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/ScriptNotepad/Database/Entity/Entities/FileSession.cs:
--------------------------------------------------------------------------------
1 | #region License
2 | /*
3 | MIT License
4 |
5 | Copyright(c) 2020 Petteri Kautonen
6 |
7 | Permission is hereby granted, free of charge, to any person obtaining a copy
8 | of this software and associated documentation files (the "Software"), to deal
9 | in the Software without restriction, including without limitation the rights
10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | copies of the Software, and to permit persons to whom the Software is
12 | furnished to do so, subject to the following conditions:
13 |
14 | The above copyright notice and this permission notice shall be included in all
15 | copies or substantial portions of the Software.
16 |
17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 | SOFTWARE.
24 | */
25 | #endregion
26 |
27 | #nullable enable
28 |
29 | using System.ComponentModel.DataAnnotations.Schema;
30 |
31 | namespace ScriptNotepad.Database.Entity.Entities;
32 |
33 | ///
34 | /// A class for storing session(s) into the database.
35 | ///
36 | [Table("FileSessions")]
37 | public class FileSession: IEntity
38 | {
39 | ///
40 | /// Gets or sets the identifier for the entity.
41 | ///
42 | public int Id { get; set; }
43 |
44 | ///
45 | /// Gets or sets the name of a session.
46 | ///
47 | public string? SessionName { get; set; }
48 |
49 | ///
50 | /// Gets or sets the temporary file path in case the file system is used to cache the contents
51 | /// of the entities belonging to the session.
52 | ///
53 | public string? TemporaryFilePath { get; set; }
54 |
55 | ///
56 | /// Gets or sets a value indicating whether to use the file system to store the contents of the file instead of a database BLOB.
57 | ///
58 | public bool UseFileSystemOnContents { get; set; }
59 |
60 | ///
61 | /// Returns a that represents this instance.
62 | ///
63 | public override string? ToString()
64 | {
65 | return SessionName;
66 | }
67 | }
68 |
69 | #nullable restore
70 |
--------------------------------------------------------------------------------
/ScriptNotepad/Database/Entity/Entities/MiscellaneousParameter.cs:
--------------------------------------------------------------------------------
1 | #region License
2 | /*
3 | MIT License
4 |
5 | Copyright(c) 2022 Petteri Kautonen
6 |
7 | Permission is hereby granted, free of charge, to any person obtaining a copy
8 | of this software and associated documentation files (the "Software"), to deal
9 | in the Software without restriction, including without limitation the rights
10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | copies of the Software, and to permit persons to whom the Software is
12 | furnished to do so, subject to the following conditions:
13 |
14 | The above copyright notice and this permission notice shall be included in all
15 | copies or substantial portions of the Software.
16 |
17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 | SOFTWARE.
24 | */
25 | #endregion
26 |
27 | using System.ComponentModel.DataAnnotations.Schema;
28 |
29 | #nullable enable
30 |
31 | namespace ScriptNotepad.Database.Entity.Entities;
32 |
33 | ///
34 | /// A class for miscellaneous entries, I.e. history data entered into database.
35 | /// Implements the
36 | ///
37 | ///
38 | [Table("MiscellaneousParameters")]
39 | public class MiscellaneousParameter: IEntity
40 | {
41 | ///
42 | /// Gets or sets the identifier for the entity.
43 | ///
44 | /// The identifier.
45 | public int Id { get; set; }
46 |
47 | ///
48 | /// Gets or sets the when the entry was added to the database.
49 | ///
50 | /// The when the entry was added to the database.
51 | public DateTime Added { get; set; }
52 |
53 | ///
54 | /// Gets or sets the value.
55 | ///
56 | /// The value.
57 | public string Value { get; set; } = string.Empty;
58 | }
59 |
60 | #nullable restore
61 |
--------------------------------------------------------------------------------
/ScriptNotepad/Database/Entity/Entities/MiscellaneousTextEntry.cs:
--------------------------------------------------------------------------------
1 | #region License
2 | /*
3 | MIT License
4 |
5 | Copyright(c) 2020 Petteri Kautonen
6 |
7 | Permission is hereby granted, free of charge, to any person obtaining a copy
8 | of this software and associated documentation files (the "Software"), to deal
9 | in the Software without restriction, including without limitation the rights
10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | copies of the Software, and to permit persons to whom the Software is
12 | furnished to do so, subject to the following conditions:
13 |
14 | The above copyright notice and this permission notice shall be included in all
15 | copies or substantial portions of the Software.
16 |
17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 | SOFTWARE.
24 | */
25 | #endregion
26 |
27 | using System.ComponentModel.DataAnnotations.Schema;
28 | using ScriptNotepad.Database.Entity.Enumerations;
29 |
30 | #nullable enable
31 |
32 | namespace ScriptNotepad.Database.Entity.Entities;
33 |
34 | ///
35 | /// A class for storing miscellaneous text data into the database.
36 | /// Implements the
37 | ///
38 | ///
39 | [Table("MiscellaneousTextEntries")]
40 | public class MiscellaneousTextEntry: IEntity
41 | {
42 | ///
43 | /// Gets or sets the identifier for the entity.
44 | ///
45 | public int Id { get; set; }
46 |
47 | ///
48 | /// Gets or sets the session identifier.
49 | ///
50 | /// The session identifier.
51 | public int SessionId { get; set; }
52 |
53 | ///
54 | /// Gets or sets the text value.
55 | ///
56 | public string TextValue { get; set; } = string.Empty;
57 |
58 | ///
59 | /// Gets or sets the type of the text.
60 | ///
61 | public MiscellaneousTextType TextType { get; set; }
62 |
63 | ///
64 | /// Gets or sets the added date and time when the entry was added or updated to the database.
65 | ///
66 | public DateTime Added { get; set; }
67 |
68 | ///
69 | /// Gets or sets the this miscellaneous text data belongs to.
70 | ///
71 | [ForeignKey(nameof(SessionId))]
72 | public virtual FileSession? Session { get; set; }
73 |
74 | ///
75 | /// Returns a that represents this instance.
76 | ///
77 | /// A that represents this instance.
78 | public override string ToString()
79 | {
80 | return TextValue;
81 | }
82 | }
83 |
84 | #nullable restore
--------------------------------------------------------------------------------
/ScriptNotepad/Database/Entity/Entities/RecentFile.cs:
--------------------------------------------------------------------------------
1 | #region License
2 | /*
3 | MIT License
4 |
5 | Copyright(c) 2020 Petteri Kautonen
6 |
7 | Permission is hereby granted, free of charge, to any person obtaining a copy
8 | of this software and associated documentation files (the "Software"), to deal
9 | in the Software without restriction, including without limitation the rights
10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | copies of the Software, and to permit persons to whom the Software is
12 | furnished to do so, subject to the following conditions:
13 |
14 | The above copyright notice and this permission notice shall be included in all
15 | copies or substantial portions of the Software.
16 |
17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 | SOFTWARE.
24 | */
25 | #endregion
26 |
27 | #nullable enable
28 |
29 | using System.ComponentModel.DataAnnotations.Schema;
30 |
31 | namespace ScriptNotepad.Database.Entity.Entities;
32 |
33 | ///
34 | /// A class for storing recent file data into the database.
35 | /// Implements the
36 | ///
37 | ///
38 | [Table("RecentFiles")]
39 | public class RecentFile: IEntity
40 | {
41 | ///
42 | /// Gets or sets the identifier for the entity.
43 | ///
44 | public int Id { get; set; }
45 |
46 | ///
47 | /// Gets or sets the session identifier.
48 | ///
49 | /// The session identifier.
50 | public int SessionId { get; set; }
51 |
52 | ///
53 | /// Gets or sets the full file name with path.
54 | ///
55 | public string FileNameFull { get; set; } = string.Empty;
56 |
57 | ///
58 | /// Gets or sets the file name without path.
59 | ///
60 | public string FileName { get; set; } = string.Empty;
61 |
62 | ///
63 | /// Gets or sets the full path for the file.
64 | ///
65 | public string? FilePath { get; set; }
66 |
67 | ///
68 | /// Gets or sets the date and time when the file was closed in the editor.
69 | ///
70 | public DateTime ClosedDateTime { get; set; }
71 |
72 | ///
73 | /// Gets or sets the session the recent file belongs to.
74 | ///
75 | [ForeignKey(nameof(SessionId))]
76 | public virtual FileSession? Session { get; set; }
77 |
78 | ///
79 | /// Gets or sets a string representing the encoding of the file save.
80 | ///
81 | public string EncodingAsString { get; set; } = "utf-8;65001;True;False;False";
82 |
83 | ///
84 | /// Returns a that represents this instance.
85 | ///
86 | public override string ToString()
87 | {
88 | return FileNameFull;
89 | }
90 | }
91 |
92 | #nullable restore
--------------------------------------------------------------------------------
/ScriptNotepad/Database/Entity/Entities/SoftwareLicense.cs:
--------------------------------------------------------------------------------
1 | #region License
2 | /*
3 | MIT License
4 |
5 | Copyright(c) 2020 Petteri Kautonen
6 |
7 | Permission is hereby granted, free of charge, to any person obtaining a copy
8 | of this software and associated documentation files (the "Software"), to deal
9 | in the Software without restriction, including without limitation the rights
10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | copies of the Software, and to permit persons to whom the Software is
12 | furnished to do so, subject to the following conditions:
13 |
14 | The above copyright notice and this permission notice shall be included in all
15 | copies or substantial portions of the Software.
16 |
17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 | SOFTWARE.
24 | */
25 | #endregion
26 |
27 | using System.ComponentModel.DataAnnotations.Schema;
28 |
29 | #nullable enable
30 |
31 | namespace ScriptNotepad.Database.Entity.Entities;
32 |
33 | ///
34 | /// A class to save the license of the software to the database.
35 | /// Implements the
36 | ///
37 | [Table("SoftwareLicenses")]
38 | public class SoftwareLicense: IEntity
39 | {
40 | ///
41 | /// Gets or sets the identifier for the entity.
42 | ///
43 | public int Id { get; set; }
44 |
45 | ///
46 | /// Gets or sets the license text.
47 | ///
48 | public string LicenseText { get; set; } = string.Empty;
49 |
50 | ///
51 | /// Gets or sets the license SPDX identifier.
52 | /// See: https://spdx.org/licenses/
53 | ///
54 | public string LicenseSpdxIdentifier { get; set; } = string.Empty;
55 | }
56 |
57 | #nullable restore
--------------------------------------------------------------------------------
/ScriptNotepad/Database/Entity/Enumerations/CodeSnippetLanguage.cs:
--------------------------------------------------------------------------------
1 | #region License
2 | /*
3 | MIT License
4 |
5 | Copyright(c) 2020 Petteri Kautonen
6 |
7 | Permission is hereby granted, free of charge, to any person obtaining a copy
8 | of this software and associated documentation files (the "Software"), to deal
9 | in the Software without restriction, including without limitation the rights
10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | copies of the Software, and to permit persons to whom the Software is
12 | furnished to do so, subject to the following conditions:
13 |
14 | The above copyright notice and this permission notice shall be included in all
15 | copies or substantial portions of the Software.
16 |
17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 | SOFTWARE.
24 | */
25 | #endregion
26 |
27 | namespace ScriptNotepad.Database.Entity.Enumerations;
28 |
29 | ///
30 | /// An enumeration for a code snippet language.
31 | ///
32 | public enum CodeSnippetLanguage
33 | {
34 | ///
35 | /// The C# programming language.
36 | ///
37 | Cs,
38 | }
--------------------------------------------------------------------------------
/ScriptNotepad/Database/Entity/Enumerations/MiscellaneousTextType.cs:
--------------------------------------------------------------------------------
1 | #region License
2 | /*
3 | MIT License
4 |
5 | Copyright(c) 2020 Petteri Kautonen
6 |
7 | Permission is hereby granted, free of charge, to any person obtaining a copy
8 | of this software and associated documentation files (the "Software"), to deal
9 | in the Software without restriction, including without limitation the rights
10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | copies of the Software, and to permit persons to whom the Software is
12 | furnished to do so, subject to the following conditions:
13 |
14 | The above copyright notice and this permission notice shall be included in all
15 | copies or substantial portions of the Software.
16 |
17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 | SOFTWARE.
24 | */
25 | #endregion
26 |
27 | using ScriptNotepad.Database.Entity.Entities;
28 |
29 | namespace ScriptNotepad.Database.Entity.Enumerations;
30 |
31 | ///
32 | /// An enumeration for the type.
33 | ///
34 | public enum MiscellaneousTextType
35 | {
36 | ///
37 | /// Indicates a path/directory in the file system.
38 | ///
39 | Path = 0,
40 |
41 | ///
42 | /// Indicates a file extension list delimited with semicolon (;); I.e. *.txt;*.cs.
43 | ///
44 | FileExtensionList = 1,
45 |
46 | ///
47 | /// The regular expression sorting within the custom sort dialog.
48 | ///
49 | RegexSorting = 2,
50 | }
--------------------------------------------------------------------------------
/ScriptNotepad/Database/Entity/Enumerations/ScriptSnippetType.cs:
--------------------------------------------------------------------------------
1 | #region License
2 | /*
3 | MIT License
4 |
5 | Copyright(c) 2020 Petteri Kautonen
6 |
7 | Permission is hereby granted, free of charge, to any person obtaining a copy
8 | of this software and associated documentation files (the "Software"), to deal
9 | in the Software without restriction, including without limitation the rights
10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | copies of the Software, and to permit persons to whom the Software is
12 | furnished to do so, subject to the following conditions:
13 |
14 | The above copyright notice and this permission notice shall be included in all
15 | copies or substantial portions of the Software.
16 |
17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 | SOFTWARE.
24 | */
25 | #endregion
26 |
27 | namespace ScriptNotepad.Database.Entity.Enumerations;
28 |
29 | ///
30 | /// An enumeration for the script snippet text manipulation type.
31 | ///
32 | public enum ScriptSnippetType
33 | {
34 | ///
35 | /// The text is manipulated as a single string.
36 | ///
37 | Text,
38 |
39 | ///
40 | /// The text is manipulated as a collection of lines.
41 | ///
42 | Lines,
43 | }
--------------------------------------------------------------------------------
/ScriptNotepad/Database/Entity/Enumerations/SearchAndReplaceSearchType.cs:
--------------------------------------------------------------------------------
1 | #region License
2 | /*
3 | MIT License
4 |
5 | Copyright(c) 2020 Petteri Kautonen
6 |
7 | Permission is hereby granted, free of charge, to any person obtaining a copy
8 | of this software and associated documentation files (the "Software"), to deal
9 | in the Software without restriction, including without limitation the rights
10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | copies of the Software, and to permit persons to whom the Software is
12 | furnished to do so, subject to the following conditions:
13 |
14 | The above copyright notice and this permission notice shall be included in all
15 | copies or substantial portions of the Software.
16 |
17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 | SOFTWARE.
24 | */
25 | #endregion
26 |
27 | namespace ScriptNotepad.Database.Entity.Enumerations;
28 |
29 | ///
30 | /// An enumeration for a text search type.
31 | ///
32 | [Flags]
33 | public enum SearchAndReplaceSearchType
34 | {
35 | ///
36 | /// A normal text search.
37 | ///
38 | Normal = 1,
39 |
40 | ///
41 | /// An extended text search.
42 | ///
43 | Extended = 2,
44 |
45 | ///
46 | /// A text search using regular expressions.
47 | ///
48 | RegularExpression = 4,
49 |
50 | ///
51 | /// The simple text search with some additional extended formatting possibilities.
52 | ///
53 | SimpleExtended = 8,
54 |
55 | ///
56 | /// All the possibilities combined.
57 | ///
58 | All = Normal | Extended | RegularExpression | SimpleExtended,
59 | }
--------------------------------------------------------------------------------
/ScriptNotepad/Database/Entity/Enumerations/SearchAndReplaceType.cs:
--------------------------------------------------------------------------------
1 | #region License
2 | /*
3 | MIT License
4 |
5 | Copyright(c) 2020 Petteri Kautonen
6 |
7 | Permission is hereby granted, free of charge, to any person obtaining a copy
8 | of this software and associated documentation files (the "Software"), to deal
9 | in the Software without restriction, including without limitation the rights
10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | copies of the Software, and to permit persons to whom the Software is
12 | furnished to do so, subject to the following conditions:
13 |
14 | The above copyright notice and this permission notice shall be included in all
15 | copies or substantial portions of the Software.
16 |
17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 | SOFTWARE.
24 | */
25 | #endregion
26 |
27 | namespace ScriptNotepad.Database.Entity.Enumerations;
28 |
29 | ///
30 | /// An enumeration for a type of a search.
31 | ///
32 | public enum SearchAndReplaceType
33 | {
34 | ///
35 | /// The type of the search and replace history is search.
36 | ///
37 | Search,
38 |
39 | ///
40 | /// The type of the search and replace history is replace.
41 | ///
42 | Replace,
43 | }
--------------------------------------------------------------------------------
/ScriptNotepad/Database/Entity/IEntity.cs:
--------------------------------------------------------------------------------
1 | #region License
2 | /*
3 | MIT License
4 |
5 | Copyright(c) 2020 Petteri Kautonen
6 |
7 | Permission is hereby granted, free of charge, to any person obtaining a copy
8 | of this software and associated documentation files (the "Software"), to deal
9 | in the Software without restriction, including without limitation the rights
10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | copies of the Software, and to permit persons to whom the Software is
12 | furnished to do so, subject to the following conditions:
13 |
14 | The above copyright notice and this permission notice shall be included in all
15 | copies or substantial portions of the Software.
16 |
17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 | SOFTWARE.
24 | */
25 | #endregion
26 |
27 | namespace ScriptNotepad.Database.Entity;
28 |
29 | ///
30 | /// An interface for an entity.
31 | ///
32 | interface IEntity
33 | {
34 | ///
35 | /// Gets or sets the identifier for the entity.
36 | ///
37 | int Id { get; set; }
38 | }
--------------------------------------------------------------------------------
/ScriptNotepad/Database/Entity/Migrations/02_FoldSave.cs:
--------------------------------------------------------------------------------
1 | #region License
2 | /*
3 | MIT License
4 |
5 | Copyright(c) 2022 Petteri Kautonen
6 |
7 | Permission is hereby granted, free of charge, to any person obtaining a copy
8 | of this software and associated documentation files (the "Software"), to deal
9 | in the Software without restriction, including without limitation the rights
10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | copies of the Software, and to permit persons to whom the Software is
12 | furnished to do so, subject to the following conditions:
13 |
14 | The above copyright notice and this permission notice shall be included in all
15 | copies or substantial portions of the Software.
16 |
17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 | SOFTWARE.
24 | */
25 | #endregion
26 |
27 | using System;
28 | using FluentMigrator;
29 |
30 | namespace ScriptNotepad.Database.Entity.Migrations
31 | {
32 | ///
33 | /// Add a FoldSave column to the FileSave table.
34 | /// Implements the
35 | ///
36 | ///
37 | [Migration(2022_0325_17_17_49)]
38 | public class FoldSave: Migration
39 | {
40 | ///
41 | /// Collect the UP migration expressions
42 | ///
43 | ///
44 | public override void Up()
45 | {
46 | this.Alter.Table("FileSaves")
47 | .AddColumn("FoldSave").AsString().WithDefaultValue(string.Empty);
48 | }
49 |
50 | ///
51 | /// Collects the DOWN migration expressions
52 | ///
53 | ///
54 | public override void Down()
55 | {
56 | Delete.Column("FoldSave").FromTable("FileSaves");
57 | }
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/ScriptNotepad/Database/Entity/Migrations/03_FixEmptySession.cs:
--------------------------------------------------------------------------------
1 | #region License
2 | /*
3 | MIT License
4 |
5 | Copyright(c) 2022 Petteri Kautonen
6 |
7 | Permission is hereby granted, free of charge, to any person obtaining a copy
8 | of this software and associated documentation files (the "Software"), to deal
9 | in the Software without restriction, including without limitation the rights
10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | copies of the Software, and to permit persons to whom the Software is
12 | furnished to do so, subject to the following conditions:
13 |
14 | The above copyright notice and this permission notice shall be included in all
15 | copies or substantial portions of the Software.
16 |
17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 | SOFTWARE.
24 | */
25 | #endregion
26 |
27 | using System;
28 | using FluentMigrator;
29 |
30 | namespace ScriptNotepad.Database.Entity.Migrations
31 | {
32 | ///
33 | /// Fixes the empty session bug from the database.
34 | /// Implements the
35 | ///
36 | ///
37 | [Migration(2022_0609_21_15_38)]
38 | public class FixEmptySession : Migration
39 | {
40 | ///
41 | /// Collect the UP migration expressions
42 | ///
43 | public override void Up()
44 | {
45 | Execute.Sql("DELETE FROM FileSessions WHERE SessionName IS NULL");
46 | }
47 |
48 | ///
49 | /// Collects the DOWN migration expressions
50 | ///
51 | ///
52 | public override void Down()
53 | {
54 | // nothing to do here..
55 | }
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/ScriptNotepad/Database/Helpers/DatabaseUtilities.cs:
--------------------------------------------------------------------------------
1 | #region License
2 | /*
3 | MIT License
4 |
5 | Copyright(c) 2022 Petteri Kautonen
6 |
7 | Permission is hereby granted, free of charge, to any person obtaining a copy
8 | of this software and associated documentation files (the "Software"), to deal
9 | in the Software without restriction, including without limitation the rights
10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | copies of the Software, and to permit persons to whom the Software is
12 | furnished to do so, subject to the following conditions:
13 |
14 | The above copyright notice and this permission notice shall be included in all
15 | copies or substantial portions of the Software.
16 |
17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 | SOFTWARE.
24 | */
25 | #endregion
26 |
27 | using System.Linq;
28 | using ScriptNotepad.Database.Entity.Context;
29 | using ScriptNotepad.Database.Entity.Entities;
30 |
31 | namespace ScriptNotepad.Database.Helpers;
32 |
33 | ///
34 | /// Some database utilities for the .
35 | ///
36 | public static class DatabaseUtilities
37 | {
38 | ///
39 | /// Sets the miscellaneous parameter to the database.
40 | ///
41 | /// The database context.
42 | /// The value to set.
43 | /// true if the value is already set, false otherwise.
44 | public static bool SetMiscellaneousParameter(this ScriptNotepadDbContext context, string value)
45 | {
46 | if (!context.MiscellaneousParameters.Any(f => f.Value.Equals(value, StringComparison.Ordinal)))
47 | {
48 | return true;
49 | }
50 |
51 | context.MiscellaneousParameters.Add(new MiscellaneousParameter {Added = DateTime.Now, Value = value, });
52 | context.SaveChanges();
53 | return false;
54 | }
55 | }
--------------------------------------------------------------------------------
/ScriptNotepad/Editor/EntityHelpers/DataHolders/DataHolderIndexer.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace ScriptNotepad.Editor.EntityHelpers.DataHolders;
4 |
5 | ///
6 | /// A class to hold a get indexer for type of .
7 | ///
8 | /// The class which is to be indexed.
9 | public class DataHolderIndexer where T: class
10 | {
11 | ///
12 | /// Gets the values for the this indexer.
13 | ///
14 | /// The values for the this indexer.
15 | private Dictionary Values { get; } = new();
16 |
17 | ///
18 | /// Gets the with the specified key.
19 | ///
20 | /// The key.
21 | /// The instance with the specified key.
22 | public T this[int key]
23 | {
24 | get
25 | {
26 | if (!Values.ContainsKey(key))
27 | {
28 | Values.Add(key, Activator.CreateInstance());
29 | }
30 |
31 | return Values[key];
32 | }
33 | }
34 |
35 | ///
36 | /// Removes the instance with a specified key.
37 | ///
38 | /// The key.
39 | public void Remove(int key)
40 | {
41 | Values.Remove(key);
42 | }
43 | }
--------------------------------------------------------------------------------
/ScriptNotepad/Editor/EntityHelpers/DataHolders/FileSaveData.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using ScriptNotepad.Database.Entity.Entities;
3 | using ScriptNotepad.UtilityClasses.LinesAndBinary;
4 |
5 | namespace ScriptNotepad.Editor.EntityHelpers.DataHolders;
6 |
7 | ///
8 | /// Additional data for the entity.
9 | ///
10 | public class FileSaveData
11 | {
12 | ///
13 | /// Gets or sets the value if the property has been set once.
14 | ///
15 | public bool PreviousDbModifiedIsSet { get; set; }
16 |
17 | ///
18 | /// Gets or sets the value indicating when the file was modified in the database.
19 | ///
20 | public DateTime PreviousDbModified { get; set; } = DateTime.MinValue;
21 |
22 | ///
23 | /// Gets or sets a value indicating whether the user should be queried of to reload the changed document from the file system.
24 | ///
25 | public bool ShouldQueryDiskReload { get; set; } = true;
26 |
27 | ///
28 | /// Gets or sets the previous encodings of the file save for undo possibility.
29 | /// Redo possibility does not exist.
30 | ///
31 | public List PreviousEncodings { get; set; } = new();
32 |
33 | ///
34 | /// A text describing the file line ending type(s) of the document.
35 | ///
36 | public string FileEndingText { get; set; } = string.Empty;
37 |
38 | ///
39 | /// Gets or sets the file line types and their descriptions.
40 | ///
41 | /// The file line types and their descriptions.
42 | public IEnumerable> FileLineTypesInternal { get; set; } =
43 | new List>();
44 |
45 | ///
46 | /// Gets or sets the value indicating when the file was modified in the database.
47 | ///
48 | public DateTime DbModified { get; set; } = DateTime.MinValue;
49 | }
--------------------------------------------------------------------------------
/ScriptNotepad/Editor/EntityHelpers/FileSessionHelper.cs:
--------------------------------------------------------------------------------
1 | #nullable enable
2 | using ScriptNotepad.Database.Entity.Entities;
3 |
4 | namespace ScriptNotepad.Editor.EntityHelpers;
5 |
6 | ///
7 | /// Helper methods for the entity.
8 | ///
9 | public static class FileSessionHelper
10 | {
11 | ///
12 | /// Generates, creates and sets a random path for the property in case the property value is null.
13 | ///
14 | /// The instance.
15 | /// The generated or already existing path for temporary files for the session.
16 | public static string? SetRandomPath(this FileSession fileSession)
17 | {
18 | if (fileSession.TemporaryFilePath == null && fileSession.UseFileSystemOnContents)
19 | {
20 | var path = Path.Combine(ApplicationDataDirectory, Path.GetRandomFileName());
21 | if (!Directory.Exists(path))
22 | {
23 | Directory.CreateDirectory(path);
24 | }
25 |
26 | fileSession.TemporaryFilePath = path;
27 |
28 | return path;
29 | }
30 |
31 | if (!fileSession.UseFileSystemOnContents)
32 | {
33 | fileSession.TemporaryFilePath = null;
34 | }
35 |
36 | return fileSession.TemporaryFilePath;
37 | }
38 |
39 | ///
40 | /// Gets or sets the application data directory for caching files in case the property is set to true.
41 | ///
42 | public static string ApplicationDataDirectory { get; set; } = string.Empty;
43 | }
--------------------------------------------------------------------------------
/ScriptNotepad/Editor/Utility/ModelHelpers/FileSessionHelper.cs:
--------------------------------------------------------------------------------
1 | #region License
2 | /*
3 | MIT License
4 |
5 | Copyright(c) 2020 Petteri Kautonen
6 |
7 | Permission is hereby granted, free of charge, to any person obtaining a copy
8 | of this software and associated documentation files (the "Software"), to deal
9 | in the Software without restriction, including without limitation the rights
10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | copies of the Software, and to permit persons to whom the Software is
12 | furnished to do so, subject to the following conditions:
13 |
14 | The above copyright notice and this permission notice shall be included in all
15 | copies or substantial portions of the Software.
16 |
17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 | SOFTWARE.
24 | */
25 | #endregion
26 |
27 | using System.Linq;
28 | using ScriptNotepad.Database.Entity.Context;
29 | using ScriptNotepad.Database.Entity.Entities;
30 | using ScriptNotepad.UtilityClasses.ErrorHandling;
31 |
32 | namespace ScriptNotepad.Editor.Utility.ModelHelpers;
33 |
34 | ///
35 | /// A class to help with entities.
36 | /// Implements the
37 | ///
38 | ///
39 | public class FileSessionHelper: ErrorHandlingBase
40 | {
41 | ///
42 | /// Deletes the entire session from the database context.
43 | ///
44 | /// The session to delete.
45 | /// true if the operation was successful, false otherwise.
46 | public static bool DeleteEntireSession(FileSession session)
47 | {
48 | try
49 | {
50 | var context = ScriptNotepadDbContext.DbContext;
51 |
52 | context.FileSaves.RemoveRange(context.FileSaves.Where(f => f.Session.SessionName == session.SessionName));
53 | context.MiscellaneousTextEntries.RemoveRange(context.MiscellaneousTextEntries.Where(f => f.Session.SessionName == session.SessionName));
54 | context.RecentFiles.RemoveRange(context.RecentFiles.Where(f => f.Session.SessionName == session.SessionName));
55 |
56 | session = context.FileSessions.FirstOrDefault(f => f.SessionName == session.SessionName);
57 |
58 | if (session != null)
59 | {
60 | context.FileSessions.Remove(session);
61 | }
62 |
63 | context.SaveChanges();
64 | return true; // success..
65 | }
66 | catch (Exception ex)
67 | {
68 | // log the exception..
69 | ExceptionLogAction?.Invoke(ex);
70 | return false; // failure..
71 | }
72 | }
73 | }
--------------------------------------------------------------------------------
/ScriptNotepad/FodyWeavers.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/ScriptNotepad/FormHexEdit.cs:
--------------------------------------------------------------------------------
1 | #region License
2 | /*
3 | MIT License
4 |
5 | Copyright(c) 2020 Petteri Kautonen
6 |
7 | Permission is hereby granted, free of charge, to any person obtaining a copy
8 | of this software and associated documentation files (the "Software"), to deal
9 | in the Software without restriction, including without limitation the rights
10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | copies of the Software, and to permit persons to whom the Software is
12 | furnished to do so, subject to the following conditions:
13 |
14 | The above copyright notice and this permission notice shall be included in all
15 | copies or substantial portions of the Software.
16 |
17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 | SOFTWARE.
24 | */
25 | #endregion
26 |
27 | using System.Windows.Forms;
28 | using System.Windows.Media;
29 | using VPKSoft.LangLib;
30 | using VPKSoft.PosLib;
31 | using WpfHexaEditor.Core;
32 |
33 | namespace ScriptNotepad;
34 |
35 | ///
36 | /// A hex editor for binary files.
37 | ///
38 | ///
39 | public partial class FormHexEdit : DBLangEngineWinforms
40 | {
41 | ///
42 | /// Initializes a new instance of the class.
43 | ///
44 | public FormHexEdit()
45 | {
46 | // Add this form to be positioned..
47 | PositionForms.Add(this, PositionCore.SizeChangeMode.MoveTopLeft);
48 |
49 | // add positioning..
50 | PositionCore.Bind(ApplicationType.WinForms);
51 |
52 | InitializeComponent();
53 |
54 | DBLangEngine.DBName = "lang.sqlite"; // Do the VPKSoft.LangLib == translation..
55 |
56 | if (Utils.ShouldLocalize() != null)
57 | {
58 | DBLangEngine.InitializeLanguage("ScriptNotepad.Localization.Messages", Utils.ShouldLocalize(), false);
59 | return; // After localization don't do anything more..
60 | }
61 |
62 | hexEditor.ForegroundSecondColor = Brushes.Blue;
63 | }
64 |
65 | private void toolStripButton1_Click(object sender, EventArgs e)
66 | {
67 | var fileDialog = new OpenFileDialog();
68 |
69 | if (fileDialog.ShowDialog() == DialogResult.OK && File.Exists(fileDialog.FileName))
70 | hexEditor.FileName = fileDialog.FileName;
71 | }
72 |
73 | private void toolStripButton2_Click(object sender, EventArgs e)
74 | {
75 | var fileDialog = new OpenFileDialog();
76 |
77 | if (fileDialog.ShowDialog() == DialogResult.OK && File.Exists(fileDialog.FileName))
78 | {
79 | hexEditor.LoadTblFile(fileDialog.FileName);
80 | hexEditor.TypeOfCharacterTable = CharacterTableType.TblFile;
81 | }
82 | }
83 | }
--------------------------------------------------------------------------------
/ScriptNotepad/Icons/astonished.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Icons/astonished.ico
--------------------------------------------------------------------------------
/ScriptNotepad/Icons/notepad0.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Icons/notepad0.ico
--------------------------------------------------------------------------------
/ScriptNotepad/Icons/notepad1.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Icons/notepad1.ico
--------------------------------------------------------------------------------
/ScriptNotepad/Icons/notepad2.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Icons/notepad2.ico
--------------------------------------------------------------------------------
/ScriptNotepad/Icons/notepad3.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Icons/notepad3.ico
--------------------------------------------------------------------------------
/ScriptNotepad/Icons/notepad4.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Icons/notepad4.ico
--------------------------------------------------------------------------------
/ScriptNotepad/Icons/notepad5.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Icons/notepad5.ico
--------------------------------------------------------------------------------
/ScriptNotepad/Icons/notepad6.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Icons/notepad6.ico
--------------------------------------------------------------------------------
/ScriptNotepad/Icons/notepad7.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Icons/notepad7.ico
--------------------------------------------------------------------------------
/ScriptNotepad/Installer/languages.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Installer/languages.ico
--------------------------------------------------------------------------------
/ScriptNotepad/Installer/license.txt:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright(c) 2019 Petteri Kautonen
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/ScriptNotepad/Installer/make_installer.bat:
--------------------------------------------------------------------------------
1 | :: MIT License
2 | ::
3 | :: Copyright(c) 2019 Petteri Kautonen
4 | ::
5 | :: Permission is hereby granted, free of charge, to any person obtaining a copy
6 | :: of this software and associated documentation files (the "Software"), to deal
7 | :: in the Software without restriction, including without limitation the rights
8 | :: to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | :: copies of the Software, and to permit persons to whom the Software is
10 | :: furnished to do so, subject to the following conditions:
11 | ::
12 | :: The above copyright notice and this permission notice shall be included in all
13 | :: copies or substantial portions of the Software.
14 | ::
15 | :: THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | :: IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | :: FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | :: AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | :: LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | :: OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | :: SOFTWARE.
22 |
23 | del ..\bin\Release\*.pdb
24 | del ..\bin\Release\*.xml
25 | ::del ..\bin\Release\*.config
26 | "c:\Program Files (x86)\NSIS\makensisw.exe" .\setup_scriptnotepad.nsi
27 | pause
28 |
29 |
--------------------------------------------------------------------------------
/ScriptNotepad/Installer/un_icon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Installer/un_icon.ico
--------------------------------------------------------------------------------
/ScriptNotepad/Localization/Forms/FormLocalizationHelper.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace ScriptNotepad.Localization.Forms
2 | {
3 | partial class FormLocalizationHelper
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.lbNotification = new System.Windows.Forms.Label();
32 | this.SuspendLayout();
33 | //
34 | // lbNotification
35 | //
36 | this.lbNotification.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
37 | | System.Windows.Forms.AnchorStyles.Left)
38 | | System.Windows.Forms.AnchorStyles.Right)));
39 | this.lbNotification.Font = new System.Drawing.Font("Microsoft Sans Serif", 27.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
40 | this.lbNotification.Location = new System.Drawing.Point(12, 9);
41 | this.lbNotification.Name = "lbNotification";
42 | this.lbNotification.Size = new System.Drawing.Size(390, 148);
43 | this.lbNotification.TabIndex = 0;
44 | this.lbNotification.Text = "This form is not intented to ever be visible.";
45 | //
46 | // FormLocalizationHelper
47 | //
48 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
49 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
50 | this.ClientSize = new System.Drawing.Size(414, 166);
51 | this.Controls.Add(this.lbNotification);
52 | this.Name = "FormLocalizationHelper";
53 | this.Text = "FormLocalizationHelper";
54 | this.ResumeLayout(false);
55 |
56 | }
57 |
58 | #endregion
59 |
60 | private System.Windows.Forms.Label lbNotification;
61 | }
62 | }
--------------------------------------------------------------------------------
/ScriptNotepad/Localization/IStaticMessageProvider.cs:
--------------------------------------------------------------------------------
1 | #region License
2 | /*
3 | MIT License
4 |
5 | Copyright(c) 2022 Petteri Kautonen
6 |
7 | Permission is hereby granted, free of charge, to any person obtaining a copy
8 | of this software and associated documentation files (the "Software"), to deal
9 | in the Software without restriction, including without limitation the rights
10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | copies of the Software, and to permit persons to whom the Software is
12 | furnished to do so, subject to the following conditions:
13 |
14 | The above copyright notice and this permission notice shall be included in all
15 | copies or substantial portions of the Software.
16 |
17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 | SOFTWARE.
24 | */
25 | #endregion
26 |
27 | using VPKSoft.LangLib;
28 |
29 | namespace ScriptNotepad.Localization;
30 |
31 | ///
32 | /// An interface providing access to the messages.
33 | ///
34 | public interface IStaticMessageProvider
35 | {
36 | ///
37 | /// Gets the message by the specified name localized to the current software culture setting.
38 | ///
39 | /// Name of the message.
40 | /// The default message to fall back into if a localized message was not found.
41 | /// A localized value for the specified message name.
42 | string GetMessage(string messageName, string defaultMessage);
43 | }
--------------------------------------------------------------------------------
/ScriptNotepad/Localization/Notepad++LanguageNames.txt:
--------------------------------------------------------------------------------
1 | "Normal text", "Normal text file"
2 | "PHP", "PHP Hypertext Preprocessor file"
3 | "C", "C source file"
4 | "C++", "C++ source file"
5 | "C#", "C# source file"
6 | "Objective-C", "Objective-C source file"
7 | "Java", "Java source file"
8 | "RC", "Windows Resource file"
9 | "HTML", "Hyper Text Markup Language file"
10 | "XML", "eXtensible Markup Language file"
11 | "Makefile", "Makefile"
12 | "Pascal", "Pascal source file"
13 | "Batch", "Batch file"
14 | "ini", "MS ini file"
15 | "NFO", "MSDOS Style/ASCII Art"
16 | "udf", "User Defined language file"
17 | "ASP", "Active Server Pages script file"
18 | "SQL", "Structured Query Language file"
19 | "Visual Basic", "Visual Basic file"
20 | "JavaScript", "JavaScript file"
21 | "CSS", "Cascade Style Sheets File"
22 | "Perl", "Perl source file"
23 | "Python", "Python file"
24 | "Lua", "Lua source File"
25 | "TeX", "TeX file"
26 | "Fortran free form", "Fortran free form source file"
27 | "Shell", "Unix script file"
28 | "ActionScript", "Flash ActionScript file"
29 | "NSIS", "Nullsoft Scriptable Install System script file"
30 | "TCL", "Tool Command Language file"
31 | "Lisp", "List Processing language file"
32 | "Scheme", "Scheme file"
33 | "Assembly", "Assembly language source file"
34 | "Diff", "Diff file"
35 | "Properties file", "Properties file"
36 | "PostScript", "PostScript file"
37 | "Ruby", "Ruby file"
38 | "Smalltalk", "Smalltalk file"
39 | "VHDL", "VHSIC Hardware Description Language file"
40 | "KiXtart", "KiXtart file"
41 | "AutoIt", "AutoIt"
42 | "CAML", "Categorical Abstract Machine Language"
43 | "Ada", "Ada file"
44 | "Verilog", "Verilog file"
45 | "MATLAB", "MATrix LABoratory"
46 | "Haskell", "Haskell"
47 | "Inno Setup", "Inno Setup script"
48 | "Internal Search", "Internal Search"
49 | "CMake", "CMake file"
50 | "YAML", "YAML Ain't Markup Language"
51 | "COBOL", "COmmon Business Oriented Language"
52 | "Gui4Cli", "Gui4Cli file"
53 | "D", "D programming language"
54 | "PowerShell", "Windows PowerShell"
55 | "R", "R programming language"
56 | "JSP", "JavaServer Pages script file"
57 | "CoffeeScript", "CoffeeScript file"
58 | "json", "JSON file"
59 | "JavaScript", "JavaScript file"
60 | "Fortran fixed form", "Fortran fixed form source file"
61 | "BaanC", "BaanC File"
62 | "S-Record", "Motorola S-Record binary data"
63 | "Intel HEX", "Intel HEX binary data"
64 | "Tektronix extended HEX", "Tektronix extended HEX binary data"
65 | "Swift", "Swift file"
66 | "ASN.1", "Abstract Syntax Notation One file"
67 | "AviSynth", "AviSynth scripts files"
68 | "BlitzBasic", "BlitzBasic file"
69 | "PureBasic", "PureBasic file"
70 | "FreeBasic", "FreeBasic file"
71 | "Csound", "Csound file"
72 | "Erlang", "Erlang file"
73 | "ESCRIPT", "ESCRIPT file"
74 | "Forth", "Forth file"
75 | "LaTeX", "LaTeX file"
76 | "MMIXAL", "MMIXAL file"
77 | "Nimrod", "Nimrod file"
78 | "Nncrontab", "extended crontab file"
79 | "OScript", "OScript source file"
80 | "REBOL", "REBOL file"
81 | "registry", "registry file"
82 | "Rust", "Rust file"
83 | "Spice", "spice file"
84 | "txt2tags", "txt2tags file"
85 | "Visual Prolog", "Visual Prolog file"
86 | "External", "External"
--------------------------------------------------------------------------------
/ScriptNotepad/Localization/SQLiteDatabase/CopyLang.bat:
--------------------------------------------------------------------------------
1 | :: MIT License
2 | ::
3 | :: Copyright(c) 2019 Petteri Kautonen
4 | ::
5 | :: Permission is hereby granted, free of charge, to any person obtaining a copy
6 | :: of this software and associated documentation files (the "Software"), to deal
7 | :: in the Software without restriction, including without limitation the rights
8 | :: to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | :: copies of the Software, and to permit persons to whom the Software is
10 | :: furnished to do so, subject to the following conditions:
11 | ::
12 | :: The above copyright notice and this permission notice shall be included in all
13 | :: copies or substantial portions of the Software.
14 | ::
15 | :: THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | :: IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | :: FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | :: AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | :: LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | :: OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | :: SOFTWARE.
22 |
23 | copy /y "%LOCALAPPDATA%\ScriptNotepad\lang.sqlite" .\
24 | pause
--------------------------------------------------------------------------------
/ScriptNotepad/Localization/SQLiteDatabase/lang.sqlite:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Localization/SQLiteDatabase/lang.sqlite
--------------------------------------------------------------------------------
/ScriptNotepad/Localization/StaticMessageLocalizationProvider.cs:
--------------------------------------------------------------------------------
1 | #region License
2 | /*
3 | MIT License
4 |
5 | Copyright(c) 2022 Petteri Kautonen
6 |
7 | Permission is hereby granted, free of charge, to any person obtaining a copy
8 | of this software and associated documentation files (the "Software"), to deal
9 | in the Software without restriction, including without limitation the rights
10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | copies of the Software, and to permit persons to whom the Software is
12 | furnished to do so, subject to the following conditions:
13 |
14 | The above copyright notice and this permission notice shall be included in all
15 | copies or substantial portions of the Software.
16 |
17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 | SOFTWARE.
24 | */
25 | #endregion
26 |
27 | using VPKSoft.LangLib;
28 |
29 | namespace ScriptNotepad.Localization;
30 |
31 | ///
32 | /// A class to provide static localized messages from the .
33 | /// Implements the
34 | ///
35 | ///
36 | public class StaticMessageLocalizationProvider: IStaticMessageProvider
37 | {
38 | ///
39 | /// Prevents a default instance of the class from being created.
40 | ///
41 | private StaticMessageLocalizationProvider()
42 | {
43 | Instance = this;
44 | }
45 |
46 | ///
47 | /// Gets or sets the of this class.
48 | ///
49 | /// The instance.
50 | public static StaticMessageLocalizationProvider Instance { get; set; } = new();
51 |
52 | ///
53 | /// Gets the message by the specified name localized to the current software culture setting.
54 | ///
55 | /// Name of the message.
56 | /// The default message to fall back into if a localized message was not found.
57 | /// A localized value for the specified message name.
58 | public string GetMessage(string messageName, string defaultMessage)
59 | {
60 | return DBLangEngine.GetStatMessage(messageName, defaultMessage);
61 | }
62 | }
--------------------------------------------------------------------------------
/ScriptNotepad/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | #region License
2 | /*
3 | MIT License
4 |
5 | Copyright(c) 2020 Petteri Kautonen
6 |
7 | Permission is hereby granted, free of charge, to any person obtaining a copy
8 | of this software and associated documentation files (the "Software"), to deal
9 | in the Software without restriction, including without limitation the rights
10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | copies of the Software, and to permit persons to whom the Software is
12 | furnished to do so, subject to the following conditions:
13 |
14 | The above copyright notice and this permission notice shall be included in all
15 | copies or substantial portions of the Software.
16 |
17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 | SOFTWARE.
24 | */
25 | #endregion
26 |
27 | using System.Runtime.InteropServices;
28 |
29 | // Setting ComVisible to false makes the types in this assembly not visible
30 | // to COM components. If you need to access a type in this assembly from
31 | // COM, set the ComVisible attribute to true on that type.
32 | [assembly: ComVisible(false)]
33 |
34 | // The following GUID is for the ID of the typelib if this project is exposed to COM
35 | [assembly: Guid("6b770702-6e99-439c-9679-61d048b3b876")]
36 |
--------------------------------------------------------------------------------
/ScriptNotepad/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace ScriptNotepad.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.5.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/ScriptNotepad/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/About.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/About.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/CSharp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/CSharp.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/Copy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/Copy.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/Delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/Delete.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/Down_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/Down_2.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/Erase.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/Erase.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/Fast-rewind.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/Fast-rewind.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/Find.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/Find.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/History.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/History.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/New document.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/New document.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/Paste.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/Paste.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/Play.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/Play.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/Playback.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/Playback.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/Redo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/Redo.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/Save.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/Save.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/SaveAs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/SaveAs.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/SaveWithDialog.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/SaveWithDialog.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/Script.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/Script.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/Undo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/Undo.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/Up.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/Up.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/arrow-down-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/arrow-down-2.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/arrow-up-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/arrow-up-2.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/arrow_left.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/arrow_left.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/arrow_right.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/arrow_right.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/astonished.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/astonished.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/book_next.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/book_next.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/book_previous.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/book_previous.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/close_small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/close_small.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/database-go.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/database-go.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/default.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/diff_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/diff_icon.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/discard_changes.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/discard_changes.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/duplicate_lines.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/duplicate_lines.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/edit-cut-red.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/edit-cut-red.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/education-languages.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/education-languages.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/find_replace.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/find_replace.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/find_tab.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/find_tab.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/folder-database.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/folder-database.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/folder-find.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/folder-find.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/folder-page.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/folder-page.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/format-text-uppercase.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/format-text-uppercase.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/jump_first.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/jump_first.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/jump_last.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/jump_last.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/krename.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/krename.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/list-add-5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/list-add-5.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/mark_words.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/mark_words.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/media-playback-start.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/media-playback-start.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/open_no_bom.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/open_no_bom.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/open_unknown_encoding.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/open_unknown_encoding.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/paragraph.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/paragraph.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/plugin-add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/plugin-add.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/plugin-delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/plugin-delete.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/plugin-error.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/plugin-error.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/plugin-go.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/plugin-go.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/preferences-plugin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/preferences-plugin.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/preferences.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/preferences.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/print_preview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/print_preview.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/printer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/printer.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/reload_disk.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/reload_disk.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/save_all.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/save_all.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/save_all_plus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/save_all_plus.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/session-properties.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/session-properties.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/sort_alphabet.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/sort_alphabet.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/spell_check.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/spell_check.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/split_view.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/split_view.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/style.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/style.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/swap_view.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/swap_view.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/tab_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/tab_arrow.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/tab_strikethrough.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/tab_strikethrough.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/textfield-rename.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/textfield-rename.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/unicode.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/unicode.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/up_down.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/up_down.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/word_wrap.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/word_wrap.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/word_wrap2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/word_wrap2.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/word_wrapped.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/word_wrapped.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/zoom_in.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/zoom_in.png
--------------------------------------------------------------------------------
/ScriptNotepad/Resources/zoom_out.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VPKSoft/ScriptNotepad/83eb5a1119f8ecd66f474bbf6451a11ea87638b4/ScriptNotepad/Resources/zoom_out.png
--------------------------------------------------------------------------------
/ScriptNotepad/Test/FormTestThingDialog.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace ScriptNotepad.Test
2 | {
3 | partial class FormTestThingDialog
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.SuspendLayout();
32 | //
33 | // FormTestThingDialog
34 | //
35 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
36 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
37 | this.ClientSize = new System.Drawing.Size(364, 221);
38 | this.Name = "FormTestThingDialog";
39 | this.Text = "FormTestThingDialog";
40 | this.ResumeLayout(false);
41 |
42 | }
43 |
44 | #endregion
45 | }
46 | }
--------------------------------------------------------------------------------
/ScriptNotepad/Test/FormTestThingDialog.cs:
--------------------------------------------------------------------------------
1 | #region License
2 | /*
3 | MIT License
4 |
5 | Copyright(c) 2020 Petteri Kautonen
6 |
7 | Permission is hereby granted, free of charge, to any person obtaining a copy
8 | of this software and associated documentation files (the "Software"), to deal
9 | in the Software without restriction, including without limitation the rights
10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | copies of the Software, and to permit persons to whom the Software is
12 | furnished to do so, subject to the following conditions:
13 |
14 | The above copyright notice and this permission notice shall be included in all
15 | copies or substantial portions of the Software.
16 |
17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 | SOFTWARE.
24 | */
25 | #endregion
26 |
27 | using System.Windows.Forms;
28 |
29 | namespace ScriptNotepad.Test;
30 |
31 | ///
32 | /// A test dialog form for various things (...).
33 | ///
34 | ///
35 | public partial class FormTestThingDialog : Form
36 | {
37 | ///
38 | /// Initializes a new instance of the class.
39 | ///
40 | public FormTestThingDialog()
41 | {
42 | InitializeComponent();
43 | }
44 | }
--------------------------------------------------------------------------------
/ScriptNotepad/UtilityClasses/Assembly/TestFileIsAssembly.cs:
--------------------------------------------------------------------------------
1 | #region License
2 | /*
3 | MIT License
4 |
5 | Copyright(c) 2020 Petteri Kautonen
6 |
7 | Permission is hereby granted, free of charge, to any person obtaining a copy
8 | of this software and associated documentation files (the "Software"), to deal
9 | in the Software without restriction, including without limitation the rights
10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | copies of the Software, and to permit persons to whom the Software is
12 | furnished to do so, subject to the following conditions:
13 |
14 | The above copyright notice and this permission notice shall be included in all
15 | copies or substantial portions of the Software.
16 |
17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 | SOFTWARE.
24 | */
25 | #endregion
26 |
27 | using ScriptNotepad.UtilityClasses.ErrorHandling;
28 | using System.Reflection;
29 |
30 | // (C): https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/assemblies-gac/how-to-determine-if-a-file-is-an-assembly
31 | namespace ScriptNotepad.UtilityClasses.Assembly;
32 |
33 | ///
34 | /// A class to test if an given file is a .NET Framework assembly.
35 | ///
36 | public class TestFileIsAssembly: ErrorHandlingBase
37 | {
38 | ///
39 | /// Determines whether the specified file is a .NET Framework assembly.
40 | ///
41 | /// The name of the file to test for.
42 | /// True if the file is an assembly; otherwise false.
43 | public static bool IsAssembly(string fileName)
44 | {
45 | try
46 | {
47 | AssemblyName.GetAssemblyName(fileName);
48 | return true;
49 | }
50 | catch (FileNotFoundException ex)
51 | {
52 | // log the exception..
53 | ExceptionLogAction?.Invoke(ex);
54 | return false;
55 | }
56 | catch (BadImageFormatException ex)
57 | {
58 | // log the exception..
59 | ExceptionLogAction?.Invoke(ex);
60 | return false;
61 | }
62 | catch (FileLoadException ex)
63 | {
64 | // log the exception..
65 | ExceptionLogAction?.Invoke(ex);
66 | return false;
67 | }
68 | catch (Exception ex)
69 | {
70 | // log the exception..
71 | ExceptionLogAction?.Invoke(ex);
72 | return false;
73 | }
74 | }
75 | }
--------------------------------------------------------------------------------
/ScriptNotepad/UtilityClasses/Clipboard/ClipboardTextHelper.cs:
--------------------------------------------------------------------------------
1 | #region License
2 | /*
3 | MIT License
4 |
5 | Copyright(c) 2020 Petteri Kautonen
6 |
7 | Permission is hereby granted, free of charge, to any person obtaining a copy
8 | of this software and associated documentation files (the "Software"), to deal
9 | in the Software without restriction, including without limitation the rights
10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | copies of the Software, and to permit persons to whom the Software is
12 | furnished to do so, subject to the following conditions:
13 |
14 | The above copyright notice and this permission notice shall be included in all
15 | copies or substantial portions of the Software.
16 |
17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 | SOFTWARE.
24 | */
25 | #endregion
26 |
27 | using ScriptNotepad.UtilityClasses.ErrorHandling;
28 |
29 | namespace ScriptNotepad.UtilityClasses.Clipboard;
30 |
31 | ///
32 | /// A simple class to help to set clipboard text contents.
33 | ///
34 | public class ClipboardTextHelper: ErrorHandlingBase
35 | {
36 | ///
37 | /// Set the Clipboard's contents to a given text.
38 | ///
39 | /// The text to set the clipboard's contents to.
40 | /// True if the operation was successful; otherwise false.
41 | public static bool ClipboardSetText(string text)
42 | {
43 | try
44 | {
45 | System.Windows.Forms.Clipboard.SetDataObject(text, true, 20, 150);
46 | return true;
47 | }
48 | catch (Exception ex)
49 | {
50 | // clipboard operation may fail..
51 | ExceptionLogAction?.Invoke(ex);
52 | return false;
53 | }
54 | }
55 | }
--------------------------------------------------------------------------------
/ScriptNotepad/UtilityClasses/CodeDom/IScriptRunner.cs:
--------------------------------------------------------------------------------
1 | #region License
2 | /*
3 | MIT License
4 |
5 | Copyright(c) 2022 Petteri Kautonen
6 |
7 | Permission is hereby granted, free of charge, to any person obtaining a copy
8 | of this software and associated documentation files (the "Software"), to deal
9 | in the Software without restriction, including without limitation the rights
10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | copies of the Software, and to permit persons to whom the Software is
12 | furnished to do so, subject to the following conditions:
13 |
14 | The above copyright notice and this permission notice shall be included in all
15 | copies or substantial portions of the Software.
16 |
17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 | SOFTWARE.
24 | */
25 | #endregion
26 |
27 | using System.Collections.Generic;
28 | using System.Threading.Tasks;
29 |
30 | namespace ScriptNotepad.UtilityClasses.CodeDom;
31 |
32 | ///
33 | /// An interface for the script runner classes.
34 | ///
35 | public interface IScriptRunner
36 | {
37 | ///
38 | /// Gets or sets the C# script runner.
39 | ///
40 | /// The C# script runner.
41 | public RoslynScriptRunner ScriptRunner { get; set; }
42 |
43 | ///
44 | /// Gets or sets the base "skeleton" C# code snippet for manipulating text.
45 | ///
46 | /// The base "skeleton" C# code snippet for manipulating text.
47 | string CSharpScriptBase { get; set; }
48 |
49 | ///
50 | /// Gets or sets the C# script code.
51 | ///
52 | /// The C# script code.
53 | string ScriptCode { get; set; }
54 |
55 | ///
56 | /// Gets or sets a value indicating whether the script compile failed.
57 | ///
58 | /// true if the script compile failed; otherwise, false.
59 | bool CompileFailed { get; set; }
60 |
61 | ///
62 | /// Gets the previous compile exception.
63 | ///
64 | /// The previous compile exception.
65 | public Exception CompileException { get; set; }
66 |
67 | ///
68 | /// Executes the script.
69 | ///
70 | /// The text in some format.
71 | /// The object containing the manipulated text if the operation was successful.
72 | Task