Created
March 14, 2023 13:43
-
-
Save bayramcetin/3f7712cd680110640e1c7d005192d405 to your computer and use it in GitHub Desktop.
RGB Color Form
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Form] | |
public class ETGCashFlowColorParameters extends FormRun | |
{ | |
void setBackColor(OLE_Color _color) | |
{ | |
ETGCashFlowTypes.BackColor = _color; | |
ETGCashFlowTypes_ds.write(); | |
element.refreshColorView(); | |
} | |
void setTextColor(OLE_Color _color) | |
{ | |
ETGCashFlowTypes.TextColor = _color; | |
ETGCashFlowTypes_ds.write(); | |
element.refreshColorView(); | |
} | |
void refreshColorView() | |
{ | |
ETGCashFlowTypes table; | |
for (table = ETGCashFlowTypes_ds.getFirst(); | |
table; | |
table = ETGCashFlowTypes_ds.getNext()) | |
{ | |
if (table.RecId == ETGCashFlowTypes.RecId) | |
{ | |
ETGCashFlowTypes_ds.clearDisplayOption(table); | |
} | |
} | |
ETGCashFlowTypes_ds.refreshEx(-1); | |
ETGCashFlowTypes_ds.active(); | |
} | |
[DataSource] | |
class ETGCashFlowTypes | |
{ | |
/// <summary> | |
/// | |
/// </summary> | |
/// <param name = "_record"></param> | |
/// <param name = "_options"></param> | |
public void displayOption(Common _record, FormRowDisplayOption _options) | |
{ | |
ETGCashFlowTypes table = _record; | |
_options.affectedElementsByControl(FormGridControl1_BackColor.id()); | |
_options.affectedElementsByControl(FormGridControl1_TextColor.id()); | |
_options.textColor(table.TextColor); | |
_options.backColor(table.BackColor); | |
super(_record, _options); | |
} | |
} | |
[Control("Integer")] | |
class FormGridControl1_BackColor | |
{ | |
/// <summary> | |
/// | |
/// </summary> | |
public void lookup() | |
{ | |
//super(); | |
int currentColor = ETGCashFlowTypes.BackColor; | |
int selectedColor = ColorSelection::selectColor(this, currentColor); | |
if (selectedColor != currentColor) | |
{ | |
element.setBackColor(selectedColor); | |
} | |
} | |
} | |
[Control("Integer")] | |
class FormGridControl1_TextColor | |
{ | |
/// <summary> | |
/// | |
/// </summary> | |
public void lookup() | |
{ | |
//super(); | |
int currentColor = ETGCashFlowTypes.TextColor; | |
int selectedColor = ColorSelection::selectColor(this, currentColor); | |
if (selectedColor != currentColor) | |
{ | |
element.setTextColor(selectedColor); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment