Ejemplo n.º 1
0
			/// <summary>
			/// 
			/// </summary>
			/// <param name="sender"></param>
			/// <param name="e"></param>
			private void columnTable_SelectionChanged(object sender, SelectionEventArgs e)
			{
				if (e.OldSelectedIndicies.Length > 0)
				{
					if (this.widthTextBox.Text.Length == 0)
					{
						this.columnTable.TableModel[e.OldSelectedIndicies[0], 0].Tag = Column.MinimumWidth;
					}
					else
					{
						int width = Convert.ToInt32(this.widthTextBox.Text);

						if (width < Column.MinimumWidth)
						{
							this.columnTable.TableModel[e.OldSelectedIndicies[0], 0].Tag = Column.MinimumWidth;
						}
						else
						{
							this.columnTable.TableModel[e.OldSelectedIndicies[0], 0].Tag = width;
						}
					}
				}
				
				if (e.NewSelectedIndicies.Length > 0)
				{
					this.showButton.Enabled = !this.columnTable.TableModel[e.NewSelectedIndicies[0], 0].Checked;
					this.hideButton.Enabled = this.columnTable.TableModel[e.NewSelectedIndicies[0], 0].Checked;

					this.widthTextBox.Text = this.columnTable.TableModel[e.NewSelectedIndicies[0], 0].Tag.ToString();
				}
				else
				{
					this.showButton.Enabled = false;
					this.hideButton.Enabled = false;

					this.widthTextBox.Text = "0";
				}
			}
Ejemplo n.º 2
0
		/// <summary>
		/// Raises the SelectionChanged event
		/// </summary>
		/// <param name="e">A SelectionEventArgs that contains the event data</param>
		protected virtual void OnSelectionChanged(SelectionEventArgs e)
		{
			if (this.CanRaiseEvents)
			{
				if (this.Table != null)
				{
					this.Table.OnSelectionChanged(e);
				}
				
				if (SelectionChanged != null)
				{
					SelectionChanged(this, e);
				}
			}
		}