/// <summary> /// Returns true if BankingAccount instances are equal /// </summary> /// <param name="other">Instance of BankingAccount to be compared</param> /// <returns>Boolean</returns> public bool Equals(BankingAccount other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( AccountId == other.AccountId || AccountId != null && AccountId.Equals(other.AccountId) ) && ( DisplayName == other.DisplayName || DisplayName != null && DisplayName.Equals(other.DisplayName) ) && ( Nickname == other.Nickname || Nickname != null && Nickname.Equals(other.Nickname) ) && ( MaskedNumber == other.MaskedNumber || MaskedNumber != null && MaskedNumber.Equals(other.MaskedNumber) ) && ( OpenStatus == other.OpenStatus || OpenStatus != null && OpenStatus.Equals(other.OpenStatus) ) && ( IsOwned == other.IsOwned || IsOwned != null && IsOwned.Equals(other.IsOwned) ) && ( ProductCategory == other.ProductCategory || ProductCategory != null && ProductCategory.Equals(other.ProductCategory) ) && ( ProductName == other.ProductName || ProductName != null && ProductName.Equals(other.ProductName) )); }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; // Suitable nullity checks etc, of course :) if (AccountId != null) { hashCode = hashCode * 59 + AccountId.GetHashCode(); } if (DisplayName != null) { hashCode = hashCode * 59 + DisplayName.GetHashCode(); } if (Nickname != null) { hashCode = hashCode * 59 + Nickname.GetHashCode(); } if (MaskedNumber != null) { hashCode = hashCode * 59 + MaskedNumber.GetHashCode(); } if (OpenStatus != null) { hashCode = hashCode * 59 + OpenStatus.GetHashCode(); } if (IsOwned != null) { hashCode = hashCode * 59 + IsOwned.GetHashCode(); } if (ProductCategory != null) { hashCode = hashCode * 59 + ProductCategory.GetHashCode(); } if (ProductName != null) { hashCode = hashCode * 59 + ProductName.GetHashCode(); } return(hashCode); } }
public void GivenAMaskedNumber_WhenInstantiatingIt_ThenItShouldBeValid() { var number = new MaskedNumber(0, "C"); Assert.That(number, Is.Not.Null); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormMesclarCarregarDAV)); this.tabVlrDocto = new System.Windows.Forms.TabPage(); this.mkFinal = new OpenPOS.Desktop.ComponentModel.MaskedNumber(); this.lblIntervaloValorE = new System.Windows.Forms.Label(); this.lblValorIntervalo = new System.Windows.Forms.Label(); this.mkNmInicio = new OpenPOS.Desktop.ComponentModel.MaskedNumber(); this.tabData = new System.Windows.Forms.TabPage(); this.lblIntervalo = new System.Windows.Forms.Label(); this.lblPeriodo = new System.Windows.Forms.Label(); this.dtFinal = new System.Windows.Forms.DateTimePicker(); this.dtInicio = new System.Windows.Forms.DateTimePicker(); this.tabPesquisar = new System.Windows.Forms.TabControl(); this.tabNrDocumento = new System.Windows.Forms.TabPage(); this.label2 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); this.mkTxtFinal = new System.Windows.Forms.MaskedTextBox(); this.mkTxtInicio = new System.Windows.Forms.MaskedTextBox(); this.grpBoxFiltros = new System.Windows.Forms.GroupBox(); this.btnPesquisar = new System.Windows.Forms.Button(); this.treeViewDAV = new System.Windows.Forms.TreeView(); this.btnConfirmar = new System.Windows.Forms.Button(); this.btnCancelar = new System.Windows.Forms.Button(); this.treeViewDAVsSelcionados = new System.Windows.Forms.TreeView(); this.btnRight = new System.Windows.Forms.Button(); this.btnLeft = new System.Windows.Forms.Button(); this.imagelistTreeViews = new System.Windows.Forms.ImageList(this.components); this.tabCliente = new System.Windows.Forms.TabPage(); this.sfCliente = new OpenPOS.Desktop.ComponentModel.SearchField(); this.lblCliente = new System.Windows.Forms.Label(); this.tabVlrDocto.SuspendLayout(); this.tabData.SuspendLayout(); this.tabPesquisar.SuspendLayout(); this.tabNrDocumento.SuspendLayout(); this.grpBoxFiltros.SuspendLayout(); this.tabCliente.SuspendLayout(); this.SuspendLayout(); // // tabVlrDocto // this.tabVlrDocto.Controls.Add(this.mkFinal); this.tabVlrDocto.Controls.Add(this.lblIntervaloValorE); this.tabVlrDocto.Controls.Add(this.lblValorIntervalo); this.tabVlrDocto.Controls.Add(this.mkNmInicio); this.tabVlrDocto.Location = new System.Drawing.Point(4, 25); this.tabVlrDocto.Name = "tabVlrDocto"; this.tabVlrDocto.Padding = new System.Windows.Forms.Padding(3); this.tabVlrDocto.Size = new System.Drawing.Size(857, 46); this.tabVlrDocto.TabIndex = 1; this.tabVlrDocto.Text = "Valor do Documento"; this.tabVlrDocto.UseVisualStyleBackColor = true; // // mkFinal // this.mkFinal.AlwaysLocked = false; this.mkFinal.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.mkFinal.CustomFormat = "{0:0}"; this.mkFinal.Format = OpenPOS.Enuns.Desktop.ComponentModel.MaskedNumberFormat.Valor; this.mkFinal.Location = new System.Drawing.Point(235, 14); this.mkFinal.Name = "mkFinal"; this.mkFinal.NegativeNumbers = true; this.mkFinal.Size = new System.Drawing.Size(100, 22); this.mkFinal.TabIndex = 3; this.mkFinal.Text = "0,00"; this.mkFinal.TextAlign = System.Windows.Forms.HorizontalAlignment.Right; this.mkFinal.Value = 0D; // // lblIntervaloValorE // this.lblIntervaloValorE.AutoSize = true; this.lblIntervaloValorE.Location = new System.Drawing.Point(213, 16); this.lblIntervaloValorE.Name = "lblIntervaloValorE"; this.lblIntervaloValorE.Size = new System.Drawing.Size(16, 16); this.lblIntervaloValorE.TabIndex = 2; this.lblIntervaloValorE.Text = "a"; // // lblValorIntervalo // this.lblValorIntervalo.AutoSize = true; this.lblValorIntervalo.Location = new System.Drawing.Point(6, 16); this.lblValorIntervalo.Name = "lblValorIntervalo"; this.lblValorIntervalo.Size = new System.Drawing.Size(95, 16); this.lblValorIntervalo.TabIndex = 1; this.lblValorIntervalo.Text = "Intervalo entre:"; // // mkNmInicio // this.mkNmInicio.AlwaysLocked = false; this.mkNmInicio.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.mkNmInicio.CustomFormat = "{0:0}"; this.mkNmInicio.Format = OpenPOS.Enuns.Desktop.ComponentModel.MaskedNumberFormat.Valor; this.mkNmInicio.Location = new System.Drawing.Point(107, 14); this.mkNmInicio.Name = "mkNmInicio"; this.mkNmInicio.NegativeNumbers = true; this.mkNmInicio.Size = new System.Drawing.Size(100, 22); this.mkNmInicio.TabIndex = 0; this.mkNmInicio.Text = "0,00"; this.mkNmInicio.TextAlign = System.Windows.Forms.HorizontalAlignment.Right; this.mkNmInicio.Value = 0D; // // tabData // this.tabData.Controls.Add(this.lblIntervalo); this.tabData.Controls.Add(this.lblPeriodo); this.tabData.Controls.Add(this.dtFinal); this.tabData.Controls.Add(this.dtInicio); this.tabData.Location = new System.Drawing.Point(4, 25); this.tabData.Name = "tabData"; this.tabData.Padding = new System.Windows.Forms.Padding(3); this.tabData.Size = new System.Drawing.Size(857, 46); this.tabData.TabIndex = 0; this.tabData.Text = "Período"; this.tabData.UseVisualStyleBackColor = true; // // lblIntervalo // this.lblIntervalo.AutoSize = true; this.lblIntervalo.Location = new System.Drawing.Point(14, 16); this.lblIntervalo.Name = "lblIntervalo"; this.lblIntervalo.Size = new System.Drawing.Size(62, 16); this.lblIntervalo.TabIndex = 3; this.lblIntervalo.Text = "Intervalo:"; // // lblPeriodo // this.lblPeriodo.AutoSize = true; this.lblPeriodo.Location = new System.Drawing.Point(361, 16); this.lblPeriodo.Name = "lblPeriodo"; this.lblPeriodo.Size = new System.Drawing.Size(16, 16); this.lblPeriodo.TabIndex = 2; this.lblPeriodo.Text = "a"; // // dtFinal // this.dtFinal.Location = new System.Drawing.Point(383, 12); this.dtFinal.Name = "dtFinal"; this.dtFinal.Size = new System.Drawing.Size(275, 22); this.dtFinal.TabIndex = 1; // // dtInicio // this.dtInicio.Location = new System.Drawing.Point(82, 12); this.dtInicio.Name = "dtInicio"; this.dtInicio.Size = new System.Drawing.Size(273, 22); this.dtInicio.TabIndex = 0; // // tabPesquisar // this.tabPesquisar.Controls.Add(this.tabData); this.tabPesquisar.Controls.Add(this.tabVlrDocto); this.tabPesquisar.Controls.Add(this.tabNrDocumento); this.tabPesquisar.Controls.Add(this.tabCliente); this.tabPesquisar.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.tabPesquisar.Location = new System.Drawing.Point(11, 21); this.tabPesquisar.Name = "tabPesquisar"; this.tabPesquisar.SelectedIndex = 0; this.tabPesquisar.Size = new System.Drawing.Size(865, 75); this.tabPesquisar.TabIndex = 0; // // tabNrDocumento // this.tabNrDocumento.Controls.Add(this.label2); this.tabNrDocumento.Controls.Add(this.label1); this.tabNrDocumento.Controls.Add(this.mkTxtFinal); this.tabNrDocumento.Controls.Add(this.mkTxtInicio); this.tabNrDocumento.Location = new System.Drawing.Point(4, 25); this.tabNrDocumento.Name = "tabNrDocumento"; this.tabNrDocumento.Padding = new System.Windows.Forms.Padding(3); this.tabNrDocumento.Size = new System.Drawing.Size(857, 46); this.tabNrDocumento.TabIndex = 2; this.tabNrDocumento.Text = "Número do Documento"; this.tabNrDocumento.UseVisualStyleBackColor = true; // // label2 // this.label2.AutoSize = true; this.label2.Location = new System.Drawing.Point(213, 18); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(16, 16); this.label2.TabIndex = 3; this.label2.Text = "a"; // // label1 // this.label1.AutoSize = true; this.label1.Location = new System.Drawing.Point(6, 18); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(95, 16); this.label1.TabIndex = 2; this.label1.Text = "Intervalo entre:"; // // mkTxtFinal // this.mkTxtFinal.Location = new System.Drawing.Point(235, 15); this.mkTxtFinal.Name = "mkTxtFinal"; this.mkTxtFinal.Size = new System.Drawing.Size(100, 22); this.mkTxtFinal.TabIndex = 1; // // mkTxtInicio // this.mkTxtInicio.Location = new System.Drawing.Point(107, 15); this.mkTxtInicio.Name = "mkTxtInicio"; this.mkTxtInicio.Size = new System.Drawing.Size(100, 22); this.mkTxtInicio.TabIndex = 0; // // grpBoxFiltros // this.grpBoxFiltros.Controls.Add(this.btnPesquisar); this.grpBoxFiltros.Controls.Add(this.tabPesquisar); this.grpBoxFiltros.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.grpBoxFiltros.Location = new System.Drawing.Point(12, 79); this.grpBoxFiltros.Name = "grpBoxFiltros"; this.grpBoxFiltros.Size = new System.Drawing.Size(906, 153); this.grpBoxFiltros.TabIndex = 2; this.grpBoxFiltros.TabStop = false; this.grpBoxFiltros.Text = "Filtros"; // // btnPesquisar // this.btnPesquisar.Location = new System.Drawing.Point(775, 109); this.btnPesquisar.Name = "btnPesquisar"; this.btnPesquisar.Size = new System.Drawing.Size(101, 35); this.btnPesquisar.TabIndex = 1; this.btnPesquisar.Text = "Pesquisar"; this.btnPesquisar.UseVisualStyleBackColor = true; this.btnPesquisar.Click += new System.EventHandler(this.btnPesquisar_Click); // // treeViewDAV // this.treeViewDAV.AllowDrop = true; this.treeViewDAV.CheckBoxes = true; this.treeViewDAV.FullRowSelect = true; this.treeViewDAV.HideSelection = false; this.treeViewDAV.Location = new System.Drawing.Point(12, 248); this.treeViewDAV.Name = "treeViewDAV"; this.treeViewDAV.Size = new System.Drawing.Size(422, 247); this.treeViewDAV.TabIndex = 3; this.treeViewDAV.Tag = "DAV\'s "; // // btnConfirmar // this.btnConfirmar.Location = new System.Drawing.Point(705, 515); this.btnConfirmar.Name = "btnConfirmar"; this.btnConfirmar.Size = new System.Drawing.Size(101, 35); this.btnConfirmar.TabIndex = 2; this.btnConfirmar.Text = "Confirmar"; this.btnConfirmar.UseVisualStyleBackColor = true; this.btnConfirmar.Click += new System.EventHandler(this.btnConfirmar_Click); // // btnCancelar // this.btnCancelar.Location = new System.Drawing.Point(812, 515); this.btnCancelar.Name = "btnCancelar"; this.btnCancelar.Size = new System.Drawing.Size(101, 35); this.btnCancelar.TabIndex = 4; this.btnCancelar.Text = "Cancelar"; this.btnCancelar.UseVisualStyleBackColor = true; this.btnCancelar.Click += new System.EventHandler(this.btnCancelar_Click); // // treeViewDAVsSelcionados // this.treeViewDAVsSelcionados.AllowDrop = true; this.treeViewDAVsSelcionados.CheckBoxes = true; this.treeViewDAVsSelcionados.FullRowSelect = true; this.treeViewDAVsSelcionados.HideSelection = false; this.treeViewDAVsSelcionados.Location = new System.Drawing.Point(491, 250); this.treeViewDAVsSelcionados.Name = "treeViewDAVsSelcionados"; this.treeViewDAVsSelcionados.Size = new System.Drawing.Size(422, 245); this.treeViewDAVsSelcionados.TabIndex = 5; this.treeViewDAVsSelcionados.Tag = "DAV\'s Selecionados"; // // btnRight // this.btnRight.BackColor = System.Drawing.Color.Transparent; this.btnRight.BackgroundImage = global::OpenPOS.Desktop.ComponentModel.Properties.Resources.seta_direita; this.btnRight.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; this.btnRight.FlatAppearance.BorderSize = 0; this.btnRight.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnRight.ForeColor = System.Drawing.SystemColors.ControlText; this.btnRight.Location = new System.Drawing.Point(440, 324); this.btnRight.Name = "btnRight"; this.btnRight.Size = new System.Drawing.Size(45, 48); this.btnRight.TabIndex = 6; this.btnRight.UseVisualStyleBackColor = true; this.btnRight.Click += new System.EventHandler(this.btnRight_Click); // // btnLeft // this.btnLeft.BackColor = System.Drawing.Color.Transparent; this.btnLeft.BackgroundImage = global::OpenPOS.Desktop.ComponentModel.Properties.Resources.seta_esquerda; this.btnLeft.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; this.btnLeft.FlatAppearance.BorderSize = 0; this.btnLeft.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnLeft.Location = new System.Drawing.Point(440, 378); this.btnLeft.Name = "btnLeft"; this.btnLeft.Size = new System.Drawing.Size(45, 39); this.btnLeft.TabIndex = 7; this.btnLeft.UseVisualStyleBackColor = false; this.btnLeft.Click += new System.EventHandler(this.btnLeft_Click); // // imagelistTreeViews // this.imagelistTreeViews.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imagelistTreeViews.ImageStream"))); this.imagelistTreeViews.TransparentColor = System.Drawing.Color.Transparent; this.imagelistTreeViews.Images.SetKeyName(0, "cancel18x17.png"); this.imagelistTreeViews.Images.SetKeyName(1, "ok18x17.png"); // // tabCliente // this.tabCliente.BackColor = System.Drawing.SystemColors.Control; this.tabCliente.Controls.Add(this.lblCliente); this.tabCliente.Controls.Add(this.sfCliente); this.tabCliente.Location = new System.Drawing.Point(4, 25); this.tabCliente.Name = "tabCliente"; this.tabCliente.Size = new System.Drawing.Size(857, 46); this.tabCliente.TabIndex = 3; this.tabCliente.Text = "Cliente"; // // sfCliente // this.sfCliente.BackColor = System.Drawing.Color.White; this.sfCliente.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.sfCliente.DataSource = null; this.sfCliente.DontClearMe = false; this.sfCliente.Location = new System.Drawing.Point(3, 22); this.sfCliente.MaxDropDownHeight = 0; this.sfCliente.Name = "sfCliente"; this.sfCliente.Size = new System.Drawing.Size(404, 21); this.sfCliente.TabIndex = 0; // // lblCliente // this.lblCliente.AutoSize = true; this.lblCliente.Location = new System.Drawing.Point(3, 3); this.lblCliente.Name = "lblCliente"; this.lblCliente.Size = new System.Drawing.Size(52, 16); this.lblCliente.TabIndex = 1; this.lblCliente.Text = "Cliente:"; // // FormMesclarCarregarDAV // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(926, 557); this.Controls.Add(this.btnLeft); this.Controls.Add(this.btnRight); this.Controls.Add(this.treeViewDAVsSelcionados); this.Controls.Add(this.btnCancelar); this.Controls.Add(this.btnConfirmar); this.Controls.Add(this.treeViewDAV); this.Controls.Add(this.grpBoxFiltros); this.Name = "FormMesclarCarregarDAV"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "Carregar/Mesclar DAV"; this.tabVlrDocto.ResumeLayout(false); this.tabVlrDocto.PerformLayout(); this.tabData.ResumeLayout(false); this.tabData.PerformLayout(); this.tabPesquisar.ResumeLayout(false); this.tabNrDocumento.ResumeLayout(false); this.tabNrDocumento.PerformLayout(); this.grpBoxFiltros.ResumeLayout(false); this.tabCliente.ResumeLayout(false); this.tabCliente.PerformLayout(); this.ResumeLayout(false); }
public void GivenANumber_ThenItShouldHaveADisplayValueProperty() { var number = new MaskedNumber(10, "C"); Assert.That(number.DisplayValue, Is.EqualTo("C")); }