• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Gtk.Table类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



Table类属于Gtk命名空间,在下文中一共展示了Table类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: BuildDialogUI

        void BuildDialogUI()
        {
            // Add an HBox to the dialog's VBox.
              HBox hbox = new HBox (false, 8);
              hbox.BorderWidth = 8;
              this.VBox.PackStart (hbox, false, false, 0);

              // Add an Image widget to the HBox using a stock 'info' icon.
              Image stock = new Image (Stock.DialogInfo, IconSize.Dialog);
              hbox.PackStart (stock, false, false, 0);

              // Here we are using a Table to contain the other widgets.
              // Notice that the Table is added to the hBox.
              Table table = new Table (2, 2, false);
              table.RowSpacing = 4;
              table.ColumnSpacing = 4;
              hbox.PackStart (table, true, true, 0);

              Label label = new Label ("_Username");
              table.Attach (label, 0, 1, 0, 1);
              table.Attach (usernameEntry, 1, 2, 0, 1);
              label.MnemonicWidget = usernameEntry;

              label = new Label ("_Password");
              table.Attach (label, 0, 1, 1, 2);
              table.Attach (passwordEntry , 1, 2, 1, 2);
              label.MnemonicWidget = passwordEntry ;
              hbox.ShowAll ();

              // Add OK and Cancel Buttons.
              this.AddButton(Stock.Ok, ResponseType.Ok);
              this.AddButton(Stock.Cancel, ResponseType.Cancel);
        }
开发者ID:sergi,项目名称:Wakame,代码行数:33,代码来源:LoginDialog.cs


示例2: CreateEntry

		Widget CreateEntry (Table table, string text, bool password)
		{
			var lab = new Label (text);
			lab.Xalign = 0;
			table.Attach (lab, 0, 1, r, r + 1);
			var tc = (Table.TableChild)table [lab];
			tc.XOptions = AttachOptions.Shrink;

			var e = new Entry ();
			Widget editor = e;
			e.ActivatesDefault = true;
			if (password)
				e.Visibility = false;

			e.Changed += delegate {
				if (password) {
					if (upcred != null)
						upcred.Password = e.Text ?? "";
					else
						sshcred.Passphrase = e.Text ?? "";
				} else {
					if (upcred != null)
						upcred.Username = e.Text;
				}
			};

			if (editor != null) {
				table.Attach (editor, 1, 2, r, r + 1);
				tc = (Table.TableChild)table [lab];
				tc.XOptions = AttachOptions.Fill;
			}
			r++;
			return editor;
		}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:34,代码来源:CredentialsDialog.cs


示例3: CredentialsDialog

		public CredentialsDialog (string uri, SupportedCredentialTypes type, Credentials cred)
		{
			this.Build ();

			this.UseNativeContextMenus ();

			labelTop1.Text = string.Format (labelTop1.Text, uri);

			var table = new Table (0, 0, false);
			table.ColumnSpacing = 6;
			vbox.PackStart (table, true, true, 0);

			Widget firstEditor = null;
			switch (type) {
			case SupportedCredentialTypes.UsernamePassword:
				upcred = (UsernamePasswordCredentials)cred;
				firstEditor = CreateEntry (table, "Username:", false);
				CreateEntry (table, "Password:", true);
				break;
			case SupportedCredentialTypes.Ssh:
				sshcred = (SshUserKeyCredentials)cred;
				firstEditor = CreateEntry (table, "Passphrase:", true);
				break;
			}
			table.ShowAll ();
			Focus = firstEditor;
			Default = buttonOk;
		}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:28,代码来源:CredentialsDialog.cs


