public static void SetIDBuffer(string blockTypeName, uint id, IncrementMode mode) { var index = GetIndex(blockTypeName); if (index != -1) { var buffer = _DataBlockIdBuffers[index]; buffer.CurrentID = id; buffer.IncrementMode = mode; } }
/// <summary> /// Calculates the change increment of the slider when the user clicks +/- based /// on the current value as well as min/max increments /// </summary> private void UpdateChangeIncrement() { if (Value <= 1d && _incrementMode != IncrementMode.Negative) { // Each small click represents a 10% increase downwards var negativeRange = 1d - MinimumZoom; var negativeMultiplier = negativeRange * 10; SmallChange = 1 / negativeMultiplier; _incrementMode = IncrementMode.Negative; } else if (Value > 1d && _incrementMode != IncrementMode.Positive) { // Each small click represents a 10% increase upwards (which is on a different scale compared to shrinking) _incrementMode = IncrementMode.Positive; var positiveRange = MaximumZoom - 1d; var positiveMultiplier = positiveRange * 10; SmallChange = 1 / positiveMultiplier; } }
/// <summary> /// Calculates the change increment of the slider when the user clicks +/- based /// on the current value as well as min/max increments /// </summary> private void UpdateChangeIncrement() { if (Value <= 1d && _incrementMode != IncrementMode.Negative) { // Each small click represents a 10% increase downwards var negativeRange = 1d - MinimumZoom; var negativeMultiplier = negativeRange * 10; SmallChange = 1/negativeMultiplier; _incrementMode = IncrementMode.Negative; } else if (Value > 1d && _incrementMode != IncrementMode.Positive) { // Each small click represents a 10% increase upwards (which is on a different scale compared to shrinking) _incrementMode = IncrementMode.Positive; var positiveRange = MaximumZoom - 1d; var positiveMultiplier = positiveRange*10; SmallChange = 1/positiveMultiplier; } }
public static void Check(ref int lexemsIterator, string command, string success, string failure, IncrementMode incrementValue, Out.State logState) { if (SyntaxAnalyzerRecursiveDown.sharedAnalyzer.lexems[lexemsIterator].Command == command) { Out.Log(logState, success); lexemsIterator += (int)incrementValue; } else { throw new LexemException( SyntaxAnalyzerRecursiveDown.sharedAnalyzer.lexems[lexemsIterator].LineNumber, failure); } }
public static void Check(ref int lexemsIterator, string command, string success, string failure, IncrementMode incrementValue) { Check(ref lexemsIterator, command, success, failure, incrementValue, Out.State.LogVerbose); }