The files contained in this repository can be downloaded to your computer using a svn client.
On Linux you simply type the command displayed below.
This URL has Read-Only access.
root / trunk / DomotiGa / FEditModulesGroups.class @ 750
History | View | Annotate | Download (2.6 kB)
| 1 | ' Gambas class file |
|---|---|
| 2 | |
| 3 | ' Description: |
| 4 | ' FDeviceModules.class |
| 5 | ' Support for editing module/devicetypes/groups/locations and floorplans. |
| 6 | |
| 7 | ' Development Status: |
| 8 | ' Finished and working. |
| 9 | |
| 10 | ' DomotiGa - an open source home automation program. |
| 11 | ' Copyright(C) 2008-2011 Ron Klinkien |
| 12 | |
| 13 | ' Read file called COPYING for license details. |
| 14 | |
| 15 | PUBLIC SUB Form_Open() |
| 16 | |
| 17 | ME.Move(FMain.X + 50, FMain.Y + 70) |
| 18 | |
| 19 | WITH DataBrowserModules.GridView |
| 20 | .Columns[0].Text = ("Id")
|
| 21 | .Columns[0].Width = 28 |
| 22 | .Columns[1].Text = ("Name")
|
| 23 | .Columns[1].Width = 170 |
| 24 | .Columns[2].Text = ("Description")
|
| 25 | .Columns[2].Width = 160 |
| 26 | .Columns[3].Text = ("Type")
|
| 27 | .Columns[3].Width = 60 |
| 28 | END WITH |
| 29 | WITH DataBrowserGroups.GridView |
| 30 | .Columns[0].Text = ("Id")
|
| 31 | .Columns[0].Width = 28 |
| 32 | .Columns[1].Text = ("Group")
|
| 33 | .Columns[1].Width = 120 |
| 34 | END WITH |
| 35 | WITH DataBrowserLocations.GridView |
| 36 | .Columns[0].Text = ("Id")
|
| 37 | .Columns[0].Width = 28 |
| 38 | .Columns[1].Text = ("Location")
|
| 39 | .Columns[1].Width = 120 |
| 40 | END WITH |
| 41 | WITH DataBrowserFloorplans.GridView |
| 42 | .Columns[0].Text = ("Id")
|
| 43 | .Columns[0].Width = 28 |
| 44 | .Columns[1].Text = ("Floor")
|
| 45 | .Columns[1].Width = 120 |
| 46 | .Columns[2].Text = ("Image")
|
| 47 | .Columns[2].Width = 70 |
| 48 | END WITH |
| 49 | WITH DataBrowserBlacklist.GridView |
| 50 | .Columns[0].Text = ("Id")
|
| 51 | .Columns[0].Width = 28 |
| 52 | .Columns[1].Text = ("Address")
|
| 53 | .Columns[1].Width = 130 |
| 54 | .Columns[2].Text = ("Comments")
|
| 55 | .Columns[2].Width = 130 |
| 56 | END WITH |
| 57 | |
| 58 | END |
| 59 | |
| 60 | PUBLIC SUB btnClose_Click() |
| 61 | |
| 62 | ME.Close |
| 63 | |
| 64 | END |
| 65 | |
| 66 | PUBLIC SUB btnImageFloor_Click() |
| 67 | |
| 68 | DataControlF2.Value = FSelectImage.Run(Main.sBaseDir &/ "floorplans" &/ DataControlF1.Value, "floorplans") |
| 69 | |
| 70 | END |
| 71 | |
| 72 | PUBLIC SUB btnOnIcon_Click() |
| 73 | |
| 74 | DataControlM5.Value = FSelectImage.Run(Main.sBaseDir &/ "icons" &/ DataControlM5.Value, "icons") |
| 75 | DisplayIcons() |
| 76 | |
| 77 | END |
| 78 | |
| 79 | PUBLIC SUB btnDimIcon_Click() |
| 80 | |
| 81 | DataControlM6.Value = FSelectImage.Run(Main.sBaseDir &/ "icons" &/ DataControlM6.Value, "icons") |
| 82 | DisplayIcons() |
| 83 | |
| 84 | END |
| 85 | |
| 86 | PUBLIC SUB btnOffIcon_Click() |
| 87 | |
| 88 | DataControlM7.Value = FSelectImage.Run(Main.sBaseDir &/ "icons" &/ DataControlM7.Value, "icons") |
| 89 | DisplayIcons() |
| 90 | |
| 91 | END |
| 92 | |
| 93 | PUBLIC SUB DisplayIcons() |
| 94 | |
| 95 | IF DataControlM5.Value THEN |
| 96 | TRY mbIconOn.Path = Main.sBaseDir &/ "icons" &/ DataControlM5.Value |
| 97 | IF NOT ERROR THEN mbIconOn.Playing = TRUE |
| 98 | ENDIF |
| 99 | IF DataControlM6.Value THEN |
| 100 | TRY mbIconDim.Path = Main.sBaseDir &/ "icons" &/ DataControlM6.Value |
| 101 | IF NOT ERROR THEN mbIconDim.Playing = TRUE |
| 102 | ENDIF |
| 103 | IF DataControlM7.Value THEN |
| 104 | TRY mbIconOff.Path = Main.sBaseDir &/ "icons" &/ DataControlM7.Value |
| 105 | IF NOT ERROR THEN mbIconOff.Playing = TRUE |
| 106 | ENDIF |
| 107 | |
| 108 | END |
