Ran code maid against this code.
This commit is contained in:
parent
1445945d9c
commit
591528ee91
309 changed files with 139399 additions and 140129 deletions
|
|
@ -3,13 +3,13 @@ Copyright (c) 2014, Lars Brubaker
|
|||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
|
|
@ -23,41 +23,37 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
The views and conclusions contained in the software and documentation are those
|
||||
of the authors and should not be interpreted as representing official policies,
|
||||
of the authors and should not be interpreted as representing official policies,
|
||||
either expressed or implied, of the FreeBSD Project.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using MatterHackers.Agg;
|
||||
using MatterHackers.Agg.UI;
|
||||
using MatterHackers.Agg.Font;
|
||||
using MatterHackers.Localizations;
|
||||
using MatterHackers.MatterControl.DataStorage;
|
||||
using MatterHackers.MatterControl.PrintQueue;
|
||||
using MatterHackers.MatterControl.SlicerConfiguration;
|
||||
using MatterHackers.VectorMath;
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||
{
|
||||
public class PartPreviewMainWindow : SystemWindow
|
||||
{
|
||||
event EventHandler unregisterEvents;
|
||||
PartPreviewContent partPreviewWidget;
|
||||
public class PartPreviewMainWindow : SystemWindow
|
||||
{
|
||||
private event EventHandler unregisterEvents;
|
||||
|
||||
public PartPreviewMainWindow(PrintItemWrapper printItem, View3DWidget.AutoRotate autoRotate3DView, View3DWidget.OpenMode openMode = View3DWidget.OpenMode.Viewing)
|
||||
: base(690, 340)
|
||||
{
|
||||
UseOpenGL = true;
|
||||
string partPreviewTitle = LocalizedString.Get("MatterControl");
|
||||
Title = string.Format("{0}: ", partPreviewTitle) + Path.GetFileName(printItem.Name);
|
||||
private PartPreviewContent partPreviewWidget;
|
||||
|
||||
partPreviewWidget = new PartPreviewContent(printItem, View3DWidget.WindowMode.StandAlone, autoRotate3DView, openMode);
|
||||
partPreviewWidget.Closed += (sender, e) =>
|
||||
{
|
||||
Close();
|
||||
};
|
||||
public PartPreviewMainWindow(PrintItemWrapper printItem, View3DWidget.AutoRotate autoRotate3DView, View3DWidget.OpenMode openMode = View3DWidget.OpenMode.Viewing)
|
||||
: base(690, 340)
|
||||
{
|
||||
UseOpenGL = true;
|
||||
string partPreviewTitle = LocalizedString.Get("MatterControl");
|
||||
Title = string.Format("{0}: ", partPreviewTitle) + Path.GetFileName(printItem.Name);
|
||||
|
||||
partPreviewWidget = new PartPreviewContent(printItem, View3DWidget.WindowMode.StandAlone, autoRotate3DView, openMode);
|
||||
partPreviewWidget.Closed += (sender, e) =>
|
||||
{
|
||||
Close();
|
||||
};
|
||||
|
||||
#if __ANDROID__
|
||||
TerminalWidget terminalWidget = new TerminalWidget(true);
|
||||
|
|
@ -69,30 +65,30 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
|
||||
AddHandlers();
|
||||
|
||||
Width = 640;
|
||||
Height = 480;
|
||||
Width = 640;
|
||||
Height = 480;
|
||||
|
||||
MinimumSize = new Vector2(400, 300);
|
||||
ShowAsSystemWindow();
|
||||
}
|
||||
MinimumSize = new Vector2(400, 300);
|
||||
ShowAsSystemWindow();
|
||||
}
|
||||
|
||||
private void AddHandlers()
|
||||
{
|
||||
ActiveTheme.Instance.ThemeChanged.RegisterEvent(ThemeChanged, ref unregisterEvents);
|
||||
}
|
||||
private void AddHandlers()
|
||||
{
|
||||
ActiveTheme.Instance.ThemeChanged.RegisterEvent(ThemeChanged, ref unregisterEvents);
|
||||
}
|
||||
|
||||
public void ThemeChanged(object sender, EventArgs e)
|
||||
{
|
||||
this.Invalidate();
|
||||
}
|
||||
public void ThemeChanged(object sender, EventArgs e)
|
||||
{
|
||||
this.Invalidate();
|
||||
}
|
||||
|
||||
public override void OnClosed(EventArgs e)
|
||||
{
|
||||
if (unregisterEvents != null)
|
||||
{
|
||||
unregisterEvents(this, null);
|
||||
}
|
||||
base.OnClosed(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
public override void OnClosed(EventArgs e)
|
||||
{
|
||||
if (unregisterEvents != null)
|
||||
{
|
||||
unregisterEvents(this, null);
|
||||
}
|
||||
base.OnClosed(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue