コード例 #1
0
        public FindBedHeight(string instructionsText, string setZHeightCoarseInstruction1, string setZHeightCoarseInstruction2, double moveDistance, ProbePosition whereToWriteProbePosition)
            : base(instructionsText + "\n\n" + setZHeightCoarseInstruction1)
        {
            this.moveAmount           = moveDistance;
            this.lastReportedPosition = PrinterCommunication.Instance.LastReportedPosition;
            this.probePosition        = whereToWriteProbePosition;

            GuiWidget spacer = new GuiWidget(15, 15);

            topToBottomControls.AddChild(spacer);

            FlowLayoutWidget zButtonsAndInfo = new FlowLayoutWidget();

            zButtonsAndInfo.HAnchor |= Agg.UI.HAnchor.ParentCenter;
            FlowLayoutWidget zButtons = CreateZButtons();

            zButtonsAndInfo.AddChild(zButtons);

            zButtonsAndInfo.AddChild(new GuiWidget(15, 10));

            FlowLayoutWidget textFields = new FlowLayoutWidget(FlowDirection.TopToBottom);

            zButtonsAndInfo.AddChild(textFields);

            topToBottomControls.AddChild(zButtonsAndInfo);

            AddTextField(setZHeightCoarseInstruction2, 10);
        }
コード例 #2
0
        public PrintLevelWizardWindow()
            : base(500, 370)
        {
            pageOneInstructions    = string.Format("{0}\n\n\t• {1}\n\t• {2}\n\t• {3}\n\n{4}\n\n{5}", pageOneInstructionsTextOne, pageOneInstructionsTextTwo, pageOneInstructionsTextThree, pageOneInstructionsTextFour, pageOneInstructionsTextFive, pageOneInstructionsTextSix);
            homingPageInstructions = string.Format("{0}:\n\n\t• {1}\n\n{2}", homingPageInstructionsTextOne, homingPageInstructionsTextTwo, homingPageInstructionsTextThree);
            doneInstructions       = string.Format("{0}\n\n\t• {1}\n\n{2}", doneInstructionsText, doneInstructionsTextTwo, doneInstructionsTextThree);

            string printLevelWizardTitle     = LocalizedString.Get("MatterControl");
            string printLevelWizardTitleFull = LocalizedString.Get("Print Leveling Wizard");

            Title = string.Format("{0} - {1}", printLevelWizardTitle, printLevelWizardTitleFull);
            ProbePosition[] probePositions = new ProbePosition[3];
            probePositions[0] = new ProbePosition();
            probePositions[1] = new ProbePosition();
            probePositions[2] = new ProbePosition();

            printLevelWizard = new WizardControl();
            printLevelWizard.DoneButton.Click += new ButtonBase.ButtonEventHandler(DoneButton_Click);
            AddChild(printLevelWizard);

            printLevelWizard.AddPage(new FirstPageInstructions(pageOneInstructions));
            printLevelWizard.AddPage(new HomePrinterPage(homingPageInstructions));

            Vector2 probeBackCenter = ActiveSliceSettings.Instance.GetPrintLevelPositionToSample(0);

            string             lowPrecisionPositionLabel = LocalizedString.Get("Position");
            string             lowPrecisionLabel         = LocalizedString.Get("Low Precision");
            GetCoarseBedHeight getCourseBedHeight        = new GetCoarseBedHeight(printLevelWizard,
                                                                                  new Vector3(probeBackCenter, 10),
                                                                                  string.Format("{0} {1} 1 - {2}", Step(), lowPrecisionPositionLabel, lowPrecisionLabel),
                                                                                  probePositions [0]);

            printLevelWizard.AddPage(getCourseBedHeight);
            string precisionPositionLabel = LocalizedString.Get("Position");
            string medPrecisionLabel      = LocalizedString.Get("Medium Precision");

            printLevelWizard.AddPage(new GetFineBedHeight(string.Format("{0} {1} 1 - {2}", Step(), precisionPositionLabel, medPrecisionLabel), probePositions[0]));
            string highPrecisionLabel = LocalizedString.Get("High Precision");

            printLevelWizard.AddPage(new GetUltraFineBedHeight(string.Format("{0} {1} 1 - {2}", Step(), precisionPositionLabel, highPrecisionLabel), probePositions[0]));

            Vector2 probeFrontLeft        = ActiveSliceSettings.Instance.GetPrintLevelPositionToSample(1);
            string  positionLabelTwo      = LocalizedString.Get("Position");
            string  lowPrecisionTwoLabel  = LocalizedString.Get("Low Precision");
            string  medPrecisionTwoLabel  = LocalizedString.Get("Medium Precision");
            string  highPrecisionTwoLabel = LocalizedString.Get("High Precision");

            printLevelWizard.AddPage(new GetCoarseBedHeight(printLevelWizard, new Vector3(probeFrontLeft, 10), string.Format("{0} {1} 2 - {2}", Step(), positionLabelTwo, lowPrecisionTwoLabel), probePositions[1]));
            printLevelWizard.AddPage(new GetFineBedHeight(string.Format("{0} {1} 2 - {2}", Step(), positionLabelTwo, medPrecisionTwoLabel), probePositions[1]));
            printLevelWizard.AddPage(new GetUltraFineBedHeight(string.Format("{0} {1} 2 - {2}", Step(), positionLabelTwo, highPrecisionTwoLabel), probePositions[1]));

            Vector2 probeFrontRight         = ActiveSliceSettings.Instance.GetPrintLevelPositionToSample(2);
            string  positionLabelThree      = LocalizedString.Get("Position");
            string  lowPrecisionLabelThree  = LocalizedString.Get("Low Precision");
            string  medPrecisionLabelThree  = LocalizedString.Get("Medium Precision");
            string  highPrecisionLabelThree = LocalizedString.Get("High Precision");

            printLevelWizard.AddPage(new GetCoarseBedHeight(printLevelWizard, new Vector3(probeFrontRight, 10), string.Format("{0} {1} 3 - {2}", Step(), positionLabelThree, lowPrecisionLabelThree), probePositions[2]));
            printLevelWizard.AddPage(new GetFineBedHeight(string.Format("{0} {1} 3 - {2}", Step(), positionLabelThree, medPrecisionLabelThree), probePositions[2]));
            printLevelWizard.AddPage(new GetUltraFineBedHeight(string.Format("{0} {1} 3 - {2}", Step(), positionLabelThree, highPrecisionLabelThree), probePositions[2]));

            printLevelWizard.AddPage(new LastPageInstructions(doneInstructions, probePositions));
        }
