public EventData(string id, object sender, EventActionType eventType, EventCategoryType eventCategoryType)
 {
     this.id                = id;                //id of sender
     this.sender            = sender;            //object reference of sender
     this.eventType         = eventType;         //is it play, mute, volume, zone?
     this.eventCategoryType = eventCategoryType; //where did it originate? ui, menu, video
 }
 public CameraEventData(string id, object sender, EventActionType eventType,
                        EventCategoryType eventCategoryType, string cameraLayout, string cameraID)
     : base(id, sender, eventType, eventCategoryType)
 {
     this.cameraLayout = cameraLayout;   //e.g. fullscreen?
     this.cameraID     = cameraID;       //e.g. first person collidable
 }
Exemple #3
0
        public void CreateNotification(EventActionType eventActionType)
        {
            switch (eventActionType)
            {
            case EventActionType.Created:

                NewNotification.Name        = "New Vendor created";
                NewNotification.Description = string.Format("A New vendor has been created: {0}", VendorsName);
                NewNotification.IsNew       = true;
                NewNotification.RaisedBy    = StaticDataReposityory.UserID;
                NewNotification.EmailBody   = string.Format("A New vendor has been created. {0} Name: {1} {2} Description: {3}", Environment.NewLine, VendorsName, Environment.NewLine, VendorsDescption);

                break;

            case EventActionType.Updated:

                NewNotification.Name        = "Vendor updated";
                NewNotification.Description = string.Format("Vendor has been updated: {0}", VendorsName);
                NewNotification.IsNew       = true;
                NewNotification.RaisedBy    = StaticDataReposityory.UserID;
                NewNotification.EmailBody   = string.Format("Vendor update: {0} Name: {1} {2} Description: {3}", Environment.NewLine, VendorsName, Environment.NewLine, VendorsDescption);

                break;

            case EventActionType.Deleted:

                NewNotification.Name        = "Vendor deleted";
                NewNotification.Description = string.Format("Vendor has been deleted: {0}", VendorsName);
                NewNotification.IsNew       = true;
                NewNotification.RaisedBy    = StaticDataReposityory.UserID;
                NewNotification.EmailBody   = string.Format("Vendor deletion: {0} Name: {1} {2} Description: {3}", Environment.NewLine, VendorsName, Environment.NewLine, VendorsDescption);

                break;
            }
        }
 public TextEventData(string id, object sender, EventActionType eventActionType, EventCategoryType eventCategoryType, SpriteFont font, string text, Color textColor, Color backgroundColor)
     : base(id, sender, eventActionType, eventCategoryType)
 {
     this.text            = text; //e.g. alarm in sector 2
     this.font            = font;
     this.textColor       = textColor;
     this.backgroundColor = backgroundColor;
 }
 //never used - notice it is private
 private SoundEventData(string id, object sender, EventActionType eventType,
                        EventCategoryType eventCategoryType, string cueName, AudioStopOptions audioStopOptions, AudioEmitter audioEmitter)
     : base(id, sender, eventType, eventCategoryType)
 {
     this.cueName          = cueName; //"boing
     this.audioStopOptions = audioStopOptions;
     this.audioEmitter     = audioEmitter;
 }
Exemple #6
0
        public static bool HasSettings(this EventActionType type)
        {
            if (_typesWithSettings == null)
            {
                Initialize();
            }

            Debug.Assert(_typesWithSettings != null, nameof(_typesWithSettings) + " != null");
            return(_typesWithSettings.Contains(type));
        }
