Beispiel #1
0
        protected void OnCanvasEvent(object obj, CanvasEventArgs args)
        {
            Gdk.EventButton ev = new Gdk.EventButton(args.Event.Handle);
            if (args.Event.Type == Gdk.EventType.EnterNotify)
            {
                WidthUnits = extraWidth;
            }
            if (args.Event.Type == Gdk.EventType.LeaveNotify)
            {
                if (!Selected)
                {
                    WidthUnits = normalWidth;
                }
            }
            if (ev.Type == Gdk.EventType.TwoButtonPress)
            {
                ReadonlyTaskInfoDialog dialog = new ReadonlyTaskInfoDialog(Task);
                dialog.Run();
                dialog.Destroy();
            }
            else if (ev.Type == Gdk.EventType.ButtonPress)
            {
                switch (ev.Button)
                {
                case 1:
                    Selected = !Selected;
                    break;

                case 2:
                    ChangePriority();
                    break;

                default:
                    break;
                }
            }
        }
 protected void OnCanvasEvent(object obj, CanvasEventArgs args)
 {
     Gdk.EventButton ev = new Gdk.EventButton (args.Event.Handle);
     if (args.Event.Type == Gdk.EventType.EnterNotify)
         WidthUnits = extraWidth;
     if (args.Event.Type == Gdk.EventType.LeaveNotify)
         if (!Selected)
             WidthUnits = normalWidth;
     if (ev.Type == Gdk.EventType.TwoButtonPress)
     {
         ReadonlyTaskInfoDialog dialog = new ReadonlyTaskInfoDialog (Task);
         dialog.Run ();
         dialog.Destroy ();
     }
     else if (ev.Type == Gdk.EventType.ButtonPress)
     {
         switch (ev.Button)
         {
             case 1:
                 Selected = !Selected;
                 break;
             case 2:
                 ChangePriority ();
                 break;
             default:
                 break;
         }
     }
 }