// Use this for initialization void Start() { feedback = ""; bossQ = FindObjectOfType <BossQuestions> (); fbPanel = FindObjectOfType <FeedbackPanel> (); Health = FindObjectOfType <HealthBar> (); bossHealth = FindObjectOfType <BossHealthBar> (); player = FindObjectOfType <PlayerController> (); clear = FindObjectOfType <GameButtons> (); correctFB = new string[] { "Way to go!", "You rock at this!", "Lookin’ good!", "Wow! I’m impressed!", "Keep at it!", "Good going!", "You were born a winner!", "Victory is yours!", "That was awesome!", "Great Job!", "Knew you could do it", "Great Job!", "You’re so good at this!", "That answer was perfect!" }; wrongFB = new string[] { "That was terrible", "Better luck next time!", "You really went with that answer?", "FAIL" }; }
private void Application_CustomizeTemplate(object sender, CustomizeTemplateEventArgs e) { if (e.Context == TemplateContext.ApplicationWindow) { if (e.Template is IDockManagerHolder) { ((IDockManagerHolder)e.Template).DockManager.TopZIndexControls.Add("DevExpress.DXperience.Demos.XafFeedbackPanelControl"); } FeedbackPanel feedbackPanel = FeedbackHelper.AddFeedbackPanelToXtraFrom(e.Template as XtraForm, (string)ConfigurationManager.AppSettings["FeedbackDescription"]); if (feedbackPanel != null) { feedbackPanel.PostFeedback += (s, args) => { FeedbackHelper.PostFeedbackAsync(new FeedbackObject() { ModuleName = (string)ConfigurationManager.AppSettings["FeedbackDemoName"], Feedback = GetOpenedViews() + args.Feedback, Value = args.Value, Email = string.Empty }); openedViews.Clear(); }; } } }
public FocussedTaskTab(Homework task, HomeworkTabController tabController, Feedback feedback = null) : base() { this.tabController = tabController; this.task = task; this.feedback = feedback; this.Text = this.task.title; this.BorderStyle = BorderStyle.FixedSingle; // Add border // Title label titleLabel = new Label(); titleLabel.AutoSize = true; titleLabel.Font = new Font("Calibri", 18.0f, FontStyle.Bold); titleLabel.Location = new Point(10, 0); titleLabel.Text = task.title; titleLabel.BackColor = Color.Transparent; this.Controls.Add(titleLabel); // Group label groupLabel = new Label(); groupLabel.AutoSize = true; groupLabel.Font = new Font("Calibri", 14.0f); groupLabel.Location = new Point(10, 30); groupLabel.Text = "• Class: " + task.group.name; groupLabel.BackColor = Color.Transparent; this.Controls.Add(groupLabel); // Group subject label groupSubjectLabel = new Label(); groupSubjectLabel.AutoSize = true; groupSubjectLabel.Font = new Font("Calibri", 14.0f, FontStyle.Italic); groupSubjectLabel.Location = new Point(10, 55); groupSubjectLabel.Text = "• Subject: " + task.group.subject; groupSubjectLabel.BackColor = Color.Transparent; this.Controls.Add(groupSubjectLabel); // Due-in label dueInLabel = new Label(); dueInLabel.AutoSize = true; dueInLabel.Font = new Font("Calibri", 18.0f, FontStyle.Underline); dueInLabel.Location = new Point(300, 0); dueInLabel.Text = "Due in: " + task.dateDue.ToString("d MMMM yyyy"); dueInLabel.BackColor = Color.Transparent; this.Controls.Add(dueInLabel); // Task description label taskDescriptionLabel = new Label(); taskDescriptionLabel.AutoSize = true; taskDescriptionLabel.Font = new Font("Calibri", 14.0f); taskDescriptionLabel.Location = new Point(10, 90); taskDescriptionLabel.Text = task.description; taskDescriptionLabel.BackColor = Color.Transparent; taskDescriptionLabel.MaximumSize = new Size(650, 200); this.Controls.Add(taskDescriptionLabel); // Remove tab button removeTab = new RemoveTabButton(this, tabController); removeTab.AutoSize = true; removeTab.Location = new Point(650, 5); this.Controls.Add(removeTab); // Remove tab label removeTabLabel = new Label(); removeTabLabel.Text = "Remove tab"; removeTabLabel.AutoSize = true; removeTabLabel.Location = new Point(638, 69); removeTabLabel.BackColor = Color.Transparent; this.Controls.Add(this.removeTabLabel); if (this.feedback.Exists()) { feedbackPanel = new FeedbackPanel(this.feedback); feedbackPanel.Location = new Point(10, 215); feedbackPanel.Width = tabController.Size.Width; this.Controls.Add(feedbackPanel); } }
private void feedbackToolStripMenuItem_Click(object sender, EventArgs e) { FeedbackPanel.BringToFront(); RatingsPanel.BringToFront(); }