11using System ;
22using System . Collections . Generic ;
33using System . Globalization ;
4- using System . Linq ;
54using System . Windows . Forms ;
65using GeoTagNinja . Helpers ;
76
@@ -56,8 +55,12 @@ private void AppStartupEnableDoubleBuffering()
5655 }
5756 }
5857
58+
5959 /// <summary>
60- /// Assigns the various labels to objects (such as buttons, labels etc.)
60+ /// Assigns labels to various objects in the application during startup. This includes buttons, labels, checkboxes, and
61+ /// other UI elements.
62+ /// It also sets up tooltips for specific controls. The labels and tooltips are fetched from a data source using the
63+ /// HelperDataLanguageTZ.DataReadDTObjectText method.
6164 /// </summary>
6265 private void AppStartupAssignLabelsToObjects ( )
6366 {
@@ -176,7 +179,7 @@ private void AppStartupAssignLabelsToObjects()
176179 objectName = cItem . Name ;
177180 objectText = HelperDataLanguageTZ . DataReadDTObjectText (
178181 objectType : cItem . GetType ( )
179- . Name ,
182+ . Name ,
180183 objectName : cItem . Name
181184 ) ;
182185 cItem . Text = objectText ;
@@ -190,20 +193,20 @@ private void AppStartupAssignLabelsToObjects()
190193 ) ;
191194
192195 Logger . Trace ( message : "Setting Tooltips" ) ;
193- List < ( ToolTip , Control , string ) > ttpLabelsList = new List < ( ToolTip , Control , string ) > ( )
196+ List < ( ToolTip , Control , string ) > ttpLabelsList = new ( )
194197 {
195198 ( ttp_loctToFile , btn_loctToFile , "ttp_loctToFile" ) ,
196199 ( ttp_loctToFileDestination , btn_loctToFileDestination , "ttp_loctToFileDestination" ) ,
197200 ( ttp_NavigateMapGo , btn_NavigateMapGo , "ttp_NavigateMapGo" ) ,
198201 ( ttp_SaveFavourite , btn_SaveFavourite , "ttp_SaveFavourite" ) ,
199202 ( ttp_LoadFavourite , btn_LoadFavourite , "ttp_LoadFavourite" ) ,
200- ( ttp_ManageFavourites , btn_ManageFavourites , "ttp_ManageFavourites" ) ,
203+ ( ttp_ManageFavourites , btn_ManageFavourites , "ttp_ManageFavourites" )
201204 } ;
202205 foreach ( ( ToolTip , Control , string ) valueTuple in ttpLabelsList )
203206 {
204- ToolTip ttp = ( ToolTip ) valueTuple . Item1 ;
205- ttp . SetToolTip ( ( Control ) valueTuple . Item2 ,
206- HelperDataLanguageTZ . DataReadDTObjectText (
207+ ToolTip ttp = valueTuple . Item1 ;
208+ ttp . SetToolTip ( control : valueTuple . Item2 ,
209+ caption : HelperDataLanguageTZ . DataReadDTObjectText (
207210 objectType : "ToolTip" ,
208211 objectName : valueTuple . Item3
209212 ) ) ;
@@ -261,8 +264,8 @@ private void AppStartupPullLastLatLngFromSettings()
261264 nud_lat . Text = defaultLat ;
262265 nud_lng . Text = defaultLng ;
263266
264- nud_lat . Value = Convert . ToDecimal ( value : defaultLat , CultureInfo . InvariantCulture ) ;
265- nud_lng . Value = Convert . ToDecimal ( value : defaultLng , CultureInfo . InvariantCulture ) ;
267+ nud_lat . Value = Convert . ToDecimal ( value : defaultLat , provider : CultureInfo . InvariantCulture ) ;
268+ nud_lng . Value = Convert . ToDecimal ( value : defaultLng , provider : CultureInfo . InvariantCulture ) ;
266269 }
267270
268271 HelperVariables . HsMapMarkers . Clear ( ) ;
0 commit comments