public override string ToString()
        {
            if (IsNull)// || (!IsLoaded()))
            {
                throw new System.ArgumentException("ToString failed, this is null or not loaded", "this");
            }
            else
            {
                string retStr = UniqueID.ToString();

                retStr += mDelim + Topic;

                retStr += mDelim + Summary;

                retStr += mDelim + Notes.Count.ToString();
                for (int i = 0; i < Notes.Count; i++)
                {
                    retStr += mDelim + Notes[i].UniqueID.ToString();
                }

                retStr += mDelim + Images.Count.ToString();
                for (int i = 0; i < Images.Count; i++)
                {
                    retStr += mDelim + Images[i].UniqueID.ToString();
                }

                retStr += mDelim + Link;

                return(retStr);
            }
        }
Esempio n. 2
0
        public override string ToString()
        {
            if (IsNull)// || (!IsLoaded()))
            {
                throw new System.ArgumentException("ToString failed, this is null or not loaded", "this");
            }
            else
            {
                string retStr = UniqueID.ToString();

                retStr += mDelim + FirstName;
                retStr += mDelim + LastName;
                retStr += mDelim + Email;
                retStr += mDelim + Phone;
                retStr += mDelim + FBUser.ToString();
                retStr += mDelim + LastFBSync.ToString();
                retStr += mDelim + ((int)Gender).ToString();
                retStr += mDelim + ((int)Title).ToString();
                retStr += mDelim + mLocation.ToString();

                retStr += mDelim + HoldingsInfo.Count.ToString();
                for (int i = 0; i < HoldingsInfo.Count; i++)
                {
                    retStr += mDelim + HoldingsInfo[i].UniqueID.ToString();
                }

                retStr += mDelim + Events.Count.ToString();
                for (int i = 0; i < Events.Count; i++)
                {
                    retStr += mDelim + Events[i].UniqueID.ToString();
                }

                return(retStr);
            }
        }
Esempio n. 3
0
        public override string ToString()
        {
            if (IsNull)// || (!IsLoaded()))
            {
                throw new System.ArgumentException("ToString failed, this is null or not loaded", "this");
            }
            else
            {
                string retStr = UniqueID.ToString();

                retStr += mDelim + NoteWriter.UniqueID.ToString();

                retStr += mDelim + ResourceBase.UniqueID.ToString();

                retStr += mDelim + Note;

                if (EntryDate != null)
                {
                    retStr += mDelim + EntryDate.Value.Ticks.ToString();
                }
                else
                {
                    retStr += mDelim + "0";
                }

                return(retStr);
            }
        }
Esempio n. 4
0
        private void OnDie(Player pAttacker)
        {
            base.IsKilled = true;

            /* Debug message */
            Output.WriteLine("[MOB: " + UniqueID.ToString() + "] Got killed!");

            //broadcastPacket(new PlayAnimation(uniqueID, 8));
            //pAttacker.sendPacket(new PlayAnimation(uniqueID, 8));
            beheadTimer = new Timer(new TimerCallback(OnBehead), pAttacker, AUTOBEHEAD_TIME, Timeout.Infinite);
        }
Esempio n. 5
0
 public void ShowInfo()
 {
     if (_ntf != null)
     {
         return;
     }
     _ntf      = new NetTrafficForm();
     _ntf.Text = "Host: " + UniqueID.ToString();
     _ntf.Show();
     _ntf.FormClosing            += OnNetTrafficFormClosing;
     _traffic.TrafficDataChanged += _ntf.OnTrafficChangeHandler;
 }
Esempio n. 6
0
        //private string _ClientPostBackScript;
        //protected override void OnPreRender(EventArgs e)
        //{
        //    _ClientPostBackScript = Page.ClientScript.GetPostBackEventReference(this, string.Empty);
        //    base.OnPreRender(e);
        //}

        protected override void AddAttributesToRender(HtmlTextWriter writer)
        {
            if (AutoPostBack)
            {
                string onClick = Page.ClientScript.GetPostBackEventReference(this, string.Empty);
                writer.AddAttribute(HtmlTextWriterAttribute.Onclick, onClick);
                writer.AddAttribute(HtmlTextWriterAttribute.Name, UniqueID.ToString());
                writer.AddAttribute(HtmlTextWriterAttribute.Id, ClientID.ToString());
            }

            base.AddAttributesToRender(writer);
        }
