当前位置: 首页>>代码示例>>C#>>正文


C# EventBox.ShowAll方法代码示例

本文整理汇总了C#中EventBox.ShowAll方法的典型用法代码示例。如果您正苦于以下问题:C# EventBox.ShowAll方法的具体用法?C# EventBox.ShowAll怎么用?C# EventBox.ShowAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在EventBox的用法示例。


在下文中一共展示了EventBox.ShowAll方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ChatsPage

        private ChatsPage()
        {
            base.FocusGrabbed += base_FocusGrabbed;

            closePixbuf = new Gdk.Pixbuf(null, "FileFind.Meshwork.GtkClient.smallclose.png");

            tabLabelPages = new Dictionary<Widget, ChatSubpageBase>();

            notebook = new Notebook();
            notebook.TabPos = PositionType.Bottom;
            notebook.SwitchPage += notebook_SwitchPage;
            notebook.PageReordered += notebook_PageReordered;

            ScrolledWindow swindow = new ScrolledWindow();
            swindow.HscrollbarPolicy = PolicyType.Automatic;
            swindow.VscrollbarPolicy = PolicyType.Automatic;
            chatList = new TreeView ();
            swindow.Add(chatList);

            chatTreeStore = new NetworkGroupedTreeStore<ChatRoom>(chatList);
            chatList.Model = chatTreeStore;

            TreeViewColumn column;

            column = chatList.AppendColumn("Room Name", new CellRendererText(), new TreeCellDataFunc (NameDataFunc));
            column.Expand = true;
            column.Sizing = TreeViewColumnSizing.Autosize;

            var pixbufCell = new CellRendererPixbuf();
            column.PackStart(pixbufCell, false);
            column.SetCellDataFunc(pixbufCell, new TreeCellDataFunc(RoomSecureDataFunc));

            column = chatList.AppendColumn("Users", new CellRendererText(), new TreeCellDataFunc (RoomUsersDataFunc));
            column.Sizing = TreeViewColumnSizing.Autosize;

            chatList.RowActivated += chatList_RowActivated;
            chatList.ButtonPressEvent += chatList_ButtonPressEvent;

            EventBox box = new EventBox();
            box.Add(new Label("Chatroom List"));
            box.ButtonPressEvent += HandleTabButtonPressEvent;
            box.ShowAll();
            notebook.AppendPage(swindow, box);

            this.PackStart(notebook, true, true, 0);
            notebook.ShowAll();

            foreach (Network network in Core.Networks) {
                Core_NetworkAdded (network);
            }

            Core.NetworkAdded +=
                (NetworkEventHandler)DispatchService.GuiDispatch(
                    new NetworkEventHandler(Core_NetworkAdded)
                );
        }
开发者ID:codebutler,项目名称:meshwork,代码行数:56,代码来源:ChatsPage.cs

示例2: ScrolledView

        public ScrolledView()
            : base()
        {
            ScrolledWindow = new ScrolledWindow  (null, null);
            this.Put (ScrolledWindow, 0, 0);
            ScrolledWindow.Show ();

            //ebox = new BlendBox ();
            ControlBox = new EventBox ();
            this.Put (ControlBox, 0, 0);
            ControlBox.ShowAll ();

            hide = new DelayedOperation (2000, new GLib.IdleHandler (HideControls));
            this.Destroyed += HandleDestroyed;
        }
开发者ID:Yetangitu,项目名称:f-spot,代码行数:15,代码来源:ScrolledView.cs

示例3: ScrolledView

        public ScrolledView()
            : base()
        {
            scroll = new ScrolledWindow  (null, null);
            this.Put (scroll, 0, 0);
            scroll.Show ();

            //ebox = new BlendBox ();
            ebox = new EventBox ();
            this.Put (ebox, 0, 0);
            ebox.ShowAll ();

            hide = new Delay (2000, new GLib.IdleHandler (HideControls));
            this.Destroyed += HandleDestroyed;
        }
开发者ID:AminBonyadUni,项目名称:facedetect-f-spot,代码行数:15,代码来源:ScrolledView.cs

