public void HandleApplicationEvent(object sender, ApplicationEventArgs e) { if (_autoStartup) { Start(); } }
static void myApplication_OnStartCreateMenu(object sender, ApplicationEventArgs e) { var myMenuModulo = Nampula.UI.Application.GetInstance().GetMenu(MenuID.cBoUIModulesMenu); var menu = new Nampula.UI.MenuItem("Lista de Empresas"); var mnuTeste = new Nampula.UI.MenuItem(myMenuModulo, BoMenuType.mt_POPUP, "Nampula Teste"); var mnuFormBind = new Nampula.UI.MenuItem(mnuTeste, BoMenuType.mt_STRING, "Form Binding"); mnuFormBind.OnAfterClick += mnuFormBind_OnAfterClick; var mnuTesteForm = new Nampula.UI.MenuItem(mnuTeste, BoMenuType.mt_STRING, "Teste"); mnuTesteForm.OnBeforeClick += mnuTesteForm_OnBeforeClick; var gridViewEditMenu = new Nampula.UI.MenuItem(mnuTeste, BoMenuType.mt_STRING, "GridView Editable Sample"); gridViewEditMenu.OnBeforeClick += gridViewEditMenu_OnBeforeClick; var menuPayment = new Nampula.UI.MenuItem(mnuTeste, BoMenuType.mt_STRING, "Incoming Payment"); new MenuItem(mnuTeste, BoMenuType.mt_STRING, "Grid Demo") .OnAfterClick += Program_OnAfterClick; menuPayment.OnBeforeClick += menuPayment_OnBeforeClick; FormSystemManager.Instance().AddFormWath(new BusinessPartnerForm()); ApplicationSAP.GetInstance().CreateLogginMenu(mnuTeste); }
private static void app_OnStartCreatMenu(object sender, ApplicationEventArgs e) { var moduloMenu = Nampula.UI.Application.GetInstance().GetMenu(MenuID.cBoUIModulesMenu); var menuGroup = new Nampula.UI.MenuItem(moduloMenu, BoMenuType.mt_POPUP,"Nampula Demo"); var menuNampulaForm = new Nampula.UI.MenuItem(menuGroup, BoMenuType.mt_STRING, "teste"); menuNampulaForm.OnAfterClick += menuNampulaForm_OnAfterClick; }
public void HandleApplicationEvent(object sender, ApplicationEventArgs e) { if (_endpoint is IApplicationEventListener) { ((IApplicationEventListener)_endpoint).HandleApplicationEvent(sender, e); } }
public void OnApplicationEvent(ApplicationEventArgs args) { if (ApplicationEvent != null) { ApplicationEvent(args.Sender, args); } }
void usr_TriggerApplicationEvent(ApplicationUserWrapper sender, ApplicationEventArgs e) { var userList = this.AppMan.AppUsers.ToList(); userList.ForEach(user => { user.Value.NextEvent = e; }); }
public void Add(ApplicationEventArgs e) { if (this.State != ESRState.Recording) { return; } this.ApplicationRecorder.Add(e); }
/// <summary> /// Handles events raised by an application context. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private static void OnContextEvent(object sender, ApplicationEventArgs e) { ContextEventArgs cea = e as ContextEventArgs; if (cea != null && cea.Event == ContextEventArgs.ContextEvent.Closed && sender is IApplicationContext) { // we know the context is registered! UnregisterContext((IApplicationContext)sender); } }
public void Add(ApplicationEventArgs e) { IRecorderItem newRecorder = null; newRecorder = new ApplicationRecorderItem() { ApplicationData = e.ApplicationData, Event = e.Event, }; this.ESRRecorder.AddItem(newRecorder); this.ESRRecorder.CurrentRecorder = newRecorder; }
static void myApplication_OnStartConnection(object sender, ApplicationEventArgs e) { var param = Nampula.UI.Application.GetInstance().GetParam(); //param.ConnectionTimeout = 240; WaitingStatusHelper.WaintigFor(() => new DBTeste().Start(param), "Teste de Mensagem"); var teste = B1Helper.GetByKey <BusinessPlace>(GetCurrentCompanyDb(), 1, "Business Place"); //var item = B1Helper.GetItem("P00002", GetCurrentCompanyDb()); //var cod = B1Helper.GetByKey<BrazilFuelIndexer>(GetCurrentCompanyDb(), item.FuelCode, "Configuração de Combustível"); //new Security( ); //var draft2 = B1Helper.GetDocument(4, eDocumentObjectType.oPurchaseOrders, Program.GetCurrentCompanyDb()); //draft2.FillTaxExtension(); //Debug.Assert(draft2.TaxExtension.MainUsage.Equals("11"), "Utilização deveria ser 11 - 1411 - Dev. Cmp Cons"); //draft2.FillLines(); //var draft = B1Helper.GetDocument(15, eDocumentObjectType.oDrafts, Program.GetCurrentCompanyDb()); //draft.FillLines(); //var draft2 = B1Helper.GetDocument(1, eDocumentObjectType.oInvoices, Program.GetCurrentCompanyDb()); //draft2.FillLines(); //var draft3 = B1Helper.GetDocument(2, eDocumentObjectType.oInvoices, Program.GetCurrentCompanyDb()); //draft3.FillLines(); //var items = B1Helper.GetAll<Item>(Program.GetCurrentCompanyDb(), // new KeyValuePair<string, object>(Item.FieldsName.CodeBars, "1212121212")); //if (items.IsEmpty()) //{ // var codeBars = B1Helper.GetAll<BarCodeMasterData>(Program.GetCurrentCompanyDb(), // new KeyValuePair<string, object>(BarCodeMasterData.FieldsName.BcdCode, "1212121212")); // items = codeBars.Select(c => // B1Helper.GetByKey<Item>(GetCurrentCompanyDb(), c.ItemCode)).ToList(); //} //var draft3 = B1Helper.GetDocument(2, eDocumentObjectType.oInvoices, Program.GetCurrentCompanyDb()); //draft3.FillLines(); }
/// <summary> /// Handles the application context's refresh event and starts the scheduler. /// </summary> public void HandleApplicationEvent(object sender, ApplicationEventArgs e) { // auto-start Scheduler if demanded if (e is ContextRefreshedEventArgs && autoStartup) { try { StartScheduler(scheduler, startupDelay); } catch (SchedulerException ex) { throw new ObjectInitializationException("failed to auto-start scheduler", ex); } } }
public void HandleApplicationEvent(object sender, ApplicationEventArgs e) { if (_eventTypes == null || _eventTypes.Count == 0) { SendEventAsMessage(e); return; } foreach (Type type in _eventTypes) { if (type.IsAssignableFrom(e.GetType())) { SendEventAsMessage(e); return; } } }
public void HandleApplicationEvent(object sender, ApplicationEventArgs e) { var eventArgs = e as ContextRefreshedEventArgs; if (eventArgs == null) { return; } var args = eventArgs; if (args.Event != ContextEventArgs.ContextEvent.Refreshed) { return; } var ctx = (IApplicationContext)sender; var eventService = (IEventService)ctx.GetObject("EventService"); eventService.RegisterEvents(); }
/// <summary> /// Publishes an application context event. /// </summary> /// <remarks> /// <p> /// /// </p> /// </remarks> /// <param name="sender"> /// The source of the event. May be <see langword="null"/>. /// </param> /// <param name="e"> /// The event that is to be raised. /// </param> /// <seealso cref="Spring.Context.IApplicationEventPublisher.PublishEvent"/> public void PublishEvent(object sender, ApplicationEventArgs e) { #region Instrumentation if (log.IsDebugEnabled) { log.Debug(string.Format( CultureInfo.InvariantCulture, "Publishing event in context [{0}] : {1}", Name, e)); } #endregion OnContextEvent(sender, e); if (ParentContext != null) { ParentContext.PublishEvent(sender, e); } }
public void PublishEvent(object sender, ApplicationEventArgs e) { throw new NotImplementedException(); }
private static void app_OnStartConnection(object sender, ApplicationEventArgs e) { new DBNampula().Start(Nampula.UI.Application.GetInstance().GetParam()); }
public void TriggerEvent(string eventName, object data) { ApplicationEventArgs args = new ApplicationEventArgs(this, eventName, data); this.user.OnTriggerApplicationEvent(args); }
private bool SendEventAsMessage(ApplicationEventArgs @event) { return(SendMessage(MessageBuilder.WithPayload(@event).Build())); }
/// <summary> /// Handle an application event. /// </summary> /// <param name="sender"> /// The source of the event. /// </param> /// <param name="e"> /// The event that is to be handled. /// </param> public void HandleApplicationEvent(object sender, ApplicationEventArgs e) { Console.WriteLine("Source : " + sender); Console.WriteLine("Event fired : " + e.TimeStamp); }
private void DeepThoughtApp_Closed(object sender, ApplicationEventArgs e) { AppDisconnected?.Invoke(this, EventArgs.Empty); }
static void myApplication_OnShutDown(object sender, ApplicationEventArgs e) { System.Windows.Forms.Application.Exit(); }
/// <summary> /// Raises an application context event. /// </summary> /// <param name="e"> /// Any arguments to the event. May be <see langword="null"/>. /// </param> protected virtual void OnContextEvent(ApplicationEventArgs e) { OnContextEvent(this, e); }
/// <summary> /// Raises an application context event. /// </summary> /// <param name="source"> /// The source of the event. /// </param> /// <param name="e"> /// Any arguments to the event. May be <see langword="null"/>. /// </param> protected virtual void OnContextEvent(object source, ApplicationEventArgs e) { IEventExceptionsCollector exceptions = _eventRaiser.Raise(ContextEvent, source, e); if (exceptions.HasExceptions) { Delegate target = ContextEvent.GetInvocationList()[0]; Exception exception = (Exception)exceptions[target]; throw new ApplicationContextException(string.Format("An unhandled exception occured during processing application event {0} in handler {1}", e.GetType(), target.Method), exception); } }
static void app_ApplicationFinished(object sender, ApplicationEventArgs e) { semaphore.Set(); }