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


C# Controls类代码示例

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


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


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