diff options
| author | Alex-TIMEHACK <[email protected]> | 2017-11-04 09:43:02 +0000 |
|---|---|---|
| committer | Alex-TIMEHACK <[email protected]> | 2017-11-04 09:43:02 +0000 |
| commit | 6ab1468786f1e865e9ff408d32149f9c9620d844 (patch) | |
| tree | 45bac91aba019027213bdd37bac9f43c0a93853e /Histacom2.Engine | |
| parent | 2a473d05a34afe51cf0f5340cbdd48ad4e771657 (diff) | |
| download | histacom2-6ab1468786f1e865e9ff408d32149f9c9620d844.tar.gz histacom2-6ab1468786f1e865e9ff408d32149f9c9620d844.tar.bz2 histacom2-6ab1468786f1e865e9ff408d32149f9c9620d844.zip | |
Fix bugs
...and get rid of all == false and == true
Diffstat (limited to 'Histacom2.Engine')
| -rw-r--r-- | Histacom2.Engine/DesktopController.cs | 4 | ||||
| -rw-r--r-- | Histacom2.Engine/FileDialogBoxManager.cs | 7 | ||||
| -rw-r--r-- | Histacom2.Engine/SaveSystem.cs | 4 | ||||
| -rw-r--r-- | Histacom2.Engine/Template/WinClassic.cs | 4 | ||||
| -rw-r--r-- | Histacom2.Engine/Template/WinXP.cs | 2 | ||||
| -rw-r--r-- | Histacom2.Engine/UI/ClassicDropDown.cs | 12 | ||||
| -rw-r--r-- | Histacom2.Engine/UI/ClassicTextbox.cs | 12 | ||||
| -rw-r--r-- | Histacom2.Engine/WindowManager.cs | 12 |
8 files changed, 44 insertions, 13 deletions
diff --git a/Histacom2.Engine/DesktopController.cs b/Histacom2.Engine/DesktopController.cs index 8ea9775..cb09333 100644 --- a/Histacom2.Engine/DesktopController.cs +++ b/Histacom2.Engine/DesktopController.cs @@ -17,9 +17,9 @@ namespace Histacom2.Engine string directoryFileInfo = File.ReadAllText(Path.Combine(reqDirectory, "_data.info")); FileSystemFolderInfo toRead = JsonConvert.DeserializeObject<FileSystemFolderInfo>(directoryFileInfo); - if (returnYesIfProtected == true) + if (returnYesIfProtected) { - if (toRead.IsProtected == true) + if (toRead.IsProtected) { return "yes"; } diff --git a/Histacom2.Engine/FileDialogBoxManager.cs b/Histacom2.Engine/FileDialogBoxManager.cs index 161c393..9f0b2ce 100644 --- a/Histacom2.Engine/FileDialogBoxManager.cs +++ b/Histacom2.Engine/FileDialogBoxManager.cs @@ -28,6 +28,13 @@ namespace Histacom2.Engine OnlyViewExtension = ExtensionToView; } + public static void DeactivateFileDialog() + { + IsInOpenDialog = false; + IsInSaveDialog = false; + OnlyViewExtension = ""; + } + public static string ReadTextFile(string path) { try diff --git a/Histacom2.Engine/SaveSystem.cs b/Histacom2.Engine/SaveSystem.cs index 70609a2..fcc6606 100644 --- a/Histacom2.Engine/SaveSystem.cs +++ b/Histacom2.Engine/SaveSystem.cs @@ -127,7 +127,7 @@ namespace Histacom2.Engine { var save = new Save(); save.ExperiencedStories = new List<string>(); - if (DevMode == true) + if (DevMode) { if (ProfileName == "xpbad") { @@ -373,7 +373,7 @@ namespace Histacom2.Engine info.SubDirs = new List<THDirInfo>(256); info.ByteSize = 0; - if (updateParent == true) + if (updateParent) { if ((parent != ProfileDirectory)) { diff --git a/Histacom2.Engine/Template/WinClassic.cs b/Histacom2.Engine/Template/WinClassic.cs index 988f268..68cba3d 100644 --- a/Histacom2.Engine/Template/WinClassic.cs +++ b/Histacom2.Engine/Template/WinClassic.cs @@ -45,7 +45,7 @@ namespace Histacom2.Engine.Template private void Programtopbar_drag(object sender, MouseEventArgs e) { - if (e.Button == MouseButtons.Left && max == false) + if (e.Button == MouseButtons.Left && !max) { ReleaseCapture(); SendMessage(Handle, WM_NCLBUTTONDOWN, HT_CAPTION, 0); @@ -306,7 +306,7 @@ namespace Histacom2.Engine.Template private void maximizebutton_Click(object sender, EventArgs e) { - if (max == false) + if (!max) { this.right.Hide(); this.left.Hide(); diff --git a/Histacom2.Engine/Template/WinXP.cs b/Histacom2.Engine/Template/WinXP.cs index fa26611..2f51c1c 100644 --- a/Histacom2.Engine/Template/WinXP.cs +++ b/Histacom2.Engine/Template/WinXP.cs @@ -51,7 +51,7 @@ namespace Histacom2.Engine.Template private void top_MouseDown(object sender, MouseEventArgs e) { - if (e.Button == MouseButtons.Left && max == false) + if (e.Button == MouseButtons.Left && !max) { ReleaseCapture(); SendMessage(Handle, WM_NCLBUTTONDOWN, HT_CAPTION, 0); diff --git a/Histacom2.Engine/UI/ClassicDropDown.cs b/Histacom2.Engine/UI/ClassicDropDown.cs index 0b56cb9..93b4a62 100644 --- a/Histacom2.Engine/UI/ClassicDropDown.cs +++ b/Histacom2.Engine/UI/ClassicDropDown.cs @@ -17,6 +17,18 @@ namespace Histacom2.Engine.UI public bool UseSystemPasswordChar { get; set; } public bool dropDownShown; + public override string Text + { + get + { + return textBox1.Text; + } + set + { + textBox1.Text = value; + } + } + public static Color textboxcolor = Color.Black; public static Color _lightBack = Color.Silver; diff --git a/Histacom2.Engine/UI/ClassicTextbox.cs b/Histacom2.Engine/UI/ClassicTextbox.cs index 8f1f9c3..f89df03 100644 --- a/Histacom2.Engine/UI/ClassicTextbox.cs +++ b/Histacom2.Engine/UI/ClassicTextbox.cs @@ -19,6 +19,18 @@ namespace Histacom2.Engine.UI public static Color _lightBack = Color.Silver; public static Color _darkBack = Color.Silver; + public override string Text + { + get + { + return textBox1.Text; + } + set + { + textBox1.Text = value; + } + } + public ClassicTextBox() { InitializeComponent(); diff --git a/Histacom2.Engine/WindowManager.cs b/Histacom2.Engine/WindowManager.cs index 12f7954..04de392 100644 --- a/Histacom2.Engine/WindowManager.cs +++ b/Histacom2.Engine/WindowManager.cs @@ -67,14 +67,14 @@ namespace Histacom2.Engine else app.programIcon.Image = icon; // Check if Max button is enabled and set proper X for Min button - if (MaxButton == false) + if (!MaxButton) { app.maximizebutton.Visible = false; app.minimizebutton.Location = new Point(app.closebutton.Location.X - 14, app.minimizebutton.Location.Y); } // Check if Min button is enabled - if (MinButton == false) + if (!MinButton) { app.minimizebutton.Visible = false; app.minimizebutton.Location = new Point(app.minimizebutton.Location.X, app.minimizebutton.Location.Y); @@ -102,7 +102,7 @@ namespace Histacom2.Engine // Show the app app.TopMost = true; - if (ShowApplicationAsDialog == false) { app.Show(); } else { app.ShowDialog(); } + if (!ShowApplicationAsDialog) { app.Show(); } else { app.ShowDialog(); } return app; } @@ -134,14 +134,14 @@ namespace Histacom2.Engine else app.programIcon.Image = icon; // Check if Max button is enabled and set proper X for Min button - if (MaxButton == false) + if (!MaxButton) { app.maximizebutton.Visible = false; app.minimizebutton.Location = new Point(app.closebutton.Location.X - 14, app.minimizebutton.Location.Y); } // Check if Min button is enabled - if (MinButton == false) + if (!MinButton) { app.minimizebutton.Visible = false; app.minimizebutton.Location = new Point(app.minimizebutton.Location.X, app.minimizebutton.Location.Y); @@ -165,7 +165,7 @@ namespace Histacom2.Engine // Show the app app.TopMost = true; - if (ShowApplicationAsDialog == false) { app.Show(); } else { app.ShowDialog(); } + if (!ShowApplicationAsDialog) { app.Show(); } else { app.ShowDialog(); } return app; } |
