Skip to content

Commit

Permalink
Removed unused classes and fixed a few other things
Browse files Browse the repository at this point in the history
  • Loading branch information
AngryCarrot789 committed Mar 18, 2024
1 parent 08c0492 commit 8f0d888
Show file tree
Hide file tree
Showing 176 changed files with 668 additions and 11,609 deletions.
6 changes: 0 additions & 6 deletions SharpPad.sln
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpPad", "SharpPad\SharpP
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{DCFF60C3-0984-4579-B730-217FB8AAFF78}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DCFF60C3-0984-4579-B730-217FB8AAFF78}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DCFF60C3-0984-4579-B730-217FB8AAFF78}.Debug|x64.ActiveCfg = Debug|x64
{DCFF60C3-0984-4579-B730-217FB8AAFF78}.Debug|x64.Build.0 = Debug|x64
{DCFF60C3-0984-4579-B730-217FB8AAFF78}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DCFF60C3-0984-4579-B730-217FB8AAFF78}.Release|Any CPU.Build.0 = Release|Any CPU
{DCFF60C3-0984-4579-B730-217FB8AAFF78}.Release|x64.ActiveCfg = Release|x64
{DCFF60C3-0984-4579-B730-217FB8AAFF78}.Release|x64.Build.0 = Release|x64
EndGlobalSection
Expand Down
2 changes: 1 addition & 1 deletion SharpPad/AdvancedMenuService/MenuService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
//
// SharpPad is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU General Public License
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
//
// SharpPad is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU General Public License
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
//
// SharpPad is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU General Public License
Expand Down
15 changes: 15 additions & 0 deletions SharpPad/App.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="SharpPad.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
</sectionGroup>
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
</startup>
<userSettings>
<SharpPad.Properties.Settings>
<setting name="NotepadWindowWidth" serializeAs="String">
<value>600</value>
</setting>
<setting name="NotepadWindowHeight" serializeAs="String">
<value>600</value>
</setting>
</SharpPad.Properties.Settings>
</userSettings>
</configuration>
7 changes: 1 addition & 6 deletions SharpPad/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,11 @@
<ResourceDictionary Source="Themes/Controls.xaml"/>

<!-- General styles that don't really rely on that many other styles -->
<ResourceDictionary Source="Shortcuts/WPF/ShortcutStyles.xaml"/>
<ResourceDictionary Source="Controls/GeneralControlStyles.xaml"/>
<ResourceDictionary Source="Controls/Dragger/NumberDraggerStyles.xaml"/>
<ResourceDictionary Source="AdvancedMenuService/ContextService/Controls/ContextStyles.xaml"/>
<ResourceDictionary Source="Tasks/ActivityStyles.xaml"/>

<!-- Multi-select tree -->
<ResourceDictionary Source="Controls/TreeViews/Themes/EditTextBox.xaml"/>
<ResourceDictionary Source="Controls/TreeViews/Themes/MultiSelectTreeView.Aero2.xaml"/>
<ResourceDictionary Source="Controls/TreeViews/Themes/MultiSelectTreeViewItem.Aero2.xaml"/>

<ResourceDictionary Source="Notepads/Controls/NotepadControls.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
Expand Down
14 changes: 13 additions & 1 deletion SharpPad/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using SharpPad.Logger;
using SharpPad.Notepads;
using SharpPad.Notepads.Views;
using SharpPad.Properties;
using SharpPad.Services.Messages;
using SharpPad.Shortcuts.Managing;
using SharpPad.Shortcuts.WPF;
Expand Down Expand Up @@ -61,7 +62,18 @@ private void App_OnStartup(object sender, StartupEventArgs args) {
// Notepad init
Notepad notepad = new Notepad();

NotepadWindow window = new NotepadWindow();
int prefWidth = Settings.Default.NotepadWindowWidth;
if (prefWidth < 20)
prefWidth = 600;

int prefHeight = Settings.Default.NotepadWindowHeight;
if (prefHeight < 20)
prefHeight = 600;

NotepadWindow window = new NotepadWindow() {
Width = prefWidth, Height = prefHeight
};

window.Show();
window.Notepad = notepad;
this.MainWindow = window;
Expand Down
21 changes: 12 additions & 9 deletions SharpPad/ApplicationCore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

using System;
using System.Collections.Generic;
using System.Configuration;
using System.Diagnostics;
using System.IO;
using System.Threading.Tasks;
Expand All @@ -27,6 +28,7 @@
using SharpPad.Logger;
using SharpPad.Notepads;
using SharpPad.Notepads.Commands;
using SharpPad.Properties;
using SharpPad.Services.Files;
using SharpPad.Services.Messages;
using SharpPad.Services.WPF.Files;
Expand Down Expand Up @@ -79,9 +81,11 @@ public void OnApplicationLoaded(Notepad notepad, string[] args) {
if (args.Length > 0 && File.Exists(args[0])) {
OpenFilesCommand.OpenFile(notepad, args[0]);
}
else if (Debugger.IsAttached) {
this.LoadDefaultNotepad();

else {
#if DEBUG
this.Nodepad.AddNewEditorForDocument(new NotepadDocument() {DocumentName = "New Document 1", Document = {Text = ""}, IsModified = false});
this.Nodepad.AddNewEditorForDocument(new NotepadDocument() {DocumentName = "New Document 2", Document = {Text = "some text here"}, IsModified = false});
this.Nodepad.AddNewEditorForDocument(new NotepadDocument() {DocumentName = "New Document 3", Document = {Text = "some more text 111"}, IsModified = false});
TaskManager.Instance.RunTask(async () => {
IActivityProgress prog = TaskManager.Instance.CurrentTask.Progress;
prog.Text = "Dummy task";
Expand All @@ -96,15 +100,14 @@ public void OnApplicationLoaded(Notepad notepad, string[] args) {
prog.OnProgress(progressPerUpdate);
}
});
#else
this.Nodepad.AddNewEditorForDocument(new NotepadDocument() {DocumentName = "Document 1", Document = {Text = ""}, IsModified = false});
#endif
}
}

public void OnApplicationExiting() { }

private void LoadDefaultNotepad() {
this.Nodepad.AddNewEditor(new NotepadDocument() {DocumentName = "New Document 1", Document = {Text = ""}, IsModified = false});
this.Nodepad.AddNewEditor(new NotepadDocument() {DocumentName = "New Document 2", Document = {Text = "some text here"}, IsModified = false});
this.Nodepad.AddNewEditor(new NotepadDocument() {DocumentName = "New Document 3", Document = {Text = "some more text 111"}, IsModified = false});
public void OnApplicationExiting() {
Settings.Default.Save();
}

public void RegisterActions(CommandManager manager) {
Expand Down
2 changes: 1 addition & 1 deletion SharpPad/AsyncDemo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
//
// SharpPad is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU General Public License
Expand Down
96 changes: 0 additions & 96 deletions SharpPad/AttachedProperties/AttachedInteractivity.cs

This file was deleted.

Loading

0 comments on commit 8f0d888

Please sign in to comment.