internal RabbitMQDefaultChannel(RabbitMQProtocol protocol, ushort id, Action <ushort> closeCallback) : base(protocol) { _channelId = id; _protocol = protocol; _isOpen = false; _managerCloseCallback = closeCallback; _exchangeMethodHandler = new ExchangeHandler(_channelId, _protocol); _queueMethodHandler = new QueueHandler(_channelId, _protocol); _basicHandler = new BasicHandler(_channelId, _protocol); }
public void ShowTradingPanel(Player localPlayer, Player[] playersToTradeWith, ExchangeHandler exchangeHandler, TradeHandler tradeHandler, TradeCancellation onTradeCancel) { this.localPlayer = localPlayer; this.playersToTradeWith = playersToTradeWith; onExchange = exchangeHandler; onTradeRequestSent = tradeHandler; this.onTradeCancel = onTradeCancel; // Select one player to trade with EnableExchangePanel(); EnableClosability(true); }
public static void RegisterDefaultEventHandlers() { GenericHandler.Register(); GateHandler.Register(); ExchangeHandler.Register(); TimedFurnitureHandler.Register(); RandomizerHandler.Register(); TeleporterHandler.Register(); DispenserItemHandler.Register(); FireworksHandler.Register(); JukeboxHandler.Register(); RollerHandler.Register(); }
public bool NotifyFinance(int notification) { log.WriteLogEntry("Begin NotifyFinance..."); bool result = false; string emailBody = string.Empty; switch (notification) { case 0: emailBody = "<html><body><p>Notifying Finance there is a new travel advance.</p></body></html>"; break; case 1: emailBody = "<html><body><p>Notifying Finance there is a new travel recap.</p></body></html>"; break; } UserDataHandler userData = new UserDataHandler(dbServer, dbName); string financeEmail = userData.GetDepartment(Department.FinanceDept).DeptEmail; ExchangeHandler emailHandle = new ExchangeHandler { EmailSubject = "Notify Finance", RecipientEmailAddress = financeEmail, EmailBody = emailBody }; try { if (emailHandle.ConnectExchangeService()) { log.WriteLogEntry("Connection to Exchange service successful."); if (emailHandle.SendMail()) { result = true; } else { log.WriteLogEntry("Failed send email!"); } } else { log.WriteLogEntry("Failed connect to Exchange service!"); } } catch (Exception ex) { log.WriteLogEntry("Program error " + ex.Message); } log.WriteLogEntry("End NotifyFinance."); return(result); }
// // Constructie // private DataAccess() { sysLog.Info("DataAccess startup"); publicXmlRpcUrl = ConfigurationManager.AppSettings["PUBLIC_XML_RPC_SERVER"]; privateXmlRpcUrl = ConfigurationManager.AppSettings["PRIVATE_XML_RPC_SERVER"]; publicExchangeHandler = HandlerHelper.getPublicExchangeHandler(publicXmlRpcUrl); publicIndexHandler = HandlerHelper.getPublicIndexHandler(publicXmlRpcUrl); publicOrderHandler = HandlerHelper.getPublicOrderHandler(publicXmlRpcUrl); publicPortfolioHandler = HandlerHelper.getPublicPortfolioHandler(publicXmlRpcUrl); publicSecurityHandler = HandlerHelper.getPublicSecurityHandler(publicXmlRpcUrl); publicTransactionHandler = HandlerHelper.getPublicTransactionHandler(publicXmlRpcUrl); publicUserHandler = HandlerHelper.getPublicUserHandler(publicXmlRpcUrl); publicPointsTransactionHandler = HandlerHelper.getPublicPointsTransactionHandler(publicXmlRpcUrl); exchangeCache = new Dictionary<string, IExchange>(); }
public bool NotifyGeneralManager(User user) { log.WriteLogEntry("Begin NotifyGeneralManager..."); bool result = false; if (user.GetType() == typeof(DomainUser)) { DomainUser domainUser = (DomainUser)user; log.WriteLogEntry(string.Format("Current User {0} {1} {2} {3} {4}", user.UserID, domainUser.DomainUpn, domainUser.EmployeeID, domainUser.Department, domainUser.Department.DeptHeadEmail)); ExchangeHandler emailHandle = new ExchangeHandler { EmailSubject = "Notify General Manager", RecipientEmailAddress = domainUser.Company.GeneralManagerEmail, EmailBody = "<html><body><p>A department head has approved a request to travel</p><p>go <a href=\"https://bermuda.verawaterandpower.com/?route=travel\"> here to approve</a></p></body></html>" }; try { if (emailHandle.ConnectExchangeService()) { log.WriteLogEntry("Connection to Exchange service successful."); if (emailHandle.SendMail()) { result = true; } else { log.WriteLogEntry("Failed send email!"); } } else { log.WriteLogEntry("Failed connect to Exchange service!"); } } catch (Exception ex) { log.WriteLogEntry("Program error " + ex.Message); } } log.WriteLogEntry("End NotifyGeneralManager."); return(result); }
public bool NotifySubmitter(string email, string message) { log.WriteLogEntry("Begin NotifySubmitter..."); bool result = false; ExchangeHandler emailHandle = new ExchangeHandler { EmailSubject = "Notify Submitter", RecipientEmailAddress = email, EmailBody = message }; try { if (emailHandle.ConnectExchangeService()) { log.WriteLogEntry("Connection to Exchange service successful."); if (emailHandle.SendMail()) { result = true; } else { log.WriteLogEntry("Failed send email!"); } } else { log.WriteLogEntry("Failed connect to Exchange service!"); } } catch (Exception ex) { log.WriteLogEntry("Program error " + ex.Message); } return(result); }
public void Initialize(ResourceStorage storage, ExchangeHandler handler) { this.storage = storage; this.onExchange = handler; ValidateExchange(fromResource); }
private static void SendMail() { ExchangeHandler.GetCalendarInfo("*****@*****.**"); }
public GameSocket(ISerializer serializer) : base(serializer) { _achievementHandler = new AchievementHandler(this); _activityHandler = new ActivityHandler(this); _activityFavorHandler = new ActivityFavorHandler(this); _amuletHandler = new AmuletHandler(this); _arenaHandler = new ArenaHandler(this); _attendanceHandler = new AttendanceHandler(this); _bagHandler = new BagHandler(this); _battleHandler = new BattleHandler(this); _cardHandler = new CardHandler(this); _consignmentLineHandler = new ConsignmentLineHandler(this); _crossServerHandler = new CrossServerHandler(this); _dailyActivityHandler = new DailyActivityHandler(this); _demonTowerHandler = new DemonTowerHandler(this); _equipHandler = new EquipHandler(this); _exchangeHandler = new ExchangeHandler(this); _fashionHandler = new FashionHandler(this); _fightLevelHandler = new FightLevelHandler(this); _fleeHandler = new FleeHandler(this); _friendHandler = new FriendHandler(this); _functionHandler = new FunctionHandler(this); _functionOpenHandler = new FunctionOpenHandler(this); _giftOnlineHandler = new GiftOnlineHandler(this); _goddessHandler = new GoddessHandler(this); _guildBlessHandler = new GuildBlessHandler(this); _guildBossHandler = new GuildBossHandler(this); _guildDepotHandler = new GuildDepotHandler(this); _guildHandler = new GuildHandler(this); _guildShopHandler = new GuildShopHandler(this); _guildTechHandler = new GuildTechHandler(this); _hookSetHandler = new HookSetHandler(this); _interactHandler = new InteractHandler(this); _intergalMallHandler = new IntergalMallHandler(this); _itemHandler = new ItemHandler(this); _leaderBoardHandler = new LeaderBoardHandler(this); _limitTimeActivityHandler = new LimitTimeActivityHandler(this); _mailHandler = new MailHandler(this); _mapHandler = new MapHandler(this); _masteryHandler = new MasteryHandler(this); _medalHandler = new MedalHandler(this); _messageHandler = new MessageHandler(this); _mountHandler = new MountHandler(this); _npcHandler = new NpcHandler(this); _offlineAwardHandler = new OfflineAwardHandler(this); _onlineGiftHandler = new OnlineGiftHandler(this); _payGiftHandler = new PayGiftHandler(this); _petHandler = new PetHandler(this); _petNewHandler = new PetNewHandler(this); _playerHandler = new PlayerHandler(this); _prepaidHandler = new PrepaidHandler(this); _rankHandler = new RankHandler(this); _resourceDungeonHandler = new ResourceDungeonHandler(this); _resourceHandler = new ResourceHandler(this); _rewardHandler = new RewardHandler(this); _saleHandler = new SaleHandler(this); _shopMallHandler = new ShopMallHandler(this); _skillHandler = new SkillHandler(this); _skillKeysHandler = new SkillKeysHandler(this); _soloHandler = new SoloHandler(this); _stealHandler = new StealHandler(this); _sysSetHandler = new SysSetHandler(this); _taskHandler = new TaskHandler(this); _teamHandler = new TeamHandler(this); _tradeHandler = new TradeHandler(this); _treasureHandler = new TreasureHandler(this); _upLevelHandler = new UpLevelHandler(this); _vipHandler = new VipHandler(this); _vitalityHandler = new VitalityHandler(this); _wingHandler = new WingHandler(this); _activityRevelryHandler = new ActivityRevelryHandler(this); _auctionHandler = new AuctionHandler(this); _chatHandler = new ChatHandler(this); _daoYouHandler = new DaoYouHandler(this); _entryHandler = new EntryHandler(this); _roleHandler = new RoleHandler(this); _farmHandler = new FarmHandler(this); _five2FiveHandler = new Five2FiveHandler(this); _guildManagerHandler = new GuildManagerHandler(this); _xianYuanHandler = new XianYuanHandler(this); }
public bool NotifySubmitter(string email, int notification) { log.WriteLogEntry("Begin NotifySubmitter..."); bool result = false; string emailBody = string.Empty; switch (notification) { case 0: { emailBody = "<html><body><p>Your request to travel has been <b>DENIED.</b></p></body></html>"; break; } case 1: { emailBody = "<html><body><p>Your request to travel has been <b>APPROVED.</b></p></body></html>"; break; } case 2: { emailBody = "<html><body><p>Your travel advance is being processed by Finance.</p></body></html>"; break; } case 3: { emailBody = "<html><body><p>Your travel recap is being processed by Finance.</p></body></html>"; break; } } ExchangeHandler emailHandle = new ExchangeHandler { EmailSubject = "Notify Submitter", RecipientEmailAddress = email, EmailBody = emailBody }; try { if (emailHandle.ConnectExchangeService()) { log.WriteLogEntry("Connection to Exchange service successful."); if (emailHandle.SendMail()) { result = true; } else { log.WriteLogEntry("Failed send email!"); } } else { log.WriteLogEntry("Failed connect to Exchange service!"); } } catch (Exception ex) { log.WriteLogEntry("Program error " + ex.Message); } return(result); }