Beispiel #1
0
 /// <summary>
 /// Show the jsN Reassign Dialog
 /// </summary>
 public DialogResult ShowReassign( )
 {
     if (FR == null)
     {
         FR             = new FormReassign(this);
         JsReassingList = new JsReassingList( ); // used in ReassignJsN
         NewJsList      = new List <int>( );
     }
     FR.ShowDialog( );
     if (FR.Canceled == false)
     {
         int jIdx = 0;
         // update the new js indication in the tabs
         foreach (JoystickCls j in this)
         {
             j.JSAssignment = NewJsList[jIdx++];
         }
         JoystickCls.ReassignJsColor(NewJsList);
     }
     return((FR.Canceled) ? DialogResult.Cancel : DialogResult.OK);
 }
Beispiel #2
0
 /// <summary>
 /// Show the jsN Reassign Dialog
 /// </summary>
 public DialogResult ShowReassign( )
 {
     if (FR == null)
     {
         FR             = new FormReassign(this);
         JsReassingList = new JsReassingList( ); // used in ReassignJsN
         NewJsList      = new List <int>( );
     }
     FR.ShowDialog( );
     if (FR.Canceled == false)
     {
         int jIdx = 0;
         // update the new js indication in the tabs
         foreach (JoystickCls js in this)
         {
             js.JSAssignment = NewJsList[jIdx++];
             if (js.XmlInstance > 0)
             {
                 MyColors.JsMapColor[js.XmlInstance - 1] = DeviceColor(js.DevInstance);
             }
         }
     }
     return((FR.Canceled) ? DialogResult.Cancel : DialogResult.OK);
 }