Skip to content

Commit

Permalink
Ran the Formatter (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
aolszowka authored Oct 19, 2020
1 parent 2658890 commit bc998d7
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 46 deletions.
12 changes: 6 additions & 6 deletions ManipulativeReplacer/AboutManipulativeReplacerBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ partial class AboutManipulativeReplacerBox : Form
public AboutManipulativeReplacerBox()
{
InitializeComponent();
this.Text = String.Format("About {0}", AssemblyTitle);
this.labelProductName.Text = AssemblyProduct;
this.labelVersion.Text = String.Format("Version {0}", AssemblyVersion);
this.labelCopyright.Text = AssemblyCopyright;
this.labelCompanyName.Text = AssemblyCompany;
this.textBoxDescription.Text = AssemblyDescription;
Text = String.Format("About {0}", AssemblyTitle);
labelProductName.Text = AssemblyProduct;
labelVersion.Text = String.Format("Version {0}", AssemblyVersion);
labelCopyright.Text = AssemblyCopyright;
labelCompanyName.Text = AssemblyCompany;
textBoxDescription.Text = AssemblyDescription;
}

#region Assembly Attribute Accessors
Expand Down
14 changes: 7 additions & 7 deletions ManipulativeReplacer/BindableToolStripMenuItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ public BindingContext BindingContext
{
get
{
if (this.bindingContext == null)
if (bindingContext == null)
{
this.bindingContext = new BindingContext();
bindingContext = new BindingContext();
}

return this.bindingContext;
return bindingContext;
}
set
{
this.bindingContext = value;
bindingContext = value;
}
}

Expand All @@ -46,12 +46,12 @@ public ControlBindingsCollection DataBindings
{
get
{
if (this.dataBindings == null)
if (dataBindings == null)
{
this.dataBindings = new ControlBindingsCollection(this);
dataBindings = new ControlBindingsCollection(this);
}

return this.dataBindings;
return dataBindings;
}
}

Expand Down
62 changes: 31 additions & 31 deletions ManipulativeReplacer/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ public MainForm()
InitializeComponent();

// Set our default font (Consolas)
this.fontDialog.Font =
fontDialog.Font =
new Font("Consolas", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.SetTextBoxFont(this.fontDialog.Font);
SetTextBoxFont(fontDialog.Font);

// Bind the Advanced Pattern Saver
this.comboBoxInputPatternSaver.ComboBox.DataSource = this.avaliablePatterns;
this.comboBoxInputPatternSaver.ComboBox.DisplayMember = "Name";
this.comboBoxInputPatternSaver.ComboBox.ValueMember = "Value";
comboBoxInputPatternSaver.ComboBox.DataSource = avaliablePatterns;
comboBoxInputPatternSaver.ComboBox.DisplayMember = "Name";
comboBoxInputPatternSaver.ComboBox.ValueMember = "Value";

// Bind the Additional Program Settings
BindProgramSettings();
Expand Down Expand Up @@ -147,7 +147,7 @@ private static string _PerformReplacement(string inputPattern, string inputRepla
private static IEnumerable<string> _PerformReplacement(string inputPattern, string inputReplacement)
{
// Split the input string on the new line character
var replacementEntries =
string[] replacementEntries =
inputReplacement.Split(new string[] { Environment.NewLine, "\n" }, StringSplitOptions.RemoveEmptyEntries);

// Perform the replacement
Expand All @@ -167,9 +167,9 @@ private static IEnumerable<string> _PerformReplacement(string inputPattern, stri
/// <param name="font">The font to set the text boxes to</param>
private void SetTextBoxFont(Font font)
{
this.patternInputTextBox.Font = font;
this.replacementInputTextBox.Font = font;
this.outputTextBox.Font = font;
patternInputTextBox.Font = font;
replacementInputTextBox.Font = font;
outputTextBox.Font = font;
}

/// <summary>
Expand All @@ -179,7 +179,7 @@ private void SetTextBoxFont(Font font)
/// <param name="e">The arguments to the EventHandler.</param>
private void fontDialog_Apply(object sender, EventArgs e)
{
this.SetTextBoxFont(this.fontDialog.Font);
SetTextBoxFont(fontDialog.Font);
}

#endregion
Expand All @@ -194,14 +194,14 @@ private void fontDialog_Apply(object sender, EventArgs e)
private void changeFontToolStripMenuItem_Click(object sender, EventArgs e)
{
// Save off the previous font
Font previousFontValue = this.fontDialog.Font;
Font previousFontValue = fontDialog.Font;

if (this.fontDialog.ShowDialog() == DialogResult.Cancel)
if (fontDialog.ShowDialog() == DialogResult.Cancel)
{
this.fontDialog.Font = previousFontValue;
fontDialog.Font = previousFontValue;
}

this.SetTextBoxFont(this.fontDialog.Font);
SetTextBoxFont(fontDialog.Font);
}

/// <summary>
Expand All @@ -211,7 +211,7 @@ private void changeFontToolStripMenuItem_Click(object sender, EventArgs e)
/// <param name="e">The arguments to this event.</param>
private void exitToolStripMenuItem_Click(object sender, EventArgs e)
{
this.Close();
Close();
}

/// <summary>
Expand Down Expand Up @@ -267,7 +267,7 @@ private void outputPanelWordWrapToolStripMenuItem_CheckedChanged(object sender,
private void outputPanelSingleLineToolStripMenuItem_CheckedChanged(object sender, EventArgs e)
{
Settings.Default.OutputPanelSingleLine = ((ToolStripMenuItem)sender).Checked;
this.OnInputsChanged(sender, e);
OnInputsChanged(sender, e);
}

/// <summary>
Expand Down Expand Up @@ -314,7 +314,7 @@ private void resetSettingsToolStripMenuItem_Click(object sender, EventArgs e)
/// <param name="e">The arguments to this event.</param>
private void inputPanelDeleteButton_Click(object sender, EventArgs e)
{
this.avaliablePatterns.RemoveAt(this.comboBoxInputPatternSaver.ComboBox.SelectedIndex);
avaliablePatterns.RemoveAt(comboBoxInputPatternSaver.ComboBox.SelectedIndex);
}

/// <summary>
Expand All @@ -324,14 +324,14 @@ private void inputPanelDeleteButton_Click(object sender, EventArgs e)
/// <param name="e">The arguments to this event.</param>
private void inputPatternSaveButton_Click(object sender, EventArgs e)
{
string patternName = this.comboBoxInputPatternSaver.ComboBox.Text;
string patternValue = this.patternInputTextBox.Text;
string patternName = comboBoxInputPatternSaver.ComboBox.Text;
string patternValue = patternInputTextBox.Text;

// Save the Pattern
Pattern newPattern = new Pattern(patternName, patternValue);
this.avaliablePatterns.Add(newPattern);
this.comboBoxInputPatternSaver.ComboBox.SelectedIndex =
this.avaliablePatterns.IndexOf(newPattern);
avaliablePatterns.Add(newPattern);
comboBoxInputPatternSaver.ComboBox.SelectedIndex =
avaliablePatterns.IndexOf(newPattern);
}

/// <summary>
Expand All @@ -342,8 +342,8 @@ private void inputPatternSaveButton_Click(object sender, EventArgs e)
private void comboBoxInputPatternSaver_SelectedIndexChanged(object sender, EventArgs e)
{
Pattern selectedPattern =
this.avaliablePatterns[this.comboBoxInputPatternSaver.ComboBox.SelectedIndex];
this.patternInputTextBox.Text = selectedPattern.Value;
avaliablePatterns[comboBoxInputPatternSaver.ComboBox.SelectedIndex];
patternInputTextBox.Text = selectedPattern.Value;
}

#endregion
Expand All @@ -356,16 +356,16 @@ private void comboBoxInputPatternSaver_SelectedIndexChanged(object sender, Event
/// </summary>
private void BindProgramSettings()
{
this.patternPanelWordWrapToolStripMenuItem.DataBindings.Add("Checked", Settings.Default, "PatternPanelWordWrap");
this.patternInputTextBox.DataBindings.Add("WordWrap", Settings.Default, "PatternPanelWordWrap");
patternPanelWordWrapToolStripMenuItem.DataBindings.Add("Checked", Settings.Default, "PatternPanelWordWrap");
patternInputTextBox.DataBindings.Add("WordWrap", Settings.Default, "PatternPanelWordWrap");

this.inputPanelWordWrapToolStripMenuItem.DataBindings.Add("Checked", Settings.Default, "InputPanelWordWrap");
this.replacementInputTextBox.DataBindings.Add("WordWrap", Settings.Default, "InputPanelWordWrap");
inputPanelWordWrapToolStripMenuItem.DataBindings.Add("Checked", Settings.Default, "InputPanelWordWrap");
replacementInputTextBox.DataBindings.Add("WordWrap", Settings.Default, "InputPanelWordWrap");

this.outputPanelWordWrapToolStripMenuItem.DataBindings.Add("Checked", Settings.Default, "OutputPanelWordWrap");
this.outputTextBox.DataBindings.Add("WordWrap", Settings.Default, "OutputPanelWordWrap");
outputPanelWordWrapToolStripMenuItem.DataBindings.Add("Checked", Settings.Default, "OutputPanelWordWrap");
outputTextBox.DataBindings.Add("WordWrap", Settings.Default, "OutputPanelWordWrap");

this.outputPanelSingleLineToolStripMenuItem.DataBindings.Add("Checked", Settings.Default, "OutputPanelSingleLine");
outputPanelSingleLineToolStripMenuItem.DataBindings.Add("Checked", Settings.Default, "OutputPanelSingleLine");
}

#endregion
Expand Down
4 changes: 2 additions & 2 deletions ManipulativeReplacer/Pattern.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ public class Pattern
/// <param name="value">The pattern.</param>
public Pattern(string name, string value)
{
this.Name = name;
this.Value = value;
Name = name;
Value = value;
}

/// <summary>
Expand Down

0 comments on commit bc998d7

Please sign in to comment.