示例4: Main

        public static void Main(string[] args)
        {
            configpath = System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath) + "/";
            Application.Init();
            win = new MainWindow();
            var eventbox = new EventBox();

            //win.ExposeEvent += OnExposed;

            var chars = "abcdefghijklmnopqrstuvwxyz0123456789"; //ABCDEFGHIJKLMNOPQRSTUVWXYZ
            var stringChars = new char[ssnamelength];
            var random = new Random();
            for (int i = 0; i < stringChars.Length; i++)
            {
                stringChars[i] = chars[random.Next(chars.Length)];
            }
            finalString = new string(stringChars) + ".png";

            win.Hide();
            TakeScreenshot(configpath + finalString.Replace(".png", "_pre.png"));
            win.Show();
            win.Decorated = false;

            img = new Gtk.Image(configpath + finalString.Replace(".png", "_pre.png"));
            eventbox.ButtonPressEvent += (ButtonPressHandler);
            eventbox.ButtonReleaseEvent += (ButtonReleaseHandler);

            img.Xalign = 0.5f;
            img.Yalign = 0.5f;

            eventbox.Add(img);
            eventbox.ShowAll();
            win.Add(eventbox);
            win.ShowAll();

            win.Move(0, 0);

            Application.Run();
        }
开发者ID:ardaozkal,项目名称:ownshot,代码行数:39,代码来源:Program.cs

示例5: X11NotificationAreaBox

        public X11NotificationAreaBox () : base (Catalog.GetString ("Banshee"))
        {
            // NOTE: this is a dummy call to ensure we're actually on X11,
            // otherwise X11 calls won't get made until we are realized,
            // at which point it is too late to fall back to xplat GTK tray
            gdk_x11_get_default_screen ();

            event_box = new EventBox ();
            Add (event_box);
            icon = new Image ();

            // Load a 16x16-sized icon to ensure we don't end up with a 1x1 pixel.
            panel_size = 16;
            event_box.Add (icon);

            event_box.ButtonPressEvent += OnButtonPressEvent;
            event_box.EnterNotifyEvent += OnEnterNotifyEvent;
            event_box.LeaveNotifyEvent += OnLeaveNotifyEvent;
            event_box.ScrollEvent += OnMouseScroll;

            event_box.ShowAll ();
        }
开发者ID:haugjan,项目名称:banshee-hacks,代码行数:22,代码来源:X11NotificationAreaBox.cs

示例6: AddFeature

		Gtk.Widget AddFeature (ISolutionItemFeature feature)
		{
			Gtk.HBox cbox = new Gtk.HBox ();
			CheckButton check = null;
			
			Label fl = new Label ();
			fl.Wrap = true;
			fl.WidthRequest = 630;
			fl.Markup = "<b>" + feature.Title + "</b>\n<small>" + feature.Description + "</small>";
			bool enabledByDefault = feature.GetSupportLevel (parentCombine, entry) == FeatureSupportLevel.Enabled;

			if (enabledByDefault) {
				Alignment al = new Alignment (0,0,0,0);
				al.SetPadding (6,6,6,6);
				al.Add (fl);
				cbox.PackStart (al, false, false, 0);
			}
			else {
				check = new CheckButton ();
				check.Image = fl;
				cbox.PackStart (check, false, false, 0);
				check.ModifyBg (StateType.Prelight, Style.MidColors [(int)StateType.Normal]);
				check.BorderWidth = 3;
			}
			EventBox eb = new EventBox ();
			if (!enabledByDefault) {
				eb.Realized += delegate {
					eb.GdkWindow.Cursor = handCursor;
				};
			}
			eb.ModifyBg (StateType.Normal, Style.MidColors[(int)StateType.Normal]);
			eb.Add (cbox);
			eb.ShowAll ();
			box.PackStart (eb, false, false, 0);
			
			HBox fbox = new HBox ();
			Gtk.Widget editor = feature.CreateFeatureEditor (parentCombine, entry);
			if (editor != null) {
				Label sp = new Label ("");
				sp.WidthRequest = 24;
				sp.Show ();
				fbox.PackStart (sp, false, false, 0);
				editor.Show ();
				fbox.PackStart (editor, false, false, 0);
				box.PackStart (fbox, false, false, 0);
			}
			
			if (check != null) {
				ISolutionItemFeature f = feature;
				check.Toggled += delegate {
					OnClickFeature (f, check, fbox, editor);
				};
			} else {
				fbox.Show ();
			}
			return editor;
		}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:57,代码来源:CombineEntryFeatureSelector.cs