Esempio n. 7
0
 public override string ToString()
 {
     if (IsNull)// || (!IsLoaded()))
     {
         throw new System.ArgumentException("ToString failed, this is null or not loaded", "this");
     }
     else
     {
         string delim = new string((new char[] { ';' }));
         return(
             UniqueID.ToString() + delim +
             Address1 + delim + Address2 + delim + Address3 + delim + City + delim + State + delim + Zip + delim + Country + delim +
             Latitude.ToString() + delim + Longitude.ToString());
     }
 }
Esempio n. 8
0
        public override List <BusinessValidation> Validate <T>(T entity)
        {
            List <BusinessValidation> validations = new List <BusinessValidation>();
            BusinessValidation        validation  = new BusinessValidation();
            //Implement logic for validation

            Guid UniqueID_ = new Guid();

            if (!Guid.TryParse(UniqueID.ToString(), out UniqueID_))
            {
                validations.Add(new BusinessValidation {
                    ValidationResult = BusinessValidationResult.Failure, ValidationMessage = "Invalid appkey."
                });
            }

            return(validations);
        }
Esempio n. 9
0
        public void WriteXml(System.Xml.XmlWriter writer)
        {
            writer.WriteElementString("UniqueID", UniqueID.ToString());
            writer.WriteElementString("Name", Name);

            writer.WriteElementString("MaxSize", XmlConvert.ToString(MaxSize));
            writer.WriteElementString("Lod1Distance", XmlConvert.ToString(Lod1Distance));
            writer.WriteElementString("Lod2Distance", XmlConvert.ToString(Lod2Distance));
            writer.WriteElementString("Shadows", XmlConvert.ToString(Shadows));
            writer.WriteElementString("SoftShadows", XmlConvert.ToString(SoftShadows));
            writer.WriteElementString("Bloom", XmlConvert.ToString(Bloom));
            writer.WriteElementString("UseGraph", XmlConvert.ToString(UseGraph));
            writer.WriteElementString("UseLods", XmlConvert.ToString(UseLods));

            writer.WriteStartElement("Wind");
            writer.WriteElementString("X", XmlConvert.ToString(Wind.X));
            writer.WriteElementString("Y", XmlConvert.ToString(Wind.Y));
            writer.WriteEndElement();
        }
Esempio n. 10
0
        public NodeTreeViewNode(NodeTreeView treeView, Data.NodeBase node, bool createChildren = false)
        {
            UniqueID = Manager.GetUniqueID();
            id       = "###" + UniqueID.ToString();

            this.treeView = treeView;
            this.Node     = node;

            if (createChildren)
            {
                for (int i = 0; i < node.Children.Count; i++)
                {
                    var newNode = new NodeTreeViewNode(treeView, node.Children[i], true);
                    Children.Add(newNode);
                }
            }

            AddEvent(false);
        }
Esempio n. 11
0
        public override string ToString()
        {
            if (IsNull)
            {
                throw new System.ArgumentException("ToString failed, this is null or not loaded", "this");
            }
            else
            {
                string retStr = UniqueID.ToString();

                retStr += mDelim + Items.Count.ToString();
                for (int i = 0; i < Items.Count; i++)
                {
                    retStr += mDelim + Items[i].Name;
                    retStr += mDelim + Items[i].ImageLocation;
                }

                return(retStr);
            }
        }
Esempio n. 12
0
        public NodeTreeViewNode(NodeTreeView treeView, Data.NodeBase node, bool createChildren = false)
        {
            UniqueID = Manager.GetUniqueID();
            id       = "###" + UniqueID.ToString();

            this.treeView = treeView;
            this.Node     = node;

            node.OnAfterAddNode       += OnAfterAddNode;
            node.OnAfterRemoveNode    += OnAfterRemoveNode;
            node.OnAfterExchangeNodes += OnAfterExchangeNodes;

            if (createChildren)
            {
                for (int i = 0; i < node.Children.Count; i++)
                {
                    var newNode = new NodeTreeViewNode(treeView, node.Children[i], true);
                    Children.Add(newNode);
                }
            }
        }
