コード例 #1
0
		public override void Add (IComponent component, string name)
		{
			IDesigner designer;
			
			base.Add (component, name);
			
			if (_rootComponent == null) {
				_rootComponent = component;
				designer = this.CreateDesigner (component, true);
			}
			else {
				designer = this.CreateDesigner (component, false);
			}
			
			if (designer != null) {	
				_designers[component] = designer;
				designer.Initialize (component);
			}

			if (component is IExtenderProvider) {
				IExtenderProviderService service = this.GetService (typeof (IExtenderProviderService)) as IExtenderProviderService;
				if (service != null)
					service.AddExtenderProvider ((IExtenderProvider) component);
			}
		}
 public override void Initialize(IComponent component)
 {
     base.Initialize(component);
     base.AutoResizeHandles = true;
     this.propChanged = new EventHandler(this.OnControlPropertyChanged);
     ((ComboBox) this.Control).StyleChanged += this.propChanged;
 }
コード例 #3
0
 /// <summary>
 ///    <para>
 ///       Initializes the designer with the component for design.
 ///    </para>
 /// </summary>
 /// <param name='component'>
 ///    The control element for design.
 /// </param>
 /// <remarks>
 ///    <para>
 ///       This is called by the designer host to establish the component for
 ///       design.
 ///    </para>
 /// </remarks>
 /// <seealso cref='System.ComponentModel.Design.IDesigner'/>
 public override void Initialize(IComponent component)
 {
     Debug.Assert(component is System.Web.UI.MobileControls.TextBox,
                  "TextBoxDesigner.Initialize - Invalid TextBox Control");
     _textBox = (System.Web.UI.MobileControls.TextBox) component;
     base.Initialize(component);
 }
コード例 #4
0
ファイル: BoxCollider.cs プロジェクト: kaldhu/MyGameEngine
        private float m_Radius;         // size of the collider for a sphere

        public Collider(Vector3 size,Boolean trigger = false, IComponent material = null, Vector3 centre = null )
        {
            m_Trigger = trigger;
            m_Material = material;
            m_Centre = centre != null ? centre : new Vector3();
            m_Size = size;
        }
コード例 #5
0
		public DesignModeSite (IComponent component, string name, IContainer container, IServiceProvider serviceProvider)
		{
			_component = component;
			_container = container;
			_componentName = name;
			_serviceProvider = serviceProvider;
		}
コード例 #6
0
 protected virtual void VisitComponent(IComponent component)
 {
     foreach (var property in component.Properties)
     {
         VisitProperty(property);
     }
 }
コード例 #7
0
 /// <summary>
 /// Overridden. Inherited from <see cref="ControlDesigner.Initialize( IComponent )"/>.
 /// </summary>
 /// <param name="component">
 /// The <see cref="IComponent"/> hosted by the designer.
 /// </param>
 public override void Initialize(IComponent component)
 {
     _page = component as MultiPanelPage;
     if (_page == null)
         DisplayError(new Exception("You attempted to use a MultiPanelPageDesigner with a class that does not inherit from MultiPanelPage."));
     base.Initialize(component);
 }
コード例 #8
0
 /// <summary>
 /// Initialize
 /// </summary>
 /// <param name="component"></param>
 /// <remarks>
 /// Initialize
 /// </remarks>
 public override void Initialize(IComponent component)
 {
     this.deluxeGrid = (DeluxeGrid)component;
     base.Initialize(component);
     SetViewFlags(ViewFlags.DesignTimeHtmlRequiresLoadComplete, true);
     SetViewFlags(ViewFlags.TemplateEditing, true);
 }
コード例 #9
0
 public object DrawAndGetNewValue(Type type, string fieldName, object value, Entity entity, int index, IComponent component) {
     var myObject = (CustomObject)value;
     var fieldType = myObject.GetType().GetField("name").FieldType;
     EntityInspector.DrawAndSetElement(fieldType, "customObject.name", myObject.name,
         entity, index, component, newValue => myObject.name = (string)newValue);
     return myObject;
 }
コード例 #10
0
ファイル: Group.cs プロジェクト: ntl92bk/Entitas-CSharp
 public void HandleEntity(Entity entity, int index, IComponent component) {
     if (_matcher.Matches(entity)) {
         addEntity(entity, index, component);
     } else {
         removeEntity(entity, index, component);
     }
 }
