コード例 #1
0
        public static string BrandingToString(FilamentConstants.Branding brand)
        {
            switch (brand)
            {
            case FilamentConstants.Branding.Ink:
                return("3D Ink™");

            case FilamentConstants.Branding.ExpertInk:
                return("Expert 3D Ink™");

            case FilamentConstants.Branding.ToughInk:
                return("Tough 3D Ink™");

            case FilamentConstants.Branding.SolidInk:
                return("Solid 3D Ink™");

            case FilamentConstants.Branding.TransparentInk:
                return("Transparent 3D Ink™");

            case FilamentConstants.Branding.TriChromeInk:
                return("TriChrome 3D Ink™");

            default:
                if (Debugger.IsAttached && brand != FilamentConstants.Branding.Other)
                {
                    Debugger.Break();
                }

                return("");
            }
        }
コード例 #2
0
 public Filament(FilamentSpool.TypeEnum type, FilamentConstants.ColorsEnum color, string codeStr, FilamentConstants.Branding brand)
 {
     this.type    = type;
     this.color   = color;
     this.codeStr = codeStr;
     this.brand   = brand;
 }
コード例 #3
0
        private void ShowCurrentFilament(PrinterObject printer, FilamentSpool current_spool)
        {
            text_title.Text             = "3D Ink Currently in use:\n\n" + FilamentProfile.GenerateSpoolName(current_spool, true);
            text_temperature_value.Text = current_spool.filament_temperature.ToString() + " Degrees C";
            FilamentConstants.Branding brandingFrom = FilamentConstants.GetBrandingFrom(current_spool.filament_type, (FilamentConstants.ColorsEnum)current_spool.filament_color_code);
            text_material_value.Text       = brandingFrom == FilamentConstants.Branding.Other ? FilamentConstants.TypesToString(current_spool.filament_type) : FilamentConstants.TypesToString(current_spool.filament_type) + " " + FilamentConstants.BrandingToString(brandingFrom);
            text_color_value.Text          = FilamentConstants.ColorsToString((FilamentConstants.ColorsEnum)current_spool.filament_color_code);
            text_main.Text                 = "";
            text_3dInkAmount_value.Text    = current_spool.estimated_filament_length_printed.ToString("0.00");
            text_temperature_value.Visible = true;
            text_material_value.Visible    = true;
            text_color_value.Visible       = true;
            text_temperature.Visible       = true;
            text_material.Visible          = true;
            text_color.Visible             = true;
            if (!settingsManager.CurrentFilamentSettings.TrackFilament)
            {
                return;
            }

            text_3dInkAmount_value.Visible = true;
            text_3dInkAmount.Visible       = true;
        }
コード例 #4
0
 private static Filament CFDT(FilamentSpool.TypeEnum type, FilamentConstants.ColorsEnum color, string code, FilamentConstants.Branding brand)
 {
     return(new Filament(type, color, code, brand));
 }