using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using Tango.BL; using Tango.Logging; using Tango.PMR.Printing; using Tango.Settings; using Tango.Web; namespace Tango.MachineStudio.Common { public class MachineStudioSettings : SettingsBase { public class StudioModuleBounds { public String Name { get; set; } public Rect Bounds { get; set; } public WindowState State { get; set; } } public enum WorkingEnvironment { Remote, Local } /// /// Gets or sets the last login email. /// public String LastLoginEmail { get; set; } /// /// Gets or sets the last login password. /// public String LastLoginPassword { get; set; } /// /// Gets or sets a value indicating whether to save the user credentials. /// public bool RememberMe { get; set; } /// /// Gets or sets the last virtual machine serial number. /// public String LastVirtualMachineSerialNumber { get; set; } /// /// Gets or sets the logging categories. /// public List LoggingCategories { get; set; } /// /// Gets or sets the last bounds. /// public Rect LastBounds { get; set; } /// /// Gets or sets the default issue report assign to. /// public String DefaultIssueReportAssignTo { get; set; } /// /// Gets or sets the default issue report area. /// public String DefaultIssueReportArea { get; set; } /// /// Gets or sets the default issue report tags. /// public List DefaultIssueReportTags { get; set; } /// /// Gets or sets a value indicating whether add external bridge client emulator when scanning for connected machines. /// public bool UseExternalBridgeEmulator { get; set; } /// /// Gets or sets the last bounds of modules open windows. /// public List StudioModulesBounds { get; set; } /// /// Gets or sets the last module that was opened in the main window. /// public String LastMainModuleName { get; set; } /// /// Gets or sets the working environment. /// public WorkingEnvironment Environment { get; set; } /// /// Gets or sets the deployment slot. /// public DeploymentSlot DeploymentSlot { get; set; } /// /// Gets or sets the job upload strategy. /// public JobUploadStrategy JobUploadStrategy { get; set; } /// /// Gets or sets a value indicating whether to by pass environment version check. /// public bool ByPassEnvironmentVersionCheck { get; set; } /// /// Gets or sets a value indicating whether to enable database entity caching. /// public ObservablesContextInMemoryCachingMode CachingMode { get; set; } /// /// Gets or sets the maximum cache time for a single entity (when CachingMode is set Absolute or Relative). /// public TimeSpan MaximumCacheTime { get; set; } /// /// Gets the machine service address. /// public String MachineServiceAddress { get { return GetMachineServiceAddress(); } } /// /// Gets the machine service address. /// /// public String GetMachineServiceAddress() { return DeploymentSlot.ToAddress(); } /// /// Initializes a new instance of the class. /// public MachineStudioSettings() { LastBounds = new Rect(); LoggingCategories = new List(); DefaultIssueReportTags = new List(); StudioModulesBounds = new List(); Environment = WorkingEnvironment.Remote; DeploymentSlot = DeploymentSlot.DEV; JobUploadStrategy = JobUploadStrategy.Default; MaximumCacheTime = TimeSpan.FromMinutes(5); CachingMode = ObservablesContextInMemoryCachingMode.None; } } }