public PersistantData() { LastUpdate = DateTime.Now; unsaved_print_time = 0.0f; gantry_clips_removed = false; bootloader_version = 0; hours_used = 0.0f; MyRestartAction = PersistantData.RestartAction.None; SavedJobInformation = null; SavedData = new SerializableDictionary <string, string>(); }
public PersistantData(PersistantData other) { LastUpdate = other.LastUpdate; unsaved_print_time = other.unsaved_print_time; gantry_clips_removed = other.gantry_clips_removed; bootloader_version = other.bootloader_version; hours_used = other.hours_used; MyRestartAction = other.MyRestartAction; SavedData = new SerializableDictionary <string, string>(other.SavedData); SavedJobInformation = other.SavedJobInformation != null ? new PersistantJobData(other.SavedJobInformation) : null; }
internal PersistantData.RestartOptions PopRestartAction() { PersistantData.RestartOptions restartOptions; if (LastUpdate - DateTime.Now > new TimeSpan(0, 3, 0)) { restartOptions.RestartAction = PersistantData.RestartAction.None; restartOptions.RestartActionParam = 0; } else { restartOptions.RestartAction = MyRestartAction; restartOptions.RestartActionParam = RestartActionParam; } MyRestartAction = PersistantData.RestartAction.None; return(restartOptions); }
public RestartOptions(PersistantData.RestartAction RestartAction, int RestartActionParam) { this.RestartAction = RestartAction; this.RestartActionParam = RestartActionParam; }