public bool TryGetAllInputs(out List <int> xyz, out bool copyAndShift) { bool extractionSuccessful = false; string xValue = this.xAxis.Output; string yValue = this.yAxis.Output; string zValue = this.zAxis.Output; int value; ActionMode mode = this.mode.GetMode(); List <int> newXYZ = new List <int>(); bool newCopyAndShift = true; if (Int32.TryParse(xValue, out value)) { newXYZ.Add(value); if (Int32.TryParse(yValue, out value)) { newXYZ.Add(value); if (Int32.TryParse(zValue, out value)) { newXYZ.Add(value); if (mode == ActionMode.ShiftOnly) { newCopyAndShift = false; extractionSuccessful = true; } else if (mode == ActionMode.CopyAndShift) { newCopyAndShift = true; extractionSuccessful = true; } } } } if (extractionSuccessful) { xyz = newXYZ; copyAndShift = newCopyAndShift; } else { xyz = new List <int>(); copyAndShift = false; } return(extractionSuccessful); }
public bool IsModeDefault() { ActionMode defaultMode = ActionMode.ShiftOnly; return(this.mode.GetMode() == defaultMode); }