Private
Public Access
Misc changes
This commit is contained in:
1 parent
33c20bdaf6
commit
18196654b6
3 files changed
+8
-7
No files matched your search
@@ -40,8 +40,7 @@ namespace Advanced_Software_Engineering {
|
||||
/// <summary>
|
||||
/// Creates a new Commander instance without a context. Should only be used for testing purpouses.
|
||||
/// </summary>
|
||||
/// <param name="command">empty string</param>
|
||||
public Commander(string command = "") {
|
||||
public Commander() {
|
||||
Console.WriteLine("Warning! No graphics context!!!");
|
||||
}
|
||||
|
||||
|
||||
@@ -141,8 +141,9 @@ namespace Advanced_Software_Engineering {
|
||||
throw new Exception("Cannot have less than two points in a line");
|
||||
}
|
||||
|
||||
GraphicsPath path = new GraphicsPath();
|
||||
path.FillMode = FillMode.Winding;
|
||||
GraphicsPath path = new GraphicsPath {
|
||||
FillMode = FillMode.Winding
|
||||
};
|
||||
|
||||
path.AddLines(points);
|
||||
path.AddLine(points[0], points.Last()); //Add final line
|
||||
|
||||
@@ -68,9 +68,10 @@ namespace Advanced_Software_Engineering {
|
||||
}
|
||||
|
||||
private void saveFileAs() {
|
||||
SaveFileDialog saveFileDialog = new SaveFileDialog();
|
||||
saveFileDialog.OverwritePrompt = true;
|
||||
saveFileDialog.DefaultExt = ".txt";
|
||||
SaveFileDialog saveFileDialog = new SaveFileDialog {
|
||||
OverwritePrompt = true,
|
||||
DefaultExt = ".txt"
|
||||
};
|
||||
if (fileName != "") saveFileDialog.FileName = fileName;
|
||||
saveFileDialog.ValidateNames = true;
|
||||
|
||||
|
||||
Reference in new issue
Block a user