Ejemplo n.º 1
0
        internal static void Modify(List <Operation> operations)
        {
            // Show form for modification of a list of Operations
            FilthyOperation operationOptions = new FilthyOperation(operations, FilthyMath.factorRangeMinimum, FilthyMath.factorRangeMaximum);

            // Set data to defaults because we can't take data from any specific operation
            operationOptions.factorRange1Numeric.Value = FilthyMath.factorRangeDefaultMinimum;
            operationOptions.factorRange2Numeric.Value = FilthyMath.factorRangeDefaultMaximum;

            operationOptions.ShowDialog();
            if (operationOptions.exitCode != 0)
            {
                // Cancelled or 'errored'
                return;
            }

            // Modify operations
            foreach (Operation operation in operations)
            {
                operation.SetRange((int)operationOptions.factorRange1Numeric.Value, (int)operationOptions.factorRange2Numeric.Value);
            }
        }
Ejemplo n.º 2
0
        internal static void Modify(Operation operation)
        {
            // Show form for modification of a specific Operation
            FilthyOperation operationOptions = new FilthyOperation(new List <Operation>()
            {
                operation
            }, FilthyMath.factorRangeMinimum, FilthyMath.factorRangeMaximum);

            // Set data to operation values
            operationOptions.factorRange1Numeric.Value = operation.FactorMinimum;
            operationOptions.factorRange2Numeric.Value = operation.FactorMaximum;

            operationOptions.ShowDialog();
            if (operationOptions.exitCode != 0)
            {
                // Cancelled or 'errored'
                return;
            }

            // Modify operation
            operation.SetRange((int)operationOptions.factorRange1Numeric.Value, (int)operationOptions.factorRange2Numeric.Value);
        }