private void Drawable_MouseUp(object sender, MouseEventArgs e) { if (!_moveSeparator && e.Location.X >= _separatorPos && _selectedCell != null && _selectedCell.Editable && !_skipEdit) { var action = new Action(() => { if (Global.IsGtk && !_selectedCell.HasDialog) { pixel1.RemoveAll(); pixel1 = new PixelLayout(); pixel1.Add(drawable, 0, 0); _selectedCell.Edit(pixel1); Content = pixel1; } else { _selectedCell.Edit(pixel1); } drawable.Invalidate(); }); #if WINDOWS (drawable.ControlObject as System.Windows.Controls.Canvas).Dispatcher.BeginInvoke(action, System.Windows.Threading.DispatcherPriority.ContextIdle, null); #else action.Invoke(); #endif } else { _moveSeparator = false; } }
private void Drawable_MouseDoubleClick(object sender, MouseEventArgs e) { if (e.Location.X >= _separatorPos && _selectedCell != null && _selectedCell.Editable) { var action = new Action(() => _selectedCell.Edit(pixel1)); #if WINDOWS (drawable.ControlObject as System.Windows.Controls.Canvas).Dispatcher.BeginInvoke(action, System.Windows.Threading.DispatcherPriority.ContextIdle, null); #else action.Invoke(); #endif } }