コード例 #11
0
		/// <summary>
		/// Initializes a new instance of the ImageListViewActionLists class.
		/// </summary>
		/// <param name="component">A component related to the DesignerActionList.</param>
		public ImageListViewActionLists(IComponent component)
			: base(component)
		{
			imageListView = (ImageListView)component;

			designerService = (DesignerActionUIService)GetService(typeof(DesignerActionUIService));
		}
コード例 #12
0
 public override void Initialize(IComponent component)
 {
     Debug.Assert(component is System.Web.UI.MobileControls.AdRotator,
                  "AdRotatorDesigner.Initialize - Invalid AdRotator Control");
     _adRotator = (System.Web.UI.MobileControls.AdRotator) component;
     base.Initialize(component);
 }
コード例 #13
0
ファイル: ComponentSelector.cs プロジェクト: romeowa/hadows8
        /// <summary>
        /// 
        /// </summary>
        private void InvokeItemSelected(IComponent component)
        {
            if (ItemSelected == null)
                return;

            ItemSelected(this, component);
        }
コード例 #14
0
 internal DesignerActionBehavior(IServiceProvider serviceProvider, IComponent relatedComponent, DesignerActionListCollection actionLists, DesignerActionUI parentUI)
 {
     this.actionLists = actionLists;
     this.serviceProvider = serviceProvider;
     this.relatedComponent = relatedComponent;
     this.parentUI = parentUI;
 }
コード例 #15
0
 /// <summary>
 ///    <para>
 ///       Initializes the designer with the component for design.
 ///    </para>
 /// </summary>
 /// <param name='component'>
 ///    The control element for design.
 /// </param>
 /// <remarks>
 ///    <para>
 ///       This is called by the designer host to establish the component for
 ///       design.
 ///    </para>
 /// </remarks>
 /// <seealso cref='System.ComponentModel.Design.IDesigner'/>
 public override void Initialize(IComponent component)
 {
     Debug.Assert(component is System.Web.UI.MobileControls.Calendar,
                  "CalendarDesigner.Initialize - Invalid Calendar Control");
     _calendar = (System.Web.UI.MobileControls.Calendar) component;
     base.Initialize(component);
 }
コード例 #16
0
 public override void Initialize(IComponent component)
 {
     _accordion = component as Accordion;
     if (_accordion == null)
         throw new ArgumentException("Component must be an Accordion control", "component");
     base.Initialize(component);
 }
コード例 #17
0
 void OnGameBoardElementAdded(Group group, Entity entity, int index, IComponent component)
 {
     var grid = pool.gameBoardCache.grid;
     var pos = entity.position;
     grid.Add(pos.x, pos.y, entity);
     pool.ReplaceGameBoardCache(grid);
 }
コード例 #18
0
        public ComponentIsInStateCondition(IComponent component, ComponentState state)
        {
            if (component == null) throw new ArgumentNullException(nameof(component));
            if (state == null) throw new ArgumentNullException(nameof(state));

            WithExpression(() => component.GetState().Equals(state));
        }
コード例 #19
0
		protected override ISite CreateSite(IComponent component,string name)
		{
			ISite site = base.CreateSite(component,name);
			if (site == null) {
			}
			return new IDESite(component,this,name);
		}
コード例 #20
0
        /// <summary>
        /// Initializes the designer with the specified component.
        /// </summary>
        /// <param name="component">The IComponent to associate the designer with.</param>
        public override void Initialize(IComponent component)
        {
            // Validate the parameter reference
            if (component == null) throw new ArgumentNullException("component");

            // Let base class do standard stuff
            base.Initialize(component);

            // The resizing handles around the control need to change depending on the
            // value of the AutoSize and AutoSizeMode properties. When in AutoSize you
            // do not get the resizing handles, otherwise you do.
            AutoResizeHandles = true;

            // Cast to correct type
            _breadCrumb = component as KryptonBreadCrumb;

            if (_breadCrumb != null)
            {
                // Hook into bread crumb events
                _breadCrumb.GetViewManager().MouseUpProcessed += new MouseEventHandler(OnBreadCrumbMouseUp);
                _breadCrumb.GetViewManager().DoubleClickProcessed += new PointHandler(OnBreadCrumbDoubleClick);
            }

            // Get access to the design services
            _designerHost = (IDesignerHost)GetService(typeof(IDesignerHost));
            _changeService = (IComponentChangeService)GetService(typeof(IComponentChangeService));
            _selectionService = (ISelectionService)GetService(typeof(ISelectionService));

            // We need to know when we are being removed
            _changeService.ComponentRemoving += new ComponentEventHandler(OnComponentRemoving);
        }