示例7: BuildHeader

        private void BuildHeader ()
        {
            source_actions_align = new Gtk.Alignment (0f, .5f, 1f, 0f) {
                RightPadding = 0,
                LeftPadding = 0,
                NoShowAll = true
            };

            if (Hyena.PlatformDetection.IsMeeGo) {
                source_actions_align.RightPadding = 5;
                source_actions_align.TopPadding = 5;
            }

            footer = new VBox ();

            source_actions_box = new EventBox () { Visible = true };

            BuildSearchEntry ();

            InterfaceActionService uia = ServiceManager.Get<InterfaceActionService> ();
            if (uia != null) {
                Gtk.Action action = uia.GlobalActions["WikiSearchHelpAction"];
                if (action != null) {
                    MenuItem item = new SeparatorMenuItem ();
                    item.Show ();
                    search_entry.Menu.Append (item);

                    item = new ImageMenuItem (Stock.Help, null);
                    item.Activated += delegate { action.Activate (); };
                    item.Show ();
                    search_entry.Menu.Append (item);
                }
            }

            source_actions_box.ShowAll ();
            source_actions_align.Add (source_actions_box);
            source_actions_align.Hide ();
            search_entry.Show ();


            context_pane = new Banshee.ContextPane.ContextPane ();
            context_pane.ExpandHandler = b => {
                SetChildPacking (content.Widget, !b, true, 0, PackType.Start);
                SetChildPacking (context_pane, b, b, 0, PackType.End);
            };

            // Top to bottom, their order is reverse of this:
            PackEnd (footer, false, false, 0);
            PackEnd (context_pane, false, false, 0);
            PackEnd (source_actions_align, false, false, 0);
            PackEnd (new ConnectedMessageBar (), false, true, 0);
        }
开发者ID:gclark916,项目名称:banshee,代码行数:52,代码来源:ViewContainer.cs

示例8: CreateBuildResultsWidget

        public Widget CreateBuildResultsWidget(Orientation orientation)
        {
            EventBox ebox = new EventBox ();

            Gtk.Box box;
            if (orientation == Orientation.Horizontal)
                box = new HBox ();
            else
                box = new VBox ();
            box.Spacing = 3;

            var errorIcon = ImageService.GetIcon (StockIcons.Error).WithSize (Xwt.IconSize.Small);
            var warningIcon = ImageService.GetIcon (StockIcons.Warning).WithSize (Xwt.IconSize.Small);

            var errorImage = new Xwt.ImageView (errorIcon);
            var warningImage = new Xwt.ImageView (warningIcon);

            box.PackStart (errorImage.ToGtkWidget (), false, false, 0);
            Label errors = new Gtk.Label ();
            box.PackStart (errors, false, false, 0);

            box.PackStart (warningImage.ToGtkWidget (), false, false, 0);
            Label warnings = new Gtk.Label ();
            box.PackStart (warnings, false, false, 0);
            box.NoShowAll = true;
            box.Show ();

            TaskEventHandler updateHandler = delegate {
                int ec=0, wc=0;

                foreach (Task t in TaskService.Errors) {
                    if (t.Severity == TaskSeverity.Error)
                        ec++;
                    else if (t.Severity == TaskSeverity.Warning)
                        wc++;
                }

                using (var font = FontService.SansFont.CopyModified (0.8d)) {
                    errors.Visible = ec > 0;
                    errors.ModifyFont (font);
                    errors.Text = ec.ToString ();
                    errorImage.Visible = ec > 0;

                    warnings.Visible = wc > 0;
                    warnings.ModifyFont (font);
                    warnings.Text = wc.ToString ();
                    warningImage.Visible = wc > 0;
                }

                ebox.Visible = ec > 0 || wc > 0;

                UpdateSeparators ();
            };

            updateHandler (null, null);

            TaskService.Errors.TasksAdded += updateHandler;
            TaskService.Errors.TasksRemoved += updateHandler;

            box.Destroyed += delegate {
                TaskService.Errors.TasksAdded -= updateHandler;
                TaskService.Errors.TasksRemoved -= updateHandler;
            };

            ebox.VisibleWindow = false;
            ebox.Add (box);
            ebox.ShowAll ();
            ebox.ButtonReleaseEvent += delegate {
                var pad = IdeApp.Workbench.GetPad<MonoDevelop.Ide.Gui.Pads.ErrorListPad> ();
                pad.BringToFront ();
            };

            errors.Visible = false;
            errorImage.Visible = false;
            warnings.Visible = false;
            warningImage.Visible = false;

            return ebox;
        }
开发者ID:Kalnor,项目名称:monodevelop,代码行数:79,代码来源:StatusArea.cs