Esempio n. 13
0
        public override string ToString()
        {
            if (IsNull)// || (!IsLoaded()))
            {
                throw new System.ArgumentException("ToString failed, this is null or not loaded", "this");
            }
            else
            {
                string retStr = UniqueID.ToString();

                if (CreationTime != null)
                {
                    retStr += mDelim + CreationTime.Value.Ticks.ToString();
                }
                else
                {
                    retStr += mDelim + "0";
                }

                if (BecomeActive != null)
                {
                    retStr += mDelim + BecomeActive.Value.Ticks.ToString();
                }
                else
                {
                    retStr += mDelim + "0";
                }

                if (BecomeInactive != null)
                {
                    retStr += mDelim + BecomeInactive.Value.Ticks.ToString();
                }
                else
                {
                    retStr += mDelim + "0";
                }

                return(retStr);
            }
        }
Esempio n. 14
0
        public override string ToString()
        {
            if (IsNull)// || (!IsLoaded()))
            {
                throw new System.ArgumentException("ToString failed, this is null or not loaded", "this");
            }
            else
            {
                string retStr = UniqueID.ToString();

                retStr += mDelim + Admin.UniqueID.ToString();

                retStr += mDelim + ResourceDescription.ToString();

                retStr += mDelim + ((int)ResourcePriority).ToString();

                retStr += mDelim + MaxHoldings.ToString();

                retStr += mDelim + HoldingsInfo.Count.ToString();
                for (int i = 0; i < HoldingsInfo.Count; i++)
                {
                    retStr += mDelim + HoldingsInfo[i].UniqueID.ToString();
                }

                retStr += mDelim + Scalable.ToString();

                retStr += mDelim + mValue.ToString();

                retStr += mDelim + mThumbNameImage.ToString();

                retStr += mDelim + mFullNameImage.ToString();


                return(retStr);
            }
        }
        public void WriteXml(System.Xml.XmlWriter writer)
        {
            writer.WriteElementString("UniqueID", UniqueID.ToString());
            writer.WriteElementString("Name", Name);
            writer.WriteElementString("DrawLast", XmlConvert.ToString(DrawLast));

            writer.WriteStartElement("Tags");
            if (Tags != null && Tags.Count > 0)
            {
                foreach (string tag in Tags)
                {
                    writer.WriteElementString("Tag", tag);
                }
            }
            else if (Tags == null || Tags.Count == 0)
            {
                writer.WriteElementString("Tag", "null");
            }
            writer.WriteEndElement();

            writer.WriteElementString("Dynamic", XmlConvert.ToString(Dynamic));

            if (MyTransform != null)
            {
                writer.WriteStartElement("MyTransform");
                (MyTransform as IXmlSerializable).WriteXml(writer);
                writer.WriteEndElement();
            }

            if (MyPhysicalObject != null)
            {
                writer.WriteStartElement("MyPhysicalObject");
                (MyPhysicalObject as IXmlSerializable).WriteXml(writer);
                writer.WriteEndElement();
            }

            if (MyAnimator != null)
            {
                writer.WriteStartElement("MyAnimator");
                writer.WriteElementString("BaseAnim", ResourceManager.Instance.Models.FirstOrDefault(x => x.Value == MyAnimator.BaseAnim).Key);
                (MyAnimator as IXmlSerializable).WriteXml(writer);
                foreach (KeyValuePair <string, SkinningModelLibrary.AnimationPlayer> pair in MyAnimator.animationPlayers)
                {
                    writer.WriteElementString("AnimatorClip", pair.Key);
                }
                writer.WriteEndElement();
            }

            if (Components.Count != 0)
            {
                writer.WriteStartElement("Components");
                foreach (ObjectComponent comp in Components)
                {
                    if (comp != null)
                    {
                        writer.WriteStartElement(comp.GetType().ToString());
                        (comp as IXmlSerializable).WriteXml(writer);
                        writer.WriteEndElement();
                    }
                }
                writer.WriteEndElement();
            }

            if (MyCollider != null)
            {
                writer.WriteStartElement("MyCollider");
                writer.WriteElementString("Type", MyCollider.GetType().ToString());
                (MyCollider as IXmlSerializable).WriteXml(writer);
                writer.WriteEndElement();
            }
        }