示例4: Info

        /// <summary>
        /// Initializes a new instance of the <see cref="Scrabble.GUI.Info"/> class.
        /// </summary>
        /// <param name='g'>
        /// G.
        /// </param>
        public Info(Game.Game g)
        {
            this.Label = "Score";
            this.BorderWidth = 5;
            this.game = g;

            this.HeightRequest = 99;
            this.WidthRequest = 120;

            scoresTable = new Gtk.Table( 6, 2, true );
            scoreValues = new Gtk.Label[ 6*2 ];
            for( int i=0; i < this.game.players.Length; i++) {
                scoreValues[ i ] = new Label( game.players[i].Name );
                scoreValues[ i+6 ] = new Label( "0" );
                scoresTable.Attach( scoreValues[i], 0 , 1, (uint) i, (uint) i+1);
                scoresTable.Attach( scoreValues[i+6] , 1, 2, (uint) i, (uint) i+1 );
            }
            for( int i=this.game.players.Length; i < 6; i++) {
                scoreValues[ i ] = new Label( );
                scoreValues[ i+6 ] = new Label( );
                scoresTable.Attach( scoreValues[i], 0 , 1, (uint) i, (uint) i+1);
                scoresTable.Attach( scoreValues[i+6] , 1, 2, (uint) i, (uint) i+1 );
            }
            scoresTable.BorderWidth = 3;
            this.Add( scoresTable );

            this.ShowAll();
        }
开发者ID:Kedrigern,项目名称:scrabble,代码行数:34,代码来源:info.cs


示例5: TagWindow

        public TagWindow()
            : base(WindowType.Toplevel)
        {
            Tags = new ArrayList();

            Title = "Manage your tags";
            BorderWidth = 5;
            DeleteEvent += OnClose;
            Resizable = false;

            vbox = new VBox();
            vbox.Spacing = 6;
            Add(vbox);

            table = new Table(2, 2, false);
            table.RowSpacing = 6;
            vbox.PackStart(table, false, false, 0);

            bbox = new HButtonBox();
            bbox.Layout = ButtonBoxStyle.End;

            AddTagsCombobox();
            AddFeedTreeView();
            AddButtons();
            vbox.PackStart(bbox, false, false, 0);

            Database.FeedChanged += OnFeedChanged;
        }
开发者ID:wfarr,项目名称:newskit,代码行数:28,代码来源:Summa.Gui.TagWindow.cs


示例6: MatrixThresholdFilterDialog

        public MatrixThresholdFilterDialog(
            MatrixThresholdFilter existingModule)
            : base(existingModule)
        {
            module = modifiedModule as MatrixThresholdFilter;
            if (module == null) {
                modifiedModule = new MatrixThresholdFilter();
                module = modifiedModule as MatrixThresholdFilter;
            }

            matrixPanel = new ThresholdMatrixPanel(
                (uint)module.Matrix.Height,
                (uint)module.Matrix.Width);
            matrixPanel.Matrix = module.Matrix.DefinitionMatrix;
            matrixPanel.Scaled = !module.Matrix.Incremental;

            table = new Table(2, 1, false)
                { ColumnSpacing = 5, RowSpacing = 5, BorderWidth = 5 };
            table.Attach(new Label("Threshold matrix:") { Xalign = 0.0f },
                0, 1, 0, 1, AttachOptions.Fill, AttachOptions.Shrink,
                0, 0);
            table.Attach(matrixPanel, 0, 1, 1, 2,
                AttachOptions.Fill | AttachOptions.Expand,
                AttachOptions.Fill | AttachOptions.Expand, 0, 0);
            table.ShowAll();
            VBox.PackStart(table);
        }
开发者ID:bzamecnik,项目名称:HalftoneLab,代码行数:27,代码来源:MatrixThresholdFilterDialog.cs


