internal protected Variable GetSharedVariable(string key, out Task task) { Variable variable; if (sharedVariables != null) { variable = sharedVariables.Get(key); } else { variable = null; } if (variable != null) // Found in current task { task = this; } else if (ParentTask != null) // Try find in ancestor nodes { variable = ParentTask.GetSharedVariable(key, out task); } else { task = null; } return(variable); }
void CreateColorModeWidget(VariableSet variables) { var mode = new GimpComboBox(variables.Get <int>("color_mode"), new string[] { _("Grayscale"), _("RGB Color") }); AttachAligned(0, 3, _("_Mode:"), 0.0, 0.5, mode, 2, false); }
void CreateResolutionWidget(VariableSet variables) { var resolution = variables.Get <int>("resolution"); var button = new GimpSpinButton(0, 1200, 1, resolution); AttachAligned(0, 2, _("_Resolution:"), 0.0, 0.5, button, 1, true); }
void CreatePositionWidget(VariableSet variables) { _position = new GimpComboBox(variables.Get <int>("position"), new string[] { _("Centered"), _("Top Left"), _("Bottom Left"), _("Top Right"), _("Bottom Right") }); AttachAligned(0, 4, _("Position:"), 0.0, 0.5, _position, 1, false); }
void CreateTextWidget(VariableSet variables) { _entry = new GimpEntry(variables.Get <string>("label")); AttachAligned(0, 1, _("Custom Text:"), 0.0, 0.5, _entry, 1, true); }
void CreateUnitsWidget(VariableSet variables) { Attach(new GimpComboBox(variables.Get <int>("units"), new string[] { "pixels/inch", "pixels/cm", "pixels/mm" }), 2, 3, 2, 3); }
void CreateFlattenWidget(VariableSet variables) { var flatten = variables.Get <bool>("flatten"); Attach(new GimpCheckButton(_("Flatten All Layers"), flatten), 0, 2, 4, 5); }
void CreateTextWidget(VariableSet variables) { _entry = new GimpEntry(variables.Get<string>("label")); AttachAligned(0, 1, _("Custom Text:"), 0.0, 0.5, _entry, 1, true); }
void CreatePositionWidget(VariableSet variables) { _position = new GimpComboBox(variables.Get<int>("position"), new string[]{_("Centered"), _("Top Left"), _("Bottom Left"), _("Top Right"), _("Bottom Right")}); AttachAligned(0, 4, _("Position:"), 0.0, 0.5, _position, 1, false); }
void CreateFlattenWidget(VariableSet variables) { var flatten = variables.Get<bool>("flatten"); Attach(new GimpCheckButton(_("Flatten All Layers"), flatten), 0, 2, 4, 5); }
void CreateColorModeWidget(VariableSet variables) { var mode = new GimpComboBox(variables.Get<int>("color_mode"), new string[]{_("Grayscale"), _("RGB Color")}); AttachAligned(0, 3, _("_Mode:"), 0.0, 0.5, mode, 2, false); }
void CreateUnitsWidget(VariableSet variables) { Attach(new GimpComboBox(variables.Get<int>("units"), new string[]{"pixels/inch", "pixels/cm", "pixels/mm"}), 2, 3, 2, 3); }
void CreateResolutionWidget(VariableSet variables) { var resolution = variables.Get<int>("resolution"); var button = new GimpSpinButton(0, 1200, 1, resolution); AttachAligned(0, 2, _("_Resolution:"), 0.0, 0.5, button, 1, true); }