moved StartingStepNumber from AnnotationOptions to ShapeManager

This commit is contained in:
Fyers 2018-09-19 18:35:58 +02:00
parent 48155ff42c
commit 62eb62a9c2
3 changed files with 4 additions and 5 deletions

View file

@ -83,7 +83,6 @@ public class AnnotationOptions
public Color StepFillColor { get; set; } = PrimaryColor; public Color StepFillColor { get; set; } = PrimaryColor;
public int StepFontSize { get; set; } = 18; public int StepFontSize { get; set; } = 18;
public bool StepUseLetters { get; set; } = false; public bool StepUseLetters { get; set; } = false;
public int StartingStepNumber { get; set; } = 1;
// Sticker drawing // Sticker drawing
public List<StickerPackInfo> StickerPacks = new List<StickerPackInfo>() public List<StickerPackInfo> StickerPacks = new List<StickerPackInfo>()

View file

@ -152,6 +152,7 @@ private set
public bool IsCurrentHoverShapeValid => CurrentHoverShape != null && CurrentHoverShape.IsValidShape; public bool IsCurrentHoverShapeValid => CurrentHoverShape != null && CurrentHoverShape.IsValidShape;
public bool IsCurrentShapeTypeRegion => IsShapeTypeRegion(CurrentTool); public bool IsCurrentShapeTypeRegion => IsShapeTypeRegion(CurrentTool);
public int StartingStepNumber { get; set; } = 1;
public bool IsCreating { get; set; } public bool IsCreating { get; set; }
public bool IsMoving { get; set; } public bool IsMoving { get; set; }
@ -1474,7 +1475,7 @@ private void UpdateNodes()
public void OrderStepShapes() public void OrderStepShapes()
{ {
int i = AnnotationOptions.StartingStepNumber; int i = StartingStepNumber;
foreach (StepDrawingShape shape in Shapes.OfType<StepDrawingShape>()) foreach (StepDrawingShape shape in Shapes.OfType<StepDrawingShape>())
{ {

View file

@ -551,11 +551,10 @@ internal void CreateToolbar()
tslnudStartingStepValue.Content.Maximum = 10000; tslnudStartingStepValue.Content.Maximum = 10000;
tslnudStartingStepValue.Content.ValueChanged = (sender, e) => tslnudStartingStepValue.Content.ValueChanged = (sender, e) =>
{ {
AnnotationOptions.StartingStepNumber = (int)tslnudStartingStepValue.Content.Value; StartingStepNumber = (int)tslnudStartingStepValue.Content.Value;
UpdateCurrentShape(); UpdateCurrentShape();
}; };
tsddbShapeOptions.DropDownItems.Add(tslnudStartingStepValue); tsddbShapeOptions.DropDownItems.Add(tslnudStartingStepValue);
AnnotationOptions.StartingStepNumber = 1;
tsmiStepUseLetters = new ToolStripMenuItem(Resources.ShapeManager_CreateToolbar_UseLetters); tsmiStepUseLetters = new ToolStripMenuItem(Resources.ShapeManager_CreateToolbar_UseLetters);
tsmiStepUseLetters.Checked = false; tsmiStepUseLetters.Checked = false;
@ -1315,7 +1314,7 @@ private void UpdateMenu()
tsbHighlightColor.Image = ImageHelpers.CreateColorPickerIcon(AnnotationOptions.HighlightColor, new Rectangle(0, 0, 16, 16)); tsbHighlightColor.Image = ImageHelpers.CreateColorPickerIcon(AnnotationOptions.HighlightColor, new Rectangle(0, 0, 16, 16));
tslnudStepFontSize.Content.Value = AnnotationOptions.StepFontSize; tslnudStepFontSize.Content.Value = AnnotationOptions.StepFontSize;
tslnudStartingStepValue.Content.Value = AnnotationOptions.StartingStepNumber; tslnudStartingStepValue.Content.Value = StartingStepNumber;
tsmiStepUseLetters.Checked = AnnotationOptions.StepUseLetters; tsmiStepUseLetters.Checked = AnnotationOptions.StepUseLetters;
tsmiShadow.Checked = AnnotationOptions.Shadow; tsmiShadow.Checked = AnnotationOptions.Shadow;