コード例 #1
0
ファイル: AvatarSelector.cs プロジェクト: isabella232/banter
        protected override void OnClicked()
        {
            Menu          popupMenu  = new Menu();
            Menu          recentMenu = new Menu();
            MenuItem      item;
            ImageMenuItem imageItem;

            AvatarMenuItem amItem = new AvatarMenuItem();

            amItem.AvatarSelected += OnAvatarSelected;
            popupMenu.Add(amItem);

            popupMenu.Add(new SeparatorMenuItem());

            item            = new MenuItem("Edit Picture...");
            item.Activated += OnEditPicture;
            popupMenu.Add(item);

            item            = new MenuItem("Clear Recent Pictures");
            item.Activated += OnClearRecentPictures;
            popupMenu.Add(item);

            popupMenu.ShowAll();
            popupMenu.Popup();
        }
コード例 #2
0
ファイル: AvatarSelector.cs プロジェクト: GNOME/banter
        protected override void OnClicked()
        {
            Menu popupMenu = new Menu ();
            Menu recentMenu = new Menu ();
            MenuItem item;
            ImageMenuItem imageItem;

            AvatarMenuItem amItem = new AvatarMenuItem();
            amItem.AvatarSelected += OnAvatarSelected;
            popupMenu.Add(amItem);

            popupMenu.Add (new SeparatorMenuItem ());

            item = new MenuItem("Edit Picture...");
            item.Activated += OnEditPicture;
            popupMenu.Add (item);

            item = new MenuItem("Clear Recent Pictures");
            item.Activated += OnClearRecentPictures;
            popupMenu.Add (item);

            popupMenu.ShowAll();
            popupMenu.Popup ();
        }