Exemple #7
0
        //supports passing of multiple parameter objects within an event
        public EventData(string id, object sender, EventActionType eventType, EventCategoryType eventCategoryType, object[] additionalParameters)
        {
            this.id                = id;                //id of sender
            this.sender            = sender;            //object reference of sender
            this.eventType         = eventType;         //is it play, mute, volume, zone?
            this.eventCategoryType = eventCategoryType; //where did it originate? ui, menu, video

            //used to pass extra information between sender and registered recipient(s)
            this.additionalParameters = additionalParameters;
        }
        public async Task SquadEvent(int eventId, EventActionType eventActionType)
        {
            List <PersonNotification> personList = null;

            DataProvider.ExecuteCmd(GetConnection, "dbo.PersonNotificationPreference_GetSquadEventNotificationPeople",
                                    inputParamMapper : delegate(SqlParameterCollection paramCollection)
            {
                paramCollection.AddWithValue("@EventActionTypeId", (int)eventActionType);
                paramCollection.AddWithValue("@EventId", eventId);
            }
                                    , map : delegate(IDataReader reader, short set)
            {
                switch (set)
                {
                case 0:
                    PersonNotification prsn = MapPersonNotification(reader);

                    if (personList == null)
                    {
                        personList = new List <PersonNotification>();
                    }
                    personList.Add(prsn);
                    break;
                }
            }
                                    );
            string eventActionString = String.Empty;

            switch (eventActionType)
            {
            case EventActionType.Created:
                eventActionString = "created";
                break;

            case EventActionType.Modified:
                eventActionString = "modified";
                break;

            case EventActionType.Cancelled:
                eventActionString = "cancelled";
                break;
            }
            if (personList != null)
            {
                string url                     = System.Web.Configuration.WebConfigurationManager.AppSettings["BaseUrl"] + "/eventdetails/" + eventId;
                string emailTitle              = personList[0].GroupName + " squad event news";
                string emailMainMessage        = "An event for the " + personList[0].GroupName + " squad has been " + eventActionString;
                string emailPleaseClickMessage = "Click the link below to view event details";
                string emailSubject            = "A Squad Event has been " + eventActionString;
                string emailMessageText        = "Click the following link to view event details: " + url;
                string smsMessageText          = "An event for the " + personList[0].GroupName + " squad has been " + eventActionString + "! Click the following link to view event details: " + url;

                await SendMessages(personList, url, emailTitle, emailMainMessage, emailPleaseClickMessage, emailSubject, emailMessageText, smsMessageText);
            }
        }
 public EventNodePersisted(
     TEvent @event,
     EventActionType eventAction,
     TState?state,
     IAction <TKey, TState, TEvent, TCtx, TParam, TUserId> action)
 {
     this.Event       = @event;
     this.EventAction = eventAction;
     this.State       = state;
     this.Action      = action;
 }
Exemple #10
0
        public void CreateNotification(EventActionType eventActionType)
        {
            NewNotification.RaisedBy = CurrentUser.UserID;
            switch (eventActionType)
            {
            case EventActionType.Created:

                NewNotification.Name        = "New Category Created";
                NewNotification.Description = string.Format("{0} - has been created as a category.", Description);

                StringBuilder CreatedEmail = new StringBuilder();

                CreatedEmail.AppendLine("A New category has been created with the below details");
                CreatedEmail.AppendLine(Environment.NewLine);
                CreatedEmail.AppendLine("Name:" + Name);
                CreatedEmail.AppendLine("Description: " + Description);

                NewNotification.EmailBody = CreatedEmail.ToString();

                break;

            case EventActionType.Updated:

                NewNotification.Name        = "Category Updated";
                NewNotification.Description = string.Format("Category has been updated: {0}", Description);

                StringBuilder UpdatedEmail = new StringBuilder();

                UpdatedEmail.AppendLine("Category has been updated with the below details");
                UpdatedEmail.AppendLine(Environment.NewLine);
                UpdatedEmail.AppendLine("Name:" + Name);
                UpdatedEmail.AppendLine("Description: " + Description);

                NewNotification.EmailBody = UpdatedEmail.ToString();

                break;

            case EventActionType.Deleted:

                NewNotification.Name        = "Category Deleted";
                NewNotification.Description = string.Format("Category has been deleted: {0}", Description);

                StringBuilder DeletedEmail = new StringBuilder();

                DeletedEmail.AppendLine("Category with the below details has been deleted.");
                DeletedEmail.AppendLine(Environment.NewLine);
                DeletedEmail.AppendLine("Name:" + Name);
                DeletedEmail.AppendLine("Description: " + Description);

                NewNotification.EmailBody = DeletedEmail.ToString();

                break;
            }
        }
