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


C# Frame.ShowAll方法代码示例

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


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

示例1: ConfigurationDialog

        public ConfigurationDialog (LCDService plugin)
        {
            this.plugin = plugin;
            Title = AddinManager.CurrentLocalizer.GetString ("LCD configuration");
            BorderWidth = 5;
            HasSeparator = false;
            Resizable = false;

            VBox lcdproc_box = new VBox ();

            HBox host_box = new HBox ();
            host_box.PackStart (new Label (AddinManager.CurrentLocalizer.GetString ("Hostname:")), false, false, 3);
            host_entry = new Entry ();
            host_box.PackStart (host_entry, true, true, 3);
            host_entry.Text = this.plugin.Host;
            host_entry.Changed += new EventHandler (Host_Changed);

            HBox port_box = new HBox ();
            port_box.PackStart (new Label (AddinManager.CurrentLocalizer.GetString ("Port:")), false, false, 3);
            port_spin = new SpinButton (1, 65535, 1);
            port_box.PackStart (port_spin, true, true, 3);
            port_spin.Value = this.plugin.Port;
            port_spin.Changed += new EventHandler (Port_Changed);

            Frame lcdproc_frame = new Frame (AddinManager.CurrentLocalizer.GetString ("LCDProc Daemon:"));
            lcdproc_box.PackStart (host_box);
            lcdproc_box.PackStart (port_box);
            lcdproc_frame.Add (lcdproc_box);
            lcdproc_frame.ShowAll ();

            VBox.PackStart (lcdproc_frame, false, false, 3);
            AddButton (Stock.Close, ResponseType.Close);
        }
开发者ID:h0rm,项目名称:No.Noise,代码行数:33,代码来源:ConfigurationDialog.cs

示例2: BuildInterface

        private void BuildInterface ()
        {
            NoShowAll = true;

            Alignment matchesAlignment = new Alignment (0.0f, 0.0f, 1.0f, 1.0f);
            matchesAlignment.SetPadding (5, 5, 5, 5);
            matchesAlignment.Add (terms_box);

            matchesFrame = new Frame (null);
            matchesFrame.Add (matchesAlignment);
            matchesFrame.LabelWidget = BuildMatchHeader ();
            matchesFrame.ShowAll ();

            terms_entry_box = new HBox ();
            terms_entry_box.Spacing = 8;
            terms_entry_box.PackStart (new Label (Catalog.GetString ("Condition:")), false, false, 0);
            terms_entry = new Entry ();
            terms_entry_box.PackStart (terms_entry, true, true, 0);

            limit_box.ShowAll ();

            PackStart(matchesFrame, true, true, 0);
            PackStart(terms_entry_box, false, false, 0);
            PackStart(limit_box, false, false, 0);

            //ShowAll ();
        }
开发者ID:Yetangitu,项目名称:f-spot,代码行数:27,代码来源:QueryBox.cs

示例3: ChessGameWidget

        public ChessGameWidget(Widget board)
        {
            whiteLabel = new Label ();
            blackLabel = new Label ();

            blackClock = new ChessClock ();
            blackHBox = new HBox ();
            blackHBox.PackStart (blackLabel, true, true, 2);
            blackHBox.PackStart (blackClock, false, false, 2);

            whiteClock = new ChessClock ();
            whiteHBox = new HBox ();
            whiteHBox.PackStart (whiteLabel, true, true, 2);
            whiteHBox.PackStart (whiteClock, false, false, 2);

            topBin = new Frame ();
            bottomBin = new Frame ();

            whiteAtBottom = true;
            topBin.Add (blackHBox);
            bottomBin.Add (whiteHBox);

            PackStart (topBin, false, false, 2);
            PackStart (board, true, true, 2);
            PackStart (bottomBin, false, false, 2);

            topBin.ShowAll ();
            bottomBin.ShowAll ();
        }
开发者ID:BackupTheBerlios,项目名称:csboard-svn,代码行数:29,代码来源:ChessGameWidget.cs

示例4: DataGridView

 public DataGridView()
     : base()
 {
     frame = new Gtk.Frame ();
     grid = new DataGrid ();
     frame.Add (grid);
     frame.ShowAll ();
 }