示例9: CreateBuildResultsWidget

		public Widget CreateBuildResultsWidget (Orientation orientation)
		{
			EventBox ebox = new EventBox ();

			Gtk.Box box;
			if (orientation == Orientation.Horizontal)
				box = new HBox ();
			else
				box = new VBox ();
			box.Spacing = 3;
			
			Gdk.Pixbuf errorIcon = ImageService.GetPixbuf (StockIcons.Error, IconSize.Menu);
			Gdk.Pixbuf noErrorIcon = ImageService.MakeGrayscale (errorIcon); // creates a new pixbuf instance
			Gdk.Pixbuf warningIcon = ImageService.GetPixbuf (StockIcons.Warning, IconSize.Menu);
			Gdk.Pixbuf noWarningIcon = ImageService.MakeGrayscale (warningIcon); // creates a new pixbuf instance
			
			Gtk.Image errorImage = new Gtk.Image (errorIcon);
			Gtk.Image warningImage = new Gtk.Image (warningIcon);
			
			box.PackStart (errorImage, false, false, 0);
			Label errors = new Gtk.Label ();
			box.PackStart (errors, false, false, 0);
			
			box.PackStart (warningImage, false, false, 0);
			Label warnings = new Gtk.Label ();
			box.PackStart (warnings, false, false, 0);
			box.NoShowAll = true;
			box.Show ();
			
			TaskEventHandler updateHandler = delegate {
				int ec=0, wc=0;
				foreach (Task t in TaskService.Errors) {
					if (t.Severity == TaskSeverity.Error)
						ec++;
					else if (t.Severity == TaskSeverity.Warning)
						wc++;
				}
				errors.Visible = ec > 0;
				errors.Text = ec.ToString ();
				errorImage.Visible = ec > 0;

				warnings.Visible = wc > 0;
				warnings.Text = wc.ToString ();
				warningImage.Visible = wc > 0;
				ebox.Visible = ec > 0 || wc > 0;
				UpdateSeparators ();
			};
			
			updateHandler (null, null);
			
			TaskService.Errors.TasksAdded += updateHandler;
			TaskService.Errors.TasksRemoved += updateHandler;
			
			box.Destroyed += delegate {
				noErrorIcon.Dispose ();
				noWarningIcon.Dispose ();
				TaskService.Errors.TasksAdded -= updateHandler;
				TaskService.Errors.TasksRemoved -= updateHandler;
			};

			ebox.VisibleWindow = false;
			ebox.Add (box);
			ebox.ShowAll ();
			ebox.ButtonReleaseEvent += delegate {
				var pad = IdeApp.Workbench.GetPad<MonoDevelop.Ide.Gui.Pads.ErrorListPad> ();
				pad.BringToFront ();
			};

			errors.Visible = false;
			errorImage.Visible = false;
			warnings.Visible = false;
			warningImage.Visible = false;

			return ebox;
		}
开发者ID:jmloeffler,项目名称:monodevelop,代码行数:75,代码来源:StatusArea.cs

示例10: ShowStatusIcon

 public IStatusIcon ShowStatusIcon(Gtk.Image image)
 {
     EventBox ebox = new EventBox ();
     ebox.Child = image;
     statusBox.PackEnd (ebox, false, false, 2);
     statusBox.ReorderChild (ebox, 0);
     ebox.ShowAll ();
     return new StatusIcon (ebox);
 }
开发者ID:slluis,项目名称:monodevelop-prehistoric,代码行数:9,代码来源:SdStatusBar.cs