示例7: AddNodeDialog

        public AddNodeDialog(SimulatorInterface simulatorInterface)
        {
            this.Build ();
            this.simulatorInterface = simulatorInterface;
            ScrolledWindow sw = new ScrolledWindow ();
            sw.ShadowType = ShadowType.EtchedIn;
            sw.SetPolicy (PolicyType.Automatic, PolicyType.Automatic);
            sw.HeightRequest = 250;

            VBox.PackStart (sw, true, true, 0);
            Table table = new Table ((uint)(BasicNode.NodeLabels.Length), 2, true);
            sw.AddWithViewport (table);
            for (int i = 0; i < BasicNode.NodeLabels.Length; i++)
            {
                labels.Add (new Label (BasicNode.NodeLabels[i]));
                table.Attach (labels[i], 0, 1, (uint)(i), (uint)(i) + 1);
                entries.Add (new SpinButton (0, 80, 1));
                entries[i].ClimbRate = 1;
                entries[i].Numeric = true;
                table.Attach (entries[i], 1, 2, (uint)(i), (uint)(i) + 1);
            }
            buttonOk.Clicked += new EventHandler (AddNode);
            buttonCancel.Clicked += new EventHandler (Cancel);
            this.SetDefaultSize (340, 300);
            this.Modal = true;
            this.ShowAll ();
        }
开发者ID:querino,项目名称:FrapeSchedSim,代码行数:27,代码来源:AddNodeDialog.cs


示例8: HeightMapSizeDialog

		public HeightMapSizeDialog( DoneCallback source )
		{
            this.source = source;

			window = new Window ("Heightmap width and height:");
			window.SetDefaultSize (200, 100);

            Table table = new Table( 3, 2, false );
            table.BorderWidth = 20;
            table.RowSpacing = 20;
            table.ColumnSpacing = 20;
            window.Add(table);

            table.Attach(new Label("Width:"), 0, 1, 0, 1);
            table.Attach(new Label("Height:"), 0, 1, 1, 2);

            widthcombo = new Combo();
            widthcombo.PopdownStrings = new string[]{"4","8","12","16","20","24","28","32"};
            table.Attach(widthcombo, 1, 2, 0, 1);

            heightcombo = new Combo();
            heightcombo.PopdownStrings = new string[]{"4","8","12","16","20","24","28","32"};
            table.Attach(heightcombo, 1, 2, 1, 2);

			Button button = new Button (Stock.Ok);
			button.Clicked += new EventHandler (OnOkClicked);
			button.CanDefault = true;
			
            table.Attach(button, 1, 2, 2, 3);

            window.Modal = true;
            window.ShowAll();
		}
开发者ID:genxinzou,项目名称:svn-spring-archive,代码行数:33,代码来源:MainUI.cs


示例9: VectorErrorFilterDialog

        public VectorErrorFilterDialog(VectorErrorFilter existingModule)
            : base(existingModule)
        {
            module = modifiedModule as VectorErrorFilter;
            if (module == null) {
                modifiedModule = new VectorErrorFilter();
                module = modifiedModule as VectorErrorFilter;
            }

            vectorPanel = new ErrorVectorPanel((uint)module.Matrix.Width);
            vectorPanel.BareMatrix = module.Matrix.DefinitionMatrix;
            vectorPanel.Divisor = module.Matrix.Divisor;
            vectorPanel.UseCustomDivisor = false;
            vectorPanel.SourceOffsetX = module.Matrix.SourceOffsetX;

            table = new Table(2, 1, false)
                { ColumnSpacing = 5, RowSpacing = 5, BorderWidth = 5 };
            table.Attach(new Label("Error vector:") { Xalign = 0.0f },
                0, 1, 0, 1, AttachOptions.Fill, AttachOptions.Shrink, 0, 0);
            table.Attach(vectorPanel, 0, 1, 1, 2,
                AttachOptions.Fill | AttachOptions.Expand,
                AttachOptions.Fill | AttachOptions.Expand, 0, 0);
            table.ShowAll();
            VBox.PackStart(table);
        }
开发者ID:bzamecnik,项目名称:HalftoneLab,代码行数:25,代码来源:VectorErrorFilterDialog.cs


