Page 1 of 1

JiwaBadge

PostPosted: Wed Jul 09, 2014 3:56 pm
by perry
Can you provide a sample plugin to use JiwaBadge in Quoting please?

Color, font, width and position, for example, it will be in front of SalesOrderBadge but after ClosedJiwaBadge

Re: JiwaBadge  Topic is solved

PostPosted: Thu Jul 10, 2014 2:56 pm
by Mike.Sheen
perry wrote:Can you provide a sample plugin to use JiwaBadge in Quoting please?

Color, font, width and position, for example, it will be in front of SalesOrderBadge but after ClosedJiwaBadge


Hi Perry,

The attached plugin adds a badge to the sales quotes form - the code which does the actual work is also pasted below. The colour is determined by the Appearance.BackColor and Appearance.ForeColor properties. The location, size and text (caption) are the same as a normal windows control.

Code: Select all
Public Sub Setup(ByVal JiwaForm As JiwaApplication.IJiwaForm, ByVal Plugin As JiwaApplication.Plugin.Plugin) Implements JiwaApplication.IJiwaFormPlugin.Setup
                Dim quoteForm As JiwaSalesUI.SalesQuote.SalesQuoteEntryForm = DirectCast(JiwaForm, JiwaSalesUI.SalesQuote.SalesQuoteEntryForm)         
      Dim SampleJiwaBadge As New JiwaFinancials.Jiwa.JiwaApplication.Controls.JiwaBadge
      quoteForm.Panel1.Controls.Add(SampleJiwaBadge)

      Dim BadgeAppearance As Infragistics.Win.Appearance = New Infragistics.Win.Appearance()

      BadgeAppearance.BackColor = System.Drawing.Color.Red
      BadgeAppearance.ForeColor = System.Drawing.Color.White
      BadgeAppearance.TextHAlignAsString = "Center"
      BadgeAppearance.TextVAlignAsString = "Middle"

      SampleJiwaBadge.Appearance = BadgeAppearance
      SampleJiwaBadge.ArcWidth = 20
      SampleJiwaBadge.Dock = System.Windows.Forms.DockStyle.Left
      SampleJiwaBadge.Font = New System.Drawing.Font("Arial", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
      SampleJiwaBadge.Location = New System.Drawing.Point(quoteForm.ClosedJiwaBadge.left + quoteForm.ClosedJiwaBadge.Width + 10, 0)
      SampleJiwaBadge.Name = "SampleJiwaBadge"
      SampleJiwaBadge.Size = New System.Drawing.Size(62, 20)
      SampleJiwaBadge.TabIndex = 26
      SampleJiwaBadge.Text = "Sample"
      SampleJiwaBadge.Visible = True
End Sub


Sample Jiwa Badge.rar
Sample Plugin to add a badge to sales quotes
(4.43 KiB) Downloaded 163 times


Mike

Re: JiwaBadge

PostPosted: Fri Jul 11, 2014 4:02 pm
by perry
Thanks