http://wiki.linuxmce.org/index.php?title=DataGrid_Objects&feed=atom&action=historyDataGrid Objects - Revision history2024-03-29T12:15:58ZRevision history for this page on the wikiMediaWiki 1.24.1http://wiki.linuxmce.org/index.php?title=DataGrid_Objects&diff=23810&oldid=prevMarie.o: beautification2010-05-17T21:06:22Z<p>beautification</p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;'>
<td colspan='2' style="background-color: white; color:black; text-align: center;">←Older revision</td>
<td colspan='2' style="background-color: white; color:black; text-align: center;">Revision as of 21:06, 17 May 2010</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 7:</td>
<td colspan="2" class="diff-lineno">Line 7:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>Additionally in the Data Grid generator you can attach attributes to each cell, which are a pair of strings, such as color=blue, size=l, etc.  In Designer you can specify as parameters for the datagrid PK_DesignObj_Row1, PK_DesignObj_Coll1 and PK_DesignObj_Cell.  In this case those objects will be used in place of the normally rendered cells; the objects are positioned in Designer in a grid for the rows and columns, and are automatically hidden when there is no corresponding cell.</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>Additionally in the Data Grid generator you can attach attributes to each cell, which are a pair of strings, such as color=blue, size=l, etc.  In Designer you can specify as parameters for the datagrid PK_DesignObj_Row1, PK_DesignObj_Coll1 and PK_DesignObj_Cell.  In this case those objects will be used in place of the normally rendered cells; the objects are positioned in Designer in a grid for the rows and columns, and are automatically hidden when there is no corresponding cell.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>Example for Add Software grid<del class="diffchange diffchange-inline">:</del></div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline">== </ins>Example for Add Software grid <ins class="diffchange diffchange-inline">==</ins></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> </div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>We have a grid that lists software modules the user can install.  Each row needs to list the title of the module, show an icon for the software, and display a check box if it's virus free.</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>We have a grid that lists software modules the user can install.  Each row needs to list the title of the module, show an icon for the software, and display a check box if it's virus free.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>We create an object in Designer for the cells in the grid, and on it place a text object with "<%=CA:Title%>".  This means the text will contain the cell's attribute "Title".  Create a blank bitmap object with no graphic to represent the icon, and another which contains a check box for 'virus free'.</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>We create an object in Designer for the cells in the grid, and on it place a text object with "<%=CA:Title%>".  This means the text will contain the cell's attribute "Title".   </div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> </div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline">* </ins>Create a blank bitmap object with no graphic to represent the icon, and another which contains a check box for 'virus free'.</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>Create a new DataGrid in Designer and place on it all 3 of those objects, marking the 'virus free' one as 'can hide', meaning it won't always be visible.</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline">* </ins>Create a new DataGrid in Designer and place on it all 3 of those objects, marking the 'virus free' one as 'can hide', meaning it won't always be visible.</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> </div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline">* </ins>Create a data grid generator (in this case in general info plugin) and register it as follows:</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>Create a data grid generator (in this case in general info plugin) and register it as follows:</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline"> </ins>bool General_Info_Plugin::Register() {</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> </div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline"> </ins>...</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline">  </del>bool General_Info_Plugin::Register() {</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline">  </del>...</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>   m_pDatagrid_Plugin->RegisterDatagridGenerator(</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>   m_pDatagrid_Plugin->RegisterDatagridGenerator(</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>   new DataGridGeneratorCallBack(this, (DCEDataGridGeneratorFn) (&General_Info_Plugin::AddSoftware)),</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>   new DataGridGeneratorCallBack(this, (DCEDataGridGeneratorFn) (&General_Info_Plugin::AddSoftware)),</div></td></tr>
<tr><td colspan="2" class="diff-lineno">Line 25:</td>
<td colspan="2" class="diff-lineno">Line 22:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>in the generator code we retrieve the software modules from the database and create a cell for each with the correct attributes:</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>in the generator code we retrieve the software modules from the database and create a cell for each with the correct attributes:</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline">  </del>class DataGridTable *General_Info_Plugin::AddSoftware( string GridID, string Parms, void *ExtraData, int *iPK_Variable, string</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline"> </ins>class DataGridTable *General_Info_Plugin::AddSoftware( string GridID, string Parms, void *ExtraData, int *iPK_Variable, string</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>  *sValue_To_Assign, class Message *pMessage ) {</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>  *sValue_To_Assign, class Message *pMessage ) {</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>   DataGridTable *pDataGrid = new DataGridTable();</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>   DataGridTable *pDataGrid = new DataGridTable();</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>   DataGridCell *pCell;</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>   DataGridCell *pCell;</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">  </del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>   string sql="SELECT PK_Software, Iconstr, Title, Category, Rating, Virus_Free, Installation_status, Description, Homeurl  </div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>   string sql="SELECT PK_Software, Iconstr, Title, Category, Rating, Virus_Free, Installation_status, Description, Homeurl  </div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>   FROM Software WHERE FK_Device="+sPK_Device_PC+" ORDER BY Title";</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>   FROM Software WHERE FK_Device="+sPK_Device_PC+" ORDER BY Title";</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">  </del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>   int iRow=0;</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>   int iRow=0;</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>   if( (result.r = m_pDatabase_pluto_main->mysql_query_result(sql)) )</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>   if( (result.r = m_pDatabase_pluto_main->mysql_query_result(sql)) )</div></td></tr>
</table>Marie.ohttp://wiki.linuxmce.org/index.php?title=DataGrid_Objects&diff=5155&oldid=prevRwilson131 at 02:19, 6 September 20072007-09-06T02:19:26Z<p></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;'>
<td colspan='2' style="background-color: white; color:black; text-align: center;">←Older revision</td>
<td colspan='2' style="background-color: white; color:black; text-align: center;">Revision as of 02:19, 6 September 2007</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 144:</td>
<td colspan="2" class="diff-lineno">Line 144:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>   return false; // Keep processing it</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>   return false; // Keep processing it</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>   }</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>   }</div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">[[Category: Programmer's Guide]]</ins></div></td></tr>
</table>Rwilson131http://wiki.linuxmce.org/index.php?title=DataGrid_Objects&diff=3465&oldid=prevJerry finn at 16:13, 16 March 20072007-03-16T16:13:07Z<p></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;'>
<td colspan='2' style="background-color: white; color:black; text-align: center;">←Older revision</td>
<td colspan='2' style="background-color: white; color:black; text-align: center;">Revision as of 16:13, 16 March 2007</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline"><table width="100%"> <tr><td bgcolor="#FFCFCF">This page was written by Pluto and imported with their permission when LinuxMCE branched off in February, 2007.  In general any information should apply to LinuxMCE.  However, this page should be edited to reflect changes to LinuxMCE and remove old references to Pluto.</td></tr> </table></del>Data grids are objects shown on the Orbiters which have dynamically changing data in the rows and columns, which data is specified in code.  To create a DataGrid you must add a new DataGrid to the DataGrid table in pluto_main, and create a function, usually in a plugin, which builds the rows and columns of data.  Upon startup call the function RegisterDatagridGenerator in the DataGrid plugin to specify the function that provides the data for the data grid.  In Designer create a data grid object on a screen and specify the data grid id and the parameters to be passed to the data grid generator in the DesignObjParameter 'options'.</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>Data grids are objects shown on the Orbiters which have dynamically changing data in the rows and columns, which data is specified in code.  To create a DataGrid you must add a new DataGrid to the DataGrid table in pluto_main, and create a function, usually in a plugin, which builds the rows and columns of data.  Upon startup call the function RegisterDatagridGenerator in the DataGrid plugin to specify the function that provides the data for the data grid.  In Designer create a data grid object on a screen and specify the data grid id and the parameters to be passed to the data grid generator in the DesignObjParameter 'options'.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>In the Data Grid Generator create cells in rows and columns, and attach to each cell a 'value' and optionally 'text'.  When the screen with a DataGrid first appears Orbiter will fire the command "Populate DataGrid" which will result in the DataGrid Generator getting called to populate the entire contents of the grid, and then every time it needs to render a block of rows/columns it sends the command "Request DataGrid Contents".</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>In the Data Grid Generator create cells in rows and columns, and attach to each cell a 'value' and optionally 'text'.  When the screen with a DataGrid first appears Orbiter will fire the command "Populate DataGrid" which will result in the DataGrid Generator getting called to populate the entire contents of the grid, and then every time it needs to render a block of rows/columns it sends the command "Request DataGrid Contents".</div></td></tr>
</table>Jerry finnhttp://wiki.linuxmce.org/index.php?title=DataGrid_Objects&diff=2782&oldid=prevWikiadmin: spelling corrections2006-12-10T15:01:09Z<p>spelling corrections</p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;'>
<td colspan='2' style="background-color: white; color:black; text-align: center;">←Older revision</td>
<td colspan='2' style="background-color: white; color:black; text-align: center;">Revision as of 15:01, 10 December 2006</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><table width="100%"> <tr><td bgcolor="#FFCFCF">This page was written by Pluto and imported with their permission when LinuxMCE branched off in February, 2007.  In general any information should apply to LinuxMCE.  However, this page should be edited to reflect changes to LinuxMCE and remove old references to Pluto.</td></tr> </table>Data grids are objects shown on the Orbiters which have dynamically changing data in the rows and columns, which data is specified in code.  To create a <del class="diffchange diffchange-inline">datagrid </del>you must add a new DataGrid to the DataGrid table in pluto_main, and create a function, usually in a plugin, which builds the rows and columns of data.  Upon startup call the function RegisterDatagridGenerator in the DataGrid plugin to specify the function that provides the data for the data grid.  In Designer create a data grid object on a screen and specify the data grid id and the parameters to be passed to the data grid generator in the DesignObjParameter 'options'.</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><table width="100%"> <tr><td bgcolor="#FFCFCF">This page was written by Pluto and imported with their permission when LinuxMCE branched off in February, 2007.  In general any information should apply to LinuxMCE.  However, this page should be edited to reflect changes to LinuxMCE and remove old references to Pluto.</td></tr> </table>Data grids are objects shown on the Orbiters which have dynamically changing data in the rows and columns, which data is specified in code.  To create a <ins class="diffchange diffchange-inline">DataGrid </ins>you must add a new DataGrid to the DataGrid table in pluto_main, and create a function, usually in a plugin, which builds the rows and columns of data.  Upon startup call the function RegisterDatagridGenerator in the DataGrid plugin to specify the function that provides the data for the data grid.  In Designer create a data grid object on a screen and specify the data grid id and the parameters to be passed to the data grid generator in the DesignObjParameter 'options'.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>In the Data Grid Generator create cells in rows and columns, and attach to each cell a 'value' and optionally 'text'.  When the screen with a <del class="diffchange diffchange-inline">datagrid </del>first appears Orbiter will fire the command "Populate <del class="diffchange diffchange-inline">Datagrid</del>" which will result in the <del class="diffchange diffchange-inline">Datagrid </del>Generator getting called to populate the entire contents of the grid, and then every time it needs to render a block of rows/columns it sends the command "Request <del class="diffchange diffchange-inline">Datagrid </del>Contents".</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>In the Data Grid Generator create cells in rows and columns, and attach to each cell a 'value' and optionally 'text'.  When the screen with a <ins class="diffchange diffchange-inline">DataGrid </ins>first appears Orbiter will fire the command "Populate <ins class="diffchange diffchange-inline">DataGrid</ins>" which will result in the <ins class="diffchange diffchange-inline">DataGrid </ins>Generator getting called to populate the entire contents of the grid, and then every time it needs to render a block of rows/columns it sends the command "Request <ins class="diffchange diffchange-inline">DataGrid </ins>Contents".</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>When a cell in the <del class="diffchange diffchange-inline">datagrid </del>is selected orbiter will store the 'value' for the cell into the variable specified in the parameter for the <del class="diffchange diffchange-inline">datagrid</del>, and Orbiter will fire all the commands in the "On Activate" list.  You can also use ScreenHandler's RegisterCallBack method to create a function that is called whenever a cell is selected (use the type cbDataGridSelected).</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>When a cell in the <ins class="diffchange diffchange-inline">DataGrid </ins>is selected orbiter will store the 'value' for the cell into the variable specified in the parameter for the <ins class="diffchange diffchange-inline">DataGrid</ins>, and Orbiter will fire all the commands in the "On Activate" list.  You can also use ScreenHandler's RegisterCallBack method to create a function that is called whenever a cell is selected (use the type cbDataGridSelected).</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>Additionally in the Data Grid generator you can attach attributes to each cell, which are a pair of strings, such as color=blue, size=l, etc.  In Designer you can specify as parameters for the datagrid PK_DesignObj_Row1, PK_DesignObj_Coll1 and PK_DesignObj_Cell.  In this case those objects will be used in place of the normally rendered cells; the objects are positioned in Designer in a grid for the rows and columns, and are automatically hidden when there is no corresponding cell.</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>Additionally in the Data Grid generator you can attach attributes to each cell, which are a pair of strings, such as color=blue, size=l, etc.  In Designer you can specify as parameters for the datagrid PK_DesignObj_Row1, PK_DesignObj_Coll1 and PK_DesignObj_Cell.  In this case those objects will be used in place of the normally rendered cells; the objects are positioned in Designer in a grid for the rows and columns, and are automatically hidden when there is no corresponding cell.</div></td></tr>
<tr><td colspan="2" class="diff-lineno">Line 13:</td>
<td colspan="2" class="diff-lineno">Line 13:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>We create an object in Designer for the cells in the grid, and on it place a text object with "<%=CA:Title%>".  This means the text will contain the cell's attribute "Title".  Create a blank bitmap object with no graphic to represent the icon, and another which contains a check box for 'virus free'.</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>We create an object in Designer for the cells in the grid, and on it place a text object with "<%=CA:Title%>".  This means the text will contain the cell's attribute "Title".  Create a blank bitmap object with no graphic to represent the icon, and another which contains a check box for 'virus free'.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>Create a new <del class="diffchange diffchange-inline">datagrid </del>in Designer and place on it all 3 of those objects, marking the 'virus free' one as 'can hide', meaning it won't always be visible.</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>Create a new <ins class="diffchange diffchange-inline">DataGrid </ins>in Designer and place on it all 3 of those objects, marking the 'virus free' one as 'can hide', meaning it won't always be visible.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>Create a data grid generator (in this case in general info plugin) and register it as follows:</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>Create a data grid generator (in this case in general info plugin) and register it as follows:</div></td></tr>
</table>Wikiadminhttp://wiki.linuxmce.org/index.php?title=DataGrid_Objects&diff=2679&oldid=prevWikiadmin: Changed identation2006-10-30T10:50:17Z<p>Changed identation</p>
<a href="http://wiki.linuxmce.org/index.php?title=DataGrid_Objects&diff=2679&oldid=2678">Show changes</a>Wikiadminhttp://wiki.linuxmce.org/index.php?title=DataGrid_Objects&diff=2678&oldid=prevWikiadmin at 05:06, 30 October 20062006-10-30T05:06:01Z<p></p>
<p><b>New page</b></p><div><table width="100%"> <tr><td bgcolor="#FFCFCF">This page was written by Pluto and imported with their permission when LinuxMCE branched off in February, 2007. In general any information should apply to LinuxMCE. However, this page should be edited to reflect changes to LinuxMCE and remove old references to Pluto.</td></tr> </table>Data grids are objects shown on the Orbiters which have dynamically changing data in the rows and columns, which data is specified in code. To create a datagrid you must add a new DataGrid to the DataGrid table in pluto_main, and create a function, usually in a plugin, which builds the rows and columns of data. Upon startup call the function RegisterDatagridGenerator in the DataGrid plugin to specify the function that provides the data for the data grid. In Designer create a data grid object on a screen and specify the data grid id and the parameters to be passed to the data grid generator in the DesignObjParameter 'options'.<br />
<br />
In the Data Grid Generator create cells in rows and columns, and attach to each cell a 'value' and optionally 'text'. When the screen with a datagrid first appears Orbiter will fire the command "Populate Datagrid" which will result in the Datagrid Generator getting called to populate the entire contents of the grid, and then every time it needs to render a block of rows/columns it sends the command "Request Datagrid Contents".<br />
<br />
When a cell in the datagrid is selected orbiter will store the 'value' for the cell into the variable specified in the parameter for the datagrid, and Orbiter will fire all the commands in the "On Activate" list. You can also use ScreenHandler's RegisterCallBack method to create a function that is called whenever a cell is selected (use the type cbDataGridSelected).<br />
<br />
Additionally in the Data Grid generator you can attach attributes to each cell, which are a pair of strings, such as color=blue, size=l, etc. In Designer you can specify as parameters for the datagrid PK_DesignObj_Row1, PK_DesignObj_Coll1 and PK_DesignObj_Cell. In this case those objects will be used in place of the normally rendered cells; the objects are positioned in Designer in a grid for the rows and columns, and are automatically hidden when there is no corresponding cell.<br />
<br />
Example for Add Software grid:<br />
<br />
We have a grid that lists software modules the user can install. Each row needs to list the title of the module, show an icon for the software, and display a check box if it's virus free.<br />
<br />
We create an object in Designer for the cells in the grid, and on it place a text object with "<%=CA:Title%>". This means the text will contain the cell's attribute "Title". Create a blank bitmap object with no graphic to represent the icon, and another which contains a check box for 'virus free'.<br />
<br />
Create a new datagrid in Designer and place on it all 3 of those objects, marking the 'virus free' one as 'can hide', meaning it won't always be visible.<br />
<br />
Create a data grid generator (in this case in general info plugin) and register it as follows:<br />
<br />
bool General_Info_Plugin::Register() {<br />
...<br />
m_pDatagrid_Plugin->RegisterDatagridGenerator(<br />
new DataGridGeneratorCallBack(this, (DCEDataGridGeneratorFn) (&General_Info_Plugin::AddSoftware)),<br />
DATAGRID_Installable_Apps_CONST, PK_DeviceTemplate_get());<br />
<br />
in the generator code we retrieve the software modules from the database and create a cell for each with the correct attributes:<br />
<br />
class DataGridTable *General_Info_Plugin::AddSoftware( string GridID, string Parms, void *ExtraData, int *iPK_Variable, string *sValue_To_Assign, class Message *pMessage ) {<br />
DataGridTable *pDataGrid = new DataGridTable();<br />
DataGridCell *pCell;<br />
<br />
string sql="SELECT PK_Software, Iconstr, Title, Category, Rating, Virus_Free, Installation_status, Description, Homeurl FROM Software WHERE FK_Device="+sPK_Device_PC+" ORDER BY Title";<br />
<br />
int iRow=0;<br />
if( (result.r = m_pDatabase_pluto_main->mysql_query_result(sql)) )<br />
{<br />
unsigned long *lengths;<br />
while((row=mysql_fetch_row(result.r))){<br />
lengths=mysql_fetch_lengths(result.r);<br />
int size = 0;<br />
char *data = NULL;<br />
<br />
pCell = new DataGridCell("", row[0]);<br />
if(lengths[1]){<br />
char *Data=new char[lengths[1]];<br />
memcpy(Data,row[1],lengths[1]);<br />
pCell->SetImage(Data, lengths[1], GR_PNG);<br />
}<br />
pCell->m_mapAttributes["Title"] = row[2] ? row[2] : "";<br />
pCell->m_mapAttributes["Category"] = row[3] ? row[3] : "";<br />
pCell->m_mapAttributes["Rating"] = row[4] ? row[4] : "";<br />
pCell->m_mapAttributes["Rating"] = row[4] ? row[4] : "";<br />
pCell->m_mapAttributes["Virus_Free"] = row[5] ? row[5] : "";<br />
pCell->m_mapAttributes["Installation_status"] = row[6] ? row[6] : "";<br />
pCell->m_mapAttributes["Description"] = row[7] ? row[7] : "";<br />
pDataGrid->SetData(0,iRow++,pCell);<br />
}<br />
}<br />
<br />
return pDataGrid;<br />
}<br />
<br />
Then in orbiter we create a screen handler for this screen and register interceptors:<br />
<br />
/*virtual*/ void ScreenHandler::SCREEN_Add_Software(long PK_Screen)<br />
{<br />
ScreenHandlerBase::SCREEN_Add_Software(PK_Screen);<br />
RegisterCallBack(cbDataGridSelected, (ScreenHandlerCallBack) &ScreenHandler::AddSoftware_GridSelected, new DatagridCellBackData());<br />
RegisterCallBack(cbDataGridRendering, (ScreenHandlerCallBack) &ScreenHandler::AddSoftware_GridRendering, new DatagridAcquiredBackData());<br />
}<br />
//-----------------------------------------------------------------------------------------------------<br />
bool ScreenHandler::AddSoftware_GridRendering(CallBackData *pData)<br />
{<br />
// This is called every time a new section of the grid is to be rendered. We want to find the child object for the 'virus free' check and hide it if it's virus free,<br />
// and also find the child object for the icon and assign it the picture associated with the cell.<br />
DatagridAcquiredBackData *pDatagridAcquiredBackData = (DatagridAcquiredBackData *) pData; // Call back data containing relevant values for the grid/table being rendered<br />
<br />
// Iterate through all the cells<br />
for(MemoryDataTable::iterator it=pDatagridAcquiredBackData->m_pDataGridTable->m_MemoryDataTable.begin();it!=pDatagridAcquiredBackData->m_pDataGridTable->m_MemoryDataTable.end();++it)<br />
{<br />
DataGridCell *pCell = it->second;<br />
pair<int,int> colRow = DataGridTable::CovertColRowType(it->first); // Get the column/row for the cell<br />
<br />
// See if there is an object assigned for this column/row<br />
map< pair<int,int>, DesignObj_Orbiter *>::iterator itobj = pDatagridAcquiredBackData->m_pObj->m_mapChildDgObjects.find( colRow );<br />
if( itobj!=pDatagridAcquiredBackData->m_pObj->m_mapChildDgObjects.end() )<br />
{<br />
DesignObj_Orbiter *pObj = itobj->second; // This is the cell's object.<br />
DesignObj_DataList::iterator iHao;<br />
<br />
// Iterate through all the object's children<br />
for( iHao=pObj->m_ChildObjects.begin( ); iHao != pObj->m_ChildObjects.end( ); ++iHao )<br />
{<br />
DesignObj_Orbiter *pDesignObj_Orbiter = (DesignObj_Orbiter *)( *iHao );<br />
if( pDesignObj_Orbiter->m_iBaseObjectID==DESIGNOBJ_Installed_Apps_Not_Virus_Free_CONST )<br />
pDesignObj_Orbiter->m_bHidden = pCell->m_mapAttributes_Find("Virus_Free")=="Yes"; // Hide this if it's virus fee<br />
if( pDesignObj_Orbiter->m_iBaseObjectID==DESIGNOBJ_Installed_Apps_Icon_CONST )<br />
m_pOrbiter->m_pOrbiterRenderer->UpdateObjectImage(pDesignObj_Orbiter->m_ObjectID, "PNG",<br />
pCell->m_pGraphicData, pCell->m_GraphicLength, "0"); // Store the icon, which is cell's picture<br />
}<br />
}<br />
}<br />
return false;<br />
}<br />
//-----------------------------------------------------------------------------------------------------<br />
bool ScreenHandler::AddSoftware_GridSelected(CallBackData *pData)<br />
{<br />
DatagridCellBackData *pCellInfoData = (DatagridCellBackData *)pData;<br />
if( pCellInfoData->m_pDataGridCell )<br />
{<br />
int PK_Software = atoi(pCellInfoData->m_pDataGridCell->GetValue());<br />
string sText,sCommand;<br />
if( PK_Software>0 )<br />
{<br />
sText = m_pOrbiter->m_mapTextString[TEXT_Confirm_Add_Software_CONST];<br />
sCommand = StringUtils::itos(m_pOrbiter->m_dwPK_Device) + " " + StringUtils::itos(m_pOrbiter->m_dwPK_Device_GeneralInfoPlugIn)<br />
+ " 1 " + TOSTRING(COMMAND_Add_Software_CONST) + " " + TOSTRING(COMMANDPARAMETER_PK_Software_CONST)<br />
+ " " + pCellInfoData->m_pDataGridCell->GetValue() + " " TOSTRING(COMMANDPARAMETER_PK_Device_CONST) " "<br />
+ StringUtils::itos(m_pOrbiter->m_pLocationInfo->m_dwPK_Device_MediaDirector) + " " TOSTRING(COMMANDPARAMETER_TrueFalse_CONST) " 1";<br />
}<br />
else if( PK_Software<0 )<br />
{<br />
sText = m_pOrbiter->m_mapTextString[TEXT_Confirm_Add_Software_CONST];<br />
sCommand = StringUtils::itos(m_pOrbiter->m_dwPK_Device) + " " + StringUtils::itos(m_pOrbiter->m_dwPK_Device_GeneralInfoPlugIn)<br />
+ " 1 " + TOSTRING(COMMAND_Add_Software_CONST) + " " + TOSTRING(COMMANDPARAMETER_PK_Software_CONST)<br />
+ " " + StringUtils::itos(PK_Software*-1) + " " TOSTRING(COMMANDPARAMETER_PK_Device_CONST) " "<br />
+ StringUtils::itos(m_pOrbiter->m_pLocationInfo->m_dwPK_Device_MediaDirector) + " " TOSTRING(COMMANDPARAMETER_TrueFalse_CONST) " 0";<br />
}<br />
else<br />
return false; // No software was selected<br />
<br />
DataGridCell *pCell = pCellInfoData->m_pDesignObj_DataGrid->DataGridTable_Get() ? pCellInfoData->m_pDesignObj_DataGrid->DataGridTable_Get()->GetData( 0, pCellInfoData->m_Row ) : NULL;<br />
if( pCell )<br />
sText+="\n" + pCell->m_mapAttributes["Title"];<br />
DisplayMessageOnOrbiter(0,sText,false,"30",false,m_pOrbiter->m_mapTextString[TEXT_YES_CONST],sCommand,m_pOrbiter->m_mapTextString[TEXT_NO_CONST]);<br />
}<br />
<br />
return false; // Keep processing it<br />
}</div>Wikiadmin