示例10: CreatePreferencesControl

		/// <summary>
		/// Creates a Gtk.Widget that's used to configure the service.  This
		/// will be used in the Synchronization Preferences.  Preferences should
		/// not automatically be saved by a GConf Property Editor.  Preferences
		/// should be saved when SaveConfiguration () is called.
		/// </summary>
		public override Gtk.Widget CreatePreferencesControl (EventHandler requiredPrefChanged)
		{
			Gtk.Table table = new Gtk.Table (1, 2, false);
			table.RowSpacing = 5;
			table.ColumnSpacing = 10;

			// Read settings out of gconf
			string syncPath;
			if (GetConfigSettings (out syncPath) == false)
				syncPath = string.Empty;

			Label l = new Label (Catalog.GetString ("_Folder Path:"));
			l.Xalign = 1;
			table.Attach (l, 0, 1, 0, 1,
			              Gtk.AttachOptions.Fill,
			              Gtk.AttachOptions.Expand | Gtk.AttachOptions.Fill,
			              0, 0);

			pathButton = new FileChooserButton (Catalog.GetString ("Select Synchronization Folder..."),
			                                    FileChooserAction.SelectFolder);
			pathButton.CurrentFolderChanged += requiredPrefChanged;
			l.MnemonicWidget = pathButton;
			pathButton.SetFilename (syncPath);

			table.Attach (pathButton, 1, 2, 0, 1,
			              Gtk.AttachOptions.Expand | Gtk.AttachOptions.Fill,
			              Gtk.AttachOptions.Expand | Gtk.AttachOptions.Fill,
			              0, 0);

			table.ShowAll ();
			return table;
		}
开发者ID:MichaelAquilina,项目名称:tomboy,代码行数:38,代码来源:FileSystemSyncServiceAddin.cs


示例11: separaFilas

 public void separaFilas(Table tabla,int espacio)
 {
     int row=(int)tabla.NRows;
         for(int i=0;i<row;i++){
         tabla.SetRowSpacing((uint)i,(uint)espacio);
         }
 }
开发者ID:nerea123,项目名称:ad,代码行数:7,代码来源:MyWidget.cs


示例12: Refresh

        public void Refresh(Rekening[] rekeningen)
        {
            if (table != null)
            {
                Remove(table);
            }

            // Bereken afmetingen van de tabel
            int aantalRekeningen = rekeningen.Length;
            uint columns = (uint)Math.Ceiling(Math.Sqrt((double)aantalRekeningen));
            uint rows = (uint)Math.Floor(Math.Sqrt((double)aantalRekeningen));
            table = new Table(rows, columns, true);

            uint index = 0;
            foreach(var rekening in rekeningen)
            {
                RekeningWidget rekeningWidget = new RekeningWidget(rekening);
                rekeningWidget.Clicked += handleRekeningWidgetClicked;

                // Bereken rekening widget posities
                uint thisColumn = index % columns;
                uint thisRow = (index - thisColumn) / columns;
                table.Attach(rekeningWidget, thisColumn, thisColumn + 1, thisRow, thisRow + 1);

                index++;
            }

            Add(table);
        }
开发者ID:reinkrul,项目名称:SailorsTabDotNet,代码行数:29,代码来源:RekeningOverzichtWidget.cs


示例13: Spec

        public Spec(InvoiceSpec ispec, Table table, uint row)
        {
            description = new Entry();
            number = new Entry();
            price = new Entry();
            total = new Entry();

            number.Changed += new EventHandler(UpdateTotal);
            price.Changed += new EventHandler(UpdateTotal);
            total.Changed += new EventHandler(TotalChanged);

            number.SetUsize(NumberEntryWidth, -2);
            price.SetUsize(NumberEntryWidth, -2);
            total.SetUsize(NumberEntryWidth, -2);
            description.SetUsize(300, -2);

            table.Attach(description, 0, 1, row, row+1,
                         AttachOptions.Expand | AttachOptions.Fill, 0, 0, 0);
            table.Attach(number, 1, 2, row, row+1, 0, 0, 0, 0);
            table.Attach(price,  2, 3, row, row+1, 0, 0, 0, 0);
            table.Attach(total,  3, 4, row, row+1, 0, 0, 0, 0);

            description.Text =  ispec.beskrivning;
            if (ispec.antal.Length > 0)				  number.Text = ispec.antal;
            price.Text = ispec.styckpris;
            total.Text = ispec.belopp;
        }
