Data update

This commit is contained in:
Ingy döt Net 2024-03-06 22:25:12 -08:00
parent ed705008a8
commit 0df55f9f24
2196 changed files with 32999 additions and 3075 deletions

View file

@ -1,8 +0,0 @@
<Form X="100" Y="100" Width="160" Height="120" Caption="Rosseta Code">
<Edit ID="txtNumber" X="7" Y="7" Width="140" Height="25" Caption="0">
</Edit>
<Button ID="btmIncrement" X="7" Y="35" Width="140" Height="25" Caption="Increment" onClick="onButtonIncrementClick">
</Button>
<Button ID="btmRandom" X="7" Y="65" Width="140" Height="25" Caption="Random" onClick="onButtonRandomClick">
</Button>
</Form>

View file

@ -1,44 +0,0 @@
import xforms;
import forms;
import extensions;
public class MainWindow
{
SDIForm form;
Button btmIncrement;
Button btmRandom;
Edit txtNumber;
constructor new()
{
form := xforms.executePath("main.xs", self);
btmIncrement := form.Controls.btmIncrement;
btmRandom := form.Controls.btmRandom;
txtNumber := form.Controls.txtNumber;
}
onButtonIncrementClick(sender)
{
var number := txtNumber.Value.toInt();
number := number + 1;
self.changeTextBoxValue(number)
}
onButtonRandomClick(sender)
{
if(messageDialog.showQuestion("Inf", "Really reset to random value?"))
{
self.changeTextBoxValue(randomGenerator.eval(99999999))
}
}
private changeTextBoxValue(number)
{
txtNumber.Caption := number.toString()
}
dispatch() => form;
}

View file

@ -15,9 +15,9 @@ public class MainWindow : SDIDialog
txtNumber := Edit.new();
self
.appendControl:btmIncrement
.appendControl:btmRandom
.appendControl:txtNumber;
.appendControl(btmIncrement)
.appendControl(btmRandom)
.appendControl(txtNumber);
self.Caption := "Rosseta Code";
self.setRegion(100, 100, 180, 140);