diff options
| author | Alex-TIMEHACK <[email protected]> | 2017-08-27 11:32:44 +0100 |
|---|---|---|
| committer | Alex-TIMEHACK <[email protected]> | 2017-08-27 11:32:44 +0100 |
| commit | f8f3bd0b1eb57c5a289513200b192e1d54d58292 (patch) | |
| tree | c9b79515fb81d90320ef386a522a5830875f6d49 /TimeHACK.Main/GlobalPrograms/WinClassicNotepad.cs | |
| parent | bffcb720f811623015ed4795032e5c57d1064c8a (diff) | |
| parent | cd6273d7c95098e0e0dd9948c6b5cec1c5f9cd3f (diff) | |
| download | histacom2-f8f3bd0b1eb57c5a289513200b192e1d54d58292.tar.gz histacom2-f8f3bd0b1eb57c5a289513200b192e1d54d58292.tar.bz2 histacom2-f8f3bd0b1eb57c5a289513200b192e1d54d58292.zip | |
Updated my fork!
Diffstat (limited to 'TimeHACK.Main/GlobalPrograms/WinClassicNotepad.cs')
| -rw-r--r-- | TimeHACK.Main/GlobalPrograms/WinClassicNotepad.cs | 136 |
1 files changed, 0 insertions, 136 deletions
diff --git a/TimeHACK.Main/GlobalPrograms/WinClassicNotepad.cs b/TimeHACK.Main/GlobalPrograms/WinClassicNotepad.cs deleted file mode 100644 index f9382e3..0000000 --- a/TimeHACK.Main/GlobalPrograms/WinClassicNotepad.cs +++ /dev/null @@ -1,136 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Drawing; -using System.Data; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; -using TimeHACK.Engine; -using static TimeHACK.Engine.FileDialogBoxManager; -using System.IO; - -namespace TimeHACK.OS.Win95.Win95Apps -{ - public partial class WinClassicNotepad : UserControl - { - string CurrentFilePath = ""; - public WinClassicNotepad() - { - InitializeComponent(); - foreach (ToolStripMenuItem item in menuStrip1.Items) - { - item.Font = new Font(TitleScreen.pfc.Families[0], 16F, FontStyle.Regular); - item.BackColor = Color.Silver; - item.BackgroundImage = Properties.Resources.sliversilver; - item.BackgroundImageLayout = ImageLayout.Center; - item.DisplayStyle = ToolStripItemDisplayStyle.Text; - } - } - - private void exitToolStripMenuItem_Click(object sender, EventArgs e) - { - this.ParentForm.Close(); - } - - private void aboutNotepadToolStripMenuItem_Click(object sender, EventArgs e) - { - WindowManager wm = new WindowManager(); - wm.StartAboutBox95("Notepad", "Microsoft Notepad", Properties.Resources.WinClassicNotepadBig); - } - - private void wordWrapToolStripMenuItem_Click(object sender, EventArgs e) - { - mainText.WordWrap = wordWrapToolStripMenuItem.Checked; - } - - private void selectAllToolStripMenuItem_Click(object sender, EventArgs e) - { - mainText.SelectAll(); - } - - private void undoToolStripMenuItem_Click(object sender, EventArgs e) - { - mainText.Undo(); - } - - private void cutToolStripMenuItem_Click(object sender, EventArgs e) - { - if (mainText.SelectedText.Length >= 0) mainText.Cut(); - } - - private void copyToolStripMenuItem_Click(object sender, EventArgs e) - { - if (mainText.SelectedText.Length >= 0) mainText.Copy(); - } - - private void pasteToolStripMenuItem_Click(object sender, EventArgs e) - { - mainText.Paste(); - } - - private void deleteToolStripMenuItem_Click(object sender, EventArgs e) - { - mainText.Text.Remove(mainText.SelectionStart, mainText.SelectedText.Length); - } - - private void timeDateToolStripMenuItem_Click(object sender, EventArgs e) - { - string DateTime = System.DateTime.Now.ToString("HH:mm tt dd/MM/yyyy"); - mainText.AppendText(DateTime); - } - - private void openToolStripMenuItem_Click(object sender, EventArgs e) - { - try - { - ActivateOpenFileDialog(".txt"); - string selectedPath = Program.OpenFileExplorerAsDialogAndReturnGivenPath(); - - if (selectedPath != "") - { - mainText.Text = ReadTextFile(selectedPath); - } - } - catch - { - } - } - - private void saveToolStripMenuItem_Click(object sender, EventArgs e) - { - if (CurrentFilePath == "") - { - // We aren't in a file right now - - SaveAs(); - } else { - - File.Delete(CurrentFilePath); - SaveSystem.CreateWindowsFile(new FileInfo(CurrentFilePath).Directory.FullName, CurrentFilePath.Split('\\').Last(), mainText.Text, 12, mainText.Text.Length); - } - } - - void SaveAs() - { - try - { - ActivateSaveFileDialog(".txt"); - string selectedPath = Program.OpenFileExplorerAsDialogAndReturnGivenPath(); - - if (selectedPath != "") - { - SaveSystem.CreateWindowsFile(new FileInfo(selectedPath).Directory.FullName, selectedPath.Split('\\').Last(), mainText.Text, 12, mainText.Text.Length); - CurrentFilePath = selectedPath; - } - } - catch { } - } - - private void saveAsToolStripMenuItem_Click(object sender, EventArgs e) - { - SaveAs(); - } - } -} |
