public void SetPointView(ViewPointSelection sel) { ribbonButton1.IsPressed = false; ribbonButton2.IsPressed = false; ribbonButton3.IsPressed = false; ribbonButton4.IsPressed = false; ribbonButton5.IsPressed = false; switch (sel) { case ViewPointSelection.ViewAllPoints: ribbonButton5.IsPressed = true; break; case ViewPointSelection.ViewAxesPoints: ribbonButton1.IsPressed = true; break; case ViewPointSelection.ViewCurvePoints: ribbonButton3.IsPressed = true; break; case ViewPointSelection.ViewMeasurePoints: ribbonButton4.IsPressed = true; break; case ViewPointSelection.ViewScalePoints: ribbonButton2.IsPressed = true; break; } Refresh(); }
public void CheckedPointViewOption(ViewPointSelection sel) { viewMenu.SetPointView(sel); }
public void CheckedPointViewOption(ViewPointSelection sel) { menu.CheckedPointViewOption(sel); }
public void CheckedPointViewOption(ViewPointSelection sel) { viewMenu.SetPointView(sel); }
public void LoadSettings() { sessionsSettings.initialDigitizeState = Settings.Default.SESSIONS_INITIALDIGITZESTATE; coordSettings.frame = Settings.Default.COORD_FRAME; coordSettings.xThetaScale = Settings.Default.COORD_XTHETASCALE; coordSettings.yRScale = Settings.Default.COORD_YRSCALE; coordSettings.thetaUnits = Settings.Default.COORD_THETAUNITS; exportSettings.pointsSelection = Settings.Default.EXPORT_POINTSSELECTION; exportSettings.layout = Settings.Default.EXPORT_LAYOUT; exportSettings.delimiters = Settings.Default.EXPORT_DELIMITERS; exportSettings.header = Settings.Default.EXPORT_HEADER; viewFileToolbar = Settings.Default.VIEW_FILETOOLBAR; viewSelectToolbar = Settings.Default.VIEW_SELECTTOOLBAR; viewImageScaleToolbar = Settings.Default.VIEW_IMAGESCALETOOLBAR; viewDigitizeCurvePointsToolbar = Settings.Default.VIEW_DIGITIZECURVEPOINTSTOOLBAR; viewDigitizeMeasurePointsToolbar = Settings.Default.VIEW_DIGITIZEMEASUREPOINTSTOOLBAR; viewZoomToolbar = Settings.Default.VIEW_ZOOMTOOLBAR; viewStatusBar = Settings.Default.VIEW_STATUSBAR; viewPoints = Settings.Default.VIEW_POINTS; viewBackground = Settings.Default.VIEW_BACKGROUND; viewCurveGeometry = Settings.Default.VIEW_CURVEGEOMETRY; viewMeasureGeometry = Settings.Default.VIEW_MEASUREGEOMETRY; powerMostSigMax = Settings.Default.MATH_POWERMOSTSIGMAX; powerMostSigMin = Settings.Default.MATH_POWERMOSTSIGMIN; doubleMin = Settings.Default.MATH_DOUBLEMIN; maxCommands = Settings.Default.MATH_MAXCOMMANDS; windowCurveSize.Width = Settings.Default.WINDOW_CURVE_WIDTH; windowCurveSize.Height = Settings.Default.WINDOW_CURVE_HEIGHT; windowCurvePosition.X = Settings.Default.WINDOW_CURVE_X; windowCurvePosition.Y = Settings.Default.WINDOW_CURVE_Y; windowMainSize.Width = Settings.Default.WINDOW_MAIN_WIDTH; windowMainSize.Height = Settings.Default.WINDOW_MAIN_HEIGHT; windowMainPosition.X = Settings.Default.WINDOW_MAIN_X; windowMainPosition.Y = Settings.Default.WINDOW_MAIN_Y; windowMainFontOverride = Settings.Default.WINDOW_MAIN_FONT_OVERRIDE; windowMainFontName = Settings.Default.WINDOW_MAIN_FONT_NAME; windowMainFontSize = Settings.Default.WINDOW_MAIN_FONT_SIZE; windowMeasureSize.Width = Settings.Default.WINDOW_MEASURE_WIDTH; windowMeasureSize.Height = Settings.Default.WINDOW_MEASURE_HEIGHT; windowMeasurePosition.X = Settings.Default.WINDOW_MEASURE_X; windowMeasurePosition.Y = Settings.Default.WINDOW_MEASURE_Y; segmentPointMinSeparation = Settings.Default.SEGMENT_POINTMINSEPARATION; segmentSettings.minPoints = Settings.Default.SEGMENT_MINPOINTS; segmentSettings.pointSeparation = Settings.Default.SEGMENT_POINTDEFAULTSEPARATION; segmentSettings.fillCorners = Settings.Default.SEGMENT_FILLCORNERS; segmentSettings.lineSize = Settings.Default.SEGMENT_LINESIZE; segmentSettings.lineColor = Settings.Default.SEGMENT_LINECOLOR; gridRemovalSettings.gridMesh.gridSetX = Settings.Default.GRID_REMOVAL_GRIDSETX; gridRemovalSettings.gridMesh.gridSetY = Settings.Default.GRID_REMOVAL_GRIDSETY; gridRemovalSettings.thinThickness = Settings.Default.GRID_REMOVAL_THINTHICKNESS; gridRemovalSettings.gridDistance = Settings.Default.GRID_REMOVAL_GRIDDISTANCE; gridRemovalSettings.color = Settings.Default.GRID_REMOVAL_COLOR; gridRemovalSettings.gapSeparation = Settings.Default.GRID_REMOVAL_GAPSEPARATION; gridRemovalSettings.foregroundThresholdLow = Settings.Default.GRID_REMOVAL_FOREGROUNDTHRESHOLDLOW; gridRemovalSettings.foregroundThresholdHigh = Settings.Default.GRID_REMOVAL_FOREGROUNDTHRESHOLDHIGH; gridDisplayGridSetX = Settings.Default.GRID_DISPLAY_GRIDSETX; gridDisplayGridSetY = Settings.Default.GRID_DISPLAY_GRIDSETY; pointMatchHighlightDiameter = Settings.Default.POINTMATCH_HIGHLIGHTDIAMETER; pointMatchHighlightLineSize = Settings.Default.POINTMATCH_HIGHLIGHTLINESIZE; pointMatchSettings.pointSeparation = Settings.Default.POINTMATCH_SEPARATIONDEFAULT; pointMatchSettings.pointSize = Settings.Default.POINTMATCH_SIZEDEFAULT; pointMatchSettings.acceptedColor = Settings.Default.POINTMATCH_ACCEPTEDCOLOR; pointMatchSettings.rejectedColor = Settings.Default.POINTMATCH_REJECTEDCOLOR; discretizeSettings.discretizeMethod = Settings.Default.DISCRETIZE_METHODDEFAULT; discretizeSettings.intensityThresholdLow = Settings.Default.DISCRETIZE_INTENSITY_THRESHOLDLOW; discretizeSettings.intensityThresholdHigh = Settings.Default.DISCRETIZE_INTENSITY_THRESHOLDHIGH; discretizeSettings.foregroundThresholdLow = Settings.Default.DISCRETIZE_FOREGROUND_THRESHOLDLOW; discretizeSettings.foregroundThresholdHigh = Settings.Default.DISCRETIZE_FOREGROUND_THRESHOLDHIGH; discretizeSettings.hueThresholdLow = Settings.Default.DISCRETIZE_HUE_THRESHOLDLOW; discretizeSettings.hueThresholdHigh = Settings.Default.DISCRETIZE_HUE_THRESHOLDHIGH; discretizeSettings.saturationThresholdLow = Settings.Default.DISCRETIZE_SATURATION_THRESHOLDLOW; discretizeSettings.saturationThresholdHigh = Settings.Default.DISCRETIZE_SATURATION_THRESHOLDHIGH; discretizeSettings.valueThresholdLow = Settings.Default.DISCRETIZE_VALUE_THRESHOLDLOW; discretizeSettings.valueThresholdHigh = Settings.Default.DISCRETIZE_VALUE_THRESHOLDHIGH; axesStyle.pointShape = Settings.Default.POINTSET_AXES_POINTSHAPE; axesStyle.pointSize = Settings.Default.POINTSET_AXES_POINTSIZE; axesStyle.pointLineSize = Settings.Default.POINTSET_AXES_POINTLINESIZE; axesStyle.pointLineColor = Settings.Default.POINTSET_AXES_POINTLINECOLOR; axesStyle.pointInColor = Settings.Default.POINTSET_AXES_POINTINCOLOR; axesStyle.lineSize = Settings.Default.POINTSET_AXES_LINESIZE; axesStyle.lineColor = Settings.Default.POINTSET_AXES_LINECOLOR; axesStyle.lineConnectAs = Settings.Default.POINTSET_AXES_LINECONNECTAS; scaleStyle.pointShape = Settings.Default.POINTSET_SCALE_POINTSHAPE; scaleStyle.pointSize = Settings.Default.POINTSET_SCALE_POINTSIZE; scaleStyle.pointLineSize = Settings.Default.POINTSET_SCALE_POINTLINESIZE; scaleStyle.pointLineColor = Settings.Default.POINTSET_SCALE_POINTLINECOLOR; scaleStyle.pointInColor = Settings.Default.POINTSET_SCALE_POINTINCOLOR; scaleStyle.lineSize = Settings.Default.POINTSET_SCALE_LINESIZE; scaleStyle.lineColor = Settings.Default.POINTSET_SCALE_LINECOLOR; scaleStyle.lineConnectAs = Settings.Default.POINTSET_SCALE_LINECONNECTAS; try { foreach (PointSetStyle style in Settings.Default.POINTSET_CURVES) { curveStyles.Add(style); } foreach (PointSetStyle style in Settings.Default.POINTSET_MEASURES) { measureStyles.Add(style); } } catch (InvalidCastException e) { //There were no default pointsets loaded. } }
public void LoadSettings() { sessionsSettings.initialDigitizeState = Settings.Default.SESSIONS_INITIALDIGITZESTATE; coordSettings.frame = Settings.Default.COORD_FRAME; coordSettings.xThetaScale = Settings.Default.COORD_XTHETASCALE; coordSettings.yRScale = Settings.Default.COORD_YRSCALE; coordSettings.thetaUnits = Settings.Default.COORD_THETAUNITS; exportSettings.pointsSelection = Settings.Default.EXPORT_POINTSSELECTION; exportSettings.layout = Settings.Default.EXPORT_LAYOUT; exportSettings.delimiters = Settings.Default.EXPORT_DELIMITERS; exportSettings.header = Settings.Default.EXPORT_HEADER; viewFileToolbar = Settings.Default.VIEW_FILETOOLBAR; viewSelectToolbar = Settings.Default.VIEW_SELECTTOOLBAR; viewImageScaleToolbar = Settings.Default.VIEW_IMAGESCALETOOLBAR; viewDigitizeCurvePointsToolbar = Settings.Default.VIEW_DIGITIZECURVEPOINTSTOOLBAR; viewDigitizeMeasurePointsToolbar = Settings.Default.VIEW_DIGITIZEMEASUREPOINTSTOOLBAR; viewZoomToolbar = Settings.Default.VIEW_ZOOMTOOLBAR; viewStatusBar = Settings.Default.VIEW_STATUSBAR; viewPoints = Settings.Default.VIEW_POINTS; viewBackground = Settings.Default.VIEW_BACKGROUND; viewCurveGeometry = Settings.Default.VIEW_CURVEGEOMETRY; viewMeasureGeometry = Settings.Default.VIEW_MEASUREGEOMETRY; powerMostSigMax = Settings.Default.MATH_POWERMOSTSIGMAX; powerMostSigMin = Settings.Default.MATH_POWERMOSTSIGMIN; doubleMin = Settings.Default.MATH_DOUBLEMIN; maxCommands = Settings.Default.MATH_MAXCOMMANDS; windowCurveSize.Width = Settings.Default.WINDOW_CURVE_WIDTH; windowCurveSize.Height = Settings.Default.WINDOW_CURVE_HEIGHT; windowCurvePosition.X = Settings.Default.WINDOW_CURVE_X; windowCurvePosition.Y = Settings.Default.WINDOW_CURVE_Y; windowMainSize.Width = Settings.Default.WINDOW_MAIN_WIDTH; windowMainSize.Height = Settings.Default.WINDOW_MAIN_HEIGHT; windowMainPosition.X = Settings.Default.WINDOW_MAIN_X; windowMainPosition.Y = Settings.Default.WINDOW_MAIN_Y; windowMainFontOverride = Settings.Default.WINDOW_MAIN_FONT_OVERRIDE; windowMainFontName = Settings.Default.WINDOW_MAIN_FONT_NAME; windowMainFontSize = Settings.Default.WINDOW_MAIN_FONT_SIZE; windowMeasureSize.Width = Settings.Default.WINDOW_MEASURE_WIDTH; windowMeasureSize.Height = Settings.Default.WINDOW_MEASURE_HEIGHT; windowMeasurePosition.X = Settings.Default.WINDOW_MEASURE_X; windowMeasurePosition.Y = Settings.Default.WINDOW_MEASURE_Y; segmentPointMinSeparation = Settings.Default.SEGMENT_POINTMINSEPARATION; segmentSettings.minPoints = Settings.Default.SEGMENT_MINPOINTS; segmentSettings.pointSeparation = Settings.Default.SEGMENT_POINTDEFAULTSEPARATION; segmentSettings.fillCorners = Settings.Default.SEGMENT_FILLCORNERS; segmentSettings.lineSize = Settings.Default.SEGMENT_LINESIZE; segmentSettings.lineColor = Settings.Default.SEGMENT_LINECOLOR; gridRemovalSettings.gridMesh.gridSetX = Settings.Default.GRID_REMOVAL_GRIDSETX; gridRemovalSettings.gridMesh.gridSetY = Settings.Default.GRID_REMOVAL_GRIDSETY; gridRemovalSettings.thinThickness = Settings.Default.GRID_REMOVAL_THINTHICKNESS; gridRemovalSettings.gridDistance = Settings.Default.GRID_REMOVAL_GRIDDISTANCE; gridRemovalSettings.color = Settings.Default.GRID_REMOVAL_COLOR; gridRemovalSettings.gapSeparation = Settings.Default.GRID_REMOVAL_GAPSEPARATION; gridRemovalSettings.foregroundThresholdLow = Settings.Default.GRID_REMOVAL_FOREGROUNDTHRESHOLDLOW; gridRemovalSettings.foregroundThresholdHigh = Settings.Default.GRID_REMOVAL_FOREGROUNDTHRESHOLDHIGH; gridDisplayGridSetX = Settings.Default.GRID_DISPLAY_GRIDSETX; gridDisplayGridSetY = Settings.Default.GRID_DISPLAY_GRIDSETY; pointMatchHighlightDiameter = Settings.Default.POINTMATCH_HIGHLIGHTDIAMETER; pointMatchHighlightLineSize = Settings.Default.POINTMATCH_HIGHLIGHTLINESIZE; pointMatchSettings.pointSeparation = Settings.Default.POINTMATCH_SEPARATIONDEFAULT; pointMatchSettings.pointSize = Settings.Default.POINTMATCH_SIZEDEFAULT; pointMatchSettings.acceptedColor = Settings.Default.POINTMATCH_ACCEPTEDCOLOR; pointMatchSettings.rejectedColor = Settings.Default.POINTMATCH_REJECTEDCOLOR; discretizeSettings.discretizeMethod = Settings.Default.DISCRETIZE_METHODDEFAULT; discretizeSettings.intensityThresholdLow = Settings.Default.DISCRETIZE_INTENSITY_THRESHOLDLOW; discretizeSettings.intensityThresholdHigh = Settings.Default.DISCRETIZE_INTENSITY_THRESHOLDHIGH; discretizeSettings.foregroundThresholdLow = Settings.Default.DISCRETIZE_FOREGROUND_THRESHOLDLOW; discretizeSettings.foregroundThresholdHigh = Settings.Default.DISCRETIZE_FOREGROUND_THRESHOLDHIGH; discretizeSettings.hueThresholdLow = Settings.Default.DISCRETIZE_HUE_THRESHOLDLOW; discretizeSettings.hueThresholdHigh = Settings.Default.DISCRETIZE_HUE_THRESHOLDHIGH; discretizeSettings.saturationThresholdLow = Settings.Default.DISCRETIZE_SATURATION_THRESHOLDLOW; discretizeSettings.saturationThresholdHigh = Settings.Default.DISCRETIZE_SATURATION_THRESHOLDHIGH; discretizeSettings.valueThresholdLow = Settings.Default.DISCRETIZE_VALUE_THRESHOLDLOW; discretizeSettings.valueThresholdHigh = Settings.Default.DISCRETIZE_VALUE_THRESHOLDHIGH; axesStyle.pointShape = Settings.Default.POINTSET_AXES_POINTSHAPE; axesStyle.pointSize = Settings.Default.POINTSET_AXES_POINTSIZE; axesStyle.pointLineSize = Settings.Default.POINTSET_AXES_POINTLINESIZE; axesStyle.pointLineColor = Settings.Default.POINTSET_AXES_POINTLINECOLOR; axesStyle.pointInColor = Settings.Default.POINTSET_AXES_POINTINCOLOR; axesStyle.lineSize = Settings.Default.POINTSET_AXES_LINESIZE; axesStyle.lineColor = Settings.Default.POINTSET_AXES_LINECOLOR; axesStyle.lineConnectAs = Settings.Default.POINTSET_AXES_LINECONNECTAS; scaleStyle.pointShape = Settings.Default.POINTSET_SCALE_POINTSHAPE; scaleStyle.pointSize = Settings.Default.POINTSET_SCALE_POINTSIZE; scaleStyle.pointLineSize = Settings.Default.POINTSET_SCALE_POINTLINESIZE; scaleStyle.pointLineColor = Settings.Default.POINTSET_SCALE_POINTLINECOLOR; scaleStyle.pointInColor = Settings.Default.POINTSET_SCALE_POINTINCOLOR; scaleStyle.lineSize = Settings.Default.POINTSET_SCALE_LINESIZE; scaleStyle.lineColor = Settings.Default.POINTSET_SCALE_LINECOLOR; scaleStyle.lineConnectAs = Settings.Default.POINTSET_SCALE_LINECONNECTAS; try { foreach (PointSetStyle style in Settings.Default.POINTSET_CURVES) { curveStyles.Add(style); } foreach (PointSetStyle style in Settings.Default.POINTSET_MEASURES) { measureStyles.Add(style); } } catch (InvalidCastException e) { //There were no default pointsets loaded. } }
public void CheckedPointViewOption(ViewPointSelection sel) { menu.CheckedPointViewOption(sel); }
public void SetPointView(ViewPointSelection sel) { ribbonButton1.IsPressed = false; ribbonButton2.IsPressed = false; ribbonButton3.IsPressed = false; ribbonButton4.IsPressed = false; ribbonButton5.IsPressed = false; switch (sel) { case ViewPointSelection.ViewAllPoints: ribbonButton5.IsPressed = true; break; case ViewPointSelection.ViewAxesPoints: ribbonButton1.IsPressed = true; break; case ViewPointSelection.ViewCurvePoints: ribbonButton3.IsPressed = true; break; case ViewPointSelection.ViewMeasurePoints: ribbonButton4.IsPressed = true; break; case ViewPointSelection.ViewScalePoints: ribbonButton2.IsPressed = true; break; } Refresh(); }
public NuGenView(Form parent, NuGenDocument doc, Delegate_SendStatusMessage sendStatusMessage) { MdiParent = parent; Visible = true; WindowState = FormWindowState.Maximized; int x = Genetibase.NuGenTransform.Properties.Settings.Default.WINDOW_MEASURE_WIDTH; int y = Genetibase.NuGenTransform.Properties.Settings.Default.WINDOW_MEASURE_HEIGHT; this.sendStatusMessage = sendStatusMessage; imagePanel = new InnerPanel(); Size = new Size(x, y); viewPointSelection = NuGenDefaultSettings.GetInstance().ViewPointSelection; this.doc = doc; imagePanel.Paint += new PaintEventHandler(NuGenView_Paint); imagePanel.MouseClick += new MouseEventHandler(NuGenView_MouseClick); imagePanel.MouseDown += new MouseEventHandler(NuGenView_MousePress); imagePanel.MouseUp += new MouseEventHandler(NuGenView_MouseRelease); imagePanel.MouseMove += new MouseEventHandler(NuGenView_MouseMove); imagePanel.MouseDoubleClick += new MouseEventHandler(NuGenView_MouseDoubleClick); Controls.Add(imagePanel); curveSelected = NuGenPointSetCollection.DefaultCurveName; measureSelected = NuGenPointSetCollection.DefaultMeasureName; doc.ActiveCurveName = curveSelected; doc.ActiveMeasureName = measureSelected; selectedPointList = new List<NuGenPoint>(); selectedPointGestatingList = new List<NuGenPoint>(); editPointsList = new List<NuGenPoint>(); this.DoubleBuffered = true; this.AutoScroll = true; }