/// <summary>
        /// Mencari index stock pada list
        /// </summary>
        /// <param name="variableCollection">list stock</param>
        /// <param name="name">nama stock</param>
        /// <returns>index</returns>
        public static int FindStockIndex(SeriesStocks stockCollection, string name)
        {
            stockToFind = new SeriesStock(name, "");
            System.Predicate <SeriesStock> search = findStockPredicate;

            return(stockCollection.FindIndex(search));
        }
Esempio n. 2
0
        /// <summary>
        /// Constructor. untuk undated
        /// </summary>
        /// <param name="name">nama project</param>
        /// <param name="numberObservations">jumlah observasi</param>
        public SeriesData(string name, int numberObservations)
        {
            this.seriesName         = name;
            this.frequency          = SeriesData.SeriesFrequency.Undated;
            this.numberObservations = numberObservations;
            this.createNewTimeData();
            this.seriesVariables = new SeriesVariables();
            this.seriesGroups    = new SeriesGroups();
            this.seriesStocks    = new SeriesStocks();

            this.seriesVariables.Changed += new ChangedEventHandler(OnChanged);
            this.seriesGroups.Changed    += new ChangedEventHandler(OnChanged);
            this.seriesStocks.Changed    += new ChangedEventHandler(OnChanged);
            this.time.Changed            += new ChangedEventHandler(OnChanged);
        }
Esempio n. 3
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="name">nama project</param>
        /// <param name="frequency">frekuensi</param>
        /// <param name="start">tangal awal</param>
        /// <param name="end">tangal akhir</param>
        public SeriesData(string name, SeriesFrequency frequency, DateTime start, DateTime end)
        {
            this.seriesName = name;
            this.frequency  = frequency;
            this.startDate  = start;
            this.endDate    = end;
            this.computeNumberObservations();
            this.createNewTimeData();
            this.seriesVariables = new SeriesVariables();
            this.seriesGroups    = new SeriesGroups();
            this.seriesStocks    = new SeriesStocks();

            this.seriesVariables.Changed += new ChangedEventHandler(OnChanged);
            this.seriesGroups.Changed    += new ChangedEventHandler(OnChanged);
            this.seriesStocks.Changed    += new ChangedEventHandler(OnChanged);
            this.time.Changed            += new ChangedEventHandler(OnChanged);
        }