Exemple #11
0
 public EventNode(
     TEvent @event,
     EventActionType eventAction,
     TState?state,
     IAction <TState, TEvent, TCtx, TParam> action)
 {
     this.Event       = @event;
     this.EventAction = eventAction;
     this.State       = state;
     this.Action      = action;
 }
        public void InstallationChange(long installationID, EventActionType action)
        {
            var connectionIDs = UserContext.SignalRConnectionMapping
                                .GetConnectionIDsForLoginExceptAuthorization(UserContext.CurrentUser.Login, null); //UserContext.CurrentAuthorization);

            _hubContext.Clients.Clients(connectionIDs).InstallationChange(
                new InstallationEventArgs()
            {
                Action         = action,
                InstallationID = installationID,
            });
        }
Exemple #13
0
        public void CreateNotification(EventActionType eventActionType)
        {
            NewNotification.RaisedBy = CurrentUser.UserID;
            switch (eventActionType)
            {
            case EventActionType.Created:

                if (PurchaseObject != null)
                {
                    NewNotification.Description = PurchaseObject.Title + ": Has been created with " + StockList.Count + " Stock Items";
                    NewNotification.Name        = "New Purchase created";

                    StringBuilder EmailItems = new StringBuilder();
                    EmailItems.AppendLine("New Purchase Created:");
                    EmailItems.AppendLine();
                    EmailItems.AppendLine("Purchase Name: " + PurchaseObject.Title);
                    EmailItems.AppendLine("Purchase Description: " + PurchaseObject.Description);
                    EmailItems.AppendLine("Stock Items attached to Purchase:");

                    foreach (var s in StockList)
                    {
                        EmailItems.AppendLine(s.Name);
                    }

                    NewNotification.EmailBody = EmailItems.ToString();
                }
                else
                {
                    NewNotification.Description = Name + " Has been created.";
                    NewNotification.Name        = "New stock item created";
                    NewNotification.EmailBody   = Name + Environment.NewLine + Description;
                }

                break;

            case EventActionType.Updated:

                NewNotification.Description = "Stock has been updated.";
                NewNotification.Name        = "Stock item updated";
                NewNotification.EmailBody   = Name + Environment.NewLine + Description;

                break;

            case EventActionType.Deleted:

                NewNotification.Description = "Stock has been deleted.";
                NewNotification.Name        = "Stock item deleted";
                NewNotification.EmailBody   = Name + Environment.NewLine + Description;

                break;
            }
        }
Exemple #14
0
        private void EndGame(EventActionType endState)
        {
            //display menu
            hasGameStarted = false;
            EventDispatcher.Publish(new EventData(EventCategoryType.Menu, endState, null));

            //win or lose sound?
            if (endState == EventActionType.OnWin)
            {
                EventDispatcher.Publish(new EventData(EventCategoryType.Sound, EventActionType.OnPlay2D, new object[] { "win" }));
            }
            else if (endState == EventActionType.OnLose)
            {
                EventDispatcher.Publish(new EventData(EventCategoryType.Sound, EventActionType.OnPlay2D, new object[] { "lose" }));
            }

            //Remove the curve controller
            cameraManager[0].ControllerList.Remove(c => c is Curve3DController);
        }
Exemple #15
0
 //pre-object[] compatability constructor
 public EventData(string id, object sender, EventActionType eventType, EventCategoryType eventCategoryType)
     : this(id, sender, eventType, eventCategoryType, null)
 {
 }
 public ARVREvent(EventCategoryType eventCategoryType,
                  EventActionType eventActionType)
 {
     EventCategoryType = eventCategoryType;
     EventActionType   = eventActionType;
 }
 public BaseEventArgs()
 {
     this.Action = EventActionType.None;
 }
