Ejemplo n.º 1
0
        private void OnSalesQuoteClick(object sender, OpenLinkEventArgs e)
        {
            e.Handled = true;
            if (simpleLabelItemSalesQuoteAuthor.Text == " " && simpleLabelItemSalesQuoteValue.Text == " ")
            {
                using (var form = new FormQuotes(SlideContainer.DashboardInfo.CoverLists.Quotes))
                {
                    if (form.ShowDialog() != DialogResult.OK)
                    {
                        return;
                    }
                    if (form.SelectedQuote == null)
                    {
                        return;
                    }

                    simpleLabelItemSalesQuoteAuthor.CustomizationFormText = form.SelectedQuote.Author;
                    simpleLabelItemSalesQuoteValue.CustomizationFormText  = "\"" + form.SelectedQuote.Text + "\"";
                    simpleLabelItemSalesQuoteAuthor.Text         = String.Format("<size=+2><b>{0}</b></size>", form.SelectedQuote.Author);
                    simpleLabelItemSalesQuoteValue.Text          = String.Format("<size=+1><b><i>{0}</i></b></size>", "\"" + form.SelectedQuote.Text + "\"");
                    emptySpaceItemSalesQuoteDefault.Visibility   = LayoutVisibility.Never;
                    layoutControlGroupSalesQuoteValue.Visibility = LayoutVisibility.Always;
                    hyperLinkEditResetProductName.Text           = String.Format("<size=+2><color=red><i><u>{0}</u></i></color></size>", "Remove Sales Quote");
                }
            }
            else
            {
                simpleLabelItemSalesQuoteAuthor.CustomizationFormText = " ";
                simpleLabelItemSalesQuoteValue.CustomizationFormText  = " ";
                simpleLabelItemSalesQuoteAuthor.Text         = " ";
                simpleLabelItemSalesQuoteValue.Text          = " ";
                layoutControlGroupSalesQuoteValue.Visibility = LayoutVisibility.Never;
                emptySpaceItemSalesQuoteDefault.Visibility   = LayoutVisibility.Always;
                hyperLinkEditResetProductName.Text           = String.Format("<size=+2><color={1}><i><u>{0}</u></i></color></size>", "Add Sales Quote",
                                                                             SlideContainer.AccentColor.HasValue
                                                ? SlideContainer.AccentColor.Value.ToHex()
                                                : "blue");
            }

            OnEditValueChanged(sender, e);
        }
Ejemplo n.º 2
0
		private void buttonXSalesQuote_Click(object sender, EventArgs e)
		{
			if (textEditSalesQuoteAuthor.EditValue == null && memoEditSalesQuote.EditValue == null)
			{
				using (var form = new FormQuotes(SlideContainer.DashboardInfo.CoverLists.Quotes))
				{
					if (form.ShowDialog() != DialogResult.OK) return;
					if (form.SelectedQuote == null) return;

					textEditSalesQuoteAuthor.EditValue = form.SelectedQuote.Author;
					memoEditSalesQuote.EditValue = "\"" + form.SelectedQuote.Text + "\"";
					textEditSalesQuoteAuthor.Visible = true;
					memoEditSalesQuote.Visible = true;
					laSalesQuotesHint.Visible = false;

					buttonXSalesQuote.Image = null;
					buttonXSalesQuote.Text = "Remove";
				}
			}
			else
			{
				textEditSalesQuoteAuthor.EditValue = null;
				memoEditSalesQuote.EditValue = null;
				textEditSalesQuoteAuthor.Visible = false;
				memoEditSalesQuote.Visible = false;
				laSalesQuotesHint.Visible = true;

				buttonXSalesQuote.Image = Resources.SalesQuotes;
				buttonXSalesQuote.Text = String.Empty;
			}
			SlideContainer.RaiseDataChanged();
		}