Chcę blokować kontrolki w zależności od wartości innych kontrolek i niestety wykracza to poza możliwości małej hydry.
Czy spotkał się może ktoś z Eventem jaki jest odpalany podczas zmiany zakładki na karcie towarowej (przejście z zakładki dowolnej innej zakładki na zakładkę ogólne) ?
W akcie desperacji przygotowałem funkcję która przypisuje każdy event do testowego delegata, natomiast delegat wyświetla nazwę eventu który go odpalił.
Kod: Zaznacz cały
private void SubskrybujWszystkieEventy(ClaWindow kontrolka)
{
AddSubscription(true, kontrolka.Id, Events.Accepted, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.MouseDown, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.NewSelection, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.ScrollUp, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.ScrollDown, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.PageUp, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.PageDown, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.ScrollTop, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.ScrollBottom, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.Locate, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.MouseUp, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.MouseIn, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.MouseOut, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.MouseMove, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.VBXevent, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.AlertKey_ORG, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.PreAlertKey, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.Dragging, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.Drag, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.Drop, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.ScrollDrag, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.TabChanging, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.Expanding, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.Contracting, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.Expanded, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.Contracted, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.Rejected, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.DroppingDown, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.DroppedDown, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.ScrollTrack, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.ColumnResize, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.Selected_ORG, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.CloseWindow, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.CloseDown, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.OpenWindow, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.OpenFailed, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.LoseFocus, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.GainFocus, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.Suspend, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.Resume, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.Timer, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.DDErequest, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.DDEadvise, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.DDEdata, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.DDEcommand, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.DDEexecute, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.DDEpoke, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.DDEclosed, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.Move, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.Size, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.Restore, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.Maximize, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.Iconize, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.Completed, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.Moved, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.Sized, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.Restored, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.Maximized, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.Iconized, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.Docked, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.Undocked, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.BuildFile, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.BuildKey, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.BuildDone, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.User, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.AlertKey, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.LabelQuery, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.ProcedureIdQuery, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.JustAfterWindowOpening, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.ReCalculate, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.UserEvent, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.FullRefresh, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.Refresh, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.StartProcedure, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.PassingParams, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.ClientClosed, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.ResizeWindow, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.RefreshFrame, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.SaveInForm, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.NIM, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.DragDropRefresh, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.CopyCutPasteRefresh, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.CatchException, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.BanProcedure, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.ExternalGIDCall, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.BoUpdateFailed, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.BoUpdateOK, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.BoFetchFailed, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.BoFetchOK, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.BoChanged, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.ChildClose, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.ChildCancel, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.ChildResponseYes, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.ChildResponseNo, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.ChildWindowMode, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.ChildListSelect, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.ResizeGrid, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.LockWindow, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.UnlockWindow, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.Selected, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.Command, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.DelayedDown, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.GridChanged, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.ItemSelection, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.ToolboxDocked, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.ToolboxLock, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.ToolboxUnlock, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.ToolboxDisable, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.ToolboxEnable, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.Window_First, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.Window_Last, new TakeEventDelegate(BlokojZakladkeOgolne));
AddSubscription(true, kontrolka.Id, Events.Last, new TakeEventDelegate(BlokojZakladkeOgolne));
}
//-------------------------------------------------------------------------------------------------------------------------------------
public bool BlokojZakladkeOgolne(Procedures ProcId, int ControlId, Events Event)
{
Runtime.WindowController.UnlockThread();
MessageBox.Show("EVENT: " + Event.ToString());
Runtime.WindowController.LockThread();
//BlokujOgolne();
return true;
}
Czy ktoś ma pomysł jak uchwycić moment wejścia na zakładkę ?