Exemple #18
0
        public void CreateNotification(EventActionType eventActionType)
        {
            NewNotification.RaisedBy = CurrentUser.UserID;
            switch (eventActionType)
            {
            case EventActionType.Created:

                NewNotification.Name        = "New Address created";
                NewNotification.Description = string.Format("A New address has been created: {0}", AddressID);

                StringBuilder CreatedEmail = new StringBuilder();

                CreatedEmail.AppendLine("A new address has been created with the below details");
                CreatedEmail.AppendLine(Environment.NewLine);
                CreatedEmail.AppendLine(AddressLine1);
                if (AddressLine2 != "")
                {
                    CreatedEmail.AppendLine(AddressLine2);
                }
                if (AddressLine3 != "")
                {
                    CreatedEmail.AppendLine(AddressLine3);
                }
                if (Town != "")
                {
                    CreatedEmail.AppendLine(Town);
                }
                if (County != "")
                {
                    CreatedEmail.AppendLine(County);
                }
                CreatedEmail.AppendLine(PostCode);
                CreatedEmail.AppendLine(Country);


                NewNotification.EmailBody = CreatedEmail.ToString();

                break;

            case EventActionType.Updated:

                NewNotification.Name        = "Address Update";
                NewNotification.Description = string.Format("An address has been Updated: {0}", AddressID);

                StringBuilder UpdatedEmail = new StringBuilder();

                UpdatedEmail.AppendLine(AddressID + ": address has been updated with the below details");
                UpdatedEmail.AppendLine(Environment.NewLine);
                UpdatedEmail.AppendLine(AddressLine1);
                if (AddressLine2 != "")
                {
                    UpdatedEmail.AppendLine(AddressLine2);
                }
                if (AddressLine3 != "")
                {
                    UpdatedEmail.AppendLine(AddressLine3);
                }
                if (Town != "")
                {
                    UpdatedEmail.AppendLine(Town);
                }
                if (County != "")
                {
                    UpdatedEmail.AppendLine(County);
                }
                UpdatedEmail.AppendLine(PostCode);
                UpdatedEmail.AppendLine(Country);


                NewNotification.EmailBody = UpdatedEmail.ToString();

                break;

            case EventActionType.Deleted:

                NewNotification.Name        = "Address Updated";
                NewNotification.Description = string.Format("An address has been deleted: {0}", AddressID);

                StringBuilder DeletedEmail = new StringBuilder();

                DeletedEmail.AppendLine(AddressID + ": address has been deleted");
                DeletedEmail.AppendLine(Environment.NewLine);
                DeletedEmail.AppendLine(AddressLine1);
                if (AddressLine2 != "")
                {
                    DeletedEmail.AppendLine(AddressLine2);
                }
                if (AddressLine3 != "")
                {
                    DeletedEmail.AppendLine(AddressLine3);
                }
                if (Town != "")
                {
                    DeletedEmail.AppendLine(Town);
                }
                if (County != "")
                {
                    DeletedEmail.AppendLine(County);
                }
                DeletedEmail.AppendLine(PostCode);
                DeletedEmail.AppendLine(Country);


                NewNotification.EmailBody = DeletedEmail.ToString();

                break;
            }
        }