コード例 #21
0
ファイル: ControlDesigner.cs プロジェクト: Profit0004/mono
		public override void Initialize (IComponent component)
		{
			base.Initialize (component);

			if (!(component is Control))
				throw new ArgumentException ("Component is not a Control.");

			Control.Text = component.Site.Name;
			_messageRouter = new WndProcRouter ((Control) component, (IMessageReceiver) this);
			Control.WindowTarget = _messageRouter;

			// DT properties
			//
			this.Visible = true;
			this.Enabled = true;
			this.Locked = false;
			this.AllowDrop = false;
			//
			// The control properties
			//
			Control.Enabled = true;
			Control.Visible = true;
			Control.AllowDrop = false;

			this.Control.DragDrop += new DragEventHandler (OnDragDrop);
			this.Control.DragEnter += new DragEventHandler (OnDragEnter);
			this.Control.DragLeave += new EventHandler (OnDragLeave);
			this.Control.DragOver += new DragEventHandler (OnDragOver);

			// XXX: The control already has a handle?
			//
			if (Control.IsHandleCreated)
				OnCreateHandle ();

		}
コード例 #22
0
 /// <summary>
 ///    <para>
 ///       Initializes the designer with the component for design.
 ///    </para>
 /// </summary>
 /// <param name='component'>
 ///    The control element for design.
 /// </param>
 /// <remarks>
 ///    <para>
 ///       This is called by the designer host to establish the component for
 ///       design.
 ///    </para>
 /// </remarks>
 /// <seealso cref='System.ComponentModel.Design.IDesigner'/>
 public override void Initialize(IComponent component)
 {
     Debug.Assert(component is System.Web.UI.MobileControls.Link,
                  "LinkDesigner.Initialize - Invalid Link Control");
     _link = (System.Web.UI.MobileControls.Link) component;
     base.Initialize(component);
 }
		protected override void When()
        {
			component = component
				.WithName("name")
				.WithAttr("name", "other")
				.WithAttr("misc", "random");
        }
コード例 #24
0
 /// <devdoc>
 ///     Creates a new NestedContainer.
 /// </devdoc>
 public NestedContainer(IComponent owner) {
     if (owner == null) {
         throw new ArgumentNullException("owner");
     }
     _owner = owner;
     _owner.Disposed += new EventHandler(OnOwnerDisposed);
 }
コード例 #25
0
		string GetComponentName(IComponent component)
		{
			string siteName = component.Site.Name;
			if (GeneralOptionsPanel.GenerateVisualStudioStyleEventHandlers)
				return siteName;
			return Char.ToUpper(siteName[0]) + siteName.Substring(1);
		}
コード例 #26
0
        /// <summary>
        /// Initializes the designer with the specified component.
        /// </summary>
        /// <param name="component">The IComponent to associate the designer with.</param>
        public override void Initialize(IComponent component)
        {
            Debug.Assert(component != null);

            // Validate the parameter reference
            if (component == null) throw new ArgumentNullException("component");

            // Let base class do standard stuff
            base.Initialize(component);

            // Cast to correct type
            _groupBox = component as KryptonGroupBox;

            // The resizing handles around the control need to change depending on the
            // value of the AutoSize and AutoSizeMode properties. When in AutoSize you
            // do not get the resizing handles, otherwise you do.
            AutoResizeHandles = true;

            // Acquire service interfaces
            _designerHost = (IDesignerHost)GetService(typeof(IDesignerHost));

            // Let the internal panel in the container be designable
            if (_groupBox != null)
                EnableDesignMode(_groupBox.Panel, "Panel");
        }
 protected virtual void Dispose(bool disposing)
 {
     if (disposing)
     {
         IPropertyValueUIService service = (IPropertyValueUIService) this.GetService(typeof(IPropertyValueUIService));
         if (service != null)
         {
             service.RemovePropertyValueUIHandler(new PropertyValueUIHandler(this.OnGetUIValueItem));
         }
         IServiceContainer container = (IServiceContainer) this.GetService(typeof(IServiceContainer));
         if (container != null)
         {
             if (this._urlResolutionService != null)
             {
                 container.RemoveService(typeof(IUrlResolutionService));
             }
             container.RemoveService(typeof(IImplicitResourceProvider));
             if (this._designerActionService != null)
             {
                 this._designerActionService.Dispose();
             }
             this._designerActionUIService.Dispose();
         }
         this._urlResolutionService = null;
         this._component = null;
     }
 }
