Skip to content

Commit

Permalink
Removed redundant code
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergiu Marton committed Aug 2, 2018
1 parent 67808c9 commit dc3fc6d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 30 deletions.
14 changes: 1 addition & 13 deletions PseudoEditor/AboutWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Diagnostics;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace PseudoEditor
{
Expand Down
8 changes: 1 addition & 7 deletions PseudoEditor/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
using System.Windows;

namespace PseudoEditor
{
Expand Down
11 changes: 2 additions & 9 deletions PseudoEditor/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,10 @@
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Xml;
using ICSharpCode.AvalonEdit.Highlighting;
using ICSharpCode.AvalonEdit.Highlighting.Xshd;
Expand Down Expand Up @@ -155,7 +148,7 @@ private void SaveFileAs()

private void Close_Executed(object sender, ExecutedRoutedEventArgs e)
{
this.Close();
Close();
}

private void Editor_OnTextChanged(object sender, EventArgs e)
Expand Down Expand Up @@ -202,7 +195,7 @@ private void Execute_Executed(object sender, ExecutedRoutedEventArgs e)

if (_isFileSaved)
{
var process = Process.Start(InterpreterName, $"{_currentFileName} diagnostics");
Process.Start(InterpreterName, $"{_currentFileName} diagnostics");
}
}

Expand Down
3 changes: 2 additions & 1 deletion PseudocodeInterpreter/src/Objects/NumberLiteral.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.Globalization;
using PseudocodeInterpreter.Exceptions;

namespace PseudocodeInterpreter.Objects
Expand Down Expand Up @@ -105,7 +106,7 @@ public static implicit operator NumberLiteral(float number)
return new NumberLiteral(number.Value * -1);
}

public override string ToString() => Value.ToString();
public override string ToString() => Value.ToString(CultureInfo.CurrentCulture);

public override bool ToBoolean() => Math.Abs(Value) >= float.Epsilon;
}
Expand Down

0 comments on commit dc3fc6d

Please sign in to comment.