コード例 #3
0
 public GetUltraFineBedHeight(string instructionsText, ProbePosition whereToWriteProbePosition)
     : base(instructionsText, setZHeightFineInstruction1, setZHeightFineInstruction2, .02, whereToWriteProbePosition)
 {
 }
コード例 #4
0
 public GetCoarseBedHeight(WizardControl container, Vector3 probeStartPosition, string instructionsText, ProbePosition whereToWriteProbePosition)
     : base(instructionsText, setZHeightCoarseInstruction1, setZHeightCoarseInstruction2, 1, whereToWriteProbePosition)
 {
     this.container          = container;
     this.probeStartPosition = probeStartPosition;
 }
コード例 #5
0
 public LastPageInstructions(string instructionsText, ProbePosition[] probePositions)
     : base(instructionsText)
 {
     this.probePositions = probePositions;
 }
コード例 #6
0
        public PrintLevelWizardWindow()
            : base(500, 370)
		{	
			pageOneInstructions = string.Format("{0}\n\n\t• {1}\n\t• {2}\n\t• {3}\n\n{4}\n\n{5}",pageOneInstructionsTxtOne, pageOneInstructionsTxtTwo, pageOneInstructionsTxtThree, pageOneInstructionsTxtFour, pageOneInstructionsTxtFive, pageOneInstructionsTxtSix);
			homingPageInstructions = string.Format("{0}:\n\n\t• {1}\n\n{2}", homingPageInstructionsTxtOne, homingPageInstructionsTxtTwo, homingPageInstructionsTxtThree);
			doneInstructions = string.Format("{0}\n\n\t• {1}\n\n{2}",doneInstructionsTxt, doneInstructionsTxtTwo, doneInstructionsTxtThree);


			string printLevelWizardTitle = new LocalizedString("MatterControl").Translated;
			string printLevelWizardTitleFull = new LocalizedString ("Print Leveling Wizard").Translated;
			Title = string.Format("{0} - {1}",printLevelWizardTitle, printLevelWizardTitleFull);
            ProbePosition[] probePositions = new ProbePosition[3];
            probePositions[0] = new ProbePosition();
            probePositions[1] = new ProbePosition();
            probePositions[2] = new ProbePosition();

            printLevelWizard = new WizardControl();
            printLevelWizard.DoneButton.Click += new ButtonBase.ButtonEventHandler(DoneButton_Click);
            AddChild(printLevelWizard);

            printLevelWizard.AddPage(new FirstPageInstructions(pageOneInstructions));
            printLevelWizard.AddPage(new HomePrinterPage(homingPageInstructions));

            Vector2 probeBackCenter = ActiveSliceSettings.Instance.GetPrintLevelSamplePosition(0);

			string lowPrecisionPositionLbl = new LocalizedString ("Position").Translated;
			string lowPrecisionLbl = new LocalizedString ("Low Precision").Translated;
			GetCoarseBedHeight getCourseBedHeight = new GetCoarseBedHeight (printLevelWizard, 
				new Vector3 (probeBackCenter, 10), 
				string.Format ("{0} {1} 1 - {2}", Step (),lowPrecisionPositionLbl, lowPrecisionLbl),
				probePositions [0]);

			printLevelWizard.AddPage(getCourseBedHeight);
			string precisionPositionLbl = new LocalizedString("Position").Translated;
			string medPrecisionLbl = new LocalizedString("Medium Precision").Translated;
			printLevelWizard.AddPage(new GetFineBedHeight(string.Format("{0} {1} 1 - {2}", Step(), precisionPositionLbl, medPrecisionLbl), probePositions[0]));
			string highPrecisionLbl = new LocalizedString("High Precision").Translated;
			printLevelWizard.AddPage(new GetUltraFineBedHeight(string.Format("{0} {1} 1 - {2}", Step(), precisionPositionLbl, highPrecisionLbl), probePositions[0]));

            Vector2 probeFrontLeft = ActiveSliceSettings.Instance.GetPrintLevelSamplePosition(1);
			string positionLblTwo = new LocalizedString("Position").Translated;
			string lowPrecisionTwoLbl = new LocalizedString("Low Precision").Translated;
			string medPrecisionTwoLbl = new LocalizedString("Medium Precision").Translated;
			string highPrecisionTwoLbl = new LocalizedString("High Precision").Translated;
			printLevelWizard.AddPage(new GetCoarseBedHeight(printLevelWizard, new Vector3(probeFrontLeft, 10), string.Format("{0} {1} 2 - {2}", Step(), positionLblTwo, lowPrecisionTwoLbl  ), probePositions[1]));
			printLevelWizard.AddPage(new GetFineBedHeight(string.Format("{0} {1} 2 - {2}", Step(), positionLblTwo,medPrecisionTwoLbl), probePositions[1]));
			printLevelWizard.AddPage(new GetUltraFineBedHeight(string.Format("{0} {1} 2 - {2}", Step(), positionLblTwo,highPrecisionTwoLbl), probePositions[1]));

            Vector2 probeFrontRight = ActiveSliceSettings.Instance.GetPrintLevelSamplePosition(2);
			string positionLabelThree = new LocalizedString("Position").Translated;
			string lowPrecisionLblThree = new LocalizedString("Low Precision").Translated;
			string medPrecisionLblThree = new LocalizedString("Medium Precision").Translated;
			string highPrecisionLblThree = new LocalizedString("High Precision").Translated;
			printLevelWizard.AddPage(new GetCoarseBedHeight(printLevelWizard, new Vector3(probeFrontRight, 10), string.Format("{0} {1} 3 - {2}", Step(), positionLabelThree, lowPrecisionLblThree), probePositions[2]));
			printLevelWizard.AddPage(new GetFineBedHeight(string.Format("{0} {1} 3 - {2}", Step(),positionLabelThree, medPrecisionLblThree ), probePositions[2]));
			printLevelWizard.AddPage(new GetUltraFineBedHeight(string.Format("{0} {1} 3 - {2}", Step(), positionLabelThree, highPrecisionLblThree ), probePositions[2]));

            printLevelWizard.AddPage(new LastPageInstructions(doneInstructions, probePositions));
        }