コード例 #28
0
 private string RenderHtml(IComponent component)
 {
     string layout = ReadLayout();
     string content = BuildContent(component);            
     content = layout.Replace("@Body@", content); 
     return content;
 }
コード例 #29
0
ファイル: BoxCollider.cs プロジェクト: kaldhu/MyGameEngine
 public Collider( float radius,Boolean trigger = false, IComponent material = null, Vector3 centre = null)
 {
     m_Trigger = trigger;
     m_Material = material;
     m_Centre = centre != null ? centre : new Vector3();
     m_Radius = radius;
 }
コード例 #30
0
 public virtual void Add(IComponent component, string name)
 {
     lock (this.syncObj)
     {
         if (component != null)
         {
             ISite site = component.Site;
             if ((site == null) || (site.Container != this))
             {
                 if (this.sites == null)
                 {
                     this.sites = new ISite[4];
                 }
                 else
                 {
                     this.ValidateName(component, name);
                     if (this.sites.Length == this.siteCount)
                     {
                         ISite[] destinationArray = new ISite[this.siteCount * 2];
                         Array.Copy(this.sites, 0, destinationArray, 0, this.siteCount);
                         this.sites = destinationArray;
                     }
                 }
                 if (site != null)
                 {
                     site.Container.Remove(component);
                 }
                 ISite site2 = this.CreateSite(component, name);
                 this.sites[this.siteCount++] = site2;
                 component.Site = site2;
                 this.components = null;
             }
         }
     }
 }
コード例 #31
0
        /// <inheritdoc />
        public void SendDirectedComponentNetworkMessage(INetChannel channel, IEntity entity, IComponent component, ComponentMessage message)
        {
            if (_mNetManager.IsClient)
            {
                return;
            }

            if (!component.NetID.HasValue)
            {
                throw new ArgumentException($"Component {component.Name} does not have a NetID.", nameof(component));
            }

            var msg = _mNetManager.CreateNetMessage <MsgEntity>();

            msg.Type             = EntityMessageType.ComponentMessage;
            msg.EntityUid        = entity.Uid;
            msg.NetId            = component.NetID.Value;
            msg.ComponentMessage = message;

            //Send the message
            if (channel == null)
            {
                _mNetManager.ServerSendToAll(msg);
            }
            else
            {
                _mNetManager.ServerSendMessage(msg, channel);
            }
        }
コード例 #32
0
        public static void DrawAndSetElement(Type type, string fieldName, object value, Entity entity, int index, IComponent component, Action <object> setValue)
        {
            var newValue = DrawAndGetNewValue(type, fieldName, value, entity, index, component);

            if (DidValueChange(value, newValue))
            {
                entity.WillRemoveComponent(index);
                setValue(newValue);
                entity.ReplaceComponent(index, component);
            }
        }
コード例 #33
0
        void drawComponent(EntityDebugBehaviour debugBehaviour, Entity entity, int index, IComponent component)
        {
            var componentType = component.GetType();
            var fields        = componentType.GetFields(BindingFlags.Public | BindingFlags.Instance);

            EditorGUILayout.BeginVertical(GUI.skin.box);
            EditorGUILayout.BeginHorizontal();
            if (fields.Length == 0)
            {
                EditorGUILayout.LabelField(componentType.RemoveComponentSuffix(), EditorStyles.boldLabel);
            }
            else
            {
                debugBehaviour.unfoldedComponents[index] = EditorGUILayout.Foldout(debugBehaviour.unfoldedComponents[index], componentType.RemoveComponentSuffix(), _foldoutStyle);
            }
            if (GUILayout.Button("-", GUILayout.Width(19), GUILayout.Height(14)))
            {
                entity.RemoveComponent(index);
            }
            EditorGUILayout.EndHorizontal();

            if (debugBehaviour.unfoldedComponents[index])
            {
                foreach (var field in fields)
                {
                    var value = field.GetValue(component);
                    DrawAndSetElement(field.FieldType, field.Name, value,
                                      entity, index, component, newValue => field.SetValue(component, newValue));
                }
            }
            EditorGUILayout.EndVertical();
        }