开发者ID:slluis,项目名称:monodevelop-prehistoric,代码行数:8,代码来源:DataGridView.cs

示例5: Initialize

		public void Initialize (PropertyDescriptor prop)
		{
			if (!prop.PropertyType.IsEnum)
				throw new ApplicationException ("Flags editor does not support editing values of type " + prop.PropertyType);
				
			property = prop.Label;
			Spacing = 3;

			// For small enums, the editor is a list of checkboxes inside a frame
			// For large enums (>5), use a selector dialog.

			enm = Registry.LookupEnum (prop.PropertyType.FullName);
			
			if (enm.Values.Length < 6) 
			{
				Gtk.VBox vbox = new Gtk.VBox (true, 3);

				flags = new Hashtable ();

				foreach (Enum value in enm.Values) {
					EnumValue eval = enm[value];
					if (eval.Label == "")
						continue;

					Gtk.CheckButton check = new Gtk.CheckButton (eval.Label);
					check.TooltipText = eval.Description;
					uint uintVal = (uint) Convert.ToInt32 (eval.Value);
					flags[check] = uintVal;
					flags[uintVal] = check;
					
					check.Toggled += FlagToggled;
					vbox.PackStart (check, false, false, 0);
				}

				Gtk.Frame frame = new Gtk.Frame ();
				frame.Add (vbox);
				frame.ShowAll ();
				PackStart (frame, true, true, 0);
			} 
			else 
			{
				flagsLabel = new Gtk.Entry ();
				flagsLabel.IsEditable = false;
				flagsLabel.HasFrame = false;
				flagsLabel.ShowAll ();
				PackStart (flagsLabel, true, true, 0);
				
				Gtk.Button but = new Gtk.Button ("...");
				but.Clicked += OnSelectFlags;
				but.ShowAll ();
				PackStart (but, false, false, 0);
			}
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:53,代码来源:Flags.cs

示例6: EntryPopup

        public EntryPopup () : base (Gtk.WindowType.Popup)
        {
            CanFocus = true;
            Resizable = false;
            TypeHint = Gdk.WindowTypeHint.Utility;
            Modal = true;

            Frame frame = new Frame ();
            frame.Shadow = ShadowType.EtchedIn;
            Add (frame);

            hbox = new HBox () { Spacing = 6 };
            text_entry = new Entry();
            hbox.PackStart (text_entry, true, true, 0);
            hbox.BorderWidth = 3;

            frame.Add (hbox);
            frame.ShowAll ();

            text_entry.Text = String.Empty;
            text_entry.CanFocus = true;

            //TODO figure out why this event does not get raised
            text_entry.FocusOutEvent += (o, a) => {
                if (hide_when_focus_lost) {
                    HidePopup ();
                }
            };

            text_entry.KeyReleaseEvent += delegate (object o, KeyReleaseEventArgs args) {
                if (args.Event.Key == Gdk.Key.Escape ||
                    args.Event.Key == Gdk.Key.Return ||
                    args.Event.Key == Gdk.Key.Tab) {

                    HidePopup ();
                }

                InitializeDelayedHide ();
            };

            text_entry.KeyPressEvent += (o, a) => OnKeyPressed (a);

            text_entry.Changed += (o, a) => {
                if (GdkWindow.IsVisible) {
                    OnChanged (a);
                }
            };
        }
开发者ID:Yetangitu,项目名称:f-spot,代码行数:48,代码来源:EntryPopup.cs

示例7: SqlDefinitionPad

        public SqlDefinitionPad()
            : base("SQL Definition", "md-mono-query-view")
        {
            frame = new Gtk.Frame ();
            sw = new Gtk.ScrolledWindow ();
            frame.Add (sw);
            SourceLanguagesManager lm = new SourceLanguagesManager ();
            textBuffer = new SourceBuffer(lm.GetLanguageFromMimeType("text/x-sql"));
            textBuffer.Highlight = true;
            textView = new SourceView (textBuffer);
            textView.ShowLineNumbers = false;
            textView.ShowMargin = false;
            textView.TabsWidth = 2;
            textView.Editable = false;
            sw.Add (textView);
            frame.ShowAll ();

            service.SqlDefinitionPad = this;
        }
开发者ID:slluis,项目名称:monodevelop-prehistoric,代码行数:19,代码来源:SqlDefinitionPad.cs

示例8: Initialize

		public override void Initialize (NodeBuilder[] builders, TreePadOption[] options, string menuPath)
		{
			base.Initialize (builders, options, menuPath);
			
			testChangedHandler = (EventHandler) DispatchService.GuiDispatch (new EventHandler (OnDetailsTestChanged));
			testService.TestSuiteChanged += (EventHandler) DispatchService.GuiDispatch (new EventHandler (OnTestSuiteChanged));
			paned = new VPaned ();
			
			VBox vbox = new VBox ();
			DockItemToolbar topToolbar = Window.GetToolbar (PositionType.Top);
			
			buttonRunAll = new Button (new Gtk.Image (Gtk.Stock.GoUp, IconSize.Menu));
			buttonRunAll.Clicked += new EventHandler (OnRunAllClicked);
			buttonRunAll.Sensitive = true;
			buttonRunAll.TooltipText = GettextCatalog.GetString ("Run all tests");
			topToolbar.Add (buttonRunAll);
			
			buttonRun = new Button (new Gtk.Image (Gtk.Stock.Execute, IconSize.Menu));
			buttonRun.Clicked += new EventHandler (OnRunClicked);
			buttonRun.Sensitive = true;
			buttonRun.TooltipText = GettextCatalog.GetString ("Run test");
			topToolbar.Add (buttonRun);
			
			buttonStop = new Button (new Gtk.Image (Gtk.Stock.Stop, IconSize.Menu));
			buttonStop.Clicked += new EventHandler (OnStopClicked);
			buttonStop.Sensitive = false;
			buttonStop.TooltipText = GettextCatalog.GetString ("Cancel running test");
			topToolbar.Add (buttonStop);
			topToolbar.ShowAll ();
			
			vbox.PackEnd (base.Control, true, true, 0);
			vbox.FocusChain = new Gtk.Widget [] { base.Control };
			
			paned.Pack1 (vbox, true, true);
			
			detailsPad = new VBox ();
			
			EventBox eb = new EventBox ();
			HBox header = new HBox ();
			eb.Add (header);

			detailLabel = new HeaderLabel ();
			detailLabel.Padding = 6;
			
			Button hb = new Button (new Gtk.Image ("gtk-close", IconSize.SmallToolbar));
			hb.Relief = ReliefStyle.None;
			hb.Clicked += new EventHandler (OnCloseDetails);
			header.PackEnd (hb, false, false, 0);
			
			hb = new Button (new Gtk.Image ("gtk-go-back", IconSize.SmallToolbar));
			hb.Relief = ReliefStyle.None;
			hb.Clicked += new EventHandler (OnGoBackTest);
			header.PackEnd (hb, false, false, 0);
			
			header.Add (detailLabel);
			Gdk.Color hcol = eb.Style.Background (StateType.Normal);
			hcol.Red = (ushort) (((double)hcol.Red) * 0.9);
			hcol.Green = (ushort) (((double)hcol.Green) * 0.9);
			hcol.Blue = (ushort) (((double)hcol.Blue) * 0.9);
		//	eb.ModifyBg (StateType.Normal, hcol);
			
			detailsPad.PackStart (eb, false, false, 0);
			
			VPaned panedDetails = new VPaned ();
			panedDetails.BorderWidth = 3;
			VBox boxPaned1 = new VBox ();
			
			chart = new TestChart ();
			chart.ButtonPressEvent += OnChartButtonPress;
			chart.SelectionChanged += new EventHandler (OnChartDateChanged);
			chart.HeightRequest = 50;
			
			Toolbar toolbar = new Toolbar ();
			toolbar.IconSize = IconSize.SmallToolbar;
			toolbar.ToolbarStyle = ToolbarStyle.Icons;
			toolbar.ShowArrow = false;
			ToolButton but = new ToolButton ("gtk-zoom-in");
			but.Clicked += new EventHandler (OnZoomIn);
			toolbar.Insert (but, -1);
			
			but = new ToolButton ("gtk-zoom-out");
			but.Clicked += new EventHandler (OnZoomOut);
			toolbar.Insert (but, -1);
			
			but = new ToolButton ("gtk-go-back");
			but.Clicked += new EventHandler (OnChartBack);
			toolbar.Insert (but, -1);
			
			but = new ToolButton ("gtk-go-forward");
			but.Clicked += new EventHandler (OnChartForward);
			toolbar.Insert (but, -1);
			
			but = new ToolButton ("gtk-goto-last");
			but.Clicked += new EventHandler (OnChartLast);
			toolbar.Insert (but, -1);
			
			boxPaned1.PackStart (toolbar, false, false, 0);
			boxPaned1.PackStart (chart, true, true, 0);
			
			panedDetails.Pack1 (boxPaned1, false, false);
//.........这里部分代码省略.........
开发者ID:llucenic,项目名称:monodevelop,代码行数:101,代码来源:TestPad.cs

示例9: RConsolePad

        public RConsolePad()
            : base("R Console")
        {
            Frame frame = new Frame();
            ScrolledWindow scrolledWindow = new ScrolledWindow();
            HBox hbox = new HBox ();
            terminal = new Terminal();
            VScrollbar vscrollbar = new VScrollbar(terminal.Adjustment);
            hbox.PackStart(terminal, true, true, 0);
            hbox.PackStart(vscrollbar, false, true, 0);

            //scrolledWindow.AddWithViewport(hbox);
            frame.ShadowType = Gtk.ShadowType.In;
            scrolledWindow.Add(hbox);
            frame.Add(scrolledWindow);

            widget = frame;
            DefaultPlacement = "bottom";

            string[] environment = new string[Environment.GetEnvironmentVariables().Count];
            int index = 0;
            foreach (DictionaryEntry e in Environment.GetEnvironmentVariables ())
            {
                environment[index++] = String.Format ("{0}={1}", e.Key, e.Value);
            }
            terminal.ForkCommand(
                "R",
                new string[] {"--no-save"},
                environment,
                Environment.CurrentDirectory,
                false,
                false,
                false
            );

            frame.ShowAll();
            instance = this;
        }
开发者ID:BackupTheBerlios,项目名称:rdevelop-svn,代码行数:38,代码来源:RConsolePadContent.cs

示例10: Initialize

        public void Initialize(EditSession session)
        {
            PropertyDescriptor prop = session.Property;

            if (!prop.PropertyType.IsEnum)
                throw new ApplicationException ("Flags editor does not support editing values of type " + prop.PropertyType);

            Spacing = 3;
            propType = prop.PropertyType;

            property = prop.Description;
            if (property == null || property.Length == 0)
                property = prop.Name;

            // For small enums, the editor is a list of checkboxes inside a frame
            // For large enums (>5), use a selector dialog.

            values = System.Enum.GetValues (prop.PropertyType);

            if (values.Length < 6)
            {
                Gtk.VBox vbox = new Gtk.VBox (true, 3);

                flags = new Hashtable ();

                foreach (object value in values) {
                    Gtk.CheckButton check = new Gtk.CheckButton (value.ToString ());
                    check.TooltipText = value.ToString ();
                    ulong uintVal = Convert.ToUInt64 (value);
                    flags[check] = uintVal;
                    flags[uintVal] = check;

                    check.Toggled += FlagToggled;
                    vbox.PackStart (check, false, false, 0);
                }

                Gtk.Frame frame = new Gtk.Frame ();
                frame.Add (vbox);
                frame.ShowAll ();
                PackStart (frame, true, true, 0);
            }
            else
            {
                flagsLabel = new Gtk.Entry ();
                flagsLabel.IsEditable = false;
                flagsLabel.HasFrame = false;
                flagsLabel.ShowAll ();
                PackStart (flagsLabel, true, true, 0);

                Gtk.Button but = new Gtk.Button ("...");
                but.Clicked += OnSelectFlags;
                but.ShowAll ();
                PackStart (but, false, false, 0);
            }
        }
开发者ID:modesto,项目名称:monoreports,代码行数:55,代码来源:FlagsEditorCell.cs

示例11: ConfigurationDialog

        public ConfigurationDialog(AlarmClockService plugin)
            : base()
        {
            this.plugin = plugin;

            Title = Catalog.GetString ("Alarm Clock configuration");
            HasSeparator = false;
            BorderWidth = 5;

            fade_start = new VScale (0, 100, 1);
            fade_start.Inverted = true;
            fade_start.HeightRequest = volumeSliderHeight;
            fade_end = new VScale (0, 100, 1);
            fade_end.Inverted = true;
            fade_end.HeightRequest = volumeSliderHeight;
            fade_duration = new SpinButton (0, 65535, 1);
            fade_duration.WidthChars = 6;

            VBox fade_big_box = new VBox ();

            VBox fade_start_box = new VBox ();
            fade_start_box.PackEnd (new Label (Catalog.GetString ("Start")));
            fade_start_box.PackStart (fade_start, false, false, 3);

            VBox fade_end_box = new VBox ();
            fade_end_box.PackEnd (new Label (Catalog.GetString ("End")));
            fade_end_box.PackStart (fade_end, false, false, 3);

            HBox fade_box_group = new HBox ();
            fade_box_group.PackStart (fade_start_box);
            fade_box_group.PackStart (fade_end_box);

            Label volume_label = new Label (Catalog.GetString ("<b>Volume</b>"));
            volume_label.UseMarkup = true;
            fade_big_box.PackStart (volume_label, false, true, 3);
            fade_big_box.PackStart (fade_box_group);
            Label duration_label = new Label (Catalog.GetString ("Duration:"));
            Label duration_seconds_label = new Label (Catalog.GetString (" <i>(seconds)</i>"));
            duration_label.UseMarkup = true;
            duration_seconds_label.UseMarkup = true;
            HBox duration_box = new HBox ();
            duration_box.PackStart (duration_label, false, false, 3);
            duration_box.PackStart (fade_duration, false, false, 3);
            duration_box.PackStart (duration_seconds_label, false, true, 3);
            fade_big_box.PackStart (duration_box);

            Frame alarm_fade_frame = new Frame (Catalog.GetString ("Fade-In Adjustment"));
            alarm_fade_frame.Add (fade_big_box);
            alarm_fade_frame.ShowAll ();

            HBox command_box = new HBox ();
            command_box.PackStart (new Label (Catalog.GetString ("Command:")), false, false, 3);
            command_entry = new Entry ();
            command_box.PackStart (command_entry, true, true, 3);

            Frame alarm_misc_frame = new Frame (Catalog.GetString ("Command To Execute:"));
            alarm_misc_frame.Add (command_box);
            alarm_misc_frame.ShowAll ();

            VBox.PackStart (alarm_fade_frame, false, false, 3);
            VBox.PackStart (alarm_misc_frame, false, false, 3);

            AddButton (Stock.Close, ResponseType.Close);

            // initialize values
            command_entry.Text = plugin.AlarmCommand;
            fade_start.Value = plugin.FadeStartVolume;
            fade_end.Value = plugin.FadeEndVolume;
            fade_duration.Value = plugin.FadeDuration;

            // attach change handlers
            command_entry.Changed += new EventHandler (AlarmCommand_Changed);
            fade_start.ValueChanged += new EventHandler (FadeStartVolume_Changed);
            fade_end.ValueChanged += new EventHandler (FadeEndVolume_Changed);
            fade_duration.ValueChanged += new EventHandler (FadeDuration_Changed);
        }
开发者ID:jrmuizel,项目名称:banshee-unofficial-plugins,代码行数:76,代码来源:ConfigurationDialog.cs

示例12: ShowSourceView

		public void ShowSourceView (string label)
		{
			if (text == null) {
				ScrolledWindow sw = new ScrolledWindow ();
				buffer = new SourceView (new TextTagTable ());
				text = new TextView (buffer);
				text.Editable = false;
				text.CanFocus = false;
				text.Name = "SourceView";
				Frame frame = new Frame ();
				frame.BorderWidth = 5;
				frame.ShadowType = ShadowType.In;
				sw.Add (text);
				frame.Add (sw);
				frame.ShowAll ();
				SourceLabel = new Label ("");
				Content.InsertPage (frame, SourceLabel, 1);
			}
			SourceLabel.Markup = "Source: " + label;
		}
开发者ID:emtees,项目名称:old-code,代码行数:20,代码来源:ObjectBrowser.cs

示例13: create_representation


//.........这里部分代码省略.........
            picture_wrapper = new EventBox(); // for events
            GtkCommon.set_background_color(picture_wrapper, "white");
            picture_wrapper.Add(picture);
            picture_resizer.Attach(picture_wrapper, 0, 1, 0, 1, AttachOptions.Shrink, AttachOptions.Shrink, 0, 0);

            Gtk.Alignment picture_alignment = new Gtk.Alignment(0.5f, 0.5f, 0, 0);

            picture_alignment.Add(picture_resizer);

            GtkCommon.show_hand_and_tooltip(picture_wrapper, Mono.Unix.Catalog.GetString("Open"));

            box.PackStart(picture_alignment, true, true, 3);

            string image = Singleton<Types>.Instance.get_type((int)item.file.type.category).icon;
            if (!String.IsNullOrEmpty(image))
            {
                Gtk.HBox tmp = new Gtk.HBox();

                Gtk.Alignment img_alignment = new Gtk.Alignment(1F, 0.5F, 0F, 0.5F);
                img_alignment.RightPadding = 5;
                Gtk.Image img = new Gtk.Image(null, image);
                img_alignment.Add(img);

                tmp.PackStart(img_alignment, true, true, 0);

                Gtk.Alignment label_alignment = new Gtk.Alignment(0F, 0.5F, 0F, 0.5F);
                Gtk.Label tmp_label = new Gtk.Label();
                tmp_label.Markup = "<b>" + item.name(35) + "</b>";
                tmp_label.UseUnderline = false;
                label_alignment.Add(tmp_label);
                tmp.PackStart(label_alignment, true, true, 0);

                box.PackStart(tmp, false, true, 3);

            } else {

                Gtk.Label title = new Gtk.Label();
                title.Markup = "<b>" + item.name(35) + "</b>";

                box.PackStart(title, true, true, 3);
            }

            Gtk.Alignment labels_alignment = new Gtk.Alignment(0.5f, 0.5f, 0f, 0f);

            labels = new Gtk.HBox();

            create_labels();

            labels_alignment.Add(labels);

            box.PackStart(labels_alignment, false, false, 0);

            extra_info = new Gtk.Table((uint)(3 + new_fields.Count), 2, false);

            row = 0;

            foreach (KeyValuePair<string, string> kvp in new_fields)
                add_line(kvp.Key, kvp.Value);

            string path = item.path;

            string homedir = Environment.GetFolderPath(System.Environment.SpecialFolder.Personal);

            if (path.StartsWith(homedir))
                path = path.Replace(homedir, "~");

            int index = -1;
            if ((index = path.LastIndexOf('/')) != -1)
                if (index > 27) {
                    path = path.Substring(0, 25);
                    path += "...";
                } else
                    path = path.Substring(0, index+1);

            add_line(Mono.Unix.Catalog.GetString("Path:"), path);
            add_line(Mono.Unix.Catalog.GetString("Size:"), item.size);
            add_line(Mono.Unix.Catalog.GetString("Last modified:"), item.accessed);
            add_line(Mono.Unix.Catalog.GetString("Last accessed:"), item.modify);

            box.PackStart(extra_info, false, false, 3);

            Gtk.Alignment box_alignment = new Alignment(0.5f, 1f, 0, 0);
            box_alignment.BottomPadding = 12;
            box_alignment.TopPadding = 12;
            box_alignment.LeftPadding = 12;
            box_alignment.RightPadding = 12;

            box_alignment.Add(box);

            box_wrapper = new EventBox(); // for bg color
            box_wrapper.Add(box_alignment);
            GtkCommon.set_background_color(box_wrapper, "white");

            box_wrapper.ButtonPressEvent += GtkCommon.ButtonPressEventWrapper(item);

            representation = new Frame();
            representation.Add(box_wrapper);

            representation.ShowAll();
        }
开发者ID:GNOME,项目名称:nemo,代码行数:101,代码来源:DisplayItem.cs

示例14: ConfigurationDialog

        public ConfigurationDialog(AlarmClockService service)
            : base(AddinManager.CurrentLocalizer.GetString ("Alarm Clock configuration"))
        {
            this.service = service;

            fade_start = new VScale (0, 100, 1);
            fade_start.Inverted = true;
            fade_start.HeightRequest = volumeSliderHeight;
            fade_end = new VScale (0, 100, 1);
            fade_end.Inverted = true;
            fade_end.HeightRequest = volumeSliderHeight;
            fade_duration = new SpinButton (0, 65535, 1);
            fade_duration.WidthChars = 6;

            VBox fade_big_box = new VBox ();

            VBox fade_start_box = new VBox ();
            fade_start_box.PackEnd (new Label (AddinManager.CurrentLocalizer.GetString ("Start")), true, true, 2);
            fade_start_box.PackStart (fade_start, false, false, 3);

            VBox fade_end_box = new VBox ();
            fade_end_box.PackEnd (new Label (AddinManager.CurrentLocalizer.GetString ("End")), true, true, 2);
            fade_end_box.PackStart (fade_end, false, false, 3);

            HBox fade_box_group = new HBox ();
            fade_box_group.PackStart (fade_start_box, true, true, 2);
            fade_box_group.PackStart (fade_end_box, true, true, 2);

            Label volume_label = new Label (AddinManager.CurrentLocalizer.GetString ("<b>Volume</b>"));
            volume_label.UseMarkup = true;
            fade_big_box.PackStart (volume_label, false, true, 3);
            fade_big_box.PackStart (fade_box_group, true, true, 2);
            Label duration_label = new Label (AddinManager.CurrentLocalizer.GetString ("Duration:"));
            Label duration_seconds_label = new Label (AddinManager.CurrentLocalizer.GetString (" <i>(seconds)</i>"));
            duration_label.UseMarkup = true;
            duration_seconds_label.UseMarkup = true;
            HBox duration_box = new HBox ();
            duration_box.PackStart (duration_label, false, false, 3);
            duration_box.PackStart (fade_duration, false, false, 3);
            duration_box.PackStart (duration_seconds_label, false, true, 3);
            fade_big_box.PackStart (duration_box, true, true, 2);

            Frame alarm_fade_frame = new Frame (AddinManager.CurrentLocalizer.GetString ("Fade-In Adjustment"));
            alarm_fade_frame.Add (fade_big_box);
            alarm_fade_frame.ShowAll ();

            HBox command_box = new HBox ();
            command_box.PackStart (new Label (AddinManager.CurrentLocalizer.GetString ("Command:")), false, false, 3);
            command_entry = new Entry ();
            command_box.PackStart (command_entry, true, true, 3);

            Frame alarm_misc_frame = new Frame (AddinManager.CurrentLocalizer.GetString ("Command To Execute:"));
            alarm_misc_frame.Add (command_box);
            alarm_misc_frame.ShowAll ();

            VBox.PackStart (alarm_fade_frame, false, false, 3);
            VBox.PackStart (alarm_misc_frame, false, false, 3);

            AddDefaultCloseButton ();

            // initialize values
            command_entry.Text = service.AlarmCommand;
            fade_start.Value = service.FadeStartVolume;
            fade_end.Value = service.FadeEndVolume;
            fade_duration.Value = service.FadeDuration;

            // attach change handlers
            command_entry.Changed += new EventHandler (AlarmCommand_Changed);
            fade_start.ValueChanged += new EventHandler (FadeStartVolume_Changed);
            fade_end.ValueChanged += new EventHandler (FadeEndVolume_Changed);
            fade_duration.ValueChanged += new EventHandler (FadeDuration_Changed);
        }
开发者ID:nailyk,项目名称:banshee-community-extensions,代码行数:72,代码来源:ConfigurationDialog.cs


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