Skip to content

Commit dc3fc6d

Browse files
author
Sergiu Marton
committed
Removed redundant code
1 parent 67808c9 commit dc3fc6d

File tree

4 files changed

+6
-30
lines changed

4 files changed

+6
-30
lines changed

PseudoEditor/AboutWindow.xaml.cs

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,6 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Diagnostics;
4-
using System.Linq;
5-
using System.Text;
6-
using System.Threading.Tasks;
1+
using System.Diagnostics;
72
using System.Windows;
8-
using System.Windows.Controls;
9-
using System.Windows.Data;
10-
using System.Windows.Documents;
11-
using System.Windows.Input;
12-
using System.Windows.Media;
13-
using System.Windows.Media.Imaging;
143
using System.Windows.Navigation;
15-
using System.Windows.Shapes;
164

175
namespace PseudoEditor
186
{

PseudoEditor/App.xaml.cs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Configuration;
4-
using System.Data;
5-
using System.Linq;
6-
using System.Threading.Tasks;
7-
using System.Windows;
1+
using System.Windows;
82

93
namespace PseudoEditor
104
{

PseudoEditor/MainWindow.xaml.cs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,10 @@
33
using System.Diagnostics;
44
using System.IO;
55
using System.Linq;
6-
using System.Text;
7-
using System.Threading.Tasks;
86
using System.Windows;
97
using System.Windows.Controls;
10-
using System.Windows.Data;
11-
using System.Windows.Documents;
128
using System.Windows.Input;
139
using System.Windows.Media;
14-
using System.Windows.Media.Imaging;
15-
using System.Windows.Navigation;
16-
using System.Windows.Shapes;
1710
using System.Xml;
1811
using ICSharpCode.AvalonEdit.Highlighting;
1912
using ICSharpCode.AvalonEdit.Highlighting.Xshd;
@@ -155,7 +148,7 @@ private void SaveFileAs()
155148

156149
private void Close_Executed(object sender, ExecutedRoutedEventArgs e)
157150
{
158-
this.Close();
151+
Close();
159152
}
160153

161154
private void Editor_OnTextChanged(object sender, EventArgs e)
@@ -202,7 +195,7 @@ private void Execute_Executed(object sender, ExecutedRoutedEventArgs e)
202195

203196
if (_isFileSaved)
204197
{
205-
var process = Process.Start(InterpreterName, $"{_currentFileName} diagnostics");
198+
Process.Start(InterpreterName, $"{_currentFileName} diagnostics");
206199
}
207200
}
208201

PseudocodeInterpreter/src/Objects/NumberLiteral.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System;
2+
using System.Globalization;
23
using PseudocodeInterpreter.Exceptions;
34

45
namespace PseudocodeInterpreter.Objects
@@ -105,7 +106,7 @@ public static implicit operator NumberLiteral(float number)
105106
return new NumberLiteral(number.Value * -1);
106107
}
107108

108-
public override string ToString() => Value.ToString();
109+
public override string ToString() => Value.ToString(CultureInfo.CurrentCulture);
109110

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

0 commit comments

Comments
 (0)