Exemple #19
0
        public void CreateNotification(EventActionType eventActionType)
        {
            switch (eventActionType)
            {
            case EventActionType.Created:

                NewNotification.Name        = "New User Created.";
                NewNotification.Description = string.Format("{0} - has been created as a user.", FullName);

                StringBuilder CreateEmail = new StringBuilder();

                CreateEmail.AppendLine("A New user has been created with the below details");
                CreateEmail.AppendLine(Environment.NewLine);
                CreateEmail.AppendLine("Name:" + FullName);
                CreateEmail.AppendLine("Username: "******"Email Address: " + Email);
                CreateEmail.AppendLine("Contact Numbers:");
                CreateEmail.AppendLine("                " + "Home: " + HomePhone);
                CreateEmail.AppendLine("                " + "Work: " + WorkPhone);
                CreateEmail.AppendLine("                " + "Mobile: " + Mobile);

                NewNotification.EmailBody = CreateEmail.ToString();

                break;

            case EventActionType.Updated:

                NewNotification.Name        = "User Updated.";
                NewNotification.Description = string.Format("{0} - user has been updated.", FullName);

                StringBuilder UpdatedEmail = new StringBuilder();

                UpdatedEmail.AppendLine("User with the below details has been updated");
                UpdatedEmail.AppendLine(Environment.NewLine);
                UpdatedEmail.AppendLine("Name:" + FullName);
                UpdatedEmail.AppendLine("Username: "******"Email Address: " + Email);
                UpdatedEmail.AppendLine("Contact Numbers:");
                UpdatedEmail.AppendLine("                " + "Home: " + HomePhone);
                UpdatedEmail.AppendLine("                " + "Work: " + WorkPhone);
                UpdatedEmail.AppendLine("                " + "Mobile: " + Mobile);

                NewNotification.EmailBody = UpdatedEmail.ToString();

                break;

            case EventActionType.Deleted:

                NewNotification.Name        = "User Deleted.";
                NewNotification.Description = string.Format("{0} - user has been deleted.", FullName);

                StringBuilder DeletedEmail = new StringBuilder();

                DeletedEmail.AppendLine("User with the below details has been deleted");
                DeletedEmail.AppendLine(Environment.NewLine);
                DeletedEmail.AppendLine("Name:" + FullName);
                DeletedEmail.AppendLine("Username: "******"Email Address: " + Email);
                DeletedEmail.AppendLine("Contact Numbers:");
                DeletedEmail.AppendLine("                " + "Home: " + HomePhone);
                DeletedEmail.AppendLine("                " + "Work: " + WorkPhone);
                DeletedEmail.AppendLine("                " + "Mobile: " + Mobile);

                NewNotification.EmailBody = DeletedEmail.ToString();

                break;
            }
        }
Exemple #20
0
        //public static void OpenSaleTab(skSales SaleObj)
        //{

        //    ObjectMessenger om = new ObjectMessenger();


        //    if (SaleObj != null)
        //    {
        //        om.Send("TRANOBJ", SaleObj);
        //  //      UI.Enviroment.LoadNewTab("SalesDetailsView");
        //    }
        //    else
        //    {
        //        throw new Exception("No Sale with this ID can be found.");
        //    }
        //}

        public void CreateNotification(EventActionType eventActionType)
        {
            switch (eventActionType)
            {
            case EventActionType.Created:

                NewNotification.Name        = "New Sale Created.";
                NewNotification.Description = string.Format("{0} - has been created as a sale.", Title);

                StringBuilder CreateEmail = new StringBuilder();

                CreateEmail.AppendLine("A New sale has been created with the below details");
                CreateEmail.AppendLine(Environment.NewLine);
                CreateEmail.AppendLine("Name: " + Title);
                CreateEmail.AppendLine("Description: " + Description);
                CreateEmail.AppendLine("Method: " + SaleMethod);
                CreateEmail.AppendLine("Sale Amount: £" + Amount);
                CreateEmail.AppendLine("Postage Amount: £" + Postage);
                CreateEmail.AppendLine("PayPal Fees: £" + PayPalFees);
                CreateEmail.AppendLine("Total Fee: " + TotalFee);

                NewNotification.EmailBody = CreateEmail.ToString();

                break;

            case EventActionType.Updated:

                NewNotification.Name        = "Sale Updated.";
                NewNotification.Description = string.Format("{0} - sale has been updated.", Title);

                StringBuilder UpdateEmail = new StringBuilder();

                UpdateEmail.AppendLine("Sale with the below details has been updated.");
                UpdateEmail.AppendLine(Environment.NewLine);
                UpdateEmail.AppendLine("Name: " + Title);
                UpdateEmail.AppendLine("Description: " + Description);
                UpdateEmail.AppendLine("Method: " + SaleMethod);
                UpdateEmail.AppendLine("Sale Amount: £" + Amount);
                UpdateEmail.AppendLine("Postage Amount: £" + Postage);
                UpdateEmail.AppendLine("PayPal Fees: £" + PayPalFees);
                UpdateEmail.AppendLine("Total Fee: " + TotalFee);

                NewNotification.EmailBody = UpdateEmail.ToString();

                break;

            case EventActionType.Deleted:

                NewNotification.Name        = "Sale Deleted.";
                NewNotification.Description = string.Format("{0} - sale has been deleted.", Title);

                StringBuilder DeletedEmail = new StringBuilder();

                DeletedEmail.AppendLine("Sale with the below details has been deleted.");
                DeletedEmail.AppendLine(Environment.NewLine);
                DeletedEmail.AppendLine("Name: " + Title);
                DeletedEmail.AppendLine("Description: " + Description);
                DeletedEmail.AppendLine("Method: " + SaleMethod);
                DeletedEmail.AppendLine("Sale Amount: £" + Amount);
                DeletedEmail.AppendLine("Postage Amount: £" + Postage);
                DeletedEmail.AppendLine("PayPal Fees: £" + PayPalFees);
                DeletedEmail.AppendLine("Total Fee: " + TotalFee);

                NewNotification.EmailBody = DeletedEmail.ToString();

                break;
            }
        }
 //used when we wish to specify a camera to be set as active
 public VideoEventData(string id, object sender, EventActionType eventActionType, EventCategoryType eventCategoryType, string name)
     : base(id, sender, eventActionType, eventCategoryType)
 {
     this.name = name;       //e.g. target video name to play/pause/restart
 }
