예제 #1
0
 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>();
 }
예제 #2
0
 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;
 }
예제 #3
0
 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);
 }
예제 #4
0
 public RestartOptions(PersistantData.RestartAction RestartAction, int RestartActionParam)
 {
     this.RestartAction      = RestartAction;
     this.RestartActionParam = RestartActionParam;
 }