Example #1
0
        private string GenerateMemberDocId()
        {
            var sb = new StringBuilder();

            // Get the full name from the type
            sb.Append(ParentType.ToString());

            if (ParentType.IsArrayType)
            {
                sb.Append(ParentType.ArrayTypeInfo);
            }

            sb.Append(".");

            // Make sure that the member name is safe by replacing the unwanted characters.
            sb.Append(GetDocIdSafeMemberName(Name));

            if (Kind == MemberKind.Method)
            {
                if (MethodSignature.GenericParameterCount > 0)
                {
                    sb.Append(FormattableString.Invariant($"``{MethodSignature.GenericParameterCount}"));
                }
            }

            // Add the method signature
            if (Kind == MemberKind.Method && MethodSignature.ParameterTypes.Count() > 0)
            {
                sb.Append("(");

                // Only required parameters should be listed explicitly
                Debug.Assert(MethodSignature.ParameterTypes.Count() >= MethodSignature.RequiredParameterCount, LocalizedStrings.MoreParametersWereRequired);
                sb.Append(string.Join(",", MethodSignature.ParameterTypes.Select(m => m.ToString()).ToArray(), 0, MethodSignature.RequiredParameterCount));

                // If the method is a varargs method, it should add an '__arglist' parameter
                if (MethodSignature.Header.CallingConvention.HasFlag(SignatureCallingConvention.VarArgs))
                {
                    sb.Append(",__arglist");
                }

                sb.Append(")");
            }
            else if (Kind == MemberKind.Method && MethodSignature.Header.CallingConvention.HasFlag(SignatureCallingConvention.VarArgs))
            {
                // It's possible to have an __arglist without anything being passed to it
                sb.Append("(__arglist)");
            }

            // Technically, we want to verify that these are marked as a special name along with the names op_Implicit or op_Explicit.  However,
            // since we are just using member references, we don't have enought information to know if it is.  For now, we will assume that it is
            // a special name if it only has one input parameter
            if (Kind == MemberKind.Method && MethodSignature.ParameterTypes.Length == 1 &&
                (string.Equals(Name, "op_Implicit", StringComparison.Ordinal) || string.Equals(Name, "op_Explicit", StringComparison.Ordinal)))
            {
                sb.Append("~");
                sb.Append(MethodSignature.ReturnType);
            }

            return(sb.ToString());
        }
Example #2
0
        public Boolean Equals(Win32ResourceName other)
        {
            if (Object.ReferenceEquals(this, other))
            {
                return(true);
            }

            if (Object.ReferenceEquals(other, null))
            {
                return(false);
            }
            if (!ParentType.Equals(other.ParentType))
            {
                return(false);
            }

            if (NameInt > -1 && NameInt == other.NameInt)
            {
                return(true);                                                       // Name is greater than -1 (use string) and numerical Name id is the same
            }
            if (NameInt == -1 && other.NameInt == -1)
            {
                return(NameStr.Equals(other.NameStr));
            }

            return(false);
        }