Exemple #22
0
 //when we don't have any pertinent string data in ID AND sender
 public EventData(EventActionType eventType, EventCategoryType eventCategoryType)
     : this(null, null, eventType, eventCategoryType, null)
 {
 }
Exemple #23
0
 //when we don't have any pertinent string data in ID AND sender but have additional event parameters
 public EventData(EventActionType eventType, EventCategoryType eventCategoryType, object[] additionalParameters)
     : this(null, null, eventType, eventCategoryType, additionalParameters)
 {
 }
Exemple #24
0
 //when we don't have any pertinent string data in ID
 public EventData(object sender, EventActionType eventType, EventCategoryType eventCategoryType)
     : this(null, sender, eventType, eventCategoryType, null)
 {
 }
 //use when you want to play a 3D sound
 public SoundEventData(string id, object sender, EventActionType eventType,
                       EventCategoryType eventCategoryType, string cueName, AudioEmitter audioEmitter)
     : this(id, sender, eventType, eventCategoryType, cueName, AudioStopOptions.Immediate, audioEmitter)
 {
 }
 public BaseEventArgs()
 {
     this.EventID = Guid.NewGuid();
     this.Action  = EventActionType.None;
 }
Exemple #27
0
        public void CreateNotification(EventActionType eventActionType)
        {
            switch (eventActionType)
            {
            case EventActionType.Created:

                NewNotification.Name        = "New Refund Created.";
                NewNotification.Description = string.Format("{0} Has been refunded succsesfully.", StockItem.Name);

                StringBuilder CreatedEmail = new StringBuilder();

                CreatedEmail.AppendLine("A new refund has been created with the below details");
                CreatedEmail.AppendLine(Environment.NewLine);
                CreatedEmail.AppendLine("Stock ID:" + StockItem.Stockid);
                CreatedEmail.AppendLine("Stock Name:" + StockItem.Name);
                CreatedEmail.AppendLine(Environment.NewLine);
                CreatedEmail.AppendLine("Refund Reason: " + Description);
                CreatedEmail.AppendLine("Refund Amount: " + Amount);

                NewNotification.EmailBody = CreatedEmail.ToString();

                break;

            case EventActionType.Updated:

                NewNotification.Name        = "Refund Updated.";
                NewNotification.Description = string.Format("{0} refund has been updated.", StockItem.Name);

                StringBuilder UpdatedEmail = new StringBuilder();

                UpdatedEmail.AppendLine("Refund with the below details has been updated.");
                UpdatedEmail.AppendLine(Environment.NewLine);
                UpdatedEmail.AppendLine("Stock ID:" + StockItem.Stockid);
                UpdatedEmail.AppendLine("Stock Name:" + StockItem.Name);
                UpdatedEmail.AppendLine(Environment.NewLine);
                UpdatedEmail.AppendLine("Refund Reason: " + Description);
                UpdatedEmail.AppendLine("Refund Amount: " + Amount);

                NewNotification.EmailBody = UpdatedEmail.ToString();

                break;

            case EventActionType.Deleted:

                NewNotification.Name        = "Refund Deleted.";
                NewNotification.Description = string.Format("{0} refund has been deleted.", StockItem.Name);

                StringBuilder DeletedEmail = new StringBuilder();

                DeletedEmail.AppendLine("Refund with the below details has been deleted.");
                DeletedEmail.AppendLine(Environment.NewLine);
                DeletedEmail.AppendLine("Stock ID:" + StockItem.Stockid);
                DeletedEmail.AppendLine("Stock Name:" + StockItem.Name);
                DeletedEmail.AppendLine(Environment.NewLine);
                DeletedEmail.AppendLine("Refund Reason: " + Description);
                DeletedEmail.AppendLine("Refund Amount: " + Amount);

                NewNotification.EmailBody = DeletedEmail.ToString();

                break;
            }
        }
