private Attachment CreateHelpCard(string text) { // TODO: replace with MeetingPurpose var purposes = new List <CardAction>(); var listOfPurposes = MeetingPurpose.GetPurposes(); foreach (var p in listOfPurposes) { purposes.Add(new CardAction("imBack", p, value: p)); } var card = new HeroCard //ThumbnailCard { Title = $"Hi there! :)", Subtitle = $" I'm Yoda and I'm here to help ", Text = "What would you like to know?", Buttons = new List <CardAction>() { new CardAction("imBack", UserMessage.FirstMessage, value: UserMessage.FirstMessage), new CardAction("imBack", UserMessage.ThirdMessage, value: UserMessage.ThirdMessage), new CardAction("imBack", UserMessage.FourthMessage, value: UserMessage.FourthMessage) } }; // Create the attachment. Attachment attachment = new Attachment() { ContentType = HeroCard.ContentType, Content = card }; return(attachment); }
// TODO: change this card! private Attachment CreateMeetingFeedbackCard() { // TODO: replace with MeetingPurpose var satisfations = new List <CardAction>(); var satisfationsAsList = MeetingSatisfaction.GetMeetingSatisfactions(); foreach (var s in satisfationsAsList) { satisfations.Add(new CardAction("imBack", s, value: s)); } var card = new HeroCard //ThumbnailCard { Title = $"Looks like the meeting has ended (:", Subtitle = "So how was the meeting?", Buttons = satisfations }; // Create the attachment. Attachment attachment = new Attachment() { ContentType = HeroCard.ContentType, Content = card }; return(attachment); }
private Attachment CreatePurposesCard() { // TODO: replace with MeetingPurpose var purposes = new List <CardAction>(); var listOfPurposes = MeetingPurpose.GetPurposes(); foreach (var p in listOfPurposes) { purposes.Add(new CardAction("imBack", p, value: p)); } var card = new HeroCard //ThumbnailCard { Title = $"What is the purpose of the meeting?", Buttons = purposes }; // Create the attachment. Attachment attachment = new Attachment() { ContentType = HeroCard.ContentType, Content = card }; return(attachment); }
// TODO: change this card! private Attachment CreateTipsForPurposeCard(string purpose) { // TODO: save the purpose var server = ServerMock.GetInstance(); var myContact = server.GetContactByName("shir esh"); Meeting meeting = server.FindNextMeeting(myContact); Contact otherContact = meeting.Attendees.Where(c => c != myContact).FirstOrDefault(); var tips = server.GetTipsAboutPersonForMeeting(meeting, myContact, false); tips = tips.GetRange(2, 2); List <string> tipContents = tips.Select(x => x.Content).ToList(); string concatenedTips = ConcatAllTips(tipContents, ""); var card = new HeroCard //ThumbnailCard { Subtitle = $"Great! For this kind of meeting try to follow these tips:", Text = concatenedTips }; // Create the attachment. Attachment attachment = new Attachment() { ContentType = HeroCard.ContentType, Content = card }; return(attachment); }
private Attachment CreateTipsFeedbackCard(string message) { IServer server = ServerMock.GetInstance(); var myContact = server.GetContactByName("shir esh"); var meeting = server.FindNextMeeting(myContact); string title; string subTitle; if (message == MeetingSatisfaction.VeryGood || message == MeetingSatisfaction.Good) { title = "Good to hear!"; subTitle = "Hope my tips were helpful :)"; } else { title = "it can't be that bad..."; subTitle = "Hope that at least my tips were helpful"; } string tip = " <font size=\"3\" color=\"#6699ff\"> <b> " + server.GetGivenTips(meeting, myContact).FirstOrDefault().Content + "</li> </b> </font> "; string text = "So, What do you think about this tip?" + NewLine() + NewLine() + tip + NewLine(); var card = new HeroCard //ThumbnailCard { Title = title, Subtitle = subTitle, Text = text, Buttons = new List <CardAction>() { new CardAction("imBack", "Great Tip!", value: "Great Tip!"), new CardAction("imBack", "You can do better...", value: "You can do better..."), } }; // Create the attachment. Attachment attachment = new Attachment() { ContentType = HeroCard.ContentType, Content = card }; return(attachment); }