Example #3
0
        private void LoadObjectEventReceivers(ParentType parentType, string name)
        {
            switch (parentType)
            {
            case ParentType.Lists:
            case ParentType.Libraries:
            {
                this.m_SelectedObject = this.m_Web.Lists[name];
                break;
            }

            case ParentType.Websites:
            {
                this.m_SelectedObject = this.m_Web.Webs[name];
                break;
            }

            default:
            {
                MessageBox.Show(this, "The current type is not supported.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                break;
            }
            }

            this.LoadEventReceivers();
        }
Example #4
0
 public override int GetHashCode()
 {
     unchecked
     {
         return(((ParentType != null ? ParentType.GetHashCode() : 0) * 397) ^ (ExtenderType != null ? ExtenderType.GetHashCode() : 0));
     }
 }
Example #5
0
    private Transform GetLaserTransform(Guid parentId, ParentType parentType)
    {
        if (parentType == ParentType.Beam)
        {
            throw new Exception("Unsupported type of parent");
        }
        ;
        GameObject laser = null;

        foreach (var el in _lasers)
        {
            var a = el.GetComponent <BeamGeneratorScript>();

            if (el.GetComponent <BeamGeneratorScript>().Id == parentId)
            {
                laser = el;
            }
        }
        if (laser == null)
        {
            throw new Exception("No instance of a laser has been found");
        }

        return(laser.transform);
    }
Example #6
0
    public void should_have_optional_deprecation_reason()
    {
        var objectType = new ParentType();

        objectType.Fields.ElementAt(0).DeprecationReason.ShouldBe("Deprecated");
        objectType.Fields.ElementAt(1).DeprecationReason.ShouldBe(null);
    }
Example #7
0
        public void SetTargetObject(object value)
        {
            try
            {
                var set = value;

                if (set != null && (value.Equals("NULL") || value.Equals("null")))
                {
                    set = null;
                }

                if (set != null)
                {
                    set = Convert.ChangeType(value, TargetType);
                }

                ParentType.GetRuntimeProperty(TargetName).SetValue(ParentObject, set);
            }
            catch (InvalidCastException)
            {
                try
                {
                    ParentType.GetRuntimeProperty(TargetName).SetValue(ParentObject, value);
                }
                catch (Exception)
                {
                    // ignored
                }
            }
            catch (Exception)
            {
                // ignored
            }
        }
Example #8
0
 public CommentInfo(string datasetId, ParentType parentType)
     : this()
 {
     DatasetId = datasetId;
     ParentType = parentType;
     LoadComments();
 }
Example #9
0
        public void should_have_optional_description()
        {
            var objectType = new ParentType();

            objectType.Fields.ElementAt(0).Description.ShouldBe(null);
            objectType.Fields.ElementAt(1).Description.ShouldBe("RandomDescription");
        }
Example #10
0
        public ActionResult Edit(ParentType blobType, Guid blobId)
        {
            CacheHelper.SetPreviousPage(_cache, Request.Headers["Referer"].ToString());

            BlobContentViewModel model = new BlobContentViewModel(blobType, _cache, blobId);

            return(View(model));
        }
Example #11
0
        public ActionResult DeleteConfirmed(int id)
        {
            ParentType parentType = db.ParentTypes.Find(id);

            db.ParentTypes.Remove(parentType);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Example #12
0
 public void AddParentAge(ParentType type, string age)
 {
     if (parentAgeList == null)
     {
         parentAgeList = new List <ParentAgePropertyClass>();
     }
     parentAgeList.Add(new ParentAgePropertyClass(type, age));
 }
Example #13
0
 public override int GetHashCode()
 {
     unchecked
     {
         return(((EventTypeInfo != null ? EventTypeInfo.GetHashCode() : 0) * 397) ^
                (ParentType != null ? ParentType.GetHashCode() : 0));
     }
 }
Example #14
0
        public override int GetHashCode()
        {
            int hash = base.GetHashCode();

            hash = hash * 31 + (ParentId == null ? 0 : ParentId.GetHashCode());
            hash = hash * 31 + ParentType.GetHashCode();
            return(hash);
        }
Example #15
0
 /// <inheritdoc/>
 public ISpanBuilder SetParent(ISpan parent)
 {
     this.parent             = parent ?? throw new ArgumentNullException(nameof(parent));
     this.parentType         = ParentType.ExplicitParent;
     this.timestampConverter = ((Span)parent)?.TimestampConverter;
     this.parentSpanContext  = null;
     return(this);
 }
Example #16
0
 public ParentItem(ParentType type, Collection <DTBItem> subItems) : base(subItems)
 {
     if (!IsParentTypeValid(type))
     {
         throw new Exception("Invalid parent type!");
     }
     _parentType = type;
 }
Example #17
0
 public ParentItem(ParentType type) : base()
 {
     if (!IsParentTypeValid(type))
     {
         throw new Exception("Invalid parent type!");
     }
     _parentType = type;
 }
Example #18
0
 public override Int32 GetHashCode()
 {
     if (NameStr == null)
     {
         return(ParentType.GetHashCode() ^ NameInt.GetHashCode());
     }
     return(ParentType.GetHashCode() ^ NameStr.GetHashCode() ^ NameInt.GetHashCode());
 }
Example #19
0
            protected override EBTStatus update(Agent pAgent, EBTStatus childStatus)
            {
                Debug.Check(this.GetNode() is Action, "node is not an Action");
                Action pActionNode = (Action)(this.GetNode());

                if (!this.CheckPredicates(pAgent))
                {
                    return(pActionNode.m_resultPreconditionFail);
                }

                EBTStatus result = EBTStatus.BT_SUCCESS;

                if (pActionNode.m_method != null)
                {
                    ParentType pt      = pActionNode.m_method.GetParentType();
                    Agent      pParent = pAgent;
                    if (pt == ParentType.PT_INSTANCE)
                    {
                        pParent = Agent.GetInstance(pActionNode.m_method.GetInstanceNameString(), pParent.GetContextId());
                        Debug.Check(pParent != null || Utils.IsStaticClass(pActionNode.m_method.GetInstanceNameString()));
                    }

                    int nodeId = this.GetId();
                    SetNodeId(nodeId);

                    object returnValue = pActionNode.m_method.run(pParent, pAgent);

                    if (pActionNode.m_resultOption != EBTStatus.BT_INVALID)
                    {
                        result = pActionNode.m_resultOption;
                    }
                    else if (pActionNode.m_resultFunctor != null)
                    {
                        ParentType pt1 = pActionNode.m_resultFunctor.GetParentType();
                        Agent      pParentCheckResult = pAgent;
                        if (pt1 == ParentType.PT_INSTANCE)
                        {
                            pParentCheckResult = Agent.GetInstance(pActionNode.m_resultFunctor.GetInstanceNameString(), pParent.GetContextId());
                            Debug.Check(pParentCheckResult != null || Utils.IsStaticClass(pActionNode.m_resultFunctor.GetInstanceNameString()));
                        }

                        result = (EBTStatus)pActionNode.m_resultFunctor.run(pParentCheckResult, pAgent, returnValue);
                    }
                    else
                    {
                        Debug.Check(returnValue is EBTStatus, "method's return type is not EBTStatus");
                        result = (EBTStatus)returnValue;
                    }

                    ClearNodeId();
                }
                else
                {
                    result = pActionNode.update_impl(pAgent, childStatus);
                }

                return(result);
            }
Example #20
0
 private static string ParentTypeToString(ParentType parentType)
 {
     return(parentType switch
     {
         ParentType.Database => "database_id",
         ParentType.Page => "page_id",
         ParentType.Workspace => "workspace",
         _ => throw new ArgumentOutOfRangeException(nameof(parentType), parentType, null),
     });
Example #21
0
        public ActionResult Create(ParentType blobType, Guid parentId)
        {
            CacheHelper.SetPreviousPage(_cache, Request.Headers["Referer"].ToString());

            BlobContentViewModel model = new BlobContentViewModel(blobType, _cache);

            model.SelectedBlobContentItem.ParentId = parentId;
            return(View(model));
        }
Example #22
0
        public void bidirectional_creates_proper_arguments()
        {
            var graph = new ParentType();

            graph.Fields.Find("connection2").Arguments.Count(x => x.Name == "after").ShouldBe(1);
            graph.Fields.Find("connection2").Arguments.Count(x => x.Name == "first").ShouldBe(1);
            graph.Fields.Find("connection2").Arguments.Count(x => x.Name == "before").ShouldBe(1);
            graph.Fields.Find("connection2").Arguments.Count(x => x.Name == "last").ShouldBe(1);
        }
Example #23
0
 protected CMethodBase(CMethodBase copy)
 {
     this.m_instanceName = copy.m_instanceName;
     this.m_parentType   = copy.m_parentType;
     this.method_        = copy.method_;
     this.descAttrbute_  = copy.descAttrbute_;
     this.m_name         = copy.m_name;
     this.m_id           = copy.m_id;
 }
Example #24
0
 public EditCustomerForm(Customer selectedCustomer, ManagerForm form)
 {
     customer      = selectedCustomer;
     managerParent = form;
     type          = ParentType.Manager;
     InitializeComponent();
     EditCustInfoButton.Visible = false;
     FillTextBoxes();
 }
Example #25
0
        public void AddControl(System.Web.UI.ControlCollection ControlliWeb, ParentType _myParent)
        {
            foreach (System.Web.UI.Control _Controllo in ControlliWeb)
            {
                clMyControl _myColl = new clMyControl(_myParent);

                if (_Controllo is System.Web.UI.WebControls.TextBox)
                {
                    _myColl.Valore        = ((System.Web.UI.WebControls.TextBox)_Controllo).Text;
                    _myColl.NomeControllo = ((System.Web.UI.WebControls.TextBox)_Controllo).ClientID;
                    _myArray.Add(_myColl);
                }
                if (_Controllo is System.Web.UI.HtmlControls.HtmlInputHidden)
                {
                    _myColl.Valore        = ((System.Web.UI.HtmlControls.HtmlInputHidden)_Controllo).Value;
                    _myColl.NomeControllo = ((System.Web.UI.HtmlControls.HtmlInputHidden)_Controllo).ClientID;
                    _myArray.Add(_myColl);
                }
                if (_Controllo is System.Web.UI.WebControls.Label)
                {
                    _myColl.Valore        = ((System.Web.UI.WebControls.Label)_Controllo).Text;
                    _myColl.NomeControllo = ((System.Web.UI.WebControls.Label)_Controllo).ClientID;
                    _myArray.Add(_myColl);
                }
                if (_Controllo is System.Web.UI.WebControls.CheckBox)
                {
                    _myColl.Valore        = Convert.ToString(((System.Web.UI.WebControls.CheckBox)_Controllo).Checked);
                    _myColl.NomeControllo = ((System.Web.UI.WebControls.CheckBox)_Controllo).ClientID;
                    _myArray.Add(_myColl);
                }
                if (_Controllo is System.Web.UI.WebControls.ListBox)
                {
                    _myColl.Valore        = ((System.Web.UI.WebControls.ListBox)_Controllo).SelectedValue;
                    _myColl.NomeControllo = ((System.Web.UI.WebControls.ListBox)_Controllo).ClientID;
                    _myArray.Add(_myColl);
                }
                if (_Controllo is System.Web.UI.WebControls.DropDownList)
                {
                    _myColl.Valore        = ((System.Web.UI.WebControls.DropDownList)_Controllo).SelectedValue;
                    _myColl.NomeControllo = ((System.Web.UI.WebControls.DropDownList)_Controllo).ClientID;
                    _myArray.Add(_myColl);
                }
                if (_Controllo is System.Web.UI.WebControls.RadioButton)
                {
                    _myColl.Valore        = Convert.ToString(((System.Web.UI.WebControls.RadioButton)_Controllo).Checked);
                    _myColl.NomeControllo = ((System.Web.UI.WebControls.RadioButton)_Controllo).ClientID;
                    _myArray.Add(_myColl);
                }


                if (_Controllo.Controls.Count > 0)
                {
                    AddControl(_Controllo.Controls, _myParent);
                }
            }
        }
Example #26
0
 public EditCustomerForm(Customer selectedCustomer, CustomerForm form)
 {
     customer       = selectedCustomer;
     customerParent = form;
     type           = ParentType.Customer;
     InitializeComponent();
     EditUserButton.Visible = false;
     TypeBox.Visible        = false;
     FillTextBoxes();
 }
Example #27
0
 public ActionResult Edit([Bind(Include = "Id,Name")] ParentType parentType)
 {
     if (ModelState.IsValid)
     {
         db.Entry(parentType).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(parentType));
 }
        public DataTable SearchDirectoryWithCustomSettings(string nameFilter, ParentType dirType, bool includeDeleted)
        {
            IDirectoryCollection dirsWithCustomSettings = new IDirectoryCollection();
            IDirectoryCollection allBrands, allAgencies;
            string parentTypeName = "Invalid";
            int    parentBrandID = 0, brandID = 0, agencyID = 0; string parentBrandName = string.Empty, brandName = string.Empty, agencyName = string.Empty;

            this.GetAllBrandsAndAgencies(out allBrands, out allAgencies, true, includeDeleted);

            dirsWithCustomSettings.AddRange(this.GetChildren(includeDeleted).FindAll(dir => (!dir.InheritParentFields || dir.IsNotificationActive)));
            dirsWithCustomSettings.AddRange(allBrands.FindAll(dir => (!dir.InheritParentFields || !dir.InheritParentNotification)));
            dirsWithCustomSettings.AddRange(allAgencies.FindAll(dir => (!dir.InheritParentFields || !dir.InheritParentNotification)));

            DataTable dtResult = new DataTable();

            dtResult.Columns.Add("ID", typeof(int));
            dtResult.Columns.Add("Name", typeof(string));
            dtResult.Columns.Add("ParentType", typeof(string));
            dtResult.Columns.Add("PBID", typeof(int));
            dtResult.Columns.Add("BID", typeof(int));
            dtResult.Columns.Add("AGID", typeof(int));
            dtResult.Columns.Add("IsNoticationActive", typeof(bool));
            dtResult.Columns.Add("InheritsNotification", typeof(bool));
            dtResult.Columns.Add("InheritParentFields", typeof(bool));
            dtResult.Columns.Add("PBName", typeof(string));
            dtResult.Columns.Add("BRName", typeof(string));
            dtResult.Columns.Add("AGName", typeof(string));

            var result = (from dir in dirsWithCustomSettings
                          where Utility.CheckDirType(dir, dirType, out parentTypeName, out parentBrandID, out brandID, out agencyID, out parentBrandName, out brandName, out agencyName) &&
                          (string.IsNullOrEmpty(nameFilter) ? true : dir.Name.ToUpper().Contains(nameFilter.ToUpper())) &&
                          dir.DoesUserHasWritePermission
                          select new {
                ID = dir.ID,
                Name = dir.Name,
                ParentType = parentTypeName,
                PBID = parentBrandID,
                BID = brandID,
                AGID = agencyID,
                IsNoticationActive = dir.IsNotificationActive,
                InheritsNotification = dir.InheritParentNotification,
                InheritParentFields = dir.InheritParentFields,
                PBName = parentBrandName,
                BRName = brandName,
                AGName = agencyName
            }).ToList();


            foreach (var item in result)
            {
                dtResult.Rows.Add(item.ID, item.Name, item.ParentType, item.PBID, item.BID, item.AGID, item.IsNoticationActive, item.InheritsNotification, item.InheritParentFields, item.PBName, item.BRName, item.AGName);
            }

            return(dtResult);
        }
Example #29
0
        public ActionResult Create([Bind(Include = "Id,Name")] ParentType parentType)
        {
            if (ModelState.IsValid)
            {
                db.ParentTypes.Add(parentType);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(parentType));
        }
Example #30
0
        private static LazyList <Token> ParseNormal(IEnumerator <UChar> inputStream)
        {
            UStringBuilder _textFragment    = new UStringBuilder(1024);
            UStringBuilder _tentativeParent = new UStringBuilder(16);
            ParentType     type             = _none;

            while (inputStream.MoveNext())
            {
                var c = inputStream.Current;

                if (c == SpecialCharacters.BeforeRubyInitiater)
                {
                    _textFragment.Append(_tentativeParent.ToUString());
                    _tentativeParent.Clear();
                    var token = new NormalToken(_textFragment.ToUString());
                    _textFragment.Clear();
                    _textFragment    = null;
                    _tentativeParent = null;
                    return(LazyList <Token> .New(token, () => ParseRubyParent(inputStream)));
                }
                else if (c == SpecialCharacters.RubyOpen)
                {
                    var token = new NormalToken(_textFragment.ToUString());
                    _textFragment.Clear();
                    _textFragment = null;
                    UString parent = _tentativeParent.ToUString();
                    _tentativeParent.Clear();
                    _tentativeParent = null;
                    return(LazyList <Token> .New(token, () => ParseRubyText(inputStream, parent)));
                }
                else
                {
                    //暫定親字の継続検証
                    if (type.IsContinuous(c))
                    {
                        _tentativeParent.Append(c);
                    }
                    else
                    {
                        _textFragment.Append(_tentativeParent.ToUString());
                        _tentativeParent.Clear();
                        _tentativeParent.Append(c);
                        type = RubyParser.ClassifyParentType(c);
                    }
                }
            }

            {
                _textFragment.Append(_tentativeParent.ToUString());
                _tentativeParent.Clear();
                var token = new NormalToken(_textFragment.ToUString());
                return(LazyList <Token> .New(token));
            }
        }
Example #31
0
 public bool Equals(ParentType other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(Equals(other.Name, Name) && Equals(other.Child, Child));
 }
Example #32
0
		public void SetUp()
		{
			theConverter = new ComplexTypeConverter(new ObjectConverter());
			theSerializer = new NewtonSoftJsonSerializer(new JsonSerializerSettings(), new JsonConverter[] { theConverter });

			theTarget = new ParentType
			            	{
			            		Name = "Test",
								Child = new ComplexType { Key = "x", Value = "123" }
			            	};

			theResult = theSerializer.Serialize(theTarget);
		}
        public Student_Parent()
        {
            InitializeComponent();
            Group = "緊急聯絡人資料";
            _StudParentRec = new ParentRecord();
            _ParentType = ParentType.Guardian;

            _DataListener_Guardian = new ChangeListen();
            _DataListener_Guardian.StatusChanged += new EventHandler<ChangeEventArgs>(_DataListener_Guardian_StatusChanged);

            // 加入緊急聯絡人 Listener
            _DataListener_Guardian.Add(new TextBoxSource(txtParentName));
            _DataListener_Guardian.Add(new TextBoxSource(txtParentPhone));

            //_DataListener_Guardian.Add(new ComboBoxSource(cboRelationship, ComboBoxSource.ListenAttribute.Text));

            K12.Data.Parent.AfterUpdate += new EventHandler<K12.Data.DataChangedEventArgs>(JHParent_AfterUpdate);

            BGWorker = new BackgroundWorker();
            BGWorker.DoWork += new DoWorkEventHandler(BGWorker_DoWork);
            BGWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(BGWorker_RunWorkerCompleted);

            Disposed += new EventHandler(ParentInfoPalmerwormItem_Disposed);
        }
Example #34
0
 public static string ConvertToString(ParentType o)
 {
     if (o == ParentType.NULL) return "";
     else return (o + "").ToLower();
 }
        public DataTable SearchDirectoryWithCustomSettings(string nameFilter, ParentType dirType,bool includeDeleted)
        {
            IDirectoryCollection dirsWithCustomSettings = new IDirectoryCollection();
            IDirectoryCollection allBrands, allAgencies;
            string parentTypeName="Invalid";
            int parentBrandID = 0, brandID = 0, agencyID = 0; string parentBrandName = string.Empty, brandName = string.Empty, agencyName = string.Empty;
            this.GetAllBrandsAndAgencies(out allBrands, out allAgencies, true,includeDeleted);

            dirsWithCustomSettings.AddRange(this.GetChildren(includeDeleted).FindAll(dir => (!dir.InheritParentFields || dir.IsNotificationActive)));
            dirsWithCustomSettings.AddRange(allBrands.FindAll(dir => (!dir.InheritParentFields || !dir.InheritParentNotification)));
            dirsWithCustomSettings.AddRange(allAgencies.FindAll(dir => (!dir.InheritParentFields || !dir.InheritParentNotification)));

            DataTable dtResult = new DataTable();
            dtResult.Columns.Add("ID", typeof(int));
            dtResult.Columns.Add("Name", typeof(string));
            dtResult.Columns.Add("ParentType", typeof(string));
            dtResult.Columns.Add("PBID", typeof(int));
            dtResult.Columns.Add("BID", typeof(int));
            dtResult.Columns.Add("AGID", typeof(int));
            dtResult.Columns.Add("IsNoticationActive", typeof(bool));
            dtResult.Columns.Add("InheritsNotification", typeof(bool));
            dtResult.Columns.Add("InheritParentFields", typeof(bool));
            dtResult.Columns.Add("PBName", typeof(string));
            dtResult.Columns.Add("BRName", typeof(string));
            dtResult.Columns.Add("AGName", typeof(string));

            var result = (from dir in dirsWithCustomSettings
                          where Utility.CheckDirType(dir, dirType, out parentTypeName, out parentBrandID, out brandID, out agencyID, out parentBrandName ,out brandName,out agencyName) &&
                               (string.IsNullOrEmpty(nameFilter) ? true : dir.Name.ToUpper().Contains(nameFilter.ToUpper())) &&
                               dir.DoesUserHasWritePermission
                          select new {
                              ID = dir.ID,
                              Name = dir.Name,
                              ParentType = parentTypeName,
                              PBID = parentBrandID,
                              BID = brandID,
                              AGID = agencyID,
                              IsNoticationActive = dir.IsNotificationActive,
                              InheritsNotification = dir.InheritParentNotification,
                              InheritParentFields=dir.InheritParentFields,
                              PBName = parentBrandName,
                              BRName = brandName,
                              AGName = agencyName
                          }).ToList();

            foreach (var item in result)
            {
                dtResult.Rows.Add(item.ID,item.Name,item.ParentType,item.PBID,item.BID,item.AGID,item.IsNoticationActive,item.InheritsNotification,item.InheritParentFields,item.PBName,item.BRName,item.AGName);
            }

            return dtResult;
        }
Example #36
0
 public bool Equals(ParentType other)
 {
     if (ReferenceEquals(null, other)) return false;
     if (ReferenceEquals(this, other)) return true;
     return Equals(other.Name, Name) && Equals(other.Child, Child);
 }
Example #37
0
        /// <summary>
        /// A physical object that can be moved around in screen space.
        /// </summary>
        /// <param name="x">The x position of the top-left corner of the object.</param>
        /// <param name="y">The y position of the top-left corner of the object.</param>
        /// <param name="width">The width of the object.</param>
        /// <param name="height">The height of the object.</param>
        public GenObject(float x, float y, float width, float height)
        {
            _position = new Vector2(x, y);
            _oldPosition = _position;
            _hasMoved = false;
            _bounds = new GenAABB(x, y, width, height);
            _centerPosition = new Vector2(x + _bounds.HalfWidth, y + _bounds.HalfHeight);
            _origin = new Vector2(_bounds.HalfWidth, _bounds.HalfHeight);
            _originPosition = new Vector2(x + _origin.X, y + _origin.Y);
            _boundingRect = new Rectangle(0, 0, (int)width, (int)height);
            _rotation = 0f;
            RotationSpeed = 0f;
            _moveDistance = Vector2.Zero;
            _moveBounds = new GenAABB(x, y, width, height);

            Immovable = false;
            Solid = true;
            Mass = 1f;

            Velocity = Vector2.Zero;
            OldVelocity = Velocity;
            Acceleration = Vector2.Zero;
            Deceleration = Vector2.Zero;
            MaxVelocity = Vector2.Zero;

            _facing = Direction.None;
            OldTouching = Direction.None;
            Touching = Direction.None;

            Parent = null;
            ParentMode = ParentType.None;
            ParentOffset = Vector2.Zero;

            IsPlatform = false;
            Platform = null;
            OldPlatform = null;

            Path = null;
            PathNodeIndex = 0;
            PathDirection = 1;
            PathSpeed = 0f;
            PathType = GenPath.Type.Clockwise;
            PathAxis = GenMove.Axis.Both;
            PathMovement = GenPath.Movement.Instant;
        }
Example #38
0
 /// <summary>
 /// Sets a given object as the parent of this object, using the specified parenting type.
 /// </summary>
 /// <param name="gameObject">The object to set as the parent object.</param>
 /// <param name="parentMode">The type of transformations to connect with the parent object.</param>
 public void SetParent(GenObject gameObject, ParentType parentMode)
 {
     Parent = gameObject;
     ParentMode = parentMode;
 }
 private void btnGuardian_Click(object sender, EventArgs e)
 {
     LoadGuardian();
     _ParentType = ParentType.Guardian;
 }
 public ParentChildIndex(IElasticConfiguration configuration): base(configuration, "parentchild", 1) {
     AddType(Parent = new ParentType(this));
     AddType(Child = new ChildType(this));
 }