示例11: AddColumn

		void AddColumn (string title, int ncol, string desc)
		{
			Gtk.TreeViewColumn col = new Gtk.TreeViewColumn ();
			Gtk.Label lab = new Gtk.Label (title);
			lab.Xalign = 1;
			EventBox bx = new EventBox ();
			bx.Add (lab);
			bx.ShowAll ();
			col.Widget = bx;
			
			CellRendererText crt = new CellRendererText ();
			crt.Xalign = 1;
			col.PackStart (crt, true);
			col.AddAttribute (crt, "text", ncol);
			
			treeview.AppendColumn (col);
			tips.SetTip (bx, desc, desc);
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:18,代码来源:ReferenceTreeViewer.cs

示例12: CreateTabLabel

        private Widget CreateTabLabel(string text)
        {
            Button closeButton = new Button(new Image(closePixbuf));
            closeButton.SetSizeRequest(17,17);
            closeButton.FocusOnClick = false;
            closeButton.CanFocus = false;
            closeButton.Relief = ReliefStyle.None;
            closeButton.Clicked += closeButton_Clicked;

            HBox labelWidget = new HBox();
            labelWidget.PackStart(new Label(text), true, true, 0);
            labelWidget.PackStart(closeButton, true, true, 0);
            labelWidget.CanFocus = false;

            EventBox box = new EventBox();
            box.Add(labelWidget);
            box.ButtonPressEvent += HandleTabButtonPressEvent;

            box.ShowAll();

            return box;
        }
开发者ID:codebutler,项目名称:meshwork,代码行数:22,代码来源:ChatsPage.cs

示例13: CreateTooltip

		EventBoxTooltip CreateTooltip (EventBox eventBox, string tooltipText)
		{
			Xwt.Drawing.Image image = ImageService.GetIcon ("md-information");
			eventBox.ModifyBg (StateType.Normal, leftHandBackgroundColor);
			eventBox.Add (new ImageView (image));
			eventBox.ShowAll ();

			return new EventBoxTooltip (eventBox) {
				ToolTip = GettextCatalog.GetString (tooltipText),
				Severity = TaskSeverity.Information
			};
		}
开发者ID:zenek-y,项目名称:monodevelop,代码行数:12,代码来源:GtkProjectConfigurationWidget.cs

示例14: NetworkOverviewPage

        private NetworkOverviewPage()
        {
            /* Build the UI */

            CreateUserList ();

            /* Create mainbar */

            Widget mapWidget = null;
            try {
                map = new ZoomableNetworkMap ();
                map.SelectedNodeChanged += map_SelectedNodeChanged;
                map.NodeDoubleClicked += map_NodeDoubleClicked;
                mapWidget = map;
            } catch (Exception ex) {
                LoggingService.LogError("Failed to load map !!!", ex);
                mapWidget = new Label("Error loading map.");
            }

            this.Pack1 (mapWidget, true, true);

            /* Create sidebar */
            sidebar = new EventBox();
            sidebar.WidthRequest = 190;

            var sidebarBox = new Gtk.VBox();
            sidebar.Add(sidebarBox);

            var headerAlign = new Banshee.Widgets.FadingAlignment();
            sidebarBox.PackStart(headerAlign, false, false, 0);

            var headerLabel = new Gtk.Label();
            headerLabel.Markup = "<b>Users</b>";
            headerLabel.Xalign = 0;
            headerLabel.Ypad = 6;
            headerLabel.Xpad = 6;
            headerAlign.Add(headerLabel);

            sidebarBox.PackStart(AddScrolledWindow(userList), true, true, 0);

            this.Pack2(sidebar, false, true);

            sidebar.ShowAll();

            foreach (Network network in Core.Networks) {
                Core_NetworkAdded (network);
            }

            Core.TransportManager.TransportError +=
                (TransportErrorEventHandler)DispatchService.GuiDispatch(
                    new TransportErrorEventHandler(Core_TransportError)
                );

            Core.NetworkAdded +=
                (NetworkEventHandler)DispatchService.GuiDispatch(
                    new NetworkEventHandler(Core_NetworkAdded)
                );

            Core.NetworkRemoved +=
                (NetworkEventHandler)DispatchService.GuiDispatch(
                    new NetworkEventHandler(Core_NetworkRemoved)
                );

            Core.AvatarManager.AvatarsChanged +=
                (EventHandler)DispatchService.GuiDispatch(
                    new EventHandler(AvatarManager_AvatarsChanged)
                );

            this.ShowAll();
        }
开发者ID:codebutler,项目名称:meshwork,代码行数:70,代码来源:NetworkOverviewPage.cs

示例15: PopupWindow

            public PopupWindow()
            {
                Color bg = new Color (85, 87, 83);
                Color fg = new Color (211, 215, 207);

                EventBox box = new EventBox ();
                vbox = new VBox();

                box.ButtonPressEvent += HandleButtonEvent;

                box.Add (vbox);

                win.Decorated = false;
                win.BorderWidth = 6;

                win.SetPosition(WindowPosition.CenterAlways);

                image = new Gtk.Image ();
                label = new Label ();
                label.CanFocus = false;
                label.Wrap = true;
                urlLabel = new LinkLabel ();
                urlLabel.Clicked += HandleClick;

                win.Add(box);

                win.ModifyBg (StateType.Normal, bg);
                label.ModifyFg (StateType.Normal, fg);
                box.ModifyBg (StateType.Normal, bg);
                urlLabel.ModifyBg (StateType.Selected, bg);
                urlLabel.ModifyBg (StateType.Normal, bg);

                vbox.PackStart (image, true, true, 0);
                vbox.PackStart (label, false, false, 0);
                vbox.PackStart (urlLabel, false, false, 0);

                vbox.Spacing = 6;
                box.ShowAll ();
            }
开发者ID:garuma,项目名称:zencomic,代码行数:39,代码来源:Notifications.cs


注:本文中的EventBox.ShowAll方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。