Ejemplo n.º 1
0
 private void HandleDoubleClick(object sender, EventArgs e)
 {
     if (initialRow >= 0 && initialRow < Rows.Count && (buttons & MouseButtons.Left) == MouseButtons.Left)
     {
         Item x = ((ItemView)Rows[initialRow].DataBoundItem).Item;
         if (x != null)
         {
             if (initialColumn >= 0 && initialColumn < Columns.Count && Columns[initialColumn].Name == "Name")
             {
                 if (initialSelected)
                 {
                     EndEdit();
                 }
             }
             if (initialColumn >= 0 && initialColumn < Columns.Count && Columns[initialColumn].Name == "Style")
             {
                 MainModel.EditStyle(x);
             }
             else
             {
                 MainModel.Edit(x);
             }
         }
     }
 }
Ejemplo n.º 2
0
            public override void OnClick(SourceGrid2.PositionEventArgs e)
            {
                base.OnClick(e);
                StackGrid      g  = (StackGrid)e.Grid;
                SourceLocation sl = (SourceLocation)(g[e.Position.Row, 0].Tag);

                Model.Edit(sl);
            }