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


C# Gtk.Table类代码示例

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


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


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