Exemple #28
0
        public void CreateNotification(EventActionType eventActionType)
        {
            switch (eventActionType)
            {
            case EventActionType.Created:

                NewNotification.Name        = "New Purchase Created.";
                NewNotification.Description = string.Format("{0} - has been created as a purchase.", Title);

                StringBuilder CreatedEmail = new StringBuilder();

                CreatedEmail.AppendLine("A New purchase has been created with the below details");
                CreatedEmail.AppendLine(Environment.NewLine);
                CreatedEmail.AppendLine("Name: " + Title);
                CreatedEmail.AppendLine("Description: " + Description);
                CreatedEmail.AppendLine("Purchase Price: £" + Amount);
                CreatedEmail.AppendLine("Postage Price: £" + Postage);
                CreatedEmail.AppendLine("Total Price: £" + TotalValue);

                NewNotification.EmailBody = CreatedEmail.ToString();

                break;

            case EventActionType.Updated:

                NewNotification.Name        = "Purchase Updated.";
                NewNotification.Description = string.Format("{0} - purchase has been updated.", Title);

                StringBuilder UpdatedEmail = new StringBuilder();

                UpdatedEmail.AppendLine("Purchase has been updated with the below details");
                UpdatedEmail.AppendLine(Environment.NewLine);
                UpdatedEmail.AppendLine("Name: " + Title);
                UpdatedEmail.AppendLine("Description: " + Description);
                UpdatedEmail.AppendLine("Purchase Price: £" + Amount);
                UpdatedEmail.AppendLine("Postage Price: £" + Postage);
                UpdatedEmail.AppendLine("Total Price: £" + TotalValue);

                NewNotification.EmailBody = UpdatedEmail.ToString();

                break;

            case EventActionType.Deleted:

                NewNotification.Name        = "Purchase Deleted.";
                NewNotification.Description = string.Format("{0} - purchase has been deleted.", Title);

                StringBuilder DeletedEmail = new StringBuilder();

                DeletedEmail.AppendLine("Purchase with the below details has been deleted.");
                DeletedEmail.AppendLine(Environment.NewLine);
                DeletedEmail.AppendLine("Name: " + Title);
                DeletedEmail.AppendLine("Description: " + Description);
                DeletedEmail.AppendLine("Purchase Price: £" + Amount);
                DeletedEmail.AppendLine("Postage Price: £" + Postage);
                DeletedEmail.AppendLine("Total Price: £" + TotalValue);

                NewNotification.EmailBody = DeletedEmail.ToString();

                break;
            }
        }
Exemple #29
0
 public EventContainer(MapInstance mapInstance, EventActionType eventActionType, object param)
 {
     MapInstance     = mapInstance;
     EventActionType = eventActionType;
     Parameter       = param;
 }
 //use when you want to stop a 2D OR 3D sound
 public SoundEventData(string id, object sender, EventActionType eventType,
                       EventCategoryType eventCategoryType, string cueName, AudioStopOptions audioStopOptions)
     : this(id, sender, eventType, eventCategoryType, cueName, audioStopOptions, null)
 {
 }