开发者ID:nhoglund,项目名称:Faktureringsprogrammet,代码行数:27,代码来源:Spec.cs


示例14: FileConditionsWidget

        public FileConditionsWidget(FilePropertisData fcd)
        {
            this.Build();
            project = fcd.Project;
            filepath = fcd.Filename;

            fi_old = project.FilesProperty.Find(x => x.SystemFilePath == filepath);

            conditionRules = new List<ConditionRule>();
            conditionRules_Old = new List<ConditionRule>();

            if (fi_old != null)
            if (fi_old.ConditionValues != null)
                conditionRules_Old = fi_old.ConditionValues;

            int rowCount = project.ConditoinsDefine.Count;
            //Table tableSystem = new Table((uint)(2),(uint)2,false);
            Table table = new Table((uint)(rowCount + 3),(uint)2,false);

            GenerateContent(ref table, MainClass.Settings.Platform.Name, 1, MainClass.Settings.Platform,false);//tableSystem
            GenerateContent(ref table, MainClass.Settings.Resolution.Name, 2,MainClass.Settings.Resolution,true); //project.Resolution);//tableSystem
            int i = 3;//1;

            foreach (Condition cd in project.ConditoinsDefine) {

                GenerateContent(ref table, cd.Name, i, cd,false);

                i++;
            }
            vbox2.PackEnd(table, true, true, 0);
            this.ShowAll();
        }
开发者ID:moscrif,项目名称:ide,代码行数:32,代码来源:FileConditionsPanel.cs


示例15: DebugView

        public DebugView(Settings set, DebugManager mgr)
        {
            debugManager = mgr;
            layout = new Table(2, 2, false);
            runStop = new Button("Interrupt");
            command = new Entry();
            log = new ConsoleLog(set);

            command.Activated += OnCommand;
            runStop.Clicked += OnRunStop;

            layout.Attach(log.View, 0, 2, 0, 1,
              AttachOptions.Fill,
              AttachOptions.Expand | AttachOptions.Fill,
              4, 4);
            layout.Attach(command, 0, 1, 1, 2,
              AttachOptions.Fill | AttachOptions.Expand,
              AttachOptions.Fill,
              4, 4);
            layout.Attach(runStop, 1, 2, 1, 2,
              AttachOptions.Fill, AttachOptions.Fill, 4, 4);

            runStop.SetSizeRequest(80, -1);

            command.Sensitive = false;
            runStop.Sensitive = false;

            mgr.MessageReceived += OnDebugOutput;
            mgr.DebuggerBusy += OnBusy;
            mgr.DebuggerReady += OnReady;
            mgr.DebuggerStarted += OnStarted;
            mgr.DebuggerExited += OnExited;
            layout.Destroyed += OnDestroy;
        }
开发者ID:dlbeer,项目名称:olishell,代码行数:34,代码来源:DebugView.cs


示例16: AddTabAndSlidersFor

        private void AddTabAndSlidersFor(Type t)
        {
            Table table = new Table(1,1,false);
            notebook.AppendPage(table, new Label(t.Name));
            uint fieldCount = 0;
            foreach (var field in t.GetFields()) {
                if (field.FieldType == typeof(float) &&
                    field.IsPublic && field.IsStatic) {
                    HScale hscale = new HScale(0, 1, 0.01);
                    hscale.Digits = 2;
                    foreach (var attribute in field.GetCustomAttributes(false)) {
                        if (attribute is RangeAttribute) {
                            var range = (RangeAttribute)attribute;
                            hscale.Adjustment.Upper = range.m_max;
                            hscale.Adjustment.Lower = range.m_min;
                            hscale.Digits = range.m_places;
                            break;
                        }
                    }
                    hscale.Value = (float)field.GetValue(null);
                    var localField = field;
                    hscale.ValueChanged += (obj, args) => {
                        localField.SetValue(null, (float)hscale.Value);
                    };

                    table.Resize(fieldCount+1, 2);
                    Label label = new Label(field.Name);
                    table.Attach(label , 0, 1, fieldCount, fieldCount+1);
                    table.Attach(hscale, 1, 2, fieldCount, fieldCount+1);
                    table.Homogeneous = false;
                    table.ShowAll();
                    fieldCount++;
                }
            }
        }
