コード例 #1
0
 public void CopyFrom(PrinterInfo other)
 {
     serial_number     = new PrinterSerialNumber(other.serial_number.ToString());
     Status            = other.Status;
     filament_info     = new FilamentSpool(other.filament_info);
     current_job       = other.current_job == null ? null : new JobInfo(other.current_job);
     extruder          = new Extruder(other.extruder);
     hardware          = new Hardware(other.hardware);
     calibration       = new Calibration(other.calibration);
     synchronization   = new Synchronization(other.synchronization);
     supportedFeatures = new SupportedFeatures(other.supportedFeatures);
     accessories       = new Accessories(other.accessories);
     statistics        = new Statistics(other.statistics);
     persistantData    = new PersistantData(other.persistantData);
     powerRecovery     = new PowerRecovery(other.powerRecovery);
     ProfileName       = other.ProfileName;
 }
コード例 #2
0
ファイル: JobParams.cs プロジェクト: urish/M3D
        public bool VerifyOptionsWithPrinter(PrinterProfile profile, PrinterInfo printerInfo)
        {
            var flag1 = true;

            if (jobMode == JobParams.Mode.ReconnectToSDPrint)
            {
                throw new NotImplementedException("ReconnectToSDPrint jobs can only be started directly from the FirmwareController.");
            }

            if (options.calibrate_before_print && printerInfo.supportedFeatures.UsesSupportedFeatures && !printerInfo.supportedFeatures.Available("Single Point Bed Height Calibration", profile.SupportedFeaturesConstants))
            {
                flag1 = false;
                options.calibrate_before_print = false;
            }
            if (options.use_heated_bed)
            {
                var num   = profile.AccessoriesConstants.HeatedBedConstants.HasBuiltinHeatedBed ? 1 : 0;
                var flag2 = false;
                if (num != 0 && printerInfo.supportedFeatures.UsesSupportedFeatures)
                {
                    flag2 = printerInfo.supportedFeatures.Available("Heated Bed Control", profile.SupportedFeaturesConstants);
                }

                if (num == 0 || !flag2)
                {
                    flag1 = false;
                    options.use_heated_bed = false;
                }
            }
            if (jobMode != JobParams.Mode.DirectPrinting && printerInfo.supportedFeatures.UsesSupportedFeatures && !printerInfo.supportedFeatures.Available("Untethered Printing", profile.SupportedFeaturesConstants))
            {
                jobMode = JobParams.Mode.DirectPrinting;
            }

            return(flag1);
        }
コード例 #3
0
 public PrinterInfo(PrinterInfo other)
 {
     CopyFrom(other);
 }