private void FindDefaultValue()
 {
     if (this._properties.Count == this._yMax * this._xMax)
     {
         Dictionary <string, int> dictionary = new Dictionary <string, int>();
         Stopwatch stopwatch = new Stopwatch();
         stopwatch.Start();
         foreach (CellTable.Props current in this._properties.Values)
         {
             string hash = current.Hash;
             if (dictionary.ContainsKey(hash))
             {
                 Dictionary <string, int> dictionary2;
                 string key;
                 (dictionary2 = dictionary)[key = hash] = dictionary2[key] + 1;
             }
             else
             {
                 dictionary[hash] = 0;
             }
         }
         stopwatch.Stop();
         int num = 0;
         foreach (KeyValuePair <string, int> current2 in dictionary)
         {
             if (current2.Value > num)
             {
                 this._defaultHash = current2.Key;
                 num = current2.Value;
             }
         }
         this._defaultValue = this.PropsByHash(this._defaultHash);
     }
 }
 public string GetHash(int x, int y)
 {
     CellTable.Props props = this.Get(x, y);
     if (props == null)
     {
         return(null);
     }
     return(props.Hash);
 }
            internal void Set(int x, int y, CellTable.Props props)
            {
                if (props == null)
                {
                    throw new Exception("PropCache doesn't accept null");
                }
                int num = this.Position(x, y);

                CellTable.Props props2 = this._array[num];
                bool            flag   = props2 != null;

                if (flag)
                {
                    this._values.Remove(props2);
                }
                else
                {
                    this._count++;
                }
                this._values.Add(props);
                this._array[num] = props;
            }
        internal void Process()
        {
            Stopwatch stopwatch = new Stopwatch();

            this.PrepareXMax();
            this.PrepareYMax();
            this.PrepareGantt();
            this._colors     = new object[this._yMax];
            this._firstLine  = new Dictionary <int, string>();
            this._properties = new CellTable.PropCache(this._xMax, this._yMax);
            for (int i = 0; i < this._yMax; i++)
            {
                this._colors[i] = new string[this._xMax];
                for (int j = 0; j < this._xMax; j++)
                {
                    CellTable.Cell  cell  = this.GetCell(j, i);
                    CellTable.Props props = new CellTable.Props(j, i);
                    if (!string.IsNullOrEmpty(cell.InnerHtml))
                    {
                        props["html"] = cell.InnerHtml;
                    }
                    if (!string.IsNullOrEmpty(cell.CssClass))
                    {
                        props["cssClass"] = cell.CssClass;
                    }
                    if (!string.IsNullOrEmpty(cell.BackgroundImage))
                    {
                        props["backImage"] = cell.BackgroundImage;
                    }
                    if (!string.IsNullOrEmpty(cell.BackgroundRepeat))
                    {
                        props["backRepeat"] = cell.BackgroundRepeat;
                    }
                    if (!string.IsNullOrEmpty(cell.Color))
                    {
                        props["backColor"] = cell.Color;
                    }
                    props["business"] = (cell.IsBusiness ? 1 : 0);
                    if (props.HasItems)
                    {
                        this._properties.Set(j, i, props);
                        this._dirty = true;
                    }
                    ((string[])this._colors[i])[j] = cell.Color;
                    if (i == 0)
                    {
                        this._firstLine[j] = cell.Color;
                    }
                    else
                    {
                        string a = (this._firstLine[j] == null) ? null : this._firstLine[j].ToUpper();
                        string b = (cell.Color == null) ? null : cell.Color.ToUpper();
                        if (a != b)
                        {
                            this._dirty = true;
                        }
                    }
                }
            }
            stopwatch.Start();
            this.Optimize();
            stopwatch.Stop();
        }