public void Test_08_SmartListControl() { SmartListControl slc = new SmartListControl(); Assert.IsNotNull(slc, "Smart List Control object is NULL!"); slc.Columns.OnNew += new SmartColumnCollectionEventHandler(scc_OnNew); slc.Rows.OnNew +=new SmartRowCollectionEventHandler(Rows_OnNew); SmartColumn sc = new SmartColumn( "email", "Email Address", SmartColumnType.ReadOnly, SmartColumnDataType.Text, 300); Assert.IsNotNull(sc, "Smart Column object is NULL!"); slc.Columns.Add(sc); SmartRow sr = new SmartRow(); Assert.IsNotNull(sr, "Smart Row object is NULL!"); sr.Columns.OnNew +=new SmartColumnValueCollectionEventHandler(Columns_OnNew); SmartColumnValue sv = new SmartColumnValue("email", "*****@*****.**"); Assert.IsNotNull(sv, "Smart Column Value object is NULL!"); sr.Columns.Add(sv); slc.Rows.Add(sr); Assert.IsTrue(slc.Rows[0].Columns["email"].ColumnValue.ToString() == "*****@*****.**", "Email Address does not match !!"); }
/// <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( NewGetMembers ) ); this.btnCancel = new System.Windows.Forms.Button( ); this.m_imgSmall = new System.Windows.Forms.ImageList( this.components ); this.label1 = new System.Windows.Forms.Label( ); this.btnAddress = new System.Windows.Forms.Button( ); this.m_menu = new System.Windows.Forms.ContextMenu( ); this.menuItem1 = new System.Windows.Forms.MenuItem( ); this.menuItem2 = new System.Windows.Forms.MenuItem( ); this.menuItem3 = new System.Windows.Forms.MenuItem( ); this.pbMain = new System.Windows.Forms.ProgressBar( ); this.label2 = new System.Windows.Forms.Label( ); this.m_cbRoles = new System.Windows.Forms.ComboBox( ); this.label3 = new System.Windows.Forms.Label( ); this.btnRemove = new System.Windows.Forms.Button( ); this.btnOK = new System.Windows.Forms.Button( ); this.picInvalid = new System.Windows.Forms.PictureBox( ); this.labInvalid = new System.Windows.Forms.Label( ); this.m_listView = new Workshare.Common.Controls.SmartListControl( ); ( ( System.ComponentModel.ISupportInitialize )( this.picInvalid ) ).BeginInit( ); this.SuspendLayout( ); // // btnCancel // this.btnCancel.BackColor = System.Drawing.SystemColors.Control; this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.btnCancel.Font = new System.Drawing.Font( "Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ( ( byte )( 0 ) ) ); this.btnCancel.ForeColor = System.Drawing.SystemColors.ControlText; this.btnCancel.Location = new System.Drawing.Point( 488, 352 ); this.btnCancel.Name = "btnCancel"; this.btnCancel.Size = new System.Drawing.Size( 88, 24 ); this.btnCancel.TabIndex = 5; this.btnCancel.Text = "Cancel"; this.btnCancel.UseVisualStyleBackColor = false; // // m_imgSmall // this.m_imgSmall.ImageStream = ( ( System.Windows.Forms.ImageListStreamer )( resources.GetObject( "m_imgSmall.ImageStream" ) ) ); this.m_imgSmall.TransparentColor = System.Drawing.Color.Transparent; this.m_imgSmall.Images.SetKeyName( 0, "" ); this.m_imgSmall.Images.SetKeyName( 1, "" ); // // label1 // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Location = new System.Drawing.Point( 200, 16 ); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size( 368, 16 ); this.label1.TabIndex = 1; this.label1.Text = "Members who have access to the target document library."; // // btnAddress // this.btnAddress.BackColor = System.Drawing.SystemColors.Control; this.btnAddress.Font = new System.Drawing.Font( "Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ( ( byte )( 0 ) ) ); this.btnAddress.ForeColor = System.Drawing.SystemColors.ControlText; this.btnAddress.Location = new System.Drawing.Point( 200, 305 ); this.btnAddress.Name = "btnAddress"; this.btnAddress.Size = new System.Drawing.Size( 88, 24 ); this.btnAddress.TabIndex = 2; this.btnAddress.Text = "Add..."; this.btnAddress.UseVisualStyleBackColor = false; this.btnAddress.Click += new System.EventHandler( this.OnAddress ); // // m_menu // this.m_menu.MenuItems.AddRange( new System.Windows.Forms.MenuItem[ ] { this.menuItem1, this.menuItem2, this.menuItem3} ); // // menuItem1 // this.menuItem1.Enabled = false; this.menuItem1.Index = 0; this.menuItem1.Text = "&Remove"; this.menuItem1.Click += new System.EventHandler( this.OnRemove ); // // menuItem2 // this.menuItem2.Index = 1; this.menuItem2.Text = "-"; // // menuItem3 // this.menuItem3.Enabled = false; this.menuItem3.Index = 2; this.menuItem3.Text = "&Properties"; this.menuItem3.Click += new System.EventHandler( this.OnShowProperty ); // // pbMain // this.pbMain.Location = new System.Drawing.Point( 172, 356 ); this.pbMain.Name = "pbMain"; this.pbMain.Size = new System.Drawing.Size( 216, 16 ); this.pbMain.TabIndex = 4; this.pbMain.Visible = false; // // label2 // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Location = new System.Drawing.Point( 12, 356 ); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size( 152, 16 ); this.label2.TabIndex = 5; this.label2.Text = "Processing Email Addresses:"; this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.label2.Visible = false; // // m_cbRoles // this.m_cbRoles.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.m_cbRoles.Location = new System.Drawing.Point( 280, 40 ); this.m_cbRoles.Name = "m_cbRoles"; this.m_cbRoles.Size = new System.Drawing.Size( 121, 21 ); this.m_cbRoles.Sorted = true; this.m_cbRoles.TabIndex = 0; this.m_cbRoles.SelectedIndexChanged += new System.EventHandler( this.OnDefaultChange ); // // label3 // this.label3.BackColor = System.Drawing.Color.Transparent; this.label3.Location = new System.Drawing.Point( 200, 40 ); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size( 72, 16 ); this.label3.TabIndex = 6; this.label3.Text = "Default Role:"; this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // btnClearAll // this.btnRemove.BackColor = System.Drawing.SystemColors.Control; this.btnRemove.Font = new System.Drawing.Font( "Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ( ( byte )( 0 ) ) ); this.btnRemove.ForeColor = System.Drawing.SystemColors.ControlText; this.btnRemove.Location = new System.Drawing.Point( 294, 305 ); this.btnRemove.Name = "btnClearAll"; this.btnRemove.Size = new System.Drawing.Size( 88, 23 ); this.btnRemove.TabIndex = 7; this.btnRemove.Text = "Remove"; this.btnRemove.UseVisualStyleBackColor = false; this.btnRemove.Click += new System.EventHandler( this.OnRemoveBtnClicked ); // // btnOK // this.btnOK.BackColor = System.Drawing.SystemColors.Control; this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK; this.btnOK.Font = new System.Drawing.Font( "Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ( ( byte )( 0 ) ) ); this.btnOK.ForeColor = System.Drawing.SystemColors.ControlText; this.btnOK.Location = new System.Drawing.Point( 394, 352 ); this.btnOK.Name = "btnOK"; this.btnOK.Size = new System.Drawing.Size( 88, 24 ); this.btnOK.TabIndex = 8; this.btnOK.Text = "OK"; this.btnOK.UseVisualStyleBackColor = false; // // picInvalid // this.picInvalid.BackColor = System.Drawing.Color.Transparent; this.picInvalid.Image = ( ( System.Drawing.Image )( resources.GetObject( "picInvalid.Image" ) ) ); this.picInvalid.Location = new System.Drawing.Point( 6, 352 ); this.picInvalid.Name = "picInvalid"; this.picInvalid.Size = new System.Drawing.Size( 16, 24 ); this.picInvalid.TabIndex = 9; this.picInvalid.TabStop = false; this.picInvalid.Visible = false; // // labInvalid // this.labInvalid.BackColor = System.Drawing.Color.Transparent; this.labInvalid.Location = new System.Drawing.Point( 36, 352 ); this.labInvalid.Name = "labInvalid"; this.labInvalid.Size = new System.Drawing.Size( 352, 30 ); this.labInvalid.TabIndex = 10; this.labInvalid.Visible = false; // // m_listView // this.m_listView.ContextMenu = this.m_menu; this.m_listView.ImageList = this.m_imgSmall; this.m_listView.Location = new System.Drawing.Point( 200, 76 ); this.m_listView.Name = "m_listView"; this.m_listView.Size = new System.Drawing.Size( 376, 214 ); this.m_listView.TabIndex = 3; // // NewGetMembers // this.AutoScaleBaseSize = new System.Drawing.Size( 5, 13 ); this.BackgroundImage = ( ( System.Drawing.Image )( resources.GetObject( "$this.BackgroundImage" ) ) ); this.ClientSize = new System.Drawing.Size( 588, 392 ); this.Controls.Add( this.labInvalid ); this.Controls.Add( this.picInvalid ); this.Controls.Add( this.btnOK ); this.Controls.Add( this.btnRemove ); this.Controls.Add( this.label3 ); this.Controls.Add( this.m_cbRoles ); this.Controls.Add( this.label2 ); this.Controls.Add( this.pbMain ); this.Controls.Add( this.m_listView ); this.Controls.Add( this.btnAddress ); this.Controls.Add( this.label1 ); this.Controls.Add( this.btnCancel ); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.Name = "NewGetMembers"; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "NewGetMembers"; this.Load += new System.EventHandler( this.OnLoad ); ( ( System.ComponentModel.ISupportInitialize )( this.picInvalid ) ).EndInit( ); this.ResumeLayout( false ); }