Exemplo n.º 1
1
        private void button1_Click(object sender, EventArgs e)
        {
            if (this.checkBox1.Checked)
            {
                form = new QQStyleMessage();
            }
            else
            {
                //form = new NormalForm();
            }

            this.timer1.Enabled = true;
        }
Exemplo n.º 2
0
 public App(IConfig <MetatoolConfig> config, IHostEnvironment hostEnv, ILogger <App> logger, INotify notify)
 {
     _config  = config;
     _logger  = logger;
     _hostEnv = hostEnv;
     _notify  = notify;
 }
Exemplo n.º 3
0
        /// <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);
                }
            }
        }
Exemplo n.º 4
0
 internal SendNotification(String conectionString)
 {
     NotificatioEventDb = new NoitificationEvent(conectionString);
     NotificationLogs   = new NotificationLogs(conectionString);
     Notify             = new ResolverNotify();
     NotificationQuerys = new NotificationQuerys(conectionString);
 }
Exemplo n.º 5
0
 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;
        }
Exemplo n.º 7
0
 public void RemoveNotify(INotify n)
 {
     if (mList.Contains(n))
     {
         mList.Remove(n);
     }
 }
Exemplo n.º 8
0
    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);
    }
Exemplo n.º 9
0
 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));
 }
Exemplo n.º 10
0
 public void AddNotify(INotify n)
 {
     if (!mList.Contains(n))
     {
         mList.Add(n);
     }
 }
Exemplo n.º 11
0
 public void Subscribe(INotify subscriber)
 {
     if (!_subscribers.Contains(subscriber))
     {
         _subscribers.Add(subscriber);
     }
 }
Exemplo n.º 12
0
 // 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);
 }
Exemplo n.º 14
0
 public MailAction(IMailSender mailSender, IMailCopy mailCopy, INotify notify, IPrint print)
 {
     _mailSender = mailSender;
     _mailCopy   = mailCopy;
     _notify     = notify;
     _print      = print;
 }
Exemplo n.º 15
0
 public void UnSubscribe(INotify subscriber)
 {
     if (_subscribers.Contains(subscriber))
     {
         _subscribers.Remove(subscriber);
     }
 }
Exemplo n.º 16
0
 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;
 }
Exemplo n.º 18
0
 public void Subscribe(INotify subscriber)
 {
     if (!_subscribers.Contains(subscriber))
     {
         _subscribers.Add(subscriber);
     }
 }
Exemplo n.º 19
0
 public void UnSubscribe(INotify subscriber)
 {
     if (_subscribers.Contains(subscriber))
     {
         _subscribers.Remove(subscriber);
     }
 }
Exemplo n.º 20
0
 public SensorHelper(ILogger <SensorHelper> logger, LightHelper lightHelper, INotify notify)
 {
     _logger      = logger;
     _lightHelper = lightHelper;
     _lightHelper.SetSensorHelper(this);
     _notify = notify;
 }
Exemplo n.º 21
0
        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();
        }
Exemplo n.º 22
0
 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;
 }
Exemplo n.º 23
0
 public FeedbackController(INotify notify,
                           IFeedbackService feedbackService,
                           IMapper mapper,
                           IUser user) : base(notify, user)
 {
     _feedbackService = feedbackService;
     _mapper          = mapper;
 }
Exemplo n.º 24
0
 public ModelsController(INotify notify,
                         IModelService modelService,
                         IMapper mapper,
                         IUser user) : base(notify, user)
 {
     _modelService = modelService;
     _mapper       = mapper;
 }
Exemplo n.º 25
0
 public PageServer(
     IPageRepository pageRepository,
     IPageOwnerRepository pageOwnerRepository,
     INotify notify) : base(notify)
 {
     _pageRepository      = pageRepository;
     _pageOwnerRepository = pageOwnerRepository;
 }
Exemplo n.º 26
0
 public ProjectsController(INotify notify,
                           IProjectService projectService,
                           IMapper mapper,
                           IUser user) : base(notify, user)
 {
     _projectService = projectService;
     _mapper         = mapper;
 }
Exemplo n.º 27
0
 public GearWebInstallerService(INotify <GearRole> notify, IPermissionService permissionService, SignInManager <GearUser> signInManager, IIdentityContext applicationDbContext, IHostingEnvironment hostingEnvironment)
 {
     _notify               = notify;
     _permissionService    = permissionService;
     _signInManager        = signInManager;
     _applicationDbContext = applicationDbContext;
     _hostingEnvironment   = hostingEnvironment;
 }
