Changeset 15 for trunk/desktop/mainWindow.rbfrm
- Timestamp:
- 04/08/10 10:38:19 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/desktop/mainWindow.rbfrm
r14 r15 59 59 Cancel = "" 60 60 Caption = "Write" 61 Default = True61 Default = False 62 62 Enabled = True 63 63 Height = 20 … … 129 129 Panels = "" 130 130 Scope = 0 131 SmallTabs = ""131 SmallTabs = False 132 132 TabDefinition = "Settings\rProfiles\rCar\rCustom" 133 133 TabIndex = 43 … … 138 138 Top = 32 139 139 Underline = "" 140 Value = 1140 Value = 2 141 141 Visible = True 142 142 Width = 637 … … 957 957 LockRight = "" 958 958 LockTop = "" 959 Maximum = 255959 Maximum = 10 960 960 Minimum = 1 961 961 PageStep = 20 … … 2695 2695 Sub Open() 2696 2696 StaticText_Version.Text = "Version " + str(app.NonReleaseVersion/100) 2697 2698 //Set the default car type 2699 ICSSerialPort1.setCarType("MR-03") 2697 2700 End Sub 2698 2701 #tag EndEvent … … 2793 2796 //Update punch 2794 2797 Slider_Punch.Value = asc(ICSSerialPort1.Byte05) 2798 EditField_Punch.Text = str(asc(ICSSerialPort1.Byte05)) 2795 2799 2796 2800 //Update DBAND … … 2920 2924 //Update Steering Gain 2921 2925 Slider_STGain.Value = asc(ICSSerialPort1.Byte16) 2926 EditField_STGain.Text = str(asc(ICSSerialPort1.Byte16)) 2922 2927 2923 2928 //Update Throttle Gain 2924 2929 Slider_THGain.Value = asc(ICSSerialPort1.Byte17) 2930 EditField_THGain.Text = str(asc(ICSSerialPort1.Byte17)) 2925 2931 End Sub 2926 2932 #tag EndMethod … … 3046 3052 #tag EndEvent 3047 3053 #tag EndEvents 3054 #tag Events TabPanel1 3055 #tag Event 3056 Sub Change() 3057 updateAdvancedScreen 3058 updateCarScreen 3059 End Sub 3060 #tag EndEvent 3061 #tag EndEvents 3048 3062 #tag Events PopupMenu_Profile 3049 3063 #tag Event … … 3052 3066 PushButton_SaveProfile.Visible = true 3053 3067 PushButton_Delete.Visible = true 3068 ICSSerialPort1.loadProfile(me.Text) 3054 3069 end if 3055 3070 End Sub … … 3089 3104 Sub ValueChanged() 3090 3105 ICSSerialPort1.Byte17 = chrb(me.Value) 3091 EditField_THGain.Text = str(me.Value) 3106 //Check to see if we need to update the edit field 3107 //This prevents the edit field from triggering this event that then updates the edit field again 3108 //Causing the cursor to move to the begginning of the editfield 3109 if EditField_THGain.Text <> str(me.Value) then 3110 EditField_THGain.Text = str(me.Value) 3111 end if 3112 3113 3114 End Sub 3115 #tag EndEvent 3116 #tag EndEvents 3117 #tag Events EditField_THGain 3118 #tag Event 3119 Sub TextChange() 3120 //Make sure we have a valid value if not then set it to something 3121 if me.Text <> "" then 3122 if val(me.Text) > 255 or val(me.Text) < 1 then 3123 me.Text = "255" 3124 end if 3125 end if 3126 3127 dim d as double 3128 dim i as integer 3129 d = val(me.Text) 3130 i = d 3131 ICSSerialPort1.Byte17 = chrb(i) 3132 3133 Slider_THGain.Value = val(me.Text) 3092 3134 End Sub 3093 3135 #tag EndEvent … … 3097 3139 Sub ValueChanged() 3098 3140 ICSSerialPort1.Byte16 = chrb(me.Value) 3099 EditField_STGain.Text = str(me.Value) 3141 //Check to see if we need to update the edit field 3142 //This prevents the edit field from triggering this event that then updates the edit field again 3143 //Causing the cursor to move to the begginning of the editfield 3144 if EditField_STGain.Text <> str(me.Value) then 3145 EditField_STGain.Text = str(me.Value) 3146 end if 3147 End Sub 3148 #tag EndEvent 3149 #tag EndEvents 3150 #tag Events EditField_STGain 3151 #tag Event 3152 Sub TextChange() 3153 //Make sure we have a valid value if not then set it to something 3154 if me.Text <> "" then 3155 if val(me.Text) > 255 or val(me.Text) < 1 then 3156 me.Text = "255" 3157 end if 3158 end if 3159 3160 dim d as double 3161 dim i as integer 3162 d = val(me.Text) 3163 i = d 3164 ICSSerialPort1.Byte16 = chrb(i) 3165 3166 Slider_STGain.Value = val(me.Text) 3167 3100 3168 3101 3169 End Sub … … 3220 3288 Sub ValueChanged() 3221 3289 ICSSerialPort1.Byte05 = chrb(me.Value) 3222 EditField_Punch.Text = str(me.Value) 3223 3290 //Check to see if we need to update the edit field 3291 //This prevents the edit field from triggering this event that then updates the edit field again 3292 //Causing the cursor to move to the begginning of the editfield 3293 if EditField_Punch.Text <> str(me.Value) then 3294 EditField_Punch.Text = str(me.Value) 3295 end if 3296 3297 3298 End Sub 3299 #tag EndEvent 3300 #tag EndEvents 3301 #tag Events EditField_Punch 3302 #tag Event 3303 Sub TextChange() 3304 //Make sure we have a valid value if not then set it to something 3305 if me.Text <> "" then 3306 if val(me.Text) > 255 or val(me.Text) < 1 then 3307 me.Text = "255" 3308 end if 3309 end if 3310 3311 dim d as double 3312 dim i as integer 3313 d = val(me.Text) 3314 i = d 3315 ICSSerialPort1.Byte05 = chrb(i) 3316 3317 Slider_Punch.Value = val(me.Text) 3224 3318 End Sub 3225 3319 #tag EndEvent
Note: See TracChangeset
for help on using the changeset viewer.