コード例 #34
0
 public abstract object GetValue(IComponent source, IPage page = null);
コード例 #35
0
 /// <summary>
 /// Prepares the designer to view, edit, and design the specified component.
 /// </summary>
 /// <param name="component">The component for this designer.</param>
 public override void Initialize(IComponent component)
 {
     base.Initialize(component);
     _ctl = component as NuGenMiniBarControl;
 }
コード例 #36
0
    public object DrawAndGetNewValue(Type type, string fieldName, object value, Entity entity, int index, IComponent component)
    {
        var myObject  = (CustomObject)value;
        var fieldType = myObject.GetType().GetField("name").FieldType;

        EntityEditor.DrawAndSetElement(fieldType, "customObject.name", myObject.name,
                                       entity, index, component, newValue => myObject.name = (string)newValue);
        return(myObject);
    }
コード例 #37
0
ファイル: Group.cs プロジェクト: ValtoLibraries/Entitas
 /// This is used by the context to manage the group.
 public void UpdateEntity(TEntity entity, int index, IComponent previousComponent, IComponent newComponent)
 {
     if (_entities.Contains(entity))
     {
         if (OnEntityRemoved != null)
         {
             OnEntityRemoved(this, entity, index, previousComponent);
         }
         if (OnEntityAdded != null)
         {
             OnEntityAdded(this, entity, index, newComponent);
         }
         if (OnEntityUpdated != null)
         {
             OnEntityUpdated(
                 this, entity, index, previousComponent, newComponent
                 );
         }
     }
 }
コード例 #38
0
 public MyPostfixDecorator(string postfix, IComponent component)
 {
     _postfix   = postfix;
     _component = component;
 }
コード例 #39
0
 /// <summary>
 ///     Invoked when this verb is activated from the right click menu.
 /// </summary>
 /// <param name="user">The entity of the user opening this menu.</param>
 /// <param name="component">The component instance for which this verb is being loaded.</param>
 public abstract void Activate(IEntity user, IComponent component);
コード例 #40
0
 public void SendComponentNetworkMessage(IEntity entity, IComponent component, ComponentMessage message)
 {
     throw new NotImplementedException();
 }
コード例 #41
0
 /// <summary>
 ///     Gets the text string that will be shown to <paramref name="user"/> in the right click menu.
 /// </summary>
 /// <param name="user">The entity of the user opening this menu.</param>
 /// <param name="component">The component instance for which this verb is being loaded.</param>
 /// <returns>The text string that is shown in the right click menu for this verb.</returns>
 public abstract string GetText(IEntity user, IComponent component);
コード例 #42
0
 public MyPrefixDecorator(string prefix, IComponent component)
 {
     _prefix    = prefix;
     _component = component;
 }
コード例 #43
0
ファイル: EntityDrawer.cs プロジェクト: pacman899/Match-One
        public static bool DrawComponentMember(Type memberType, string memberName, object value, IComponent component, Action <IComponent, object> setValue)
        {
            if (value == null)
            {
                EditorGUI.BeginChangeCheck();
                {
                    var isUnityObject = memberType == typeof(UnityEngine.Object) || memberType.IsSubclassOf(typeof(UnityEngine.Object));
                    EditorGUILayout.BeginHorizontal();
                    {
                        if (isUnityObject)
                        {
                            setValue(component, EditorGUILayout.ObjectField(memberName, (UnityEngine.Object)value, memberType, true));
                        }
                        else
                        {
                            EditorGUILayout.LabelField(memberName, "null");
                        }

                        if (EntitasEditorLayout.MiniButton("new " + memberType.ToCompilableString().ShortTypeName()))
                        {
                            object defaultValue;
                            if (CreateDefault(memberType, out defaultValue))
                            {
                                setValue(component, defaultValue);
                            }
                        }
                    }
                    EditorGUILayout.EndHorizontal();
                }

                return(EditorGUI.EndChangeCheck());
            }

            if (!memberType.IsValueType)
            {
                EditorGUILayout.BeginHorizontal();
                EditorGUILayout.BeginVertical();
            }

            EditorGUI.BeginChangeCheck();
            {
                var typeDrawer = getTypeDrawer(memberType);
                if (typeDrawer != null)
                {
                    setValue(component, typeDrawer.DrawAndGetNewValue(memberType, memberName, value, component));
                }
                else
                {
                    drawUnsupportedType(memberType, memberName, value);
                    EditorGUILayout.BeginVertical();
                    {
                        EditorGUILayout.Space();
                        var infos = memberType.GetPublicMemberInfos();
                        for (int i = 0; i < infos.Count; i++)
                        {
                            var info = infos[i];
                            EditorGUILayout.LabelField(info.name, info.GetValue(value).ToString());
                        }
                    }
                    EditorGUILayout.EndVertical();
                }

                if (!memberType.IsValueType)
                {
                    EditorGUILayout.EndVertical();
                    if (EntitasEditorLayout.MiniButton("×"))
                    {
                        setValue(component, null);
                    }
                    EditorGUILayout.EndHorizontal();
                }
            }

            return(EditorGUI.EndChangeCheck());
        }
