Пример #1
0
 /// <summary>
 /// Called from parent form on activation
 /// </summary>
 public void RunOnceOnActivationManual(TFrmGLCostCentreHierarchy ParentForm)
 {
     FParentForm = ParentForm;
     // AlanP March 2013:  Use a try/catch block because nUnit testing on this screen does not support Drag/Drop in multi-threaded model
     // It is easier to do this than to configure all the different test execution methods to use STA
     try
     {
         trvCostCentres.AllowDrop = true;
         trvCostCentres.ItemDrag += new ItemDragEventHandler(treeView_ItemDrag);
         trvCostCentres.DragOver += new DragEventHandler(treeView_DragOver);
         trvCostCentres.DragDrop += new DragEventHandler(treeView_DragDrop);
     }
     catch (InvalidOperationException)
     {
         // ex.Message is: DragDrop registration did not succeed.
         // Inner exception is: Current thread must be set to single thread apartment (STA) mode before OLE calls can be made.
     }
 }
 /// <summary>
 /// Perform initialisation
 /// (Actually called earlier than the parent RunOnceOnActivationManual)
 /// </summary>
 public void RunOnceOnActivationManual(TFrmGLCostCentreHierarchy ParentForm)
 {
     FParentForm = ParentForm;
     grdCostCentres.Selection.SelectionChanged += Selection_SelectionChanged;
     grdCostCentres.Selection.FocusRowLeaving  += new SourceGrid.RowCancelEventHandler(grdCostCentres_FocusRowLeaving);
 }
 /// <summary>
 /// Perform initialisation
 /// (Actually called earlier than the parent RunOnceOnActivationManual)
 /// </summary>
 public void RunOnceOnActivationManual(TFrmGLCostCentreHierarchy ParentForm)
 {
     FParentForm = ParentForm;
     grdCostCentres.Selection.SelectionChanged += Selection_SelectionChanged;
 }
 /// <summary>
 /// Perform initialisation
 /// (Actually called earlier than the parent RunOnceOnActivationManual)
 /// </summary>
 public void RunOnceOnActivationManual(TFrmGLCostCentreHierarchy ParentForm)
 {
     FParentForm = ParentForm;
     grdCostCentres.Selection.SelectionChanged += Selection_SelectionChanged;
     grdCostCentres.Selection.FocusRowLeaving += new SourceGrid.RowCancelEventHandler(grdCostCentres_FocusRowLeaving);
 }
 /// <summary>
 /// Called from parent form on activation
 /// </summary>
 public void RunOnceOnActivationManual(TFrmGLCostCentreHierarchy ParentForm)
 {
     FParentForm = ParentForm;
     // AlanP March 2013:  Use a try/catch block because nUnit testing on this screen does not support Drag/Drop in multi-threaded model
     // It is easier to do this than to configure all the different test execution methods to use STA
     try
     {
         trvCostCentres.AllowDrop = true;
         trvCostCentres.ItemDrag += new ItemDragEventHandler(treeView_ItemDrag);
         trvCostCentres.DragOver += new DragEventHandler(treeView_DragOver);
         trvCostCentres.DragDrop += new DragEventHandler(treeView_DragDrop);
     }
     catch (InvalidOperationException)
     {
         // ex.Message is: DragDrop registration did not succeed.
         // Inner exception is: Current thread must be set to single thread apartment (STA) mode before OLE calls can be made.
     }
 }
 /// <summary>
 /// Perform initialisation
 /// (Actually called earlier than the parent RunOnceOnActivationManual)
 /// </summary>
 public void RunOnceOnActivationManual(TFrmGLCostCentreHierarchy ParentForm)
 {
     FParentForm = ParentForm;
     grdCostCentres.Selection.SelectionChanged += Selection_SelectionChanged;
 }