diff --git a/Text Editor Setup/Text Editor Setup-SetupFiles/Text_Editor_1_0_0_Setup.msi b/Text Editor Setup/Text Editor Setup-SetupFiles/Text_Editor_1_0_0_Setup.msi
deleted file mode 100644
index 3ec6290..0000000
Binary files a/Text Editor Setup/Text Editor Setup-SetupFiles/Text_Editor_1_0_0_Setup.msi and /dev/null differ
diff --git a/Text Editor Setup/Text Editor Setup-SetupFiles/Text_Editor_1_0_1_Setup.msi b/Text Editor Setup/Text Editor Setup-SetupFiles/Text_Editor_1_0_1_Setup.msi
deleted file mode 100644
index 56ac5fb..0000000
Binary files a/Text Editor Setup/Text Editor Setup-SetupFiles/Text_Editor_1_0_1_Setup.msi and /dev/null differ
diff --git a/Text Editor Setup/Text Editor Setup-SetupFiles/Text_Editor_1_0_2_Setup.msi b/Text Editor Setup/Text Editor Setup-SetupFiles/Text_Editor_1_0_2_Setup.msi
deleted file mode 100644
index 1b96729..0000000
Binary files a/Text Editor Setup/Text Editor Setup-SetupFiles/Text_Editor_1_0_2_Setup.msi and /dev/null differ
diff --git a/Text Editor Setup/Text Editor Setup-SetupFiles/Text_Editor_1_0_3_Setup.msi b/Text Editor Setup/Text Editor Setup-SetupFiles/Text_Editor_1_0_3_Setup.msi
deleted file mode 100644
index be493f2..0000000
Binary files a/Text Editor Setup/Text Editor Setup-SetupFiles/Text_Editor_1_0_3_Setup.msi and /dev/null differ
diff --git a/Text Editor Setup/Text Editor Setup-SetupFiles/Text_Editor_1_0_4_Setup.msi b/Text Editor Setup/Text Editor Setup-SetupFiles/Text_Editor_1_0_4_Setup.msi
deleted file mode 100644
index a49b951..0000000
Binary files a/Text Editor Setup/Text Editor Setup-SetupFiles/Text_Editor_1_0_4_Setup.msi and /dev/null differ
diff --git a/Text Editor Setup/Text Editor Setup-SetupFiles/Text_Editor_1_0_5_Setup.msi b/Text Editor Setup/Text Editor Setup-SetupFiles/Text_Editor_1_0_5_Setup.msi
deleted file mode 100644
index 2e1fc19..0000000
Binary files a/Text Editor Setup/Text Editor Setup-SetupFiles/Text_Editor_1_0_5_Setup.msi and /dev/null differ
diff --git a/Text Editor Setup/Text Editor Setup-SetupFiles/Text_Editor_1_0_6_Setup.msi b/Text Editor Setup/Text Editor Setup-SetupFiles/Text_Editor_1_0_6_Setup.msi
deleted file mode 100644
index d69a8ca..0000000
Binary files a/Text Editor Setup/Text Editor Setup-SetupFiles/Text_Editor_1_0_6_Setup.msi and /dev/null differ
diff --git a/Text Editor Setup/Text Editor Setup-SetupFiles/Text_Editor_1_0_7_Setup.msi b/Text Editor Setup/Text Editor Setup-SetupFiles/Text_Editor_1_0_7_Setup.msi
deleted file mode 100644
index 0ac18cd..0000000
Binary files a/Text Editor Setup/Text Editor Setup-SetupFiles/Text_Editor_1_0_7_Setup.msi and /dev/null differ
diff --git a/Text Editor Setup/Text Editor Setup-SetupFiles/Text_Editor_1_0_8_Setup.msi b/Text Editor Setup/Text Editor Setup-SetupFiles/Text_Editor_1_0_8_Setup.msi
deleted file mode 100644
index a7693b0..0000000
Binary files a/Text Editor Setup/Text Editor Setup-SetupFiles/Text_Editor_1_0_8_Setup.msi and /dev/null differ
diff --git a/Text Editor Setup/Text Editor Setup-SetupFiles/Text_Editor_1_0_9_Setup.msi b/Text Editor Setup/Text Editor Setup-SetupFiles/Text_Editor_1_0_9_Setup.msi
deleted file mode 100644
index 5bdc54a..0000000
Binary files a/Text Editor Setup/Text Editor Setup-SetupFiles/Text_Editor_1_0_9_Setup.msi and /dev/null differ
diff --git a/Text Editor Setup/Text Editor Setup-SetupFiles/Text_Editor_1_1_0_Setup.msi b/Text Editor Setup/Text Editor Setup-SetupFiles/Text_Editor_1_1_0_Setup.msi
deleted file mode 100644
index aff3fc9..0000000
Binary files a/Text Editor Setup/Text Editor Setup-SetupFiles/Text_Editor_1_1_0_Setup.msi and /dev/null differ
diff --git a/Text Editor Setup/Text Editor Setup-SetupFiles/Text_Editor_1_1_1_Setup.msi b/Text Editor Setup/Text Editor Setup-SetupFiles/Text_Editor_1_1_1_Setup.msi
deleted file mode 100644
index 88219d7..0000000
Binary files a/Text Editor Setup/Text Editor Setup-SetupFiles/Text_Editor_1_1_1_Setup.msi and /dev/null differ
diff --git a/Text Editor Setup/Text Editor Setup-cache/cacheIndex.txt b/Text Editor Setup/Text Editor Setup-cache/cacheIndex.txt
deleted file mode 100644
index a603ff0..0000000
Binary files a/Text Editor Setup/Text Editor Setup-cache/cacheIndex.txt and /dev/null differ
diff --git a/Text Editor Setup/Text Editor Setup-cache/part2/disk1.cab b/Text Editor Setup/Text Editor Setup-cache/part2/disk1.cab
deleted file mode 100644
index a76a527..0000000
Binary files a/Text Editor Setup/Text Editor Setup-cache/part2/disk1.cab and /dev/null differ
diff --git a/Text Editor Setup/Text Editor Setup-cache/part2/output-info.ini b/Text Editor Setup/Text Editor Setup-cache/part2/output-info.ini
deleted file mode 100644
index 78d3439..0000000
Binary files a/Text Editor Setup/Text Editor Setup-cache/part2/output-info.ini and /dev/null differ
diff --git a/Text Editor Setup/Text Editor Setup.aip b/Text Editor Setup/Text Editor Setup.aip
deleted file mode 100644
index 74011e6..0000000
--- a/Text Editor Setup/Text Editor Setup.aip
+++ /dev/null
@@ -1,181 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Text Editor Setup/Text Editor Setup.aiproj b/Text Editor Setup/Text Editor Setup.aiproj
deleted file mode 100644
index eb95f2c..0000000
--- a/Text Editor Setup/Text Editor Setup.aiproj
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
- All
- 2.0
- 9ada466b-06b1-4ad2-a7c8-545be09b9688
- msi
- .
- Text Editor Setup.aip
-
-
- .
- True
- Text Editor Setup
- Text Editor Setup
- Text Editor Setup
-
-
-
-
-
-
- Code
-
-
-
-
- Text Editor
- {8a82fa64-b600-4a9a-8ba9-7790026e09e8}
- True
- PrimaryOutput;References;LocalizedResourcesOutput
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Text Editor.sln b/Text Editor.sln
index 05ded88..d9b2537 100644
--- a/Text Editor.sln
+++ b/Text Editor.sln
@@ -5,8 +5,6 @@ VisualStudioVersion = 15.0.28307.1622
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Text Editor", "Text Editor\Text Editor.csproj", "{8A82FA64-B600-4A9A-8BA9-7790026E09E8}"
EndProject
-Project("{840C416C-B8F3-42BC-B0DD-F6BB14C9F8CB}") = "Text Editor Setup", "Text Editor Setup\Text Editor Setup.aiproj", "{9ADA466B-06B1-4AD2-A7C8-545BE09B9688}"
-EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
All|Any CPU = All|Any CPU
@@ -20,12 +18,6 @@ Global
{8A82FA64-B600-4A9A-8BA9-7790026E09E8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8A82FA64-B600-4A9A-8BA9-7790026E09E8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8A82FA64-B600-4A9A-8BA9-7790026E09E8}.Release|Any CPU.Build.0 = Release|Any CPU
- {9ADA466B-06B1-4AD2-A7C8-545BE09B9688}.All|Any CPU.ActiveCfg = DefaultBuild
- {9ADA466B-06B1-4AD2-A7C8-545BE09B9688}.All|Any CPU.Build.0 = DefaultBuild
- {9ADA466B-06B1-4AD2-A7C8-545BE09B9688}.Debug|Any CPU.ActiveCfg = DefaultBuild
- {9ADA466B-06B1-4AD2-A7C8-545BE09B9688}.Debug|Any CPU.Build.0 = DefaultBuild
- {9ADA466B-06B1-4AD2-A7C8-545BE09B9688}.Release|Any CPU.ActiveCfg = DefaultBuild
- {9ADA466B-06B1-4AD2-A7C8-545BE09B9688}.Release|Any CPU.Build.0 = DefaultBuild
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/Text Editor/AboutForm.Designer.cs b/Text Editor/AboutForm.Designer.cs
index d10d590..3af591d 100644
--- a/Text Editor/AboutForm.Designer.cs
+++ b/Text Editor/AboutForm.Designer.cs
@@ -63,7 +63,7 @@ private void InitializeComponent()
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(69, 13);
this.label2.TabIndex = 2;
- this.label2.Text = "Version 1.1.1";
+ this.label2.Text = "Version 1.1.2";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// label3
diff --git a/Text Editor/Form1.cs b/Text Editor/Form1.cs
index 6c3f844..465759e 100644
--- a/Text Editor/Form1.cs
+++ b/Text Editor/Form1.cs
@@ -23,6 +23,33 @@ public Form1()
mainEditor.WordWrap = Properties.Settings.Default.EnableWordWrap;
}
+ public Form1(string fileName) : this()
+ {
+ if (fileName == null)
+ return;
+
+ if (!File.Exists(fileName))
+ {
+ MessageBox.Show("Invalid file name.", "Cannot open file", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ return;
+ }
+ try
+ {
+ this.Text = Path.GetFileName(fileName) + " - Text Editor";
+ using (StreamReader sr = new StreamReader(fileName))
+ {
+ path = fileName;
+ Task text = sr.ReadToEndAsync();
+ mainEditor.Text = text.Result;
+ this.Text = this.Text.Replace("*", "");
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show(ex.Message, "Cannot open file", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
public static void QuickReplace(RichTextBox rtb, String word, String word2)
{
rtb.Text = rtb.Text.Replace(word, word2);
diff --git a/Text Editor/Inno/Text_Editor_1_1_2_Setup.exe b/Text Editor/Inno/Text_Editor_1_1_2_Setup.exe
new file mode 100644
index 0000000..6a3eaf0
Binary files /dev/null and b/Text Editor/Inno/Text_Editor_1_1_2_Setup.exe differ
diff --git a/Text Editor/Inno/Text_Editor_1_1_2_Setup.exe.exe b/Text Editor/Inno/Text_Editor_1_1_2_Setup.exe.exe
new file mode 100644
index 0000000..9fc4512
Binary files /dev/null and b/Text Editor/Inno/Text_Editor_1_1_2_Setup.exe.exe differ
diff --git a/Text Editor/Inno/installer.iss b/Text Editor/Inno/installer.iss
new file mode 100644
index 0000000..b2682dd
--- /dev/null
+++ b/Text Editor/Inno/installer.iss
@@ -0,0 +1,56 @@
+; Script generated by the Inno Setup Script Wizard.
+; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
+
+#define MyAppName "Text Editor"
+#define MyAppVersion "1.1.2"
+#define MyAppPublisher "Zach, Inc."
+#define MyAppExeName "Text Editor.exe"
+#define MyAppAssocName "Text File"
+#define MyAppAssocExt ".txt"
+#define MyAppAssocKey StringChange(MyAppAssocName, " ", "") + MyAppAssocExt
+
+[Setup]
+; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications.
+; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
+AppId={{AEAF16D2-ED3B-417F-ABB6-B8A032C7CE2F}
+AppName={#MyAppName}
+AppVersion={#MyAppVersion}
+;AppVerName={#MyAppName} {#MyAppVersion}
+AppPublisher={#MyAppPublisher}
+DefaultDirName=C:\Program Files (x86)\{#MyAppName}
+ChangesAssociations=yes
+DisableProgramGroupPage=yes
+LicenseFile=C:\Users\zacha\Documents\License Agreement.rtf
+; Uncomment the following line to run in non administrative install mode (install for current user only.)
+;PrivilegesRequired=lowest
+OutputDir=C:\Users\zacha\source\repos\Text Editor\Text Editor\Inno
+OutputBaseFilename=Text_Editor_1_1_2_Setup
+Compression=lzma
+SolidCompression=yes
+WizardStyle=modern
+
+[Languages]
+Name: "english"; MessagesFile: "compiler:Default.isl"
+
+[Tasks]
+Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
+
+[Files]
+Source: "C:\Users\zacha\source\repos\Text Editor\Text Editor\bin\Debug\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
+Source: "C:\Users\zacha\source\repos\Text Editor\Text Editor\bin\Debug\textedit-help.chm"; DestDir: "{app}"; Flags: ignoreversion
+; NOTE: Don't use "Flags: ignoreversion" on any shared system files
+
+[Registry]
+Root: HKCR; Subkey: "{#MyAppAssocExt}\OpenWithProgids"; ValueType: string; ValueName: "{#MyAppAssocKey}"; ValueData: ""; Flags: uninsdeletevalue
+Root: HKCR; Subkey: "{#MyAppAssocKey}"; ValueType: string; ValueName: ""; ValueData: "{#MyAppAssocName}"; Flags: uninsdeletekey
+Root: HKCR; Subkey: "{#MyAppAssocKey}\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "C:\Windows\System32\imageres.dll,246"
+Root: HKCR; Subkey: "{#MyAppAssocKey}\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\{#MyAppExeName}"" ""%1"""
+Root: HKCR; Subkey: "Applications\{#MyAppExeName}\SupportedTypes"; ValueType: string; ValueName: ".txt"; ValueData: ""
+
+[Icons]
+Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
+Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
+
+[Run]
+Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
+
diff --git a/Text Editor/Program.cs b/Text Editor/Program.cs
index 2d284bd..88ea2b2 100644
--- a/Text Editor/Program.cs
+++ b/Text Editor/Program.cs
@@ -12,11 +12,15 @@ static class Program
/// The main entry point for the application.
///
[STAThread]
- static void Main()
+ static void Main(string[] args)
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
- Application.Run(new Form1());
+ string fileName = null;
+
+ if (args != null && args.Length > 0)
+ fileName = args[0];
+ Application.Run(new Form1(fileName));
}
}
}
diff --git a/Text Editor/Text Editor.csproj b/Text Editor/Text Editor.csproj
index 015f186..e66fb36 100644
--- a/Text Editor/Text Editor.csproj
+++ b/Text Editor/Text Editor.csproj
@@ -107,5 +107,8 @@
+
+
+
\ No newline at end of file