Esempio n. 16
0
 /// <summary>
 /// Displays cell's unique ID for easy distinguishing between two cell.s
 /// </summary>
 public override string ToString()
 {
     return(UniqueID.ToString());
 }
Esempio n. 17
0
 public void DeleteAllPrefabPools()
 {
     Generator.PoolManager.DeletePools(UniqueID.ToString() + "_");
 }
Esempio n. 18
0
 public List <IPool> GetAllPrefabPools()
 {
     return(Generator.PoolManager.FindPools(UniqueID.ToString() + "_"));
 }
Esempio n. 19
0
 protected PrefabPool GetPrefabPool(GameObject prefab)
 {
     return(Generator.PoolManager.GetPrefabPool(UniqueID.ToString() + "_" + prefab.name, prefab));
 }
Esempio n. 20
0
 public override string ToString() => UniqueID.ToString();
Esempio n. 21
0
        public override string ToString()
        {
            if (IsNull)// || (!IsLoaded()))
            {
                throw new System.ArgumentException("ToString failed, this is null or not loaded", "this");
            }
            else
            {
                string retStr = UniqueID.ToString();

                if (HoldingUser == null)
                {
                    retStr += mDelim + "0";
                }
                else
                {
                    retStr += mDelim + HoldingUser.UniqueID.ToString();
                }

                if (EventOwner == null)
                {
                    retStr += mDelim + "0";
                }
                else
                {
                    retStr += mDelim + EventOwner.UniqueID.ToString();
                }

                if (ItemOwner == null)
                {
                    retStr += mDelim + "0";
                }
                else
                {
                    retStr += mDelim + ItemOwner.UniqueID.ToString();
                }

                retStr += mDelim + UserPermissions.Count.ToString();
                for (int i = 0; i < UserPermissions.Count; i++)
                {
                    retStr += mDelim + UserPermissions[i].UserBase.UniqueID.ToString();
                    retStr += mDelim + ((int)UserPermissions[i].HoldingPermission).ToString();
                }

                retStr += mDelim + HoldingTypes.Count.ToString();
                for (int i = 0; i < HoldingTypes.Count; i++)
                {
                    retStr += mDelim + HoldingTypes[i].ToString();
                }

                retStr += mDelim + AllowOverBooking.ToString();

                retStr += mDelim + Scalable.ToString();

                retStr += mDelim + NeedsOwnerApprovel.ToString();

                retStr += mDelim + ((int)HoldingApprovel).ToString();

                return(retStr);
            }
        }