コード例 #7
0
 public GetUltraFineBedHeight(string instructionsText, ProbePosition whereToWriteProbePosition)
     : base(instructionsText, setZHeightFineInstruction1, setZHeightFineInstruction2, .02, whereToWriteProbePosition)
 {
 }
コード例 #8
0
 public GetCoarseBedHeight(WizardControl container, Vector3 probeStartPosition, string instructionsText, ProbePosition whereToWriteProbePosition)
     : base(instructionsText, setZHeightCoarseInstruction1, setZHeightCoarseInstruction2, 1, whereToWriteProbePosition)
 {
     this.container = container;
     this.probeStartPosition = probeStartPosition;
 }
コード例 #9
0
        public FindBedHeight(string instructionsText, string setZHeightCoarseInstruction1, string setZHeightCoarseInstruction2, double moveDistance, ProbePosition whereToWriteProbePosition)
            : base(instructionsText + "\n\n" + setZHeightCoarseInstruction1)
        {
            this.moveAmount = moveDistance;
            this.lastReportedPosition = PrinterCommunication.Instance.LastReportedPosition;
            this.probePosition = whereToWriteProbePosition;

            GuiWidget spacer = new GuiWidget(15, 15);
            topToBottomControls.AddChild(spacer);

            FlowLayoutWidget zButtonsAndInfo = new FlowLayoutWidget();
            zButtonsAndInfo.HAnchor |= Agg.UI.HAnchor.ParentCenter;
            FlowLayoutWidget zButtons = CreateZButtons();
            zButtonsAndInfo.AddChild(zButtons);

            zButtonsAndInfo.AddChild(new GuiWidget(15, 10));

            FlowLayoutWidget textFields = new FlowLayoutWidget(FlowDirection.TopToBottom);
           
            zButtonsAndInfo.AddChild(textFields);

            topToBottomControls.AddChild(zButtonsAndInfo);

            AddTextField(setZHeightCoarseInstruction2, 10);
        }