开发者ID:joebain,项目名称:MagnumHouse,代码行数:35,代码来源:PhysicsAdjuster.cs


示例17: CodeCompilationPanel

        public CodeCompilationPanel()
        {
            InitializeComponent();
            vbox = new VBox();
            var hboxTmp = new HBox();
            hboxTmp.PackStart (codeGenerationLabel, false, false, 0);
            vbox.PackStart (hboxTmp, false, false, 12);

            hboxTmp = new HBox();
            var tableOutputOptions = new Table (4, 2, false);
            tableOutputOptions.Attach (outputLabel, 0, 1, 0, 1, AttachOptions.Shrink, AttachOptions.Shrink, 0, 0);
            tableOutputOptions.Attach (outputAssembly, 1, 2, 0, 1, AttachOptions.Fill | AttachOptions.Expand, AttachOptions.Fill, 0, 3);
            tableOutputOptions.Attach (labelOutputDir, 0, 1, 1, 2, AttachOptions.Shrink, AttachOptions.Shrink, 0, 0);
            tableOutputOptions.Attach (outputDirectory, 1, 2, 1, 2, AttachOptions.Fill | AttachOptions.Expand , AttachOptions.Fill, 0, 3);
            tableOutputOptions.Attach (labelCompileTarget, 0, 1, 2, 3, AttachOptions.Shrink, AttachOptions.Shrink, 0, 0);
            tableOutputOptions.Attach (compileTargetCombo, 1, 2, 2, 3, AttachOptions.Fill | AttachOptions.Expand, AttachOptions.Fill, 0, 3);
            tableOutputOptions.Attach (labelCulture, 0, 1, 3, 4, AttachOptions.Shrink, AttachOptions.Shrink, 0, 0);
            tableOutputOptions.Attach (culture, 1, 2, 3, 4, AttachOptions.Fill | AttachOptions.Expand, AttachOptions.Fill, 0, 3);
            hboxTmp.PackStart (tableOutputOptions, true, true, 6);
            vbox.PackStart (hboxTmp, false, false, 0);

            hboxTmp = new HBox ();
            hboxTmp.PackStart (labelWarnings, false, false, 0);
            vbox.PackStart (hboxTmp, false, false, 12);
            hboxTmp = new HBox();
            hboxTmp.PackStart (checkDebug, false, false, 6);
            vbox.PackStart (hboxTmp, false, false, 0);
            hboxTmp = new HBox();
            hboxTmp.PackStart (checkDucky, false, false, 6);
            vbox.PackStart (hboxTmp, false, false, 0);

            vbox.ShowAll ();
        }
开发者ID:kibiz0r,项目名称:MonoBoo,代码行数:33,代码来源:CodeCompilationPanel.cs


示例18: Tile

        public Tile ()
        {
            Table table = new Table (2, 2, false);
            table.ColumnSpacing = 6;
            table.RowSpacing = 2;
            table.BorderWidth = 2;

            PrimaryLabel = new Label ();
            SecondaryLabel = new Label ();

            table.Attach (image, 0, 1, 0, 2, AttachOptions.Shrink, AttachOptions.Shrink, 0, 0);
            table.Attach (PrimaryLabel, 1, 2, 0, 1,
                AttachOptions.Fill | AttachOptions.Expand,
                AttachOptions.Shrink, 0, 0);
            table.Attach (SecondaryLabel, 1, 2, 1, 2,
                AttachOptions.Fill | AttachOptions.Expand,
                AttachOptions.Fill | AttachOptions.Expand, 0, 0);

            table.ShowAll ();
            Add (table);

            PrimaryLabel.Xalign = 0.0f;
            PrimaryLabel.Yalign = 0.0f;

            SecondaryLabel.Xalign = 0.0f;
            SecondaryLabel.Yalign = 0.0f;

            StyleSet += delegate {
                PrimaryLabel.ModifyFg (StateType.Normal, Style.Text (StateType.Normal));
                SecondaryLabel.ModifyFg (StateType.Normal, Hyena.Gui.GtkUtilities.ColorBlend (
                    Style.Foreground (StateType.Normal), Style.Background (StateType.Normal)));
            };

            Relief = ReliefStyle.None;
        }
