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

C# Controls类代码示例

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

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



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

示例1: ResizeControlState

 public ResizeControlState(Controls controls, StateManager stateManager, CommandManager commandManager, FlagPosition flagPosition)
 {
     m_flagPosition = flagPosition;
     m_controls = controls;
     m_stateManager = stateManager;
     m_commandManager = commandManager;
 }
开发者ID:microm,项目名称:eplib,代码行数:7,代码来源:ResizeControlState.cs


示例2: OnMouseButton

        public static bool OnMouseButton(Controls.Control hoveredControl, int x, int y, bool down)
        {
            if (!down)
            {
                m_LastPressedControl = null;

                // Not carrying anything, allow normal actions
                if (CurrentPackage == null)
                    return false;

                // We were carrying something, drop it.
                onDrop(x, y);
                return true;
            }

            if (hoveredControl == null)
                return false;
            if (!hoveredControl.DragAndDrop_Draggable())
                return false;

            // Store the last clicked on control. Don't do anything yet,
            // we'll check it in OnMouseMoved, and if it moves further than
            // x pixels with the mouse down, we'll start to drag.
            m_LastPressedPos = new Vector2i(x, y);
            m_LastPressedControl = hoveredControl;

            return false;
        }
开发者ID:chartly,项目名称:flood,代码行数:28,代码来源:DragAndDrop.cs


示例3: AddDirectoryControls

        /// <summary>
        /// Adds extended controls to a packet.
        /// </summary>
        /// <param name="packet">The packet to which the controls are added.</param>
        /// <param name="controls">The controls.</param>
        internal void AddDirectoryControls(AdtsLdapPacket packet, params MsLdap.DirectoryControl[] controls)
        {
            LDAPMessage message = packet.ldapMessagev3;

            int existingControlCount = (message.controls != null) ? message.controls.Elements.Length : 0;
            Control[] controlArray = new Control[existingControlCount + controls.Length];

            // Add original existing controls
            for (int i = 0; i < existingControlCount; i++)
            {
                controlArray[i] = message.controls.Elements[i];
            }

            // Add newly added controls
            for (int i = 0; i < controls.Length; i++)
            {
                controlArray[existingControlCount + i] = new Control(
                    new LDAPOID(controls[i].Type),
                    new Asn1Boolean(controls[i].IsCritical),
                    new Asn1OctetString(controls[i].GetValue()));
            }

            Controls allControls = new Controls(controlArray);

            message.controls = allControls;
        }
开发者ID:yazeng,项目名称:WindowsProtocolTestSuites,代码行数:31,代码来源:AdtsLdapV3Encoder.cs


示例4: MainWindow

    public MainWindow()
        : base(Gtk.WindowType.Toplevel)
    {
        oXbmc = new XBMC_Communicator();
        oXbmc.SetIp("10.0.0.5");
        oXbmc.SetConnectionTimeout(4000);
        oXbmc.SetCredentials("", "");
        oXbmc.Status.StartHeartBeat();

        Build ();

        this.AllowStaticAccess();

        //Create objects used
        oPlaylist 		= new Playlist(this);
        oControls		= new Controls(this);
        oMenuItems		= new MenuItems(this);
        oContextMenu 	= new ContextMenu(this);
        oShareBrowser 	= new ShareBrowser(this);
        oTrayicon 		= new SysTrayIcon(this);
        oStatusUpdate	= new StatusUpdate(this);
        oMediaInfo		= new MediaInfo(this);
        oNowPlaying		= new NowPlaying(this);
        oGuiConfig		= new GuiConfig(this);

        nbDataContainer.CurrentPage = 0;
    }
开发者ID:Bram77,项目名称:xbmcontrol-evo,代码行数:27,代码来源:MainWindow.cs


示例5: Player

 public Player(Arman game, PositionInGrid positionInGrid, Texture2D texture, Block[,] gameArray, int oneBlockSize, int timeForMove, List<Entity> movableObjects, GameArea gameArea, Controls controls)
     : base(game, positionInGrid, texture, gameArray, oneBlockSize, timeForMove, movableObjects)
 {
     this.gameArea = gameArea;
     this.controls = controls;
     spawnPoint = positionInGrid;
 }