Exemplo n.º 28
0
 /// <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;
 }
Exemplo n.º 29
0
 public FieldsController(INotify notify,
                         IMapper mapper,
                         IFieldService fieldService,
                         IUser user) : base(notify, user)
 {
     _mapper       = mapper;
     _fieldService = fieldService;
 }
Exemplo n.º 30
0
        static void Main(string[] args)
        {
            NotifyFactory notifyFactory = new NotifyFactory();

            INotify notify = notifyFactory.CreateNotify("MAIL");

            notify.SendNotification(new User());
        }
Exemplo n.º 31
0
 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);
 }
Exemplo n.º 32
0
 public ReportsController(INotify notify,
                          IReportService reportService,
                          IMapper mapper,
                          IUser user) : base(notify, user)
 {
     _reportService = reportService;
     _mapper        = mapper;
 }
Exemplo n.º 33
0
 public WeatherComponent(IReader reader, IMapper mapper, INotify notify, IProcessor processor, string fileLocation)
 {
     Reader       = reader;
     Mapper       = mapper;
     Notify       = notify;
     Processor    = processor;
     FileLocation = fileLocation;
 }
Exemplo n.º 34
0
        public MavCBIService(INotify notifier, IVersamentiCondominiService versamentiCondominiService, IMovimentiContabiliService movimentiContabiliService, IPersonaService personaService, IDaoFactory daoFactory)
        {
            _notifier = notifier;
            _versamentiCondominiService = versamentiCondominiService;
            _movimentiContabiliService = movimentiContabiliService;
            _personaService = personaService;

            _daoFactory = daoFactory;
        }
Exemplo n.º 35
0
 public ClassController(IClassService classService,
                        IUserService userService,
                        INotify notify,
                        IJWTService jwtService) : base(notify)
 {
     _classService = classService;
     _userService  = userService;
     _jwtService   = jwtService;
 }
Exemplo n.º 36
0
 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);
     }
 }
Exemplo n.º 38
0
 public OrderProcessor(INotify notify)
 {
     _notify = notify;
 }
Exemplo n.º 39
0
Arquivo: Input.cs Projeto: bolke/Sewer
 public abstract void AddInputNotify(INotify inputListener);
 public UserPreferenceNotifier(INotify[] notifiers)
 {
     this.notifiers = notifiers;
 }
Exemplo n.º 41
0
 public RefinePreview(Lazy<IWorld> world, INotify notify)
 {
     Assert.IsType<NotificationOverride>(notify);
 }
Exemplo n.º 42
0
 public World(IOwinServer server, ISupport support, INotify notifyChanges)
 {
 }
Exemplo n.º 43
0
        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 ;
        }
Exemplo n.º 44
0
        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);
        }
Exemplo n.º 47
0
 public bool Receive(INotify Source, IEvent Event)
 {
     return _subscribers.Receive( Source,  Event);
 }
Exemplo n.º 48
0
 public EseguiRitenutaCBI(INotify notifier, IDaoFactory daoFactory)
 {
     _notifier = notifier;
     _daoFactory = daoFactory;
 }
Exemplo n.º 49
0
 public abstract void AddOutputNotify(INotify outputListener);
 private void _notifyListeners(INotify notify)
 {
     foreach (IStateMachine machine in listeners)
     {
         machine.fireStateChangedNotification(notify);
     }
 }
Exemplo n.º 51
0
        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();
              }
        }
Exemplo n.º 52
0
 public Monitor(INotify n, string name)
 {
     notify = n;
 }
Exemplo n.º 53
0
 public EseguiRitenutaModuloPDF(INotify notifier, IDaoFactory daoFactory)
 {
     _notifier = notifier;
     _daoFactory = daoFactory;
 }
Exemplo n.º 54
0
 public LogonService(INotify notifier)
 {
     _mNotifier = notifier;
 }
Exemplo n.º 55
0
 public Monitor(INotify n)
 {
     notify = n;
 }
Exemplo n.º 56
0
 /// <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);
 }
Exemplo n.º 57
0
 public RefinePreview(Lazy<IWorld> world, INotify notify)
 {
     Assert.That(notify, Is.InstanceOf<NotificationOverride>());
 }
Exemplo n.º 58
0
 /// <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();
 }
Exemplo n.º 59
0
 public bool Receive(INotify Source, IEvent Event)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 60
0
        /// <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;
            }
        }