@@ -175,24 +175,24 @@ private void InitActions()
175175 _actionPreview . ImageIndex = 3 ;
176176 _actionPreview . Text = "Preview" ;
177177 _actionPreview . ShortcutKeys = Keys . F9 ;
178- _actionPreview . SetComponent ( toolButtonPreview , true ) ;
179- _actionPreview . SetComponent ( menuPreview , true ) ;
178+ _actionList . SetAction ( toolButtonPreview , _actionPreview ) ;
179+ _actionList . SetAction ( menuPreview , _actionPreview ) ;
180180
181181 _actionOpen . Execute += ActionOpenExecute ;
182182 _actionOpen . Hint = "Open an existing Ribbon document (Ctrl+O)" ;
183183 _actionOpen . ImageIndex = 1 ;
184184 _actionOpen . Text = "Open" ;
185185 _actionOpen . ShortcutKeys = ( Keys ) ( Keys . Control | Keys . O ) ;
186- _actionOpen . SetComponent ( toolButtonOpen , true ) ;
187- _actionOpen . SetComponent ( menuOpen , true ) ;
186+ _actionList . SetAction ( toolButtonOpen , _actionOpen ) ;
187+ _actionList . SetAction ( menuOpen , _actionOpen ) ;
188188 //_actionAddCommand.ShowTextOnToolBar = false;
189189
190190 _actionNew . Execute += ActionNewExecute ;
191191 _actionNew . Hint = "Create a new Ribbon document (Ctrl+N)" ;
192192 _actionNew . ImageIndex = 0 ;
193193 _actionNew . Text = "New" ;
194194 _actionNew . ShortcutKeys = ( Keys ) ( Keys . Control | Keys . N ) ;
195- _actionNew . SetComponent ( menuNew , true ) ;
195+ _actionList . SetAction ( menuNew , _actionNew ) ;
196196
197197 //_actionConvertImage.Visible = false;
198198 //_nN9.Visible = false;
@@ -201,85 +201,85 @@ private void InitActions()
201201 //_actionConvertImage.ImageIndex = 0;
202202 _actionConvertImage . Text = "Convert Images" ;
203203 //_actionConvertImage.ShortcutKeys = (Keys)(Keys.Control | Keys.N);
204- _actionConvertImage . SetComponent ( menuImage , true ) ;
204+ _actionList . SetAction ( menuImage , _actionConvertImage ) ;
205205
206206 _actionGenerateCommandIDs . Execute += ActionGenerateCommandIDsExecute ;
207207 _actionGenerateCommandIDs . Hint = "Generates and sets IDs for all commands in this markup." ;
208208 _actionGenerateCommandIDs . Text = "Auto generate IDs for all commands" ;
209- _actionGenerateCommandIDs . SetComponent ( autoGenerateIdsForAllCommands , true ) ;
209+ _actionList . SetAction ( autoGenerateIdsForAllCommands , _actionGenerateCommandIDs ) ;
210210
211211 _actionSaveAs . Execute += ActionSaveAsExecute ;
212212 _actionSaveAs . Enabled = false ; //@ added
213213 _actionSaveAs . Hint = "Saves the Ribbon document under a new name (Shift+Ctrl+S)" ;
214214 _actionSaveAs . Text = "Save As" ;
215215 _actionSaveAs . ShortcutKeys = ( Keys ) ( Keys . Shift | Keys . Control | Keys . S ) ;
216- _actionSaveAs . SetComponent ( menuSaveAs , true ) ;
216+ _actionList . SetAction ( menuSaveAs , _actionSaveAs ) ;
217217
218218 _actionSave . Execute += ActionSaveExecute ;
219219 _actionSave . Enabled = false ; //@ added
220220 _actionSave . Hint = "Saves the Ribbon document (Ctrl+S)" ;
221221 _actionSave . ImageIndex = 2 ;
222222 _actionSave . Text = "Save" ;
223223 _actionSave . ShortcutKeys = ( Keys ) ( Keys . Control | Keys . S ) ;
224- _actionSave . SetComponent ( toolButtonSave , true ) ;
225- _actionSave . SetComponent ( menuSave , true ) ;
224+ _actionList . SetAction ( toolButtonSave , _actionSave ) ;
225+ _actionList . SetAction ( menuSave , _actionSave ) ;
226226
227227 _actionSettings . Execute += ActionSettingsExecute ;
228228 _actionSettings . ImageIndex = 4 ;
229229 _actionSettings . Text = "Settings" ;
230- _actionSettings . SetComponent ( menuSettings , true ) ;
230+ _actionList . SetAction ( menuSettings , _actionSettings ) ;
231231
232232 _actionExit . Execute += ActionExitExecute ;
233233 _actionExit . Hint = "Exits the " + RS_RIBBON_TOOLS ;
234234 _actionExit . Text = "Exit" ;
235- _actionExit . SetComponent ( menuExit , true ) ;
235+ _actionList . SetAction ( menuExit , _actionExit ) ;
236236
237237 //_actionNewBlank.Hint = "Create a new blank Ribbon Document";
238238 //_actionNewBlank.Text = "Empty Ribbon Document";
239239 ////_actionNewBlank.Shortcut = (Shortcut)16462;
240- //_actionNewBlank.SetComponent (menuNew, true );
240+ //_actionList.SetAction (menuNew, _actionNewBlank );
241241
242242 _actionBuild . Execute += ActionBuildExecute ;
243243 _actionBuild . Enabled = false ; //@ added
244244 _actionBuild . Hint = "Build the ribbon (Ctrl+F9)" ;
245245 _actionBuild . ImageIndex = 5 ;
246246 _actionBuild . Text = "Build" ;
247247 _actionBuild . ShortcutKeys = ( Keys ) ( Keys . Control | Keys . F9 ) ;
248- _actionBuild . SetComponent ( toolButtonBuild , true ) ;
249- _actionBuild . SetComponent ( menuBuild , true ) ;
248+ _actionList . SetAction ( toolButtonBuild , _actionBuild ) ;
249+ _actionList . SetAction ( menuBuild , _actionBuild ) ;
250250
251251 _actionTutorial . Execute += ActionTutorialExecute ;
252252 _actionTutorial . ImageIndex = 7 ;
253253 _actionTutorial . Text = "Tutorial" ;
254- _actionTutorial . SetComponent ( menuTutorial , true ) ;
254+ _actionList . SetAction ( menuTutorial , _actionTutorial ) ;
255255
256256 _actionWebSite . Execute += ActionWebSiteExecute ;
257257 _actionWebSite . ImageIndex = 7 ;
258258 _actionWebSite . Text = "Ribbon Framework for Delphi website" ;
259- _actionWebSite . SetComponent ( menuWebSite , true ) ;
259+ _actionList . SetAction ( menuWebSite , _actionWebSite ) ;
260260 _actionWebSite . Visible = false ;
261261
262262 _actionDotnetWebSite . Execute += ActionDotnetWebSiteExecute ;
263263 _actionDotnetWebSite . Hint = "C#, VB Ribbon Framework" ;
264264 _actionDotnetWebSite . ImageIndex = 7 ;
265265 _actionDotnetWebSite . Text = "Website for .NET Windows Ribbon" ;
266- _actionDotnetWebSite . SetComponent ( menuDotnetWebSite , true ) ;
266+ _actionList . SetAction ( menuDotnetWebSite , _actionDotnetWebSite ) ;
267267
268268 _actionMSDN . Execute += ActionMSDNExecute ;
269269 _actionMSDN . ImageIndex = 6 ;
270270 _actionMSDN . Text = "MSDN Windows Ribbon" ;
271- _actionMSDN . SetComponent ( menuMSDN , true ) ;
271+ _actionList . SetAction ( menuMSDN , _actionMSDN ) ;
272272
273- _actionSetResourceName . Visible = Settings . Instance . AllowChangingResourceName ; // false; //@ not supported in .NET Ribbon
273+ _actionSetResourceName . Visible = Settings . Instance . AllowChangingResourceName ; // false; //@ not necessary in .NET Ribbon
274274 _actionSetResourceName . Execute += ActionSetResourceNameExecute ;
275275 _actionSetResourceName . Hint =
276276 "Set a resource name for the markup. This is necessary " + Environment . NewLine +
277277 "if multiple markups are used in one application." + Environment . NewLine +
278278 "The default is APPLICATION" + Environment . NewLine +
279- Environment . NewLine + "Changing of default is not supported in .NET Ribbon" ;
279+ Environment . NewLine + "Changing of default is not necessary in .NET Ribbon" ;
280280
281281 _actionSetResourceName . Text = "Set ribbon resource name" ;
282- _actionSetResourceName . SetComponent ( setresourcename , true ) ;
282+ _actionList . SetAction ( setresourcename , _actionSetResourceName ) ;
283283
284284 _actionGenerateResourceIDs . Execute += ActionGenerateResourceIDsExecute ;
285285 _actionGenerateResourceIDs . Hint =
@@ -289,7 +289,7 @@ private void InitActions()
289289 "so that there are no conflicting resource IDs)" ;
290290 _actionGenerateResourceIDs . Text = "Auto generate IDs for all resources" ;
291291 _actionGenerateResourceIDs . ShortcutKeys = ( Keys ) ( Keys . Control | Keys . G ) ;
292- _actionGenerateResourceIDs . SetComponent ( autoGenerateIdsForAllResources , true ) ;
292+ _actionList . SetAction ( autoGenerateIdsForAllResources , _actionGenerateResourceIDs ) ;
293293
294294 _actionList . ImageList = _imageListMain ;
295295 }
0 commit comments