/// <summary>
 /// Initializes a new instance of the <see cref="OfficeDocumentItem"/> class.
 /// </summary>
 /// <param name="property">The property.</param>
 /// <param name="list">The list.</param>
 /// <param name="context">The context.</param>
 public OfficeDocumentItem([NotNull] EntityProperties property, [NotNull] BaseList list, [NotNull] SpContext context)
     : base(property, list, context)
 {
     Assert.ArgumentNotNull(property, "property");
     Assert.ArgumentNotNull(list, "list");
     Assert.ArgumentNotNull(context, "context");
 }
 public SpellObject(
     uint ID, 
     uint Count,            
     uint OverlayFileRID,
     uint NameRID, 
     uint Flags,
     ushort LightFlags, 
     byte LightIntensity, 
     ushort LightColor, 
     AnimationType FirstAnimationType, 
     byte ColorTranslation, 
     byte Effect, 
     Animation Animation, 
     BaseList<SubOverlay> SubOverlays,                      
     byte TargetsCount,
     SchoolType SchoolType)
     : base(ID, Count, 
         OverlayFileRID, NameRID, Flags, 
         LightFlags, LightIntensity, LightColor, 
         FirstAnimationType, ColorTranslation, Effect, 
         Animation, SubOverlays)
 {
     this.targetsCount = TargetsCount;
     this.schoolType = SchoolType;
 }
    public ProjectBaseConfig(BaseList baseList, List <BaseConfig> configs)
    {
        configType = ConfigType.PROJECT;

        this.baseList = baseList;
        this.configs  = configs;
    }