Esempio n. 22
0
        public BoardCoordinatesViewModel(ConnectionProxy connectionProxy, Player mainPlayer, Enemy mainEnemy)
        {
            _connectionProxy = connectionProxy;
            MainPlayer       = mainPlayer;

            memento         = new MementoCareTaker();
            memento.Memento = MainPlayer.CreateMemento();

            MainEnemy = mainEnemy;
            Random randNum = new Random();

            UniqueID  = randNum.Next(100, 255);
            UniqueID2 = randNum.Next(100, 255);
            UniqueID3 = randNum.Next(100, 255);

            CurrentPlayer.color = UniqueID.ToString() + " " + UniqueID2.ToString() + " " + UniqueID3.ToString();

            enemySteal    = new StealPointsAbility();
            teleportEnemy = new TeleportAbility();
            dazeEnemy     = new DazePlayerAbility();

            enemySteal.SetEnemy(MainEnemy);
            teleportEnemy.SetEnemy(enemySteal);
            dazeEnemy.SetEnemy(teleportEnemy);


            for (int x = 0; x < 20; x++)
            {
                for (int y = 0; y < 20; y++)
                {
                    TilesSet.AddTile(x, y, new Tile(false, true, TileType.Neutral, x, y));
                }
            }

            //playerColor = UniqueID.ToString() + " " + UniqueID2.ToString() + " " + UniqueID3.ToString();
            //playerColor.Color = Color.FromArgb(255, 255, 255, 0);

            //SendCoordinatesCommand = new SendCoordinatesChatMessageCommand(this, chatService);
            MoveDownChatMessageCommand  = new MoveDownChatMessageCommand(this, _connectionProxy, MainPlayer);
            MoveLeftChatMessageCommand  = new MoveLeftChatMessageCommand(this, _connectionProxy, MainPlayer);
            MoveRightChatMessageCommand = new MoveRightChatMessageCommand(this, _connectionProxy, MainPlayer);
            MoveUpChatMessageCommand    = new MoveUpChatMessageCommand(this, _connectionProxy, MainPlayer);
            Pause       = new Pause(this, _connectionProxy);
            RestartGame = new RestartGame(this, _connectionProxy);

            _message = "Waiting for response";

            x           = MainPlayer.PosX;
            y           = MainPlayer.PosY;
            playerColor = MainPlayer.Color;

            /* CHAIN OF RESPONSIBILITY */

            EnemyDamageDealer    = new EnemyDamage();
            MagicianDamageDealer = new MagicianDamage();
            ThiefDamageDealer    = new ThiefDamage();
            IceDamageDealer      = new IceDamage();

            IceDamageDealer.SetSuccessor(ThiefDamageDealer);
            ThiefDamageDealer.SetSuccessor(MagicianDamageDealer);
            MagicianDamageDealer.SetSuccessor(EnemyDamageDealer);

            /* CHAIN OF RESPONSIBILITY */

            CurrentPlayer.x = x;
            CurrentPlayer.y = y;

            _connectionProxy.AddMessageReceiver(ChatService_CoordinatesMessageReceived);

            //chatService.CoordinatesReceived += ChatService_CoordinatesMessageReceived;
            facade = new Facade(_connectionProxy);

            root = new Effect(ComponentType.Effect);
            //Buffai

            Effect buff         = new Effect(ComponentType.Buff);
            Effect negativeBuff = new Effect(ComponentType.Negative); //negative
            Effect positiveBuff = new Effect(ComponentType.Positive); //positive

            positiveBuff.Add(new CountLeaf(ComponentType.ColorSplash));
            positiveBuff.Add(new CountLeaf(ComponentType.FreezeOthers));

            negativeBuff.Add(new CountLeaf(ComponentType.BlackSplash));
            negativeBuff.Add(new CountLeaf(ComponentType.FreezeYourself));

            buff.Add(negativeBuff);
            buff.Add(positiveBuff);

            // /Buffai
            // Bonusai

            Effect bonus = new Effect(ComponentType.Bonus);

            bonus.Add(new CountLeaf(ComponentType.JackPot));
            bonus.Add(new CountLeaf(ComponentType.Normal));
            bonus.Add(new CountLeaf(ComponentType.Joke));

            //Bonusai

            root.Add(buff);
            root.Add(bonus);

            /* INTERPRETER DESIGN PATTERN IMPLEMENTATION */
            tree = new List <ExpressionRoman>();
            tree.Add(new ThousandExpression());
            tree.Add(new HundredExpression());
            tree.Add(new TenExpression());
            tree.Add(new OneExpression());
            /* INTERPRETER DESIGN PATTERN IMPLEMENTATION */


            /* VISITOR DESIGN PATTERN IMPLEMENTATION */
            game = new GameStructure();
            game.Attach(new Hard());

            BonusSpawnRate  bonusSpawn  = new BonusSpawnRate();
            BuffSpawnRate   buffSpawn   = new BuffSpawnRate();
            DebuffSpawnRate debuffSpawn = new DebuffSpawnRate();

            game.Accept(bonusSpawn);
            game.Accept(buffSpawn);
            game.Accept(debuffSpawn);
            /* VISITOR DESIGN PATTERN IMPLEMENTATION */

            /* Flyweight design pattern */


            /* Flyweight design pattern */
        }