Changeset 21 for trunk


Ignore:
Timestamp:
04/08/10 11:35:52 (14 years ago)
Author:
pinwc4
Message:

Added logic to hide save and delete profile buttons after a profile has been deleted and removed from the menu.

Location:
trunk/desktop
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/desktop/ICSSerialPort.rbbas

    r20 r21  
    328328        #tag Method, Flags = &h0 
    329329                Sub saveProfile(theName as String) 
    330                   dim rs as RecordSet 
    331                   dim status as Boolean 
    332                    
    333                   //Find a record 
    334                   rs = fsicsdb.SQLSelect("SELECT * FROM carprofiles WHERE name= '"+theName+"'") 
    335                    
    336                   //Make sure we got a record 
    337                   if rs <> nil then 
    338                     //delete the record before saving 
    339                     deleteProfile(theName) 
     330                  if theName <> "" then 
     331                     
     332                    dim rs as RecordSet 
     333                    dim status as Boolean 
     334                     
     335                    //Find a record 
     336                    rs = fsicsdb.SQLSelect("SELECT * FROM carprofiles WHERE name= '"+theName+"'") 
     337                     
     338                    //Make sure we got a record 
     339                    if rs <> nil then 
     340                      //delete the record before saving 
     341                      deleteProfile(theName) 
     342                    end if 
     343                     
     344                    rs.Close 
     345                     
     346                    status = createProfile(theName) 
     347                     
     348                  else 
     349                     
     350                    MsgBox "Please select a profile to modify" 
     351                     
    340352                  end if 
    341                    
    342                   rs.Close 
    343                    
    344                   status = createProfile(theName) 
    345353                End Sub 
    346354        #tag EndMethod 
  • trunk/desktop/mainWindow.rbfrm

    r19 r21  
    138138      Top             =   32 
    139139      Underline       =   "" 
    140       Value           =   3 
     140      Value           =   1 
    141141      Visible         =   True 
    142142      Width           =   637 
     
    32263226                Sub Action() 
    32273227                  ICSSerialPort1.deleteProfile(PopupMenu_Profile.Text) 
     3228                   
     3229                  PopupMenu_Profile.RemoveRow(PopupMenu_Profile.ListIndex) 
     3230                   
     3231                  //Make sure to hide the save and delete profile buttons since no profile will be selected after this has been deleted 
     3232                  PushButton_SaveProfile.Visible = False 
     3233                  PushButton_Delete.Visible = False 
    32283234                End Sub 
    32293235        #tag EndEvent 
Note: See TracChangeset for help on using the changeset viewer.