private void button1_Click(object sender, EventArgs e) { if (this.checkBox1.Checked) { form = new QQStyleMessage(); } else { //form = new NormalForm(); } this.timer1.Enabled = true; }
public App(IConfig <MetatoolConfig> config, IHostEnvironment hostEnv, ILogger <App> logger, INotify notify) { _config = config; _logger = logger; _hostEnv = hostEnv; _notify = notify; }
/// <summary> /// Call to execute actions. /// </summary> protected void OnEvent() { if (Disable) { return; } int count = m_actions.Count; for (int i = 0; i < count; i++) { INotify notify = m_actions[i]; if (notify is Notify) { Notify n = notify as Notify; n.action(gameObject); } else if (notify is NotifyWithArg) { NotifyWithArg n = notify as NotifyWithArg; n.action(gameObject, n.arg); } } }
internal SendNotification(String conectionString) { NotificatioEventDb = new NoitificationEvent(conectionString); NotificationLogs = new NotificationLogs(conectionString); Notify = new ResolverNotify(); NotificationQuerys = new NotificationQuerys(conectionString); }
public KeyboardHook(ILogger <KeyboardHook> logger, INotify notify) { Notify = notify; KeyStateTree.Notify = notify; _logger = logger; _eventSource = Hook.GlobalEvents(); }
public PasswordChanger(IValidatePasswords validatePasswords, IUserRepository repository, INotify notifier) { this.validatePasswords = validatePasswords; this.repository = repository; this.notifier = notifier; }
public void RemoveNotify(INotify n) { if (mList.Contains(n)) { mList.Remove(n); } }
public override void OnNotify(INotify notify) { eMessage msgType = (eMessage)notify.MsgCode; switch (msgType) { case eMessage.PageTransition: { string title = StringUtil.Format("<color=#{0}>{1}</color>", ColorUtility.ToHtmlStringRGBA(Color.blue), "System Message"); Global.WidgetMgr.ShowMessageBox(title, "Exit Page", eMessageBoxType.OKAndCancel, result => { if (result == true) { Global.SceneMgr.Transition(new SceneTransition(typeof(LoginScene).ToString(), "Login", 0.5f, 0.3f, (code) => { Global.SceneMgr.LogWarning(StringUtil.Format("Page Transition -> {0}", "LoginPage")); })); } else { title = StringUtil.Format("<color=#{0}>{1}</color>", ColorUtility.ToHtmlStringRGBA(Color.red), "System Message"); string messageBoxMessage = StringUtil.Format("<color=#{0}>{1}</color> {2}", ColorUtility.ToHtmlStringRGBA(Color.red), "Error", "Exit Page"); Global.WidgetMgr.ShowMessageBox(title, messageBoxMessage, eMessageBoxType.OK, null, 0.4f); } }); } break; } base.OnNotify(notify); }
public ServiceBase(IServiceProvider service) { _mapper = (IMapper)service.GetService(typeof(IMapper)); _unitOfWork = (IUnitOfWork)service.GetService(typeof(IUnitOfWork)); _executeValidation = (IExecuteValidation)service.GetService(typeof(IExecuteValidation)); _notify = (INotify)service.GetService(typeof(INotify)); }
public void AddNotify(INotify n) { if (!mList.Contains(n)) { mList.Add(n); } }
public void Subscribe(INotify subscriber) { if (!_subscribers.Contains(subscriber)) { _subscribers.Add(subscriber); } }
// This method registers a new INotify object (read as ViewModel) // It will be called in each ViewModel's constructor (as a last statement) public void Register(INotify obj) { if (!NotifiedVmsList.Contains(obj)) { NotifiedVmsList.Add(obj); } }
public EventReminderBackgroundService(ILogger <EventReminderBackgroundService> logger, ICalendarDbContext calendarDbContext, INotify <GearRole> notify) : base("CalendarEvents", logger) { _calendarDbContext = calendarDbContext; _notify = notify; Interval = TimeSpan.FromMinutes(15); }
public MailAction(IMailSender mailSender, IMailCopy mailCopy, INotify notify, IPrint print) { _mailSender = mailSender; _mailCopy = mailCopy; _notify = notify; _print = print; }
public void UnSubscribe(INotify subscriber) { if (_subscribers.Contains(subscriber)) { _subscribers.Remove(subscriber); } }
public frmManager(abForm _abForm, INotify iNotify) { InitializeComponent(); this._abForm = _abForm; this.iNotify = iNotify; Text = _abForm.GetText(); }
public LeadNotificationService( INotify <GearRole> notify, ILeadContext <Lead> context) { _notify = notify; _context = context; }
public SensorHelper(ILogger <SensorHelper> logger, LightHelper lightHelper, INotify notify) { _logger = logger; _lightHelper = lightHelper; _lightHelper.SetSensorHelper(this); _notify = notify; }
private void CreateChannel() { IPEndPoint add = RoleEnvironment.Roles["WorkerRole"].Instances[1].InstanceEndpoints["InternalRequest"].IPEndpoint; ChannelFactory <INotify> factory = new ChannelFactory <INotify>(new NetTcpBinding(), new EndpointAddress($"net.tcp://{add}/InternalRequest")); proxy = factory.CreateChannel(); }
public SubscriptionService(IUserManager <GearUser> userManager, ISubscriptionDbContext subscriptionDbContext, IOrderProductService <Order> orderService, IPaymentService paymentService, INotify <GearRole> notify) { _userManager = userManager; _subscriptionDbContext = subscriptionDbContext; _orderService = orderService; _paymentService = paymentService; _notify = notify; }
public FeedbackController(INotify notify, IFeedbackService feedbackService, IMapper mapper, IUser user) : base(notify, user) { _feedbackService = feedbackService; _mapper = mapper; }
public ModelsController(INotify notify, IModelService modelService, IMapper mapper, IUser user) : base(notify, user) { _modelService = modelService; _mapper = mapper; }
public PageServer( IPageRepository pageRepository, IPageOwnerRepository pageOwnerRepository, INotify notify) : base(notify) { _pageRepository = pageRepository; _pageOwnerRepository = pageOwnerRepository; }
public ProjectsController(INotify notify, IProjectService projectService, IMapper mapper, IUser user) : base(notify, user) { _projectService = projectService; _mapper = mapper; }
public GearWebInstallerService(INotify <GearRole> notify, IPermissionService permissionService, SignInManager <GearUser> signInManager, IIdentityContext applicationDbContext, IHostingEnvironment hostingEnvironment) { _notify = notify; _permissionService = permissionService; _signInManager = signInManager; _applicationDbContext = applicationDbContext; _hostingEnvironment = hostingEnvironment; }
/// <summary> /// Constructor /// </summary> /// <param name="context"></param> /// <param name="mapper"></param> /// <param name="notify"></param> public CrmContractsService(IContractsContext context, IMapper mapper, INotify <GearRole> notify) { _context = context; _mapper = mapper; _notify = notify; }
public FieldsController(INotify notify, IMapper mapper, IFieldService fieldService, IUser user) : base(notify, user) { _mapper = mapper; _fieldService = fieldService; }
static void Main(string[] args) { NotifyFactory notifyFactory = new NotifyFactory(); INotify notify = notifyFactory.CreateNotify("MAIL"); notify.SendNotification(new User()); }
public Comment(string commen, IUse au, ITheme th) { this.Message = commen; this.Author = au; this.Theme = th; CreatedOn = DateTime.Now; this.Notification = Factory.CreateNotification(th, this); }
public ReportsController(INotify notify, IReportService reportService, IMapper mapper, IUser user) : base(notify, user) { _reportService = reportService; _mapper = mapper; }
public WeatherComponent(IReader reader, IMapper mapper, INotify notify, IProcessor processor, string fileLocation) { Reader = reader; Mapper = mapper; Notify = notify; Processor = processor; FileLocation = fileLocation; }
public MavCBIService(INotify notifier, IVersamentiCondominiService versamentiCondominiService, IMovimentiContabiliService movimentiContabiliService, IPersonaService personaService, IDaoFactory daoFactory) { _notifier = notifier; _versamentiCondominiService = versamentiCondominiService; _movimentiContabiliService = movimentiContabiliService; _personaService = personaService; _daoFactory = daoFactory; }
public ClassController(IClassService classService, IUserService userService, INotify notify, IJWTService jwtService) : base(notify) { _classService = classService; _userService = userService; _jwtService = jwtService; }
public EsercizioService(ISaldoContabileService saldoService, IMovimentiContabiliService movimentoContabileService, IBilancioService bilancioService, IPianoContiService pianoContiService, IPersistenceContext persistenceContext, INotify notifier, IDaoFactory daoFactory) { _saldoService = saldoService; _notifier = notifier; _bilancioService = bilancioService; _pianoContiService = pianoContiService; _daoFactory = daoFactory; _movimentoContabileService = movimentoContabileService; _persistenceContext = persistenceContext; }
private void Execute(object message, INotify executor) { try { executor.Notify(message); } finally { _container.Release(executor); } }
public OrderProcessor(INotify notify) { _notify = notify; }
public abstract void AddInputNotify(INotify inputListener);
public UserPreferenceNotifier(INotify[] notifiers) { this.notifiers = notifiers; }
public RefinePreview(Lazy<IWorld> world, INotify notify) { Assert.IsType<NotificationOverride>(notify); }
public World(IOwinServer server, ISupport support, INotify notifyChanges) { }
public bool Receive(INotify Source, IEvent Event) { bool AllReceivedIndicator = true ; IEnumerator<ISubscribe> _enum = _subscribers.GetEnumerator(); _enum.Reset(); while (_enum.MoveNext()) { if (! (_enum.Current.Receive(Source, Event))) { AllReceivedIndicator = false ; } } return AllReceivedIndicator ; }
static void Main(string[] args) { if (!AppLock.WaitOne(TimeSpan.Zero, true)) { return; } if (args.Length == 0) { Console.WriteLine("DSL .NET contracts generator."); Console.WriteLine("\tUsage: dsl.exe <path1> .. <pathN> [--tray]"); Console.WriteLine("\t <path1> .. <pathN> - path to folder with dsl files."); Console.WriteLine("\t --tray - options to start tray application."); } if (args.Any(x => x.Equals("--tray"))) { CreateTrayIconApp(); _notify = new TrayNotify(TrayIcon); var options = args.ToList(); options.Remove("--tray"); _files = CreateFileWatchers(options.ToArray()); StartupRebuild(_files); AppDomain.CurrentDomain.ProcessExit += CurrentDomainProcessExit; Application.ThreadExit += ApplicationThreadExit; Application.Run(new Empty()); } else { _notify = new ConsoleNotify(); _files = CreateFileWatchers(args); StartupRebuild(_files); Console.ReadLine(); } }
public void fireStateChangedNotification(INotify notify) { LOG.Info("Received notification '" + notify.GetType() + "'"); if (notify.GetType().Equals(typeof(PlayerReadyNotify))) { bool allReady = true; for (int i = 0; i < 2; i++) { if (!this.players[i].getCurrentState().GetType().Equals(typeof(PlayerReadyState))) { allReady = false; break; } } if (allReady) { LOG.Info("All players is ready"); for (int i = 0; i < 2; i++) { PlayerPlayEvent playerPlayEvent = new PlayerPlayEvent(); this.players[i].consumeEvent(playerPlayEvent); } int first = 1; // Hard code this.players[1 - first].consumeEvent(new PlayerWaitEvent()); GameInitializedEvent _initializedEvent = new GameInitializedEvent(); this.consumeEvent(_initializedEvent); } else { LOG.Info("All player not ready"); } } else if (notify.GetType().Equals(typeof(BoardMovedNotify))) { for (int i = 0; i < 2; i++) { if (this.players[i].getCurrentState().GetType().Equals(typeof(PlayerPlayingState))) { LOG.Info("Change player " + i + " Playing to Waiting"); this.players[i].consumeEvent(new PlayerWaitEvent()); } else if (this.players[i].getCurrentState().GetType().Equals(typeof(PlayerWaitingState))) { LOG.Info("Change player " + i +" Waiting to Turning"); this.players[i].consumeEvent(new PlayerTurnEvent()); } else { LOG.Info("Current state: " + players[i].getCurrentState().GetType()); } } } }
public void fireStateChangedNotification(INotify notify) { if (notify.GetType().Equals(typeof(InitializingNotify))) { LOG.Info("State changed: initializing"); } else if (notify.GetType().Equals(typeof(ReadyNotify))) { LOG.Info("State changed: ready"); } else if (notify.GetType().Equals(typeof(MovingNotify))) { LOG.Info("State changed: moving"); } else if (notify.GetType().Equals(typeof(BoardMovedNotify))) { LOG.Info("State changed: moved"); } else if (notify.GetType().Equals(typeof(RejectedNotify))) { LOG.Info("State changed: rejected"); } _notifyListeners(notify); }
public bool Receive(INotify Source, IEvent Event) { return _subscribers.Receive( Source, Event); }
public EseguiRitenutaCBI(INotify notifier, IDaoFactory daoFactory) { _notifier = notifier; _daoFactory = daoFactory; }
public abstract void AddOutputNotify(INotify outputListener);
private void _notifyListeners(INotify notify) { foreach (IStateMachine machine in listeners) { machine.fireStateChangedNotification(notify); } }
static void Main(string[] args) { if (!AppLock.WaitOne(TimeSpan.Zero, true)) { return; } if (args.Length == 0) { Console.WriteLine("DSL .NET contracts generator."); Console.WriteLine("\tUsage: dsl.exe <path1> .. <pathN> [--tray]"); Console.WriteLine("\t <path1> .. <pathN> - path to folder with dsl files."); Console.WriteLine("\t -o=output path (if not provided, output path is the same as the input path)."); Console.WriteLine("\t --tray - options to start tray application."); return; } var explicitOutputPath = args.Where(argument => argument.StartsWith("-o")).Select(argument => argument.Replace("-o=", "")).FirstOrDefault(); var options = args.ToList(); if (explicitOutputPath != null) { options.Remove(options.Single(option => option.StartsWith("-o="))); } if (args.Any(x => x.Equals("--tray"))) { CreateTrayIconApp(); _notify = new TrayNotify(TrayIcon); options.Remove("--tray"); _files = CreateFileWatchers(options.ToArray()); StartupRebuild(_files, explicitOutputPath); AppDomain.CurrentDomain.ProcessExit += CurrentDomainProcessExit; Application.ThreadExit += ApplicationThreadExit; Application.Run(new Empty()); } else { _notify = new ConsoleNotify(); _files = CreateFileWatchers(options.ToArray()); StartupRebuild(_files, explicitOutputPath); Console.ReadLine(); } }
public Monitor(INotify n, string name) { notify = n; }
public EseguiRitenutaModuloPDF(INotify notifier, IDaoFactory daoFactory) { _notifier = notifier; _daoFactory = daoFactory; }
public LogonService(INotify notifier) { _mNotifier = notifier; }
public Monitor(INotify n) { notify = n; }
/// <summary> /// Receives the specified source. /// </summary> /// <param name="Source">The source.</param> /// <param name="Event">The event.</param> /// <returns></returns> public bool Receive(INotify Source, string Event) { return _subscriptions.Receive(Source, Event); }
public RefinePreview(Lazy<IWorld> world, INotify notify) { Assert.That(notify, Is.InstanceOf<NotificationOverride>()); }
/// <summary> /// Receives the specified source. /// </summary> /// <param name="Source">The source.</param> /// <param name="Event">The event.</param> /// <returns></returns> public bool Receive(INotify Source, IEvent Event) { // TODO: Implement this method throw new NotImplementedException(); }
public bool Receive(INotify Source, IEvent Event) { throw new NotImplementedException(); }
/// <summary> /// Receives the specified source. /// </summary> /// <param name="Source">The source.</param> /// <param name="Event">The event.</param> /// <returns></returns> public bool Receive(INotify Source, string EventName ) { ISubsciberList _subs; if (_subscriptions.TryGetValue(EventName, out _subs)) { return _subs.Receive(Source, EventName ); } else { return false; } }