2014-04-15 18:13:27 -07:00
|
|
|
|
/*
|
|
|
|
|
|
Copyright (c) 2014, Kevin Pope
|
|
|
|
|
|
All rights reserved.
|
|
|
|
|
|
|
|
|
|
|
|
Redistribution and use in source and binary forms, with or without
|
2015-04-08 15:20:10 -07:00
|
|
|
|
modification, are permitted provided that the following conditions are met:
|
2014-04-15 18:13:27 -07:00
|
|
|
|
|
|
|
|
|
|
1. Redistributions of source code must retain the above copyright notice, this
|
2015-04-08 15:20:10 -07:00
|
|
|
|
list of conditions and the following disclaimer.
|
2014-04-15 18:13:27 -07:00
|
|
|
|
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
|
|
|
|
this list of conditions and the following disclaimer in the documentation
|
2015-04-08 15:20:10 -07:00
|
|
|
|
and/or other materials provided with the distribution.
|
2014-04-15 18:13:27 -07:00
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
|
|
|
|
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
|
|
|
|
|
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
|
|
|
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
|
|
|
|
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
|
|
|
|
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
|
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
|
|
|
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
|
|
|
|
|
|
|
|
The views and conclusions contained in the software and documentation are those
|
2015-04-08 15:20:10 -07:00
|
|
|
|
of the authors and should not be interpreted as representing official policies,
|
2014-04-15 18:13:27 -07:00
|
|
|
|
either expressed or implied, of the FreeBSD Project.
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
using System;
|
2014-03-30 12:22:34 -07:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.ComponentModel;
|
2015-04-08 15:20:10 -07:00
|
|
|
|
using System.Linq;
|
2014-03-30 12:22:34 -07:00
|
|
|
|
using System.Reflection;
|
2015-04-08 15:20:10 -07:00
|
|
|
|
using System.Text;
|
2014-03-30 12:22:34 -07:00
|
|
|
|
using System.Threading;
|
Move to new library model and view
- Add new listview control for library content
- Migrate library providers to containers
- Cloud, Sqlite, Directories, Queue, History
- Migrate SideBar components to containers
- Primatives, Text, Braille, ImageConverter
- Create new library container types
- Zip files, Calibration parts, Printer SDCards
- Reduce leftnav to Library, Settings, Controls, Options
- Add DragDrop support for image content
2017-05-19 22:33:55 -07:00
|
|
|
|
using MatterHackers.Agg.UI;
|
2014-03-30 12:22:34 -07:00
|
|
|
|
|
|
|
|
|
|
namespace MatterHackers.MatterControl.DataStorage
|
|
|
|
|
|
{
|
2015-06-25 12:19:19 -07:00
|
|
|
|
public class ApplicationSession : Entity
|
2015-04-08 15:20:10 -07:00
|
|
|
|
{
|
2015-06-25 12:19:19 -07:00
|
|
|
|
public ApplicationSession()
|
|
|
|
|
|
: base()
|
|
|
|
|
|
{
|
|
|
|
|
|
SessionStart = DateTime.Now;
|
|
|
|
|
|
PrintCount = 0;
|
|
|
|
|
|
}
|
2015-04-08 15:20:10 -07:00
|
|
|
|
|
2015-06-25 12:19:19 -07:00
|
|
|
|
public int PrintCount { get; set; }
|
2015-04-08 15:20:10 -07:00
|
|
|
|
|
2015-06-25 12:19:19 -07:00
|
|
|
|
public DateTime SessionEnd { get; set; }
|
2015-04-08 15:20:10 -07:00
|
|
|
|
|
2015-06-25 12:19:19 -07:00
|
|
|
|
public DateTime SessionStart { get; set; }
|
|
|
|
|
|
}
|
2015-04-08 15:20:10 -07:00
|
|
|
|
|
2015-06-25 12:19:19 -07:00
|
|
|
|
public class CustomCommands : Entity
|
|
|
|
|
|
{
|
|
|
|
|
|
public DateTime DateLastModified { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public string Name { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[Indexed]
|
|
|
|
|
|
public int PrinterId { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public string Value { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public override void Commit()
|
2015-04-08 15:20:10 -07:00
|
|
|
|
{
|
2015-06-25 12:19:19 -07:00
|
|
|
|
DateLastModified = DateTime.Now;
|
|
|
|
|
|
base.Commit();
|
2015-04-08 15:20:10 -07:00
|
|
|
|
}
|
2015-06-25 12:19:19 -07:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public class Entity
|
|
|
|
|
|
{
|
|
|
|
|
|
protected int hashCode = 0;
|
|
|
|
|
|
|
|
|
|
|
|
protected bool isSaved;
|
2015-04-08 15:20:10 -07:00
|
|
|
|
|
|
|
|
|
|
private static readonly int maxRetries = 20;
|
2015-06-25 12:19:19 -07:00
|
|
|
|
|
|
|
|
|
|
private IEnumerable<PropertyInfo> properties;
|
|
|
|
|
|
|
2015-04-08 15:20:10 -07:00
|
|
|
|
private int retryCount = 0;
|
|
|
|
|
|
|
2015-06-25 12:19:19 -07:00
|
|
|
|
public Entity()
|
2015-04-08 15:20:10 -07:00
|
|
|
|
{
|
2015-06-25 12:19:19 -07:00
|
|
|
|
isSaved = false;
|
2015-04-08 15:20:10 -07:00
|
|
|
|
}
|
|
|
|
|
|
|
2015-06-25 12:19:19 -07:00
|
|
|
|
[PrimaryKey, AutoIncrement]
|
|
|
|
|
|
public int Id { get; set; }
|
2015-04-08 15:20:10 -07:00
|
|
|
|
|
|
|
|
|
|
public virtual void Commit()
|
|
|
|
|
|
{
|
2020-05-21 10:54:57 -07:00
|
|
|
|
// Assumes that autoincremented ids start with 1
|
2015-04-08 15:20:10 -07:00
|
|
|
|
if (this.Id == 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
TryHandleInsert();
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
TryHandleUpdate();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void Delete()
|
|
|
|
|
|
{
|
|
|
|
|
|
Datastore.Instance.dbSQLite.Delete(this);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public override int GetHashCode()
|
|
|
|
|
|
{
|
|
|
|
|
|
StringBuilder bigStringForHashCode = new StringBuilder();
|
|
|
|
|
|
|
|
|
|
|
|
if (this.hashCode == 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
properties = this.GetType()
|
|
|
|
|
|
.GetProperties(BindingFlags.Instance |
|
|
|
|
|
|
BindingFlags.Public)
|
|
|
|
|
|
// Ignore non-string properties
|
|
|
|
|
|
.Where(prop => prop.PropertyType == typeof(string) || prop.PropertyType == typeof(int))
|
|
|
|
|
|
// Ignore indexers
|
|
|
|
|
|
.Where(prop => prop.GetIndexParameters().Length == 0)
|
|
|
|
|
|
// Must be both readable and writable
|
|
|
|
|
|
.Where(prop => prop.CanWrite && prop.CanRead);
|
|
|
|
|
|
|
|
|
|
|
|
foreach (PropertyInfo prop in properties)
|
|
|
|
|
|
{
|
|
|
|
|
|
object objectHoldingValue = prop.GetValue(this, null);
|
|
|
|
|
|
if (objectHoldingValue != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
string value = objectHoldingValue.ToString();
|
|
|
|
|
|
if (value != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
bigStringForHashCode.Append(prop.Name);
|
|
|
|
|
|
bigStringForHashCode.Append(value);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2020-07-03 12:05:28 -07:00
|
|
|
|
|
2015-04-08 15:20:10 -07:00
|
|
|
|
this.hashCode = bigStringForHashCode.ToString().GetHashCode();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return this.hashCode;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2015-06-25 12:19:19 -07:00
|
|
|
|
private void TryHandleInsert()
|
|
|
|
|
|
{
|
|
|
|
|
|
retryCount++;
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
if (retryCount < maxRetries)
|
|
|
|
|
|
{
|
|
|
|
|
|
Datastore.Instance.dbSQLite.Insert(this);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception)
|
|
|
|
|
|
{
|
2015-09-17 13:45:26 -07:00
|
|
|
|
GuiWidget.BreakInDebugger();
|
2015-06-25 12:19:19 -07:00
|
|
|
|
Thread.Sleep(100);
|
|
|
|
|
|
this.TryHandleInsert();
|
|
|
|
|
|
}
|
2015-04-08 15:20:10 -07:00
|
|
|
|
|
2015-06-25 12:19:19 -07:00
|
|
|
|
retryCount = 0;
|
|
|
|
|
|
}
|
2015-04-08 15:20:10 -07:00
|
|
|
|
|
2015-06-25 12:19:19 -07:00
|
|
|
|
private void TryHandleUpdate()
|
2015-04-08 15:20:10 -07:00
|
|
|
|
{
|
2015-06-25 12:19:19 -07:00
|
|
|
|
retryCount++;
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
if (retryCount < maxRetries)
|
|
|
|
|
|
{
|
|
|
|
|
|
Datastore.Instance.dbSQLite.Update(this);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception)
|
|
|
|
|
|
{
|
2015-09-17 13:45:26 -07:00
|
|
|
|
GuiWidget.BreakInDebugger();
|
2015-06-25 12:19:19 -07:00
|
|
|
|
Thread.Sleep(100);
|
|
|
|
|
|
this.TryHandleUpdate();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
retryCount = 0;
|
2015-04-08 15:20:10 -07:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2015-06-25 12:19:19 -07:00
|
|
|
|
public class Printer : Entity
|
2015-04-08 15:20:10 -07:00
|
|
|
|
{
|
2015-06-25 12:19:19 -07:00
|
|
|
|
public Printer()
|
|
|
|
|
|
: base()
|
2015-06-15 18:31:43 -07:00
|
|
|
|
{
|
2015-06-25 12:19:19 -07:00
|
|
|
|
this.Make = "Unknown";
|
|
|
|
|
|
this.Model = "Unknown";
|
2015-06-15 18:31:43 -07:00
|
|
|
|
}
|
2015-06-12 17:21:51 -07:00
|
|
|
|
|
2015-06-25 12:19:19 -07:00
|
|
|
|
// features
|
|
|
|
|
|
public string _features { get; set; }
|
|
|
|
|
|
|
2016-05-02 14:59:26 -07:00
|
|
|
|
public bool AutoConnect { get; set; }
|
2015-06-25 12:19:19 -07:00
|
|
|
|
|
|
|
|
|
|
public string BaudRate { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public string ComPort { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public string CurrentSlicingEngine { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public int DefaultSettingsCollectionId { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public string DeviceToken { get; set; }
|
|
|
|
|
|
|
2020-05-21 10:54:57 -07:00
|
|
|
|
// Auto connect to printer (if available)
|
2015-06-25 12:19:19 -07:00
|
|
|
|
public string DeviceType { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
// all the data about print leveling
|
|
|
|
|
|
public bool DoPrintLeveling { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public string DriverType { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public string Make { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public string ManualMovementSpeeds { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
// stored x,value,y,value,z,value,e1,value,e2,value,e3,value,...
|
|
|
|
|
|
public string MaterialCollectionIds { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public string Model { get; set; }
|
2015-06-12 17:21:51 -07:00
|
|
|
|
|
2015-04-08 15:20:10 -07:00
|
|
|
|
public string Name { get; set; }
|
2015-06-15 12:12:18 -07:00
|
|
|
|
|
2015-06-25 12:19:19 -07:00
|
|
|
|
public string PrintLevelingJsonData { get; set; }
|
|
|
|
|
|
|
2016-06-16 17:04:57 -07:00
|
|
|
|
public string PrintLevelingProbePositions { get; set; } // this is deprecated go through PrintLevelingData
|
2015-06-25 12:19:19 -07:00
|
|
|
|
|
|
|
|
|
|
// store id1,id2... (for N extruders)
|
|
|
|
|
|
|
|
|
|
|
|
public int QualityCollectionId { get; set; }
|
2015-04-08 15:20:10 -07:00
|
|
|
|
}
|
|
|
|
|
|
|
2015-06-25 12:19:19 -07:00
|
|
|
|
public class PrinterSetting : Entity
|
2015-04-08 15:20:10 -07:00
|
|
|
|
{
|
2015-06-25 12:19:19 -07:00
|
|
|
|
public DateTime DateLastModified { get; set; }
|
2015-04-08 15:20:10 -07:00
|
|
|
|
|
|
|
|
|
|
public string Name { get; set; }
|
|
|
|
|
|
|
2015-06-25 12:19:19 -07:00
|
|
|
|
[Indexed]
|
|
|
|
|
|
public int PrinterId { get; set; }
|
2015-04-08 15:20:10 -07:00
|
|
|
|
|
2015-06-25 12:19:19 -07:00
|
|
|
|
public string Value { get; set; }
|
2015-04-08 15:20:10 -07:00
|
|
|
|
|
2015-06-25 12:19:19 -07:00
|
|
|
|
public override void Commit()
|
|
|
|
|
|
{
|
|
|
|
|
|
DateLastModified = DateTime.Now;
|
|
|
|
|
|
base.Commit();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2015-04-08 15:20:10 -07:00
|
|
|
|
|
2015-06-25 12:19:19 -07:00
|
|
|
|
public class PrintItem : Entity
|
|
|
|
|
|
{
|
2015-04-08 15:20:10 -07:00
|
|
|
|
public PrintItem()
|
|
|
|
|
|
: this("", "")
|
|
|
|
|
|
{
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2015-07-17 16:45:24 -07:00
|
|
|
|
public PrintItem(string name, string fileLocation)
|
2015-04-08 15:20:10 -07:00
|
|
|
|
{
|
|
|
|
|
|
this.Name = name;
|
|
|
|
|
|
this.FileLocation = fileLocation;
|
|
|
|
|
|
|
|
|
|
|
|
DateAdded = DateTime.Now;
|
|
|
|
|
|
PrintCount = 0;
|
|
|
|
|
|
}
|
2015-06-23 15:23:28 -07:00
|
|
|
|
|
2015-06-25 12:19:19 -07:00
|
|
|
|
public DateTime DateAdded { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public string FileLocation { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public string Name { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public int PrintCount { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[Indexed]
|
|
|
|
|
|
public int PrintItemCollectionID { get; set; }
|
|
|
|
|
|
|
2015-07-06 14:55:54 -07:00
|
|
|
|
public bool ReadOnly { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public bool Protected { get; set; }
|
2015-04-08 15:20:10 -07:00
|
|
|
|
}
|
|
|
|
|
|
|
2015-06-25 12:19:19 -07:00
|
|
|
|
public class PrintItemCollection : Entity
|
2015-04-08 15:20:10 -07:00
|
|
|
|
{
|
2015-06-25 12:19:19 -07:00
|
|
|
|
public PrintItemCollection()
|
|
|
|
|
|
{
|
|
|
|
|
|
}
|
2015-04-08 15:20:10 -07:00
|
|
|
|
|
2015-06-25 12:19:19 -07:00
|
|
|
|
public PrintItemCollection(string name, string collectionKey)
|
|
|
|
|
|
{
|
|
|
|
|
|
this.Name = name;
|
|
|
|
|
|
Key = collectionKey;
|
|
|
|
|
|
}
|
2015-04-08 15:20:10 -07:00
|
|
|
|
|
2015-06-25 12:19:19 -07:00
|
|
|
|
public string Key { get; set; }
|
2015-04-08 15:20:10 -07:00
|
|
|
|
|
|
|
|
|
|
public string Name { get; set; }
|
|
|
|
|
|
|
2015-06-25 12:19:19 -07:00
|
|
|
|
[Indexed]
|
|
|
|
|
|
public int ParentCollectionID { get; set; }
|
|
|
|
|
|
}
|
2015-04-08 15:20:10 -07:00
|
|
|
|
|
2015-06-25 12:19:19 -07:00
|
|
|
|
public class PrintTask : Entity
|
|
|
|
|
|
{
|
|
|
|
|
|
public PrintTask()
|
2015-04-08 15:20:10 -07:00
|
|
|
|
: base()
|
|
|
|
|
|
{
|
2015-06-25 12:19:19 -07:00
|
|
|
|
PrintStart = DateTime.Now;
|
2015-04-08 15:20:10 -07:00
|
|
|
|
}
|
|
|
|
|
|
|
2016-02-23 15:39:26 -08:00
|
|
|
|
public string PrintingGCodeFileName { get; set; }
|
|
|
|
|
|
|
2016-12-14 11:26:53 -08:00
|
|
|
|
public double RecoveryCount { get; set; }
|
|
|
|
|
|
|
2016-02-23 15:39:26 -08:00
|
|
|
|
public double PercentDone { get; set; }
|
2016-02-23 09:32:26 -08:00
|
|
|
|
|
2015-06-25 12:19:19 -07:00
|
|
|
|
public bool PrintComplete { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public DateTime PrintEnd { get; set; }
|
|
|
|
|
|
|
2015-04-08 15:20:10 -07:00
|
|
|
|
[Indexed]
|
|
|
|
|
|
public int PrinterId { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[Indexed]
|
|
|
|
|
|
public int PrintItemId { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public string PrintName { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public DateTime PrintStart { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public int PrintTimeMinutes
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
|
|
|
|
|
TimeSpan printTimeSpan = PrintEnd.Subtract(PrintStart);
|
|
|
|
|
|
|
|
|
|
|
|
return (int)(printTimeSpan.TotalMinutes + .5);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2015-06-25 12:19:19 -07:00
|
|
|
|
public int PrintTimeSeconds { get; set; }
|
|
|
|
|
|
|
2020-07-12 12:25:18 -07:00
|
|
|
|
public bool QualityWasSet { get; set; }
|
2020-07-11 23:08:42 -07:00
|
|
|
|
|
2020-07-12 12:25:18 -07:00
|
|
|
|
public int PrintQuality { get; set; }
|
2020-07-11 23:08:42 -07:00
|
|
|
|
|
2020-07-03 12:56:40 -07:00
|
|
|
|
public string PrinterName { get; set; }
|
|
|
|
|
|
|
2020-07-11 19:28:30 -07:00
|
|
|
|
public string QualitySettingsName { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public string MaterialSettingsName { get; set; }
|
|
|
|
|
|
|
2020-07-11 23:08:42 -07:00
|
|
|
|
public string Note { get; set; }
|
|
|
|
|
|
|
2015-04-08 15:20:10 -07:00
|
|
|
|
public override void Commit()
|
|
|
|
|
|
{
|
|
|
|
|
|
if (this.PrintEnd != DateTime.MinValue)
|
|
|
|
|
|
{
|
|
|
|
|
|
TimeSpan printTimeSpan = PrintEnd.Subtract(PrintStart);
|
|
|
|
|
|
PrintTimeSeconds = (int)printTimeSpan.TotalSeconds;
|
|
|
|
|
|
}
|
2020-07-03 12:05:28 -07:00
|
|
|
|
|
2015-04-08 15:20:10 -07:00
|
|
|
|
base.Commit();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2015-06-25 12:19:19 -07:00
|
|
|
|
public class SliceSetting : Entity
|
2015-04-08 15:20:10 -07:00
|
|
|
|
{
|
2015-06-25 12:19:19 -07:00
|
|
|
|
public SliceSetting()
|
|
|
|
|
|
: base()
|
|
|
|
|
|
{
|
|
|
|
|
|
}
|
2015-04-08 15:20:10 -07:00
|
|
|
|
|
2015-06-25 12:19:19 -07:00
|
|
|
|
public string Name { get; set; }
|
2015-04-08 15:20:10 -07:00
|
|
|
|
|
2015-06-25 12:19:19 -07:00
|
|
|
|
[Indexed]
|
|
|
|
|
|
public int SettingsCollectionId { get; set; }
|
2015-04-08 15:20:10 -07:00
|
|
|
|
|
2015-06-25 12:19:19 -07:00
|
|
|
|
public string Value { get; set; }
|
2015-04-08 15:20:10 -07:00
|
|
|
|
}
|
|
|
|
|
|
|
2015-06-25 12:19:19 -07:00
|
|
|
|
public class SliceSettingsCollection : Entity
|
2015-04-08 15:20:10 -07:00
|
|
|
|
{
|
|
|
|
|
|
public string Name { get; set; }
|
|
|
|
|
|
|
2015-06-25 12:19:19 -07:00
|
|
|
|
public int PrinterId { get; set; }
|
2015-04-08 15:20:10 -07:00
|
|
|
|
|
2015-06-25 12:19:19 -07:00
|
|
|
|
public string Tag { get; set; } //ex. 'material' or 'quality'
|
2015-04-08 15:20:10 -07:00
|
|
|
|
}
|
|
|
|
|
|
|
2015-06-25 12:19:19 -07:00
|
|
|
|
public class SystemSetting : Entity
|
2015-04-08 15:20:10 -07:00
|
|
|
|
{
|
2015-06-25 12:19:19 -07:00
|
|
|
|
public DateTime DateLastModified { get; set; }
|
2015-04-08 15:20:10 -07:00
|
|
|
|
|
2015-06-25 12:19:19 -07:00
|
|
|
|
[Indexed]
|
2015-04-08 15:20:10 -07:00
|
|
|
|
public string Name { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public string Value { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public override void Commit()
|
|
|
|
|
|
{
|
|
|
|
|
|
DateLastModified = DateTime.Now;
|
|
|
|
|
|
base.Commit();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2015-06-25 12:19:19 -07:00
|
|
|
|
public class UserSetting : Entity
|
2015-04-08 15:20:10 -07:00
|
|
|
|
{
|
2015-06-25 12:19:19 -07:00
|
|
|
|
public DateTime DateLastModified { get; set; }
|
2014-06-30 15:35:20 -07:00
|
|
|
|
|
|
|
|
|
|
[Indexed]
|
|
|
|
|
|
public string Name { get; set; }
|
2015-04-08 15:20:10 -07:00
|
|
|
|
|
2014-06-30 15:35:20 -07:00
|
|
|
|
public string Value { get; set; }
|
2015-04-08 15:20:10 -07:00
|
|
|
|
|
2014-06-30 15:35:20 -07:00
|
|
|
|
public override void Commit()
|
|
|
|
|
|
{
|
|
|
|
|
|
DateLastModified = DateTime.Now;
|
|
|
|
|
|
base.Commit();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2015-04-08 15:20:10 -07:00
|
|
|
|
}
|