Ejemplo n.º 4
0
        public void Copy(IListSelection selection)
        {
            if (!CanCopy)
            {
                return;
            }

            if (selection is null)
            {
                throw new ArgumentNullException(nameof(selection));
            }

            if (selection.Count == 0)
            {
                return;
            }

            var e = new CancelEventArgs();

            OnBeginCopy(e);
            if (e.Cancel)
            {
                return;
            }

            CopyData = BaseList.GetSelectionData(selection);
            OnCopyComplete(EventArgs.Empty);
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Initializes a new instance of the <see cref="BaseItem"/> class.
        /// </summary>
        /// <param name="property">The property.</param>
        /// <param name="list">The list.</param>
        /// <param name="context">The context.</param>
        public BaseItem([NotNull] EntityProperties property, [NotNull] BaseList list, [NotNull] SpContext context)
            : this(property, list.ID, list.WebUrl, context)
        {
            Assert.ArgumentNotNull(list, "list");

            this.list = list;
        }
        protected override async Task <BaseList> AssignUpsertedReferences(BaseList record)
        {
            record.ListIdentifier = await _strings.UpsertAsync(record.ListIdentifier);

            record.ListIdentifierId = record.ListIdentifier?.AsciiStringReferenceId ?? record.ListIdentifierId;
            return(record);
        }
Ejemplo n.º 7
0
        public BasePage()
        {
            InitializeComponent();

            // Determine the visibility of the dark background.
            Visibility darkBackgroundVisibility =
                (Visibility)Application.Current.Resources["PhoneDarkThemeVisibility"];

            // Icon dark or light
            if (darkBackgroundVisibility == Visibility.Visible)
            {
                BitmapImage bm = new BitmapImage(new Uri(@"/Assets/calculator.png", UriKind.RelativeOrAbsolute));
                iconApp.Source = bm;
            }
            else
            {
                BitmapImage bm = new BitmapImage(new Uri(@"/Assets/calculatorBlack.png", UriKind.RelativeOrAbsolute));
                iconApp.Source = bm;
            }



            if (isCreated == false)
            {
                BaseBoxList.ItemsSource = BaseList.GetCurrencyStart();
                isCreated = true;
            }
            else
            {
                BaseBoxList.ItemsSource = BaseList.GetCurrency();
            }
        }
Ejemplo n.º 8
0
        protected override IEnumerable <MemberDeclarationSyntax> GetDeclarations()
        {
            ClassDeclarationSyntax classDeclaration;

            try {
                classDeclaration = ClassDeclaration(Identifier)
                                   .WithAttributeLists(AttributeLists)
                                   .WithModifiers(Modifiers)
                                   .WithMembers(ClassMembers)
                                   .WithLeadingTrivia(DocumentationCommentTriviaList);
                if (BaseList.Types.Any())
                {
                    classDeclaration = classDeclaration.WithIdentifier(
                        classDeclaration.Identifier.WithTrailingTrivia(EndOfLine("\n")));
                    classDeclaration = classDeclaration.WithBaseList(
                        BaseList.WithLeadingTrivia(Whitespace("\t")));
                }
            } catch (Exception ex) {
                Console.WriteLine("Skipping {0} due to error {1}",
                                  QualifiedName, ex.Message);
                yield break;
            }

            yield return(classDeclaration);
        }
Ejemplo n.º 9
0
        private Item GetConnectedItem(Item parentItem, SharepointItem listItem, BaseList list)
        {
            if (this.idResolver != null)
            {
                return(parentItem.Database.GetItem(this.idResolver(parentItem, listItem, list)));
            }

            List <Func <Item, SharepointItem, BaseList, ID> > canditates = new List <Func <Item, SharepointItem, BaseList, ID> >
            {
                (item, baseItem, baseList) => Utils.GetID(item.ID.ToString(), baseItem.UniqueID),
                (item, baseItem, baseList) => Utils.GetID(item.ID.ToString(), UniqueIdV10(baseItem, baseList))
            };

            foreach (var canditate in canditates)
            {
                var item = parentItem.Database.GetItem(canditate(parentItem, listItem, list));
                {
                    if (item != null)
                    {
                        this.idResolver = canditate;
                        return(item);
                    }
                }
            }

            return(null);
        }
Ejemplo n.º 10
0
        /// <exception cref="RelationshipException">
        /// The language of <paramref name="_base"/> does not equal.-or-
        /// <paramref name="_base"/> is earlier added base.-or-
        /// <paramref name="_base"/> is descendant of the interface.
        /// </exception>
        /// <exception cref="ArgumentNullException">
        /// <paramref name="_base"/> is null.
        /// </exception>
        internal void AddBase(InterfaceType _base)
        {
            if (_base == null)
            {
                throw new ArgumentNullException("_base");
            }

            if (BaseList.Contains(_base))
            {
                throw new RelationshipException(
                          Strings.ErrorCannotAddSameBaseInterface);
            }
            if (_base.IsAncestor(this))
            {
                throw new RelationshipException(string.Format(Strings.ErrorCyclicBase,
                                                              Strings.Interface));
            }

            if (_base.Language != this.Language)
            {
                throw new RelationshipException(Strings.ErrorLanguagesDoNotEqual);
            }

            BaseList.Add(_base);
            Changed();
        }
Ejemplo n.º 11
0
 private bool checkPosition(ObjectPos pos)
 {
     if (WoodBoxList.ContainsKey(pos))
     {
         return(false);
     }
     if (SolidBoxList.ContainsKey(pos))
     {
         return(false);
     }
     if (SpecialBoxList.ContainsKey(pos))
     {
         return(false);
     }
     if (ItemList.ContainsKey(pos))
     {
         return(false);
     }
     if (IceList.ContainsKey(pos))
     {
         return(false);
     }
     if (BaseList.ContainsKey(pos))
     {
         return(false);
     }
     return(true);
 }
Ejemplo n.º 12
0
        public RangeOrientation(ITextDocument document)
        {
            this.Document  = document;
            this.DrawRects = new BaseList <DrawRect>();

            ((INotifyCollectionChanged)this.DrawRects).CollectionChanged += new NotifyCollectionChangedEventHandler(RangeOrientation_CollectionChanged);
        }
Ejemplo n.º 13
0
        /// <exception cref="RelationException">
        /// The language of <paramref name="_base"/> does not equal.-or-
        /// <paramref name="_base"/> is earlier added base.-or-
        /// <paramref name="_base"/> is descendant of the interface.
        /// </exception>
        /// <exception cref="ArgumentNullException">
        /// <paramref name="_base"/> is null.
        /// </exception>
        internal void AddBase(InterfaceType _base)
        {
            if (_base == null)
            {
                throw new ArgumentNullException("_base");
            }

            if (BaseList.Contains(_base))
            {
                throw new RelationException(
                          Strings.GetString("error_cannot_add_same_base_interface"));
            }
            if (_base.IsAncestor(this))
            {
                throw new RelationException(Strings.GetString("error_cyclic_base",
                                                              Strings.GetString("interface")));
            }

            if (_base.Language != this.Language)
            {
                throw new RelationException(Strings.GetString("error_languages_do_not_equal"));
            }

            BaseList.Add(_base);
            Modified();
        }
        private void BuildGridView(BaseList spList, View spListView)
        {
            this.spGridView.Columns.Clear();
            foreach (string viewFieldName in spListView.FieldNames)
            {
                string fieldName = viewFieldName;
                Field  viewField = spList.Fields.First(field => field.Name == fieldName);
                if (viewField != null)
                {
                    ITemplate     itemTemplate = this.GetItemFieldTemplate(viewField);
                    TemplateField viewFieldColumn;
                    if (!string.IsNullOrEmpty(viewField.HeaderImage))
                    {
                        viewFieldColumn = new TemplateField
                        {
                            ItemTemplate   = itemTemplate,
                            HeaderImageUrl = string.Format("{0}/_layouts/images/{1}", this.Server.Trim(new char[] { '/' }), viewField.HeaderImage),
                            SortExpression = viewField.Name
                        };
                    }
                    else
                    {
                        viewFieldColumn = new TemplateField
                        {
                            ItemTemplate   = itemTemplate,
                            HeaderText     = viewField.DisplayName,
                            SortExpression = viewField.Name
                        };
                    }

                    this.spGridView.Columns.Add(viewFieldColumn);
                }
            }
        }
Ejemplo n.º 15
0
        public WelcomeInfo(byte[] Buffer, int StartIndex = 0)
        {
            characters = new BaseList <CharSelectItem>(10);
            ads        = new BaseList <CharSelectAd>(5);

            ReadFrom(Buffer, StartIndex);
        }
Ejemplo n.º 16
0
 public SpellObject(
     uint ID,
     uint Count,
     uint OverlayFileRID,
     uint NameRID,
     uint Flags,
     ushort LightFlags,
     byte LightIntensity,
     ushort LightColor,
     AnimationType FirstAnimationType,
     byte ColorTranslation,
     byte Effect,
     Animation Animation,
     BaseList <SubOverlay> SubOverlays,
     byte TargetsCount,
     SchoolType SchoolType)
     : base(
         ID, Count,
         OverlayFileRID, NameRID, Flags,
         LightFlags, LightIntensity, LightColor,
         FirstAnimationType, ColorTranslation, Effect,
         Animation, SubOverlays)
 {
     this.targetsCount = TargetsCount;
     this.schoolType   = SchoolType;
 }
Ejemplo n.º 17
0
        private void UpdateBaseList()
        {
            using (Monitor.Enter())
            {
                var previousSelectedBase = SelectedBase;

                var bases = EligibleBases;
                if (SelectedFirstLevel != BaseGroup.Any)
                {
                    bases = bases.Where(b => SelectedFirstLevel.Matches(b.Tags));
                }
                if (SelectedSecondLevel != ItemClass.Any)
                {
                    bases = bases.Where(b => b.ItemClass == SelectedSecondLevel);
                }
                if (SelectedThirdLevel != Tags.Default)
                {
                    bases = bases.Where(b => b.Tags.HasFlag(SelectedThirdLevel));
                }
                BaseList     = bases.ToList();
                SelectedBase = BaseList.Contains(previousSelectedBase)
                    ? previousSelectedBase
                    : BaseList[0];

                if (SelectedBase == previousSelectedBase)
                {
                    UpdateBase();
                }
            }
        }
Ejemplo n.º 18
0
        public WelcomeInfo()
        {
            characters = new BaseList <CharSelectItem>(10);
            ads        = new BaseList <CharSelectAd>(5);

            Clear(false);
        }
    /// <summary>
    /// Method to get the index into the List{} in the base collection for an item that may or may
    /// not be in the collection. Returns -1 if not found.
    /// </summary>
    protected override int GetItemIndex(T itemToFind)
    {
        int keyToFind = GetKeyForItem(itemToFind);

        return(BaseList.FindIndex((T existingItem) =>
                                  GetKeyForItem(existingItem).Equals(keyToFind)));
    }
Ejemplo n.º 20
0
    internal void AddMapBottom(TileType bottomType)
    {
        List <HexCoordinates> GrowDown = new List <HexCoordinates>();

        for (int i = 0; i < this.Count; i++)
        {
            if (GetTile(i).floorType != null || GetTile(i).solidType != null)
            {
                GrowDown.Add(IndexToCoords(i));
            }
        }
        for (int i = 0; i < GrowDown.Count; i++)
        {
            HexCoordinates Check = GrowDown[i];
            TileType       what  = bottomType;
            while (true)
            {
                Check = Check.Below;
                Tile checkTile = BaseList.GetTile(Check);
                if (checkTile != null)
                {
                    checkTile.solidType = what;
                }
                else
                {
                    break;
                }
            }
        }
    }
 public ItemCollection([NotNull] SpContext context, [NotNull] BaseList list, [NotNull] ItemsRetrievingOptions options)
     : base(context, list, options)
 {
     Assert.ArgumentNotNull(context, "context");
     Assert.ArgumentNotNull(list, "list");
     Assert.ArgumentNotNull(options, "options");
 }
Ejemplo n.º 22
0
 public OFileSmoothRangeFormaterForm()
 {
     InitializeComponent();
     //this.SetIsMultiObsFile(false);
     //positonResultRenderControl11.IsHasIndexParamName = true;
     this.SetExtendTabPageCount(0, 0);
     CurrentRunningSolvers = new BaseList <ObsFileSmoothRangeFormater>();
 }
Ejemplo n.º 23
0
        protected BaseList GetList([NotNull] IntegrationConfigData integrationConfigData)
        {
            Assert.ArgumentNotNull(integrationConfigData, "integrationConfigData");

            var context = SpContextProviderBase.Instance.CreateDataContext(integrationConfigData);

            return(BaseList.GetList(integrationConfigData.Web, integrationConfigData.List, context));
        }
Ejemplo n.º 24
0
 internal static void LoadItems <E>(BinaryReader reader, BaseList <E> target, Func <E> loader) where E : BaseItem
 {
     for (int i = reader.ReadInt32(); i > 0; i--)
     {
         E item = loader();
         target.Add(item);
     }
 }
            /// <summary>
            /// Initializes a new instance of the <see cref="ItemsRetrievingOptionsParser"/> class.
            /// </summary>
            /// <param name="list">The target SharePoint list.</param>
            /// <param name="options">Indicates which list items should be retrived from the target SharePoint list.</param>
            public ItemsRetrievingOptionsParser([NotNull] BaseList list, [NotNull] ItemsRetrievingOptions options)
            {
                Assert.ArgumentNotNull(list, "list");
                Assert.ArgumentNotNull(options, "options");

                this.list    = list;
                this.options = options;
            }
Ejemplo n.º 26
0
 public ClockJumpReviserForm()
 {
     InitializeComponent();
     //this.SetIsMultiObsFile(false);
     //positonResultRenderControl11.IsHasIndexParamName = true;
     this.SetExtendTabPageCount(0, 0);
     CurrentRunningSolvers = new BaseList <ClockJumpDetectAndRepairStreamer>();
 }
Ejemplo n.º 27
0
        public ChatMessageAdapter(BaseList <ChatMessage> Chat, Activity Activity)
            : base()
        {
            chat    = Chat;
            context = Activity;

            chat.ListChanged += chat_ListChanged;
        }
Ejemplo n.º 28
0
        public void Insert(int index, T item)
        {
            WriteData(
                () => BaseList.Insert(index, item),
                () => BaseList.RemoveAt(index));

            OnSizeChanged(EventArgs.Empty);
        }
Ejemplo n.º 29
0
        public QueryPathQueueItem(IBase baseObject, bool assumeSingleOperator = false)
        {
            this.BaseObject           = baseObject;
            this.Predicates           = new BaseList <QueryPathQueuePredicate>();
            this.AssumeSingleOperator = assumeSingleOperator;

            this.Predicates.CollectionChanged += Predicates_CollectionChanged;
        }
Ejemplo n.º 30
0
        public bool UpdateItemsGuid(Item item)
        {
            IntegrationConfigData integrationData = null;

            try
            {
                integrationData = IntegrationConfigDataProvider.GetFromItem(item);

                Assert.IsNotNull(integrationData, "integrationData");

                var context = SpContextProviderBase.Instance.CreateDataContext(integrationData);
                var list    = BaseList.GetList(integrationData.Web, integrationData.List, context);

                Assert.IsNotNull(list, "list");

                var itemCollection = list.GetItems(new ItemsRetrievingOptions
                {
                    Folder    = integrationData.Folder,
                    ItemLimit = integrationData.ItemLimit,
                    ViewName  = integrationData.View
                });

                foreach (var listItem in itemCollection)
                {
                    var connectedItem = this.GetConnectedItem(item, listItem, list);

                    if (connectedItem != null)
                    {
                        using (new SecurityDisabler())
                        {
                            new IntegrationItem(connectedItem).GUID = listItem.GUID;
                        }

                        if (listItem is FolderItem)
                        {
                            this.UpdateItemsGuid(connectedItem);
                        }
                    }
                }

                return(true);
            }
            catch (Exception exception)
            {
                var errorMessage = new StringBuilder("Updating guids have been failed.");
                errorMessage.AppendLine(string.Format("Integration config item: {0}", item.ID));

                if (integrationData != null)
                {
                    errorMessage.AppendLine(LogMessageFormatter.FormatWeb01List23(integrationData));
                }

                Log.Error(errorMessage.ToString(), exception, this);

                return(false);
            }
        }
Ejemplo n.º 31
0
 internal bool RemoveBase(InterfaceType _base)
 {
     if (BaseList.Remove(_base))
     {
         Changed();
         return(true);
     }
     return(false);
 }
Ejemplo n.º 32
0
        private BaseDictionary GetItem(BaseList list, string name, string nameHeader, string numberSF)
        {
            BaseDictionary item = list.GetItem(name);
            if (item == null)
            {
                LogManager.WriteNotFound(name, nameHeader, numberSF);
            }

            return item;
        }
Ejemplo n.º 33
0
    public void Update()
    {
        /*if (HighLogic.LoadedSceneIsEditor) {
            print ("Fetching vessel list!!!!!");
            bases = FlightGlobals.Vessels;
            print ("Got here");
            foreach (Vessel v in bases) {
                print (v.name);
            }
        }*/
        if (HighLogic.LoadedSceneIsFlight && FlightGlobals.fetch != null)
        {
            if (state != 1) {
                state = 1;
                list = new BaseList();
                list.bases.Add(FlightGlobals.ActiveVessel.GetInstanceID());

                print ("Writing");
                byte[] ListToSave = KSP.IO.IOUtils.SerializeToBinary(list);
                int HowManyToSave = ListToSave.Length;
                KSP.IO.BinaryWriter Writer = KSP.IO.BinaryWriter.CreateForType<RoverCruiseControlAttacher>("Bases.dat");
                Writer.Write(HowManyToSave);
                Writer.Write(ListToSave);
                Writer.Close();
                print ("Written!");
            }
        }
        else if (HighLogic.LoadedSceneIsEditor)
        {
            print ("loading");
            /*KSP.IO.BinaryReader Loader = KSP.IO.BinaryReader.CreateForType<RoverCruiseControlAttacher>("Bases.dat");
            int HowManyToLoad = Loader.ReadInt32();
            byte[] ListToLoad = new byte[HowManyToLoad];
            Loader.Read(ListToLoad, 0, HowManyToLoad);
            Loader.Close();
            object ObjectToLoad = KSP.IO.IOUtils.DeserializeFromBinary(ListToLoad);
            list = (BaseList)ObjectToLoad;
            print (list.bases[0].ToString());
            int id = list.bases[0];
            //QuickFlightDriver.StartWithNewLaunch(ShipConstruction.GetShipsSubfolderFor(GameScenes.FLIGHT)+"/DRILL.craft", "Launchpad");
            //FlightDriver.StartAndFocusVessel(ShipConstruction.GetShipsSubfolderFor(GameScenes.FLIGHT)+"/../../persistent.sfs",id);
            HighLogic.LoadScene(GameScenes.FLIGHT);*/
        }
    }
 public TradeOfferObject(
     uint ID,
     uint Count, 
     uint OverlayFileRID, 
     uint NameRID, 
     uint Flags,
     ushort LightFlags, 
     byte LightIntensity, 
     ushort LightColor, 
     AnimationType FirstAnimationType, 
     byte ColorTranslation, 
     byte Effect,
     Animation Animation, 
     BaseList<SubOverlay> SubOverlays,            
     uint Price)
     : base(ID, Count, OverlayFileRID, NameRID, Flags, 
         LightFlags, LightIntensity, LightColor, 
         FirstAnimationType, ColorTranslation, Effect, 
         Animation, SubOverlays)
 {
     this.price = Price;
 }
Ejemplo n.º 35
0
 /// <summary>
 /// Constructor by values
 /// </summary>
 /// <param name="ID"></param>
 /// <param name="Count"></param>
 /// <param name="OverlayFileRID"></param>
 /// <param name="NameRID"></param>
 /// <param name="Flags"></param>
 /// <param name="LightFlags"></param>
 /// <param name="LightIntensity"></param>
 /// <param name="LightColor"></param>
 /// <param name="FirstAnimationType"></param>
 /// <param name="ColorTranslation"></param>
 /// <param name="Effect"></param>
 /// <param name="Animation"></param>
 /// <param name="SubOverlays"></param>
 /// <param name="IsInUse"></param>
 public InventoryObject(
     uint ID,
     uint Count,           
     uint OverlayFileRID,
     uint NameRID, 
     uint Flags,
     ushort LightFlags, 
     byte LightIntensity, 
     ushort LightColor, 
     AnimationType FirstAnimationType, 
     byte ColorTranslation, 
     byte Effect, 
     Animation Animation, 
     BaseList<SubOverlay> SubOverlays,
     bool IsInUse
     )            
     : base(
         ID, Count, 
         OverlayFileRID, NameRID, Flags, 
         LightFlags, LightIntensity, LightColor, 
         FirstAnimationType, ColorTranslation, Effect, Animation, SubOverlays)
 {
     this.isInUse = IsInUse;            
 }
        public RoomObject(
            uint ID,
            uint Count,           
            uint OverlayFileRID,
            uint NameRID, 
            uint Flags,
            ushort LightFlags, 
            byte LightIntensity, 
            ushort LightColor, 
            AnimationType FirstAnimationType, 
            byte ColorTranslation, 
            byte Effect, 
            Animation Animation, 
            BaseList<SubOverlay> SubOverlays,            
            V3 Position3D,
            ushort Angle, 
            AnimationType MotionFirstAnimationType, 
            byte MotionColorTranslation, 
            byte MotionEffect, 
            Animation MotionAnimation, 
            IEnumerable<SubOverlay> MotionSubOverlays)
            : base(ID, Count, 
                OverlayFileRID, NameRID, Flags, 
                LightFlags, LightIntensity, LightColor, 
                FirstAnimationType, ColorTranslation, Effect, Animation, SubOverlays)
        {
            // attach motionsuboverlays listener
            motionSubOverlays.ListChanged += OnMotionSubOverlaysListChanged;

            // coordinates & angle
            position3D = Position3D;
            angle = Angle;

            // roomobject stuff (like object)
            motionFirstAnimationType = MotionFirstAnimationType;
            motionColorTranslation = MotionColorTranslation;
            motionEffect = MotionEffect;
            motionAnimation = MotionAnimation;
            motionAnimation.PropertyChanged += OnMotionAnimationPropertyChanged;

            // special handling for secondtrans
            if (flags.Drawing == ObjectFlags.DrawingType.SecondTrans)
            {
                motionColorTranslation = ColorTransformation.FILTERWHITE90;

                foreach (SubOverlay subOv in MotionSubOverlays)
                    subOv.ColorTranslation = ColorTransformation.FILTERWHITE90;
            }

            // motionsuboverlays
            motionSubOverlays.AddRange(MotionSubOverlays);
        }
Ejemplo n.º 37
0
 public PlayerOverlay(
     uint ID,
     uint Count, 
     uint OverlayFileRID, 
     uint NameRID, 
     uint Flags,
     ushort LightFlags, 
     byte LightIntensity, 
     ushort LightColor, 
     AnimationType FirstAnimationType, 
     byte ColorTranslation, 
     byte Effect,
     Animation Animation, 
     BaseList<SubOverlay> SubOverlays,
     PlayerOverlayHotspot RenderPosition)        
     : base(
         ID, Count, OverlayFileRID, NameRID, Flags, 
         LightFlags, LightIntensity, LightColor, 
         FirstAnimationType, ColorTranslation, Effect, 
         Animation, SubOverlays, false)
 {
     renderPosition = RenderPosition;
 }
Ejemplo n.º 38
0
        /// <summary>
        /// Constructor
        /// </summary>
        public DataController()
        {          
            // create lists
            roomObjects = new RoomObjectList(300);
            roomObjectsFiltered = new RoomObjectListFiltered(roomObjects);
            projectiles = new ProjectileList(50);
            onlinePlayers = new OnlinePlayerList(200);
            inventoryObjects = new InventoryObjectList(100);
            avatarCondition = new StatNumericList(5);
            avatarAttributes = new StatNumericList(10);
            avatarSkills = new SkillList(100);
            avatarSpells = new SkillList(100);
            avatarQuests = new SkillList(100);
            roomBuffs = new ObjectBaseList<ObjectBase>(30);
            avatarBuffs = new ObjectBaseList<ObjectBase>(30);
            spellObjects = new SpellObjectList(100);
            backgroundOverlays = new BackgroundOverlayList(5);
            playerOverlays = new ObjectBaseList<PlayerOverlay>(10);            
            chatMessages = new BaseList<ServerString>(101);
            gameMessageLog = new BaseList<GameMessage>(100);
            visitedTargets = new List<RoomObject>(50);
            clickedTargets = new List<uint>(50);
            actionButtons = new ActionButtonList();
            ignoreList = new List<string>(20);
            chatCommandHistory = new List<string>(20);

            // attach some listeners
            RoomObjects.ListChanged += OnRoomObjectsListChanged;
            Projectiles.ListChanged += OnProjectilesListChanged;
            ChatMessages.ListChanged += OnChatMessagesListChanged;

            // make some lists sorted
            OnlinePlayers.SortByName();
            AvatarSkills.SortByResourceName();
            AvatarSpells.SortByResourceName();
            SpellObjects.SortByName();
            
            // create single data objects
            roomInformation = new RoomInfo();
            lightShading = new LightShading(0, new SpherePosition(0, 0));
            backgroundMusic = new PlayMusic();
            guildInfo = new GuildInfo();
            guildShieldInfo = new GuildShieldInfo();
            guildAskData = new GuildAskData();
            diplomacyInfo = new DiplomacyInfo();
            adminInfo = new AdminInfo();
            tradeInfo = new TradeInfo();
            buyInfo = new BuyInfo();
            welcomeInfo = new WelcomeInfo();
            charCreationInfo = new CharCreationInfo();
            statChangeInfo = new StatChangeInfo();
            newsGroup = new NewsGroup();
            objectContents = new ObjectContents();
            effects = new Effects();
            lookPlayer = new PlayerInfo();
            lookObject = new ObjectInfo();
            clientPreferences = new PreferencesFlags();

            // some values
            ChatMessagesMaximum = 100;
            ChatCommandHistoryMaximum = 20;
            ChatCommandHistoryIndex = -1;
            AvatarObject = null;
            IsResting = false;
            SelfTarget = false;
            IsNextAttackApplyCastOnHighlightedObject = false;
            AvatarID = UInt32.MaxValue;
            TargetID = UInt32.MaxValue;
            ViewerPosition = V3.ZERO;
            UIMode = UIMode.None;
        }
Ejemplo n.º 39
0
 /// <summary />
 public static void ResetFieldArrays()
 {
     fieldNames = new StringList(false);
       fieldValues = new ObjectList(false);
       fieldDataTypes = new BaseList<DbType>(false);
 }