Exemplo n.º 1
0
        public override void OnActivate(Mangage3DInkStageDetails details)
        {
            base.OnActivate(details);
            try
            {
                if (MainWindow.GetSelectedPrinter() == null)
                {
                    return;
                }

                OnUpdate();
                DisableAllControls();
                text_main.Visible             = true;
                pro_filament_button.Visible   = true;
                pro_filament_button.Enabled   = true;
                micro_filament_button.Visible = true;
                micro_filament_button.Enabled = true;
                cancel_button.Visible         = true;
                cancel_button.Enabled         = true;
                text_title.Text = "Currently inserting:\n\n" + FilamentProfile.GenerateSpoolName(CurrentDetails.current_spool, false);
                text_main.Text  = "Please select filament spool size for insertion:";
            }
            catch (Exception ex)
            {
            }
            OnUpdate();
        }
Exemplo n.º 2
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;
        }
Exemplo n.º 3
0
        public override void OnActivate(Mangage3DInkStageDetails details)
        {
            base.OnActivate(details);
            insertwarn_sent = false;
            try
            {
                PrinterObject selectedPrinter = MainWindow.GetSelectedPrinter();
                if (selectedPrinter == null)
                {
                    return;
                }

                OnUpdate();
                DisableAllControls();
                text_main.Visible           = true;
                add_button_external.Visible = true;
                add_button_external.Enabled = true;
                add_button_internal.Visible = true;
                add_button_internal.Enabled = true;
                cancel_button.Visible       = true;
                cancel_button.Enabled       = true;
                if (CurrentDetails.mode == Manage3DInkMainWindow.Mode.SetFilamentLocationInsertingNew)
                {
                    text_title.Text          = "Currently inserting:\n\n" + FilamentProfile.GenerateSpoolName(CurrentDetails.current_spool, false);
                    text_main.Text           = "Please select filament location for insertion:";
                    add_button_external.Text = "INSERT FILAMENT (EXTERNAL)";
                    add_button_internal.Text = "INSERT FILAMENT (INTERNAL)";
                }
                else if (CurrentDetails.mode == Manage3DInkMainWindow.Mode.SetFilamentLocationAlreadyInserted)
                {
                    text_title.Text          = "Already inserted:\n\n" + FilamentProfile.GenerateSpoolName(CurrentDetails.current_spool, false);
                    text_main.Text           = "Please select filament location:";
                    add_button_external.Text = "EXTERNAL";
                    add_button_internal.Text = "INTERNAL";
                }
                if (selectedPrinter.IsPausedorPausing)
                {
                    text_main.Text += "\n\n\nFilament cannot be loaded internally while the printer is paused.";
                    if (add_button_internal.Visible)
                    {
                        add_button_internal.Enabled = false;
                    }
                }
                else
                {
                    if (CurrentDetails.current_spool.filament_type != FilamentSpool.TypeEnum.FLX)
                    {
                        if (CurrentDetails.current_spool.filament_type != FilamentSpool.TypeEnum.TGH)
                        {
                            goto label_17;
                        }
                    }
                    if (!insertwarn_sent)
                    {
                        insertwarn_sent = true;
                        messagebox.AddMessageToQueue(new SpoolerMessage(MessageType.UserDefined, "Warning: Flexible filament can only be inserted externally."));
                    }
                    text_main.Text += "\n\n\nLoading flexible filaments internally can cause the filament to snag and in turn, cause prints to fail.";
                    if (add_button_internal.Visible)
                    {
                        add_button_internal.Enabled = false;
                    }
                }
            }
            catch (Exception ex)
            {
            }
label_17:
            OnUpdate();
        }