コード例 #44
0
 /// <summary>
 ///     Gets whether this verb is "disabled" in the right click menu.
 ///     The verb is still visible in disabled state, but greyed out.
 /// </summary>
 /// <param name="user">The entity of the user opening this menu.</param>
 /// <param name="component">The component instance for which this verb is being loaded.</param>
 /// <returns>True if the verb is disabled, false otherwise.</returns>
 public abstract bool IsDisabled(IEntity user, IComponent component);
コード例 #45
0
 private static string GetName(IComponent component)
 => component.GetType().Name;
コード例 #46
0
 public bool InsertComponentEvent(IComponent component, EventDescriptor edesc, string eventMethodName, string body, out string file, out int position)
 {
     throw new NotImplementedException();
 }
コード例 #47
0
 public override void Initialize(IComponent component)
 {
     base.Initialize(component);
     AutoResizeHandles = true;
 }
コード例 #48
0
ファイル: EntityDrawer.cs プロジェクト: pacman899/Match-One
        public static void DrawComponent(bool[] unfoldedComponents, string[] componentMemberSearch, IContext context, IEntity entity, int index, IComponent component)
        {
            var componentType = component.GetType();
            var componentName = componentType.Name.RemoveComponentSuffix();

            if (EntitasEditorLayout.MatchesSearchString(componentName.ToLower(), componentNameSearchString.ToLower()))
            {
                var boxStyle = getColoredBoxStyle(context, index);
                EditorGUILayout.BeginVertical(boxStyle);
                {
                    var memberInfos = componentType.GetPublicMemberInfos();
                    EditorGUILayout.BeginHorizontal();
                    {
                        if (memberInfos.Count == 0)
                        {
                            EditorGUILayout.LabelField(componentName, EditorStyles.boldLabel);
                        }
                        else
                        {
                            unfoldedComponents[index] = EntitasEditorLayout.Foldout(unfoldedComponents[index], componentName, foldoutStyle);
                            if (unfoldedComponents[index])
                            {
                                componentMemberSearch[index] = memberInfos.Count > 5
                                                                          ? EntitasEditorLayout.SearchTextField(componentMemberSearch[index])
                                                                          : string.Empty;
                            }
                        }
                        if (EntitasEditorLayout.MiniButton("-"))
                        {
                            entity.RemoveComponent(index);
                        }
                    }
                    EditorGUILayout.EndHorizontal();

                    if (unfoldedComponents[index])
                    {
                        var newComponent = entity.CreateComponent(index, componentType);
                        component.CopyPublicMemberValues(newComponent);

                        var changed         = false;
                        var componentDrawer = getComponentDrawer(componentType);
                        if (componentDrawer != null)
                        {
                            EditorGUI.BeginChangeCheck();
                            {
                                componentDrawer.DrawComponent(newComponent);
                            }
                            changed = EditorGUI.EndChangeCheck();
                        }
                        else
                        {
                            foreach (var info in memberInfos)
                            {
                                if (EntitasEditorLayout.MatchesSearchString(info.name.ToLower(), componentMemberSearch[index].ToLower()))
                                {
                                    if (DrawComponentMember(info.type, info.name, info.GetValue(newComponent), newComponent, info.SetValue))
                                    {
                                        changed = true;
                                    }
                                }
                            }
                        }

                        if (changed)
                        {
                            entity.ReplaceComponent(index, newComponent);
                        }
                        else
                        {
                            entity.GetComponentPool(index).Push(newComponent);
                        }
                    }
                }
                EntitasEditorLayout.EndVerticalBox();
            }
        }