开发者ID:haugjan,项目名称:banshee-hacks,代码行数:35,代码来源:Tile.cs


示例19: ArrayButton

        public ArrayButton()
        {
            this.Build ();
            table = new Table((uint)rows,(uint)colums, true);
            Add(table);

            refresh();
        }
开发者ID:pepe81,项目名称:edcs,代码行数:8,代码来源:ArrayButton.cs


示例20: PreferencesDialog

        public PreferencesDialog(Settings set, Window parent,
				 string argsOver)
        {
            settings = set;
            argsOverride = argsOver;

            dialog = new Dialog("Preferences", parent,
            DialogFlags.Modal | DialogFlags.DestroyWithParent,
            new object[]{Gtk.Stock.Close, -1});

            var table = new Table(4, 3, false);

            sUseBundledDebugger = new CheckButton("Use bundled MSPDebug");
            sUseBundledDebugger.Clicked += OnBundledState;
            table.Attach(sUseBundledDebugger, 0, 3, 0, 1,
             AttachOptions.Expand | AttachOptions.Fill,
             0, 4, 4);

            Label lbl;

            lbl = new Label("MSPDebug path:");
            lbl.SetAlignment(0.0f, 0.5f);
            table.Attach(lbl, 0, 1, 1, 2, AttachOptions.Fill, 0, 4, 4);
            sMSPDebugPath = new Entry();
            table.Attach(sMSPDebugPath, 1, 2, 1, 2,
             AttachOptions.Expand | AttachOptions.Fill,
             0, 4, 4);
            chooseMSPDebug = new Button("Choose...");
            chooseMSPDebug.Clicked += OnChoose;
            table.Attach(chooseMSPDebug, 2, 3, 1, 2,
             AttachOptions.Fill, 0, 4, 4);

            lbl = new Label("MSPDebug arguments:");
            lbl.SetAlignment(0.0f, 0.5f);
            table.Attach(lbl, 0, 1, 2, 3, AttachOptions.Fill, 0, 4, 4);
            sMSPDebugArgs = new Entry();
            sMSPDebugArgs.Sensitive = (argsOverride == null);
            table.Attach(sMSPDebugArgs, 1, 3, 2, 3,
             AttachOptions.Expand | AttachOptions.Fill,
             0, 4, 4);

            lbl = new Label("Console font:");
            lbl.SetAlignment(0.0f, 0.5f);
            table.Attach(lbl, 0, 1, 3, 4, AttachOptions.Fill, 0, 4, 4);
            sConsoleFont = new FontButton();
            table.Attach(sConsoleFont, 1, 3, 3, 4,
             AttachOptions.Expand | AttachOptions.Fill,
             0, 4, 4);

            table.ShowAll();
            ((Container)dialog.Child).Add(table);

            chooseDialog = new FileChooserDialog("Choose MSPDebug binary",
            dialog, FileChooserAction.Open,
            new object[]{Stock.Cancel, ResponseType.Cancel,
                 Stock.Ok, ResponseType.Ok});
            chooseDialog.DefaultResponse = ResponseType.Ok;
        }
开发者ID:dlbeer,项目名称:olishell,代码行数:58,代码来源:PreferencesDialog.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Gtk.TextBuffer类代码示例发布时间:2022-05-26
下一篇:
C# Gtk.SizeAllocatedArgs类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap