Exemple #1
0
        /// <summary>
        /// Notify the client of complete transaction
        /// Updated the database with notify state
        /// </summary>
        /// <param name="sendMessageToClientCallback"></param>
        public MoneyPaymentNotifyClient(Hangout.Shared.Action <Message, Guid> sendMessageToClientCallback)
        {
            mLogger = LogManager.GetLogger("MoneyPaymentNotifyClient");
            mSendMessageToClientCallback = sendMessageToClientCallback;

            GetNotifyConfigInfo();

            if (!mOff)
            {
                StartNotifyThread();
            }
        }
        /// <summary>
        /// Creates a new instance of a FashionEnergyManager
        /// </summary>
        /// <param name="logger">If null, errors on messages will be thrown as exceptions, otherwise they will be logged as errors and the message will be dropped.</param>
        /// <param name="serverStateMachine"></param>
        /// <param name="sendMessageToClientCallback"></param>
        public FashionEnergyManager(ILog logger, Func <ServerAccount, Guid> guidToServerAccount, Hangout.Shared.Action <Message, Guid> sendMessageToClientCallback)
        {
            if (guidToServerAccount == null)
            {
                throw new ArgumentNullException("guidToServerAccount");
            }
            mGuidToServerAccount = guidToServerAccount;
            mLogger = logger;

            if (sendMessageToClientCallback == null)
            {
                throw new ArgumentNullException("sendMessageToClientCallback");
            }
            mSendMessageToClientCallback = sendMessageToClientCallback;
        }
Exemple #3
0
        private void SetupProgressButtons(Pair <IGuiFrame>[] progressSteps)
        {
            Hangout.Shared.Action <IGuiFrame, string, int, int> setupProgressButton = delegate(IGuiFrame frame, string buttonName, int targetStep, int initialStep)
            {
                foreach (Button button in frame.SelectElements <Button>("**/" + buttonName))
                {
                    mProgressView.SetupGoToStepButton(button, initialStep, targetStep);
                }
            };

            for (int i = 0; i < progressSteps.Length; ++i)
            {
                Pair <IGuiFrame> progressStep = progressSteps[i];
                setupProgressButton(progressStep.Second, "Step1Button", 0, i);
                setupProgressButton(progressStep.Second, "Step2aButton", 1, i);
                setupProgressButton(progressStep.Second, "Step2bButton", 2, i);
                setupProgressButton(progressStep.Second, "Step3Button", 3, i);
                setupProgressButton(progressStep.Second, "Step4Button", 4, i);
                setupProgressButton(progressStep.Second, "Step5Button", 5, i);
            }
        }
Exemple #4
0
 public ServerEngine(SessionManager sessionManager, ServerObjectRepository serverObjectRepository, Hangout.Shared.Action <Message, List <Guid> > sendMessageToReflectorCallback)
 {
     mSessionManager                 = sessionManager;
     mServerObjectRepository         = serverObjectRepository;
     mSendMessageToReflectorCallback = sendMessageToReflectorCallback;
 }