コード例 #49
0
		public virtual void Initialize (IComponent component)
		{
			throw new NotImplementedException ();
		}
コード例 #50
0
 public TipoServicioService(IComponent <TipoServicio> component) : base(component)
 {
 }
コード例 #51
0
 public override void Initialize(IComponent component)
 {
     base.Initialize(component);
 }
コード例 #52
0
 public Decorator(IComponent component)
 {
     _component = component;
 }
コード例 #53
0
 public void AddComponent(IComponent component)
 {
     components.Add(component);
 }
コード例 #54
0
 public ComponentEventArgs(IComponent component)
 {
     this.Component = component;
 }
コード例 #55
0
ファイル: LocalizingInfo.cs プロジェクト: vkarthim/l10nsharp
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Returns the localization category for the specified IComponent object.
        /// </summary>
        /// ------------------------------------------------------------------------------------
        private static LocalizationCategory GetCategory(IComponent component)
        {
            if (component is ILocalizableComponent)
            {
                return(LocalizationCategory.LocalizableComponent);
            }
            if (component is ToolStripMenuItem)
            {
                return(LocalizationCategory.MenuItem);
            }
            if (component is ToolStripItem)
            {
                return(LocalizationCategory.ToolbarOrStatusBarItem);
            }
            if (component is Button)
            {
                return(LocalizationCategory.Button);
            }
            if (component is TextBox)
            {
                return(LocalizationCategory.TextBox);
            }
            if (component is LinkLabel)
            {
                return(LocalizationCategory.LinkLabel);
            }
            if (component is Label)
            {
                return(LocalizationCategory.Label);
            }
            if (component is ComboBox)
            {
                return(LocalizationCategory.ComboBox);
            }
            if (component is RadioButton)
            {
                return(LocalizationCategory.RadioButton);
            }
            if (component is CheckBox)
            {
                return(LocalizationCategory.CheckBox);
            }
            if (component is Form)
            {
                return(LocalizationCategory.WindowOrDialog);
            }
            if (component is TabPage)
            {
                return(LocalizationCategory.TabPage);
            }
            if (component is ColumnHeader)
            {
                return(LocalizationCategory.ListViewColumnHeading);
            }
            if (component is DataGridViewColumn)
            {
                return(LocalizationCategory.ListViewColumnHeading);
            }

            return(LocalizationCategory.Other);
        }
コード例 #56
0
ファイル: UCenterZkWatcher.cs プロジェクト: xubingyue/def
 public UCenterZkWatcher(IComponent co_app)
 {
     mCoApp = co_app as LoginApp <ComponentDef>;
 }
コード例 #57
0
        public override void HandleMessage(ComponentMessage message, INetChannel netChannel = null, IComponent component = null)
        {
            switch (message)
            {
            case HudStateChange msg:
                if (CurrentlyControlled)
                {
                    ChangeHudIcon(msg);
                }
                break;

            case PlayerAttachedMsg _:
                ApplyOverlay();
                break;

            case PlayerDetachedMsg _:
                RemoveOverlay();
                break;
            }
        }
コード例 #58
0
ファイル: Form.cs プロジェクト: wdstest/ReVision
 public void Initialize(IComponent component)
 {
     
 }
コード例 #59
0
 public object DrawAndGetNewValue(Type memberType, string memberName, object value, IEntity entity, int index, IComponent component)
 {
     return(EditorGUILayout.BoundsField(memberName, (Bounds)value));
 }
コード例 #60
0
ファイル: LocalizingInfo.cs プロジェクト: vkarthim/l10nsharp
 /// ------------------------------------------------------------------------------------
 /// <summary>
 /// Initializes a new instance of the <see cref="LocalizingInfo"/> class.
 /// </summary>
 /// ------------------------------------------------------------------------------------
 public LocalizingInfo(IComponent component, string id) : this(component, true)
 {
     Id = id;
 }