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


C# Table.SetSizeRequest方法代码示例

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


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

示例1: InitializeComponents

        void InitializeComponents()
        {
            var stream = Assembly
                .GetExecutingAssembly()
                .GetManifestResourceStream(AppController.Instance.Config.AppWindow);

            var glade = new Glade.XML(stream, AppController.Instance.Config.AppWindowName, null);
            if (stream != null)
            {
                stream.Close();
            }
            glade.Autoconnect(this);

            mNew.Activated += OnNew;
            mOpen.Activated += OnOpen;
            mSave.Activated += OnSave;
            mSaveAs.Activated += OnSaveAs;
            mQuit.Activated += OnQuit;
            mEnvironment.Activated += OnEnvironment;
            mAbout.Activated += OnAbout;
            mExportToPng.Activated += OnExportToPng;

            rbDefault.Clicked += OnVariableRadiobuttonCliecked;
            rbExisting.Clicked += OnVariableRadiobuttonCliecked;
            rbNew.Clicked += OnVariableRadiobuttonCliecked;

            rbDefault1.Clicked += OnVariableRadiobuttonCliecked1;
            rbExisting1.Clicked += OnVariableRadiobuttonCliecked1;
            rbNew1.Clicked += OnVariableRadiobuttonCliecked1;

            rbDefault2.Clicked += OnVariableRadiobuttonCliecked2;
            rbExisting2.Clicked += OnVariableRadiobuttonCliecked2;
            rbNew2.Clicked += OnVariableRadiobuttonCliecked2;

            rbDefault3.Clicked += OnVariableRadiobuttonCliecked3;
            rbExisting3.Clicked += OnVariableRadiobuttonCliecked3;
            rbNew3.Clicked += OnVariableRadiobuttonCliecked3;

            DisableProperties ();

            cbDefaultVar.Changed += OnVariableComboboxChanged;
            cbExistVar.Changed += OnVariableComboboxChanged;
            etNewVar.Changed += OnVariableComboboxChanged;

            cbDefaultVar1.Changed += OnVariableComboboxChanged;
            cbExistVar1.Changed += OnVariableComboboxChanged;
            etNewVar1.Changed += OnVariableComboboxChanged;

            cbDefaultVar2.Changed += OnVariableComboboxChanged;
            cbExistVar2.Changed += OnVariableComboboxChanged;
            etNewVar2.Changed += OnVariableComboboxChanged;

            cbDefaultVar3.Changed += OnVariableComboboxChanged;
            cbExistVar3.Changed += OnVariableComboboxChanged;
            etNewVar3.Changed += OnVariableComboboxChanged;

            cbFunction.Changed += OnFunctionChanged;
            chbOverride.Toggled += OnOverrideToggled;

            IconList = new[]{ new Gdk.Pixbuf (Assembly.GetExecutingAssembly (), AppController.Instance.Config.Icon) };
            Icon = IconList[0];

            var surfaces = AppController.Instance.GetPalette ();

            var count = (uint)surfaces.Sum (s => s.Segments.Count);
            table1 = new Table (2, count / 2, true);

            var index = 0;
            for (uint i = 0; i < count / 2; i++) {
                for (uint j = 0; j < 2; j++) {
                    if (surfaces.Count() <= index) continue;
                    var surf = surfaces [index++];
                    var el = new ElementDrawing(surf, 2, 2 );
                    table1.Attach (el, i, i+1, j, j+(uint)surf.Segments.Count());
                    el.Show ();
                }
            }

            vboxPalette.Add (table1);

            table1.SetSizeRequest (300, 100);
            table1.Show ();

            _grid = new ElementDrawing(AppController.Instance.Surface, 24, 24);

            scrolledwindow1.AddWithViewport (_grid);

            _grid.Show ();

            var arduino = AppController.Instance.GetArduino ();

            var code = new ElementDrawing(arduino[0], 2, 2 );
            tblArdulino.Attach (code, 0, 1, 0, 1);
            code.CreateCode += CController.Instance.CreateCode;
            code.Show ();
            var t = new System.Threading.Thread(() =>
            {
                System.Threading.Thread.Sleep(2000);
                UpdateHelper.CompareVersions(this);
            });
//.........这里部分代码省略.........
开发者ID:jdpillon,项目名称:ArduinoLadder,代码行数:101,代码来源:AppWindow.cs

示例2: Build

		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void Build()
		{
			System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(LoginWindow));

			this.panel5 = new Fixed();
			//this.groupBox1 = new Gtk.Box();
			this.checkBox2 = new Gtk.CheckButton();
			this.checkBox1 = new Gtk.CheckButton();
			this.nickname_label = new Gtk.Label();
			this.nickname_ent = new Gtk.Entry();
			this.username_label = new Gtk.Label();
			this.username_ent = new Gtk.Entry();
			this.password_label = new Gtk.Label();
			this.password_ent = new Gtk.Entry();
			this.button1 = new Gtk.Button();
			this.LoginButton = new Gtk.Button();
			this.port = new Gtk.Entry();
			this.port_label = new Gtk.Label();
			this.server = new Gtk.Entry();
			this.server_label = new Gtk.Label();

			// Standard strings
			string nickName = "Guest";
			string accountName = "guest";
			string password = "7Y3bdzjf";
			bool rcmode = true;

		

			if (this.settings != null)
			{
				accountName = this.settings.Account;
				password = this.settings.Password;
				if (!this.settings2.Loaded)
					nickName = this.settings.Nickname;
				else
					nickName = this.settings2.Nickname;
				rcmode = this.settings.RCMode;
			}
			else
			{
				//return null;
			}

			// 
			// checkBox2
			// 
			this.checkBox2.Active = true;
			this.checkBox2.Name = "checkBox2";
			this.checkBox2.Label = "RC Mode?";
			this.checkBox2.Xalign = 0;
			this.checkBox2.Active = rcmode;

			// 
			// checkBox1
			//
			this.checkBox1.Active = false;
			this.checkBox1.Name = "checkBox1";
			this.checkBox1.Label = "Don\'t save password";
			this.checkBox1.Xalign = 0;
			
			// 
			// nickname_label
			// 
			this.nickname_label.Name = "nickname_label";
			this.nickname_label.Xalign = 0;
			this.nickname_label.SetSizeRequest(73, 23);
			this.nickname_label.Text = "Nickname:";

			// 
			// nickname
			// 
			this.nickname_ent.Name = "nickname";
			this.nickname_ent.Text = nickName;
			
			// 
			// username_label
			// 
			this.username_label.Name = "username_label";
			this.username_label.Xalign = 0;
			this.username_label.SetSizeRequest(73, 23);
			this.username_label.Text = "Account:";
			 
			// 
			// username
			// 
			this.username_ent.Name = "username";
			this.username_ent.Text = accountName;
			//this.username.Changed += new System.EventHandler(this.username_TextChanged);
			
			// 
			// password_label
			// 
			this.password_label.Name = "password_label";
			this.password_label.Xalign = 0;
			this.password_label.SetSizeRequest(73, 23);
//.........这里部分代码省略.........
开发者ID:Gunderak,项目名称:OpenGraal.RemoteControl-cs,代码行数:101,代码来源:LoginWindow.Designer.cs

示例3: Dispose

		/// <summary>
		/// Required designer variable.
		/// </summary>
		//private System.ComponentModel.IContainer components = null;
		/*
		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
		protected override void Dispose(bool disposing)
		{
			if (disposing && (components != null))
			{
				components.Dispose();
			}
			base.Dispose();
		}
		*/
		#region Windows Form Designer generated code

		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
			System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(LoginWindow));

			this.checkBox2 = new Gtk.CheckButton();
			this.checkBox1 = new Gtk.CheckButton();

			this.cancelButton = new Gtk.Button();
			this.loginButton = new Gtk.Button();


			// 
			// checkBox2
			// 
			this.checkBox2.Active = true;
			this.checkBox2.Name = "checkBox2";
			this.checkBox2.Label = "Graphical Menu";
			this.checkBox2.Xalign = 0;

			// 
			// checkBox1
			//
			this.checkBox1.Active = false;
			this.checkBox1.Name = "checkBox1";
			this.checkBox1.Label = "Don\'t save password";
			this.checkBox1.Xalign = 0;
			/*
			// 
			// nickname_label
			// 
			this.nickname_label.Name = "nickname_label";
			this.nickname_label.Xalign = 0;
			this.nickname_label.SetSizeRequest(73, 23);
			this.nickname_label.Text = "Nickname:";

			// 
			// nickname
			// 
			this.nickname.Name = "nickname";
			this.nickname.Text = "Guest";
			*/
			
			// 
			// button1
			// 
			this.cancelButton.SetSizeRequest(80, 25);
			this.cancelButton.Label = "Cancel";
			this.cancelButton.Clicked += new System.EventHandler(this.Close);

			// 
			// refreshButton
			// 
			this.refreshButton = new Gtk.Button();
			this.refreshButton.Name = "refreshButton";
			this.refreshButton.SetSizeRequest(80, 25);
			this.refreshButton.Label = "Refresh";
			this.refreshButton.Clicked += new System.EventHandler(this.refreshButton_Click);

			// 
			// LoginButton
			// 
			this.loginButton.Name = "LoginButton";
			this.loginButton.SetSizeRequest(80, 25);
			this.loginButton.Label = "Connect";
			this.loginButton.Clicked += new System.EventHandler(this.loginButton_Click);

			/*
			// 
			// port
			// 
			this.port.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(155)))), ((int)(((byte)(123)))), ((int)(((byte)(76)))));
			this.port.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
			this.port.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(213)))), ((int)(((byte)(184)))), ((int)(((byte)(142)))));
			this.port.Location = new System.Drawing.Point(215, 101);
			this.port.Margin = new System.Windows.Forms.Padding(0);
			this.port.MaximumSize = new System.Drawing.Size(50, 25);
//.........这里部分代码省略.........
开发者ID:Gunderak,项目名称:OpenGraal.RemoteControl-cs,代码行数:101,代码来源:ServerWindow.Designer.cs


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