开发者ID:Cendrb,项目名称:Arman,代码行数:7,代码来源:Player.cs


示例6: TGPageLoadingEventArgs

 public TGPageLoadingEventArgs(Controls.TabPage tp, XmlTextReader xmlIn)
 {
     // Definie initial state
     _tp = tp;
     _xmlIn = xmlIn;
     _cancel = false;
 }
开发者ID:nithinphilips,项目名称:SMOz,代码行数:7,代码来源:TabbedGroupEventArgs.cs


示例7: RibbonTabGlyph

 public RibbonTabGlyph(BehaviorService behaviorService, RibbonDesigner designer, Controls.Ribbon.Ribbon ribbon)
     : base(new RibbonTabGlyphBehavior(designer, ribbon))
 {
     _behaviorService = behaviorService;
     _ribbon = ribbon;
     size = new Size(60, 16);
 }
开发者ID:AlexGaidukov,项目名称:gipertest_streaming,代码行数:7,代码来源:RibbonTabGlyph.cs


示例8: activate

    public void activate(GameObject Player)
    {
        if (isOccupied) {
            return;
        }

        if (erectOnEnter) {
            transform.eulerAngles.Set(transform.eulerAngles.x, transform.eulerAngles.y, 0);
        }
        player = Player.transform.parent.gameObject;

        isOccupied = true;

        if (VControls != null) VControls.isCarActive = true;
        controls = player.transform.FindChild("Camera").gameObject.GetComponent<Controls>();
        isActive = true;
        player.SetActive(false);
        ((Camera)gameObject.transform.Find("Camera").gameObject.GetComponent("Camera")).enabled = true;
        ((AudioListener)gameObject.transform.Find("Camera").gameObject.GetComponent("AudioListener")).enabled = true;

        if (!Sleep.Day) {
            foreach (GameObject go in Headlights) {
                go.SetActive(true);
            }
        }

        if (erectOnEnter && isActive) {
            float z = transform.eulerAngles.z;
            float x = transform.eulerAngles.x;
            transform.Rotate(-x, 0, -z);
        }
    }
开发者ID:wow4all,项目名称:Scripts,代码行数:32,代码来源:Vehicle.cs


示例9: FillRibbon

        public void FillRibbon( XmlDocument xmlDoc, Controls.Ribbon.RibbonControl ribbon )
        {
            Dictionary<string, Controls.Ribbon.Section> mapTagToSection = new Dictionary<string, Controls.Ribbon.Section>();
            Dictionary<string, Controls.Ribbon.Item> mapTagToItem = new Dictionary<string, Controls.Ribbon.Item>();

            FillRibbon( xmlDoc, ribbon, out mapTagToSection, out mapTagToItem );
        }
开发者ID:CecleCW,项目名称:ProductMan,代码行数:7,代码来源:RibbonFactory.cs


示例10: Row_Clicked

 private void Row_Clicked(Controls.Row row)
 {
     var data = new EventData(this);
     data.Id = "OPEN_DEVICE_DETAILS";
     data.Data01 = row.Device;
     SendData?.Invoke(data);
 }
开发者ID:TrakHound,项目名称:TrakHound-Community,代码行数:7,代码来源:StatusTimes.xaml.cs


示例11: CanDrop

        public override bool CanDrop(Controls.DragDropState state)
        {
            var appointment = state.Appointment as SupportMeetingAppointment;

            if (appointment == null)
            {
                // should be recurring Appointment
                appointment = (state.Appointment as Occurrence).Appointment as SupportMeetingAppointment;
            }

            if (appointment.IsDraggedFromListBox && state.TargetedAppointment != null)
            {
                var targetedAppointment = state.TargetedAppointment as SupportMeetingAppointment;
                var attendee = appointment.Attendees.First();
                if (targetedAppointment.Attendees.Contains(attendee))
                {
                    return false;
                }
                else
                {
                    return true;
                }
            }
            else if (appointment.IsDraggedFromListBox)
            {
                return false;
            }
            else
            {
                return base.CanDrop(state);
            }
        }
