devices/devicereclist/ordevicereclist_layout.cxx

devices/devicereclist/ordevicereclist_layout.cxx
/***************************************************************************************
Autodesk(R) Open Reality(R) Samples
(C) 2009 Autodesk, Inc. and/or its licensors
All rights reserved.
AUTODESK SOFTWARE LICENSE AGREEMENT
Autodesk, Inc. licenses this Software to you only upon the condition that
you accept all of the terms contained in the Software License Agreement ("Agreement")
that is embedded in or that is delivered with this Software. By selecting
the "I ACCEPT" button at the end of the Agreement or by copying, installing,
uploading, accessing or using all or any portion of the Software you agree
to enter into the Agreement. A contract is then formed between Autodesk and
either you personally, if you acquire the Software for yourself, or the company
or other legal entity for which you are acquiring the software.
AUTODESK, INC., MAKES NO WARRANTY, EITHER EXPRESS OR IMPLIED, INCLUDING BUT
NOT LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR
PURPOSE REGARDING THESE MATERIALS, AND MAKES SUCH MATERIALS AVAILABLE SOLELY ON AN
"AS-IS" BASIS.
IN NO EVENT SHALL AUTODESK, INC., BE LIABLE TO ANYONE FOR SPECIAL, COLLATERAL,
INCIDENTAL, OR CONSEQUENTIAL DAMAGES IN CONNECTION WITH OR ARISING OUT OF PURCHASE
OR USE OF THESE MATERIALS. THE SOLE AND EXCLUSIVE LIABILITY TO AUTODESK, INC.,
REGARDLESS OF THE FORM OF ACTION, SHALL NOT EXCEED THE PURCHASE PRICE OF THE
MATERIALS DESCRIBED HEREIN.
Autodesk, Inc., reserves the right to revise and improve its products as it sees fit.
Autodesk and Open Reality are registered trademarks or trademarks of Autodesk, Inc.,
in the U.S.A. and/or other countries. All other brand names, product names, or
trademarks belong to their respective holders.
GOVERNMENT USE
Use, duplication, or disclosure by the U.S. Government is subject to restrictions as
set forth in FAR 12.212 (Commercial Computer Software-Restricted Rights) and
DFAR 227.7202 (Rights in Technical Data and Computer Software), as applicable.
Manufacturer is Autodesk, Inc., 10 Duke Street, Montreal, Quebec, Canada, H3C 2L7.
***************************************************************************************/
//--- Class declarations
#include "ordevicereclist_layout.h"
//--- Registration define
#define ORDEVICERECORDLIST__LAYOUT ORDeviceRecordListLayout
//--- FiLMBOX implementation and registration
FBDeviceLayoutImplementation( ORDEVICERECORDLIST__LAYOUT );
FBRegisterDeviceLayout ( ORDEVICERECORDLIST__LAYOUT,
ORDEVICERECORDLIST__CLASSSTR,
FB_DEFAULT_SDK_ICON ); // Icon filename (default=Open Reality icon)
/************************************************
* FiLMBOX Layout creation function.
************************************************/
bool ORDeviceRecordListLayout::FBCreate()
{
// Get a handle on the device
mDevice = ((ORDeviceRecordList *)(FBDevice *)Device);
// Create & configure UI
UICreate ();
UIConfigure ();
UIReset ();
// Add system & device callbacks
mDevice->OnStatusChange.Add ( this,(FBCallback) &ORDeviceRecordListLayout::EventDeviceStatusChange );
mSystem.OnUIIdle.Add ( this,(FBCallback) &ORDeviceRecordListLayout::EventUIIdle );
return true;
}
/************************************************
* FiLMBOX Layout destruction function.
************************************************/
void ORDeviceRecordListLayout::FBDestroy()
{
// Remove callbacks
mSystem.OnUIIdle.Remove ( this,(FBCallback) &ORDeviceRecordListLayout::EventUIIdle );
mDevice->OnStatusChange.Remove ( this,(FBCallback) &ORDeviceRecordListLayout::EventDeviceStatusChange );
}
/************************************************
* Create the UI.
************************************************/
void ORDeviceRecordListLayout::UICreate()
{
int lS = 5;
int lH = 25;
// Add regions
AddRegion ("LayoutButtons", "LayoutButtons",
5, kFBAttachLeft, "", 1.00,
5, kFBAttachNone, NULL, 1.00,
100, kFBAttachNone, NULL, 1.00,
-5, kFBAttachBottom, "", 1.00 );
AddRegion( "TabPanel", "TabPanel",
0, kFBAttachRight, "LayoutButtons", 1.00,
0, kFBAttachTop, "LayoutButtons", 1.00,
0, kFBAttachRight, "", 1.00,
lH, kFBAttachNone, NULL, 1.00 );
AddRegion( "TabPage", "TabPage",
lS, kFBAttachLeft, "TabPanel", 1.00,
lS, kFBAttachBottom, "TabPanel", 1.00,
-lS, kFBAttachRight, "TabPanel", 1.00,
-lS, kFBAttachBottom, "", 1.00 );
// Assign regions
SetControl( "LayoutButtons", mLayoutButtons );
SetControl( "TabPanel", mTabPanel );
SetControl( "TabPage", mLayoutSpreadTakes );
// build sub layouts
UICreateLayout0();
UICreateLayout1();
}
/************************************************
* Create layout 0.
************************************************/
void ORDeviceRecordListLayout::UICreateLayout0()
{
int lH = 18; // height
int lS = 4; // space
// Add regions
mLayoutButtons.AddRegion ("ButtonLoad", "ButtonLoad",
lS, kFBAttachLeft, "", 1.00,
lS, kFBAttachTop, "", 1.00,
-lS, kFBAttachRight, "", 1.00,
lH, kFBAttachNone, NULL, 1.00 );
mLayoutButtons.AddRegion ("ButtonClear", "ButtonClear",
0, kFBAttachLeft, "ButtonLoad", 1.00,
lS, kFBAttachBottom, "ButtonLoad", 1.00,
0, kFBAttachRight, "ButtonLoad", 1.00,
0, kFBAttachHeight, "ButtonLoad", 1.00 );
mLayoutButtons.AddRegion ("LabelTakeName", "LabelTakeName",
0, kFBAttachLeft, "ButtonClear", 1.00,
lS, kFBAttachBottom, "ButtonClear", 1.00,
0, kFBAttachRight, "ButtonClear", 1.00,
0, kFBAttachHeight, "ButtonClear", 1.00 );
mLayoutButtons.AddRegion ("LabelTimeLeft", "LabelTimeLeft",
0, kFBAttachLeft, "LabelTakeName", 1.00,
lS, kFBAttachBottom, "LabelTakeName", 1.00,
0, kFBAttachRight, "LabelTakeName", 1.00,
0, kFBAttachHeight, "LabelTakeName", 1.00 );
mLayoutButtons.AddRegion ("LabelTiming", "LabelTiming",
0, kFBAttachLeft, "LabelTimeLeft", 1.00,
lS, kFBAttachBottom, "LabelTimeLeft", 1.00,
0, kFBAttachRight, "LabelTimeLeft", 1.00,
0, kFBAttachHeight, "LabelTimeLeft", 1.00 );
mLayoutButtons.AddRegion ("ButtonRecFlag", "ButtonRecFlag",
0, kFBAttachLeft, "LabelTiming", 1.00,
lS, kFBAttachBottom, "LabelTiming", 1.00,
0, kFBAttachRight, "LabelTiming", 1.00,
0, kFBAttachHeight, "LabelTiming", 1.00 );
mLayoutButtons.AddRegion ("ButtonStandBy", "ButtonStandBy",
0, kFBAttachLeft, "ButtonRecFlag", 1.00,
lS, kFBAttachBottom, "ButtonRecFlag", 1.00,
0, kFBAttachRight, "ButtonRecFlag", 1.00,
0, kFBAttachHeight, "ButtonRecFlag", 1.00 );
mLayoutButtons.AddRegion ("ButtonStop", "ButtonStop",
0, kFBAttachLeft, "ButtonStandBy", 1.00,
lS, kFBAttachBottom, "ButtonStandBy", 1.00,
0, kFBAttachRight, "ButtonStandBy", 1.00,
0, kFBAttachHeight, "ButtonStandBy", 1.00 );
mLayoutButtons.AddRegion ("ButtonPlay", "ButtonPlay",
0, kFBAttachLeft, "ButtonStop", 1.00,
lS, kFBAttachBottom, "ButtonStop", 1.00,
0, kFBAttachRight, "ButtonStop", 1.00,
0, kFBAttachHeight, "ButtonStop", 1.00 );
// Assign regions
mLayoutButtons.SetControl( "ButtonLoad", mButtonLoad );
mLayoutButtons.SetControl( "ButtonClear", mButtonClear );
mLayoutButtons.SetControl( "LabelTakeName", mLabelTakeName );
mLayoutButtons.SetControl( "LabelTimeLeft", mLabelTimeLeft );
mLayoutButtons.SetControl( "LabelTiming", mLabelTiming );
mLayoutButtons.SetControl( "ButtonRecFlag", mButtonRecFlag );
mLayoutButtons.SetControl( "ButtonStandBy", mButtonStandBy );
mLayoutButtons.SetControl( "ButtonStop", mButtonStop );
mLayoutButtons.SetControl( "ButtonPlay", mButtonPlay );
}
/************************************************
* Create layout 1.
************************************************/
void ORDeviceRecordListLayout::UICreateLayout1()
{
int lS = 4;
int lH = 18;
int lW = 100;
// Add regions
mLayoutSpreadTakes.AddRegion( "SpreadTakes", "SpreadTakes",
0, kFBAttachLeft, "", 1.00,
0, kFBAttachTop, "", 1.00,
0, kFBAttachRight, "", 1.00,
0, kFBAttachBottom, "", 1.00 );
mLayoutAbout.AddRegion( "LabelInformation", "LabelInformation",
lS, kFBAttachLeft, "", 1.00,
lS, kFBAttachTop, "", 1.00,
lW, kFBAttachNone, NULL, 1.00,
lH, kFBAttachNone, NULL, 1.00 );
// Assign regions
mLayoutSpreadTakes.SetControl ( "SpreadTakes", mSpreadTakes );
mLayoutAbout.SetControl ( "LabelInformation", mLabelInformation );
}
/************************************************
* Configure the UI.
************************************************/
void ORDeviceRecordListLayout::UIConfigure()
{
// Set borders
SetBorder( "LayoutButtons", kFBStandardBorder, false,true, 1, 0,90,0);
SetBorder( "LayoutTakesInfo", kFBStandardBorder, false,true, 1, 0,90,0);
// Configure sub-layouts
UIConfigureLayout0();
UIConfigureLayout1();
}
/************************************************
* Configure layout 0.
************************************************/
void ORDeviceRecordListLayout::UIConfigureLayout0()
{
// Configure UI Elements
if(mDevice->GetCurrentTakeIndex() < 0 )
{
mLabelTakeName.Caption = "No Take Selected";
}
else
{
mLabelTakeName.Caption = mDevice->GetListEntry(mDevice->GetCurrentTakeIndex())->mName;
}
mLabelTimeLeft.Caption = "Recording in: --- seconds" ;
mLabelTiming.Caption = "" ;
mButtonLoad.Caption = "Load...";
mButtonStandBy.Caption = "Standby";
mButtonStandBy.Style = kFB2States;
mButtonStandBy.State = mDevice->GetStandbyState();
mButtonClear.Caption = "Clear";
mButtonRecFlag.Caption = "Recording";
mButtonRecFlag.Style = kFB2States;
mButtonRecFlag.State = mDevice->GetRecFlag();
mButtonPlay.Caption = "Play";
mButtonStop.Caption = "Stop";
// Add callbacks
mButtonLoad.OnClick.Add ( this, (FBCallback) &ORDeviceRecordListLayout::EventButtonLoadClick );
mButtonStandBy.OnClick.Add ( this, (FBCallback) &ORDeviceRecordListLayout::EventButtonStandByClick );
mButtonClear.OnClick.Add ( this, (FBCallback) &ORDeviceRecordListLayout::EventButtonClearClick );
mButtonRecFlag.OnClick.Add ( this, (FBCallback) &ORDeviceRecordListLayout::EventButtonRecFlagClick );
mButtonPlay.OnClick.Add ( this, (FBCallback) &ORDeviceRecordListLayout::EventButtonPlayClick );
mButtonStop.OnClick.Add ( this, (FBCallback) &ORDeviceRecordListLayout::EventButtonStopClick );
}
/************************************************
* Configure layout 1.
************************************************/
void ORDeviceRecordListLayout::UIConfigureLayout1()
{
// Configure
SetBorder( "TabPage", kFBStandardBorder, false,true, 1, 0,90,0);
mLabelInformation.Caption = "Information...";
mTabPanel.Items.SetString("Takes~About");
// Add callbacks
mTabPanel.OnChange.Add ( this,(FBCallback) &ORDeviceRecordListLayout::EventTabPanelChange );
mSpreadTakes.OnCellChange.Add ( this,(FBCallback) &ORDeviceRecordListLayout::EventSpreadCellChange );
mSpreadTakes.OnRowClick.Add ( this,(FBCallback) &ORDeviceRecordListLayout::EventSpreadRowClick );
}
/************************************************
* Reset the UI.
************************************************/
void ORDeviceRecordListLayout::UIReset()
{
UIResetSpreadSheet();
}
/************************************************
* Rebuild spreadsheet.
************************************************/
void ORDeviceRecordListLayout::UIResetSpreadSheet()
{
int i;
// Clear spreadsheet
mSpreadTakes.Clear();
// spreadsheet
int lColumnIndex = -1;
mSpreadTakes.GetColumn(lColumnIndex).Width = 140;
// lColumn 0: Current take number
mSpreadTakes.ColumnAdd ("No");
lColumnIndex++;
mSpreadTakes.GetColumn(lColumnIndex).Width = 50;
mSpreadTakes.GetColumn(lColumnIndex).Style = kFBCellStyleInteger;
// lColumn 1: Start
mSpreadTakes.ColumnAdd ("In");
lColumnIndex++;
mSpreadTakes.GetColumn(lColumnIndex).Width = 90;
mSpreadTakes.GetColumn(lColumnIndex).Style = kFBCellStyleString;
// lColumn 2: Stop
mSpreadTakes.ColumnAdd ("Out");
lColumnIndex++;
mSpreadTakes.GetColumn(lColumnIndex).Width = 90;
mSpreadTakes.GetColumn(lColumnIndex).Style = kFBCellStyleString;
// lColumn 3: Handle In
mSpreadTakes.ColumnAdd ("Pre-roll");
lColumnIndex++;
mSpreadTakes.GetColumn(lColumnIndex).Width = 60;
mSpreadTakes.GetColumn(lColumnIndex).Style = kFBCellStyleInteger;
// lColumn 4: Handle Out
mSpreadTakes.ColumnAdd ("Post-roll");
lColumnIndex++;
mSpreadTakes.GetColumn(lColumnIndex).Width = 60;
mSpreadTakes.GetColumn(lColumnIndex).Style = kFBCellStyleInteger;
for (i=0;i<mDevice->GetListCount();i++)
{
mSpreadTakes.RowAdd( mDevice->GetListEntry(i)->mName, i );
}
}
/************************************************
* Refresh the UI.
************************************************/
void ORDeviceRecordListLayout::UIRefresh()
{
FBTime lTimeLeft;
int lSecondsLeft;
char lBuffer[256];
kLongLong lMS;
if(mDevice->GetStandbyState())
{
if(mDevice->GetCurrentTakeIndex()>=0 && mDevice->GetCurrentTakeIndex() < mDevice->GetListCount())
{
lTimeLeft.SetMilliSeconds(mDevice->GetCurrentStartTime().GetMilliSeconds() - mDevice->GetReferenceTime().GetMilliSeconds());
lMS = lTimeLeft.GetMilliSeconds();
lSecondsLeft = (int) lMS/1000;
if(mDevice->GetRecFlag())
{
sprintf(lBuffer, "Standby RECORD: %3d sec.", lSecondsLeft);
}
else
{
sprintf(lBuffer, "Standby PLAY: %3d sec.", lSecondsLeft);
}
mLabelTimeLeft.Caption = lBuffer;
}
}
else
{
mLabelTimeLeft.Caption = "<OFF>";
mButtonStandBy.State = 0;
}
sprintf(lBuffer,"%s %s",(const char*)mDevice->GetCurrentStartTime().GetTimeString(),
(const char*)mDevice->GetCurrentStopTime().GetTimeString());
mLabelTiming.Caption = lBuffer;
UIRefreshSpreadSheet();
}
/************************************************
* Refresh spreadsheet content.
************************************************/
void ORDeviceRecordListLayout::UIRefreshSpreadSheet()
{
int i;
for(i=0; i<mDevice->GetListCount();i++)
{
mSpreadTakes.SetCell( i, 0, mDevice->GetListEntry(i)->mTakeNumber );
mSpreadTakes.SetCell( i, 1, mDevice->GetListEntry(i)->mInTime.GetTimeString() );
mSpreadTakes.SetCell( i, 2, mDevice->GetListEntry(i)->mOutTime.GetTimeString() );
mSpreadTakes.SetCell( i, 3, mDevice->GetListEntry(i)->mPreroll );
mSpreadTakes.SetCell( i, 4, mDevice->GetListEntry(i)->mPostroll );
}
}
/************************************************
* UI Idle callback.
************************************************/
void ORDeviceRecordListLayout::EventUIIdle(HISender pSender, HKEvent pEvent)
{
UIRefresh();
}
/************************************************
* Status change event.
************************************************/
void ORDeviceRecordListLayout::EventDeviceStatusChange(HISender pSender, HKEvent pEvent)
{
UIReset();
}
/************************************************
* Tab event callback.
************************************************/
void ORDeviceRecordListLayout::EventTabPanelChange(HISender pSender, HKEvent pEvent)
{
switch( mTabPanel.ItemIndex )
{
case 0: SetControl("TabPage", mLayoutSpreadTakes ); break;
case 1: SetControl("TabPage", mLayoutAbout ); break;
}
}
/************************************************
* Load button callback.
************************************************/
void ORDeviceRecordListLayout::EventButtonLoadClick(HISender pSender, HKEvent pEvent)
{
// Build the popup & configure it.
FBString lPath( mSystem.ApplicationPath );
FBFilePopup lFilePopup;
lFilePopup.Style = kFBFilePopupOpen;
lFilePopup.Path = lPath + "\\..\\OpenRealitySDK\\Samples\\devices\\devicereclist\\res";
lFilePopup.Filter = "*.txt";
// If 'cancel' clicked, return
if( lFilePopup.Execute() )
{
// remember the status of the device
// the device was online, stop the device before changing anything
bool lWasOnline = mDevice->Online;
if( lWasOnline )
{
mDevice->DeviceSendCommand( FBDevice::kOpStop );
}
mDevice->LoadFile( lFilePopup.FullFilename );
// restart the device only if it was online before the change
if(lWasOnline)
{
mDevice->DeviceSendCommand( FBDevice::kOpStart );
}
UIReset();
}
}
/************************************************
* StandBy button callback.
************************************************/
void ORDeviceRecordListLayout::EventButtonStandByClick(HISender pSender, HKEvent pEvent)
{
int lCurrentTake;
FBString lTakeName;
bool lSuccess;
// If the standby state is on.
if( mDevice->GetStandbyState() )
{
// Put standby state to off
mDevice->SetStandbyState(false);
mButtonStandBy.State = 0;
}
else
{
// If list is empty
if( mDevice->GetListCount()==0 )
{
FBMessageBox("Warning","Play list is empty", "OK", NULL, NULL, 0);
mButtonStandBy.State = 0;
}
else
{
lCurrentTake = mDevice->GetCurrentTakeIndex();
// If invalid take
if(lCurrentTake<0 || lCurrentTake >= mDevice->GetListCount())
{
FBMessageBox("Warning","No selected entry.", "OK", NULL, NULL, 0);
mButtonStandBy.State = 0;
}
else
{
// Get take name
FBString lIndexString, lCandidateName;
char lBuffer[32];
int lTakeIndex;
FBString lFBTakeName;
lTakeName = mDevice->GetListEntry(lCurrentTake)->mName;
sprintf(lBuffer,"_%d",mDevice->GetListEntry(lCurrentTake)->mTakeNumber);
lIndexString = lBuffer;
lCandidateName = lTakeName;
lCandidateName += lIndexString;
// recording
lTakeIndex = -1;
// find if the selectade take has already been created
for(int i=0; i < mSystem.Scene->Takes.GetCount(); i++)
{
lFBTakeName = mSystem.Scene->Takes[i]->Name;
if(lFBTakeName == lCandidateName)
{
lTakeIndex = i;
break;
}
}
// todo: error checking
if( mDevice->GetRecFlag() )
{
// Record
if( lTakeIndex == -1 )
{
lSuccess = mDevice->CreateNewTake( lCandidateName );
}
else
{
int lRetVal;
char lBuffer2[256];
sprintf(lBuffer2, "%s exists...", (char*)lCandidateName );
lRetVal = FBMessageBox("Warning",lBuffer2, "Overwrite", "New", "Cancel", 0);
switch( lRetVal)
{
case 1:
{
//Yes: overwrite
lSuccess = mDevice->ChangeTake((char *)lCandidateName);
}
break;
case 2:
{
//increment take number
mDevice->GetListEntry(lCurrentTake)->mTakeNumber++;
sprintf(lBuffer2,"_%d",mDevice->GetListEntry(lCurrentTake)->mTakeNumber);
lIndexString = lBuffer2;
lCandidateName = lTakeName;
lCandidateName += lIndexString;
lSuccess = mDevice->CreateNewTake((char *)lCandidateName);
}
break;
default:
{
return;
}
}
}
if(! mDevice->PrepareToRecord() )
{
FBMessageBox("Warning","Nothing to record.", "OK", NULL, NULL, 0);
mButtonStandBy.State = 0;
return;
}
}
else
{
// Play
if(lTakeIndex == -1)
{
FBMessageBox("Warning","Take does not exist.", "OK", NULL, NULL, 0);
mButtonStandBy.State = 0;
return;
}
else
{
lSuccess = mDevice->ChangeTake((char *)lCandidateName);
}
lSuccess = mDevice->PrepareToPlay();
}
mDevice->SetStandbyState(true);
mButtonStandBy.State = 1;
}
}
}
}
/************************************************
* Play button event.
************************************************/
void ORDeviceRecordListLayout::EventButtonPlayClick(HISender pSender, HKEvent pEvent)
{
mDevice->Play();
}
/************************************************
* Clear button event.
************************************************/
void ORDeviceRecordListLayout::EventButtonClearClick(HISender pSender, HKEvent pEvent)
{
mDevice->ClearList();
UIReset();
}
/************************************************
* Stop button event.
************************************************/
void ORDeviceRecordListLayout::EventButtonStopClick(HISender pSender, HKEvent pEvent)
{
mDevice->Stop();
}
/************************************************
* Rec flag button event.
************************************************/
void ORDeviceRecordListLayout::EventButtonRecFlagClick(HISender pSender, HKEvent pEvent)
{
mDevice->SetRecFlag( mButtonRecFlag.State != 0 );
}
/************************************************
* Spreadsheet event.
************************************************/
void ORDeviceRecordListLayout::EventSpreadCellChange(HISender pSender, HKEvent pEvent)
{
FBEventSpread lSpreadEvent(pEvent);
int lRow = lSpreadEvent.Row;
int lColumn = lSpreadEvent.Column;
// Temporary variables
int lVal;
const char* lBuffer;
// Based on which column was selected
switch (lColumn)
{
// Take number
case 0:
{
mSpreadTakes.GetCell( lRow, lColumn, lVal );
mDevice->GetListEntry( lRow )->mTakeNumber = lVal;
}
break;
// In time
case 1:
{
mSpreadTakes.GetCell( lRow, lColumn, lBuffer );
mDevice->GetListEntry( lRow )->mInTime.SetTimeString( lBuffer );
}
break;
// Out time
case 2:
{
mSpreadTakes.GetCell( lRow, lColumn, lBuffer );
mDevice->GetListEntry( lRow )->mOutTime.SetTimeString( lBuffer );
}
// Preroll
case 3:
{
mSpreadTakes.GetCell( lRow, lColumn, lVal );
mDevice->GetListEntry( lRow )->mPreroll = lVal;
}
break;
// Postroll
case 4:
{
mSpreadTakes.GetCell( lRow, lColumn, lVal );
mDevice->GetListEntry( lRow )->mPostroll = lVal;
}
break;
}
if( lColumn >= 0 && lColumn <= 4)
{
UIRefreshSpreadSheet();
}
}
/************************************************
* List line select callback.
* When one of the rows is clicked in the spreadsheet
************************************************/
void ORDeviceRecordListLayout::EventSpreadRowClick(HISender pSender, HKEvent pEvent)
{
FBEventSpread Event(pEvent);
mDevice->SetCurrentTakeIndex(Event.Row);
if(mDevice->GetCurrentTakeIndex() < 0 )
{
mLabelTakeName.Caption = "No Take Selected";
}
else
{
mLabelTakeName.Caption = mDevice->GetListEntry(mDevice->GetCurrentTakeIndex())->mName;
}
}