コード例 #1
0
ファイル: AdvancedList.cs プロジェクト: north0808/haina
 private void OnTimerTick(object sender, EventArgs e)
 {
     try
     {
         this.m_Timer.Enabled = false;
         Point mousePosition = this.m_MousePosition;
         string str = this.CheckForTooltip(mousePosition);
         if (str != null)
         {
             if (this.m_ToolTip == null)
             {
                 this.m_ToolTip = new Resco.Controls.AdvancedList.ToolTip();
                 base.Controls.Add(this.m_ToolTip);
             }
             this.m_ToolTip.Text = str;
             this.m_ToolTip.Show(mousePosition);
             this.m_bShowingToolTip = true;
         }
         else
         {
             this.HandleContextMenu(null, this.m_MousePosition);
         }
     }
     catch (ObjectDisposedException)
     {
     }
 }
コード例 #2
0
ファイル: AdvancedList.cs プロジェクト: north0808/haina
 public AdvancedList()
 {
     this.OnChangeHandler = new OnChangeDelegate(this.OnChangeSafe);
     this.OnRowRemovedHandler = new OnRowRemovedDelegate(this.OnRowRemovedSafe);
     this.m_templateIndex = 0;
     this.m_selectedTemplateIndex = 0;
     this.m_activeTemplateIndex = -1;
     this.m_alternateTemplateIndex = -1;
     this.m_dbConnector = new Resco.Controls.AdvancedList.DataConnector();
     this.m_connector = this.m_dbConnector;
     this.m_rcRows = new RowCollection(this);
     this.m_rcRows.Changed += new GridEventHandler(this.OnChange);
     this.m_tsCurrent = new TemplateSet();
     this.m_tsCurrent.Parent = this;
     this.m_tsCurrent.Changed += new GridEventHandler(this.OnChange);
     BackBufferManager.AddRef();
     this.m_colorKey = Color.FromArgb(0xff, 0, 0xff);
     this.m_brushKey = new SolidBrush(this.m_colorKey);
     this.m_imgAttr = new ImageAttributes();
     this.m_imgAttr.SetColorKey(this.m_colorKey, this.m_colorKey);
     base.BackColor = SystemColors.ControlDark;
     this.m_BackColor = new SolidBrush(this.BackColor);
     this.m_vScrollWidth = 0;
     this.m_iScrollWidth = 13;
     this.ButtonClick = null;
     this.LinkClick = null;
     this.CellClick = null;
     this.RowSelect = null;
     this.HeaderClick = null;
     this.ActiveRowChanged = null;
     this.Scroll = null;
     this.m_rHeader = new Resco.Controls.AdvancedList.HeaderRow();
     this.m_rHeader.Parent = this.m_rcRows;
     this.m_rFooter = new Resco.Controls.AdvancedList.HeaderRow();
     this.m_rFooter.Parent = this.m_rcRows;
     this.m_iActualRowIndex = 0;
     this.m_iTopmostRowOffset = 0;
     this.m_iDocumentHeight = 0;
     this.m_iExpectedRows = -1;
     this.m_iVScrollPrevValue = 0;
     this.m_toolTipType = Resco.Controls.AdvancedList.ToolTipType.Triangle;
     using (Graphics graphics = base.CreateGraphics())
     {
         TooltipWidth = (int) (DefaultTooltipWidth * (graphics.DpiX / 96f));
         point1 = new Point(0, 0);
         point2 = new Point(0, -TooltipWidth);
         point3 = new Point(-TooltipWidth, 0);
         this.m_ToolTip = null;
         this.m_scaleFactorY = graphics.DpiY / 96f;
     }
     this.m_Timer = new Timer();
     this.m_Timer.Enabled = false;
     this.m_Timer.Interval = 500;
     this.m_Timer.Tick += new EventHandler(this.OnTimerTick);
     this.m_bShowingToolTip = false;
     this.m_iSelectedCellIndex = -1;
     this.m_TouchScrollingTimer = new Timer();
     this.m_TouchScrollingTimer.Enabled = false;
     this.m_TouchScrollingTimer.Interval = 50;
     this.m_TouchScrollingTimer.Tick += new EventHandler(this.OnTouchScrollingTimerTick);
     this.m_bStartingTouchScroll = false;
     this.m_bEnableTouchScrolling = false;
     this.m_TouchAutoScrollDiff = 0;
     this.m_touchSensitivity = 8;
     this.m_touchScrollDirection = Resco.Controls.AdvancedList.TouchScrollDirection.Inverse;
     this.m_nRowsLoaded = 0;
     this.m_nRowsInserted = 0;
     this.m_bFocusOnClick = false;
     this.m_gradientBackColor = new GradientColor(FillDirection.Horizontal);
     this.m_gradientBackColor.PropertyChanged += new EventHandler(this.m_gradientBackColor_PropertyChanged);
 }