开发者ID:netintellect,项目名称:PluralsightSpaJumpStartFinal,代码行数:32,代码来源:ScheduleViewDragDropBehavior.cs


示例12: Awake

	void Awake() {
		Player.instance = this;
//		attacher = GetComponent<Attacher>();
		attacker = GetComponent<Attack> ();
//		equipper = GetComponent<Equip>();
//		focus = GetComponent<Focus>();
		grabber = GetComponent<Grab>();
		interactor = GetComponent<Interact>();
		inventory = GetComponent<Inventory>();
		mover = GetComponent<MovementController>();
		cam = GetComponentInChildren<Camera>();
		looker = GetComponentInChildren<MouseLook>();
		/*heat = GetComponent<Heat>();
		hunger = GetComponent<Hunger>();
		mapViewer = GetComponent<MapViewer>();*/
		controls = GetComponent<Controls>();

//		coldStart = 80;
//		coldExtra = 0.1f;
//		coldColor = new Color(0.25f, 0.5f, 1);
//		freezeTemp = -20;
		whiteOutTime = 0;
		breathingSource = gameObject.AddComponent<AudioSource>();
		breathingSource.clip = heavyBreathingSound;
		breathingSource.enabled = true;
		breathingSource.loop = true;
		whiteOutTexture = new Texture2D (1, 1, TextureFormat.RGB24, false);
		whiteOutTexture.SetPixel (0, 0, Color.white);
	}
开发者ID:AlyDrake,项目名称:OpenCircuit,代码行数:29,代码来源:Player.cs


示例13: DragDropCompleted

 public override void DragDropCompleted(Controls.DragDropState state)
 {
     if (state.DestinationAppointmentsSource != null)
     {
         base.DragDropCompleted(state);
     }
 }
开发者ID:netintellect,项目名称:PluralsightSpaJumpStartFinal,代码行数:7,代码来源:ScheduleViewDragDropBehavior.cs


示例14: Resize

        public static void Resize(FlagPosition flagPosition,  TPoint offset , Controls controls)
        {
            foreach (ControlBase control in controls)
            {
                Rect controlRect = control.Rect;

                if ((flagPosition & FlagPosition.Left) == FlagPosition.Left)
                {
                    controlRect.Left = controlRect.Left + offset.X;
                }
                else if ((flagPosition & FlagPosition.Right) == FlagPosition.Right)
                {
                    controlRect.Right = controlRect.Right + offset.X;
                }

                if ((flagPosition & FlagPosition.Top) == FlagPosition.Top)
                {
                    controlRect.Top = controlRect.Top + offset.Y;
                }
                else if ((flagPosition & FlagPosition.Bottom) == FlagPosition.Bottom)
                {
                    controlRect.Bottom = controlRect.Bottom + offset.Y;
                }
                control.Rect = controlRect;
            }
        }
开发者ID:microm,项目名称:eplib,代码行数:26,代码来源:ResizeControlState.cs


示例15: fileExplorer1_FileDoubleClicked

 void fileExplorer1_FileDoubleClicked(object sender, Controls.FileExplorerEventArgs e)
 {
     Debug.WriteLine("File double clicked.");
     Debug.WriteLine("Files:");
     string[] files = fileExplorer1.SelectedFiles();
     foreach (string ptrFile in files) Debug.WriteLine(ptrFile);
 }
开发者ID:Code-Artist,项目名称:CodeArtEng.Controls,代码行数:7,代码来源:Form1.cs


示例16: PaymentReceived

		protected void PaymentReceived(object sender, Controls.Payment.PaymentDoneEventArgs e)
		{
			if (!e.Duplicate)
			{
				Mailer m = new Mailer();
				m.Body = @" 
<p>Thank you!</p>
<p>Payment receipt for £" + ((int)(int.Parse(TicketsQuantityTextBox.Text) * 20)).ToString() + @".</p>
<p>Reference: " + int.Parse(TicketsQuantityTextBox.Text) + @" ticket" + (int.Parse(TicketsQuantityTextBox.Text)==1?"":"s") + @" for Camp DSI 2006.</p>
<p>Payment reference: "+e.Invoices[0].K.ToString()[email protected]".</p>
<p>Please regularly check the Camp DSI event listing for further information and updates.</p>
<p>See you soon!</p>";
				m.Bulk = false;
				m.RedirectUrl = "/uk/barnstaple/a-secret-location/2006/jun/17/event-29398";
				m.Subject = "Receipt for Camp DSI tickets";
				m.UsrRecipient = Usr.Current;
				m.Send();

				Usr.Current.CampTickets += int.Parse(TicketsQuantityTextBox.Text);
				Usr.Current.Update();
			}

			Update u = new Update();
			u.Changes.Add(new Assign.Override(Bobs.Global.Columns.ValueInt, "(select sum(CampTickets) from Usr)"));
			u.Table=TablesEnum.Global;
			u.Where=new Q(Bobs.Global.Columns.K,Bobs.Global.Records.CampDsiTickets);
			u.Run();

			Usr.Current.AttendEvent(29398, true, null, null);
			DoneQuantityLabel.Text = int.Parse(TicketsQuantityTextBox.Text).ToString() + " ticket" + (int.Parse(TicketsQuantityTextBox.Text) == 1 ? "" : "s");
			ChangePanel(DonePanel);
		}
开发者ID:davelondon,项目名称:dontstayin,代码行数:32,代码来源:Camp.ascx.cs


示例17: DrawButton

        public override void DrawButton(Controls.Control control, bool depressed, bool hovered, bool disabled)
        {
            int w = control.Width;
            int h = control.Height;

            DrawButton(w, h, depressed, hovered);
        }
开发者ID:chartly,项目名称:flood,代码行数:7,代码来源:Simple.cs


示例18: RibbonDropDown

 internal RibbonDropDown(
     RibbonItem parentItem,
     IEnumerable<RibbonItem> items,
     Controls.Ribbon.Ribbon ownerRibbon)
     : this(parentItem, items, ownerRibbon, RibbonElementSizeMode.DropDown)
 {
 }
开发者ID:AlexGaidukov,项目名称:gipertest_streaming,代码行数:7,代码来源:RibbonDropDown.cs


示例19: DotNetCustomCalDotNetack_CustomCalDotNetack

 protected void DotNetCustomCalDotNetack_CustomCalDotNetack(object sender, Controls.CustomCalDotNetack.DotNetCustomCalDotNetack.CustomCalDotNetackEventArgs e)
 {
     string action = e.Parameters;
     _presenter = new UserEditPresenter(this);
     bool result = SaveOrUpdate();
     DotNetCustomCalDotNetack.CalDotNetackResult.Result = result.ToString();
 }
开发者ID:nxlibing,项目名称:managesystem,代码行数:7,代码来源:UserEdit.aspx.cs


示例20: formView_OnDataBindRow

 void formView_OnDataBindRow(string columnName, Controls.UcFormView.FormViewRow viewRow)
 {
     if (columnName == SysReward.Columns.RewardMemo)
         viewRow.RenderHtml = Eleooo.Web.Controls.HtmlControl.GetTextAreaHtml(viewRow.ParamName, viewRow.Value);
     else if (columnName == SysReward.Columns.RewardFlag)
         viewRow.RenderHtml = Eleooo.Web.Controls.HtmlControl.GetRadioHtml(RewardBLL.RewardFlag, viewRow.ParamName, viewRow.Value).ToString( );
 }
开发者ID:eleooo,项目名称:App,代码行数:7,代码来源:SysRewardEdit.aspx.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# ConventionBuilder类代码示例发布时间:2022-05-24
下一篇:
C# ControllerType类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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