Example #1
0
 /// <summary>
 /// Handles the <see cref="ReorderableListView.ItemsReordered"/> event of the plugin list.
 /// </summary>
 /// <remarks>
 /// This reorders the moved plugins.
 /// </remarks>
 /// <param name="sender">The object that raised the event.</param>
 /// <param name="e">A <see cref="ReorderedItemsEventArgs"/> describing the event arguments.</param>
 private void rlvPlugins_ItemsReordered(object sender, ReorderedItemsEventArgs e)
 {
     foreach (ReorderedItemsEventArgs.ReorderedListViewItem lviPlugin in e.ReorderedListViewItems)
     {
         ViewModel.SetPluginOrderIndex((Plugin)lviPlugin.Item.Tag, lviPlugin.NewIndex);
     }
 }
 /// <summary>
 /// Handles the <see cref="ReorderableListView.ItemsReordered"/> event of the list view of file sets.
 /// </summary>
 /// <remarks>
 /// This propagates the order change to the view model.
 /// </remarks>
 /// <param name="sender">The object that raised the event.</param>
 /// <param name="e">A <see cref="ReorderedItemsEventArgs"/> describing the event arguments.</param>
 private void rlvConditionalInstalls_ItemsReordered(object sender, ReorderedItemsEventArgs e)
 {
     foreach (ReorderedItemsEventArgs.ReorderedListViewItem rliItem in e.ReorderedListViewItems)
     {
         ViewModel.MovePattern(rliItem.OldIndex, rliItem.NewIndex);
     }
 }
 private void rlvGroups_ItemsReordered(object sender, ReorderedItemsEventArgs e)
 {
     foreach (ReorderedItemsEventArgs.ReorderedListViewItem rliItem in e.ReorderedListViewItems)
     {
         InstallStepVM.OptionGroups.RemoveAt(rliItem.OldIndex);
         InstallStepVM.OptionGroups.Insert(rliItem.NewIndex, (OptionGroup)rliItem.Item.Tag);
     }
     ViewModel.SaveInstallStep(ObjectHelper.GetPropertyName <InstallStep>(x => x.OptionGroups));
 }