예제 #1
0
		public bool Equals(Token other)
		{
			//Check whether the compared object is null. 
			if (ReferenceEquals(other, null)) return false;

			//Check whether the compared object references the same data. 
			if (ReferenceEquals(this, other)) return true;

			//Check whether the products' properties are equal. 
			return Value.Equals(other.Value) && ColIndex.Equals(other.ColIndex) && RowIndex.Equals(other.RowIndex) && Type.Equals(other.Type);
		}
예제 #2
0
        protected override void OnUpdateColumn(out FrameworkElement oldElement)
        {
            var outlineWrappers = (spreadsheet.ActiveSheet as WorksheetImpl).OutlineWrappers;

            foreach (var item in outlineWrappers)
            {
                if (RowIndex.Equals(item.FirstIndex - 1))
                {
                    this.CellItemTemplate = spreadsheet.Resources["CellTemplateKey"] as DataTemplate;
                    //this.CellEditTemplate = Application.Current.Resources["CellTemplateKey"] as DataTemplate;
                }
            }
            base.OnUpdateColumn(out oldElement);
        }
        protected override void OnUpdateColumn(out FrameworkElement oldElement)
        {
            var outlineWrappers = (spreadsheet.ActiveSheet as WorksheetImpl).OutlineWrappers;

            foreach (var item in outlineWrappers)
            {
                if (RowIndex.Equals(item.FirstIndex - 1))
                {
                    foreach (var window in System.Windows.Application.Current.Windows)
                    {
                        if (window != null && window is ChromelessWindow)
                        {
                            this.CellItemTemplate = (window as ChromelessWindow).Resources["CellTemplateKey"] as DataTemplate;
                        }
                    }
                }
            }
            base.OnUpdateColumn(out oldElement);
        }