当前位置: 首页>>代码示例>>C#>>正文


C# AppTypes类代码示例

本文整理汇总了C#中AppTypes的典型用法代码示例。如果您正苦于以下问题:C# AppTypes类的具体用法?C# AppTypes怎么用?C# AppTypes使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


AppTypes类属于命名空间,在下文中一共展示了AppTypes类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: BusinessInfo

 public BusinessInfo(AppTypes.MarketTrend shortTerm, AppTypes.MarketTrend mediumTerm, AppTypes.MarketTrend longTerm, double weight)
 {
     this.ShortTermTrend = shortTerm;
     this.MediumTermTrend = mediumTerm;
     this.LongTermTrend = longTerm;
     this.Weight = weight;
 }
开发者ID:nguyenhaiquan,项目名称:trade-software,代码行数:7,代码来源:dataClass.cs

示例2: AppInfo

        public int Parent; // 0 if none

        public AppInfo( int id, string name = null, AppTypes type = AppTypes.Unknown, AppPlatforms platforms = AppPlatforms.All ) {
            this.Id = id;
            this.Name = name;
            this.AppType = type;

            this.Platforms = platforms;
        }
开发者ID:paddymahoney,项目名称:depressurizer,代码行数:9,代码来源:AppInfo.cs

示例3: Init

 private void Init(DateTime startDateTime, DateTime endDateTime, AppTypes.TimeScale timeScale, StringCollection stockCodes)
 {
     this.Cache.Clear();
     this.StartDateTime = startDateTime;
     this.EndDateTime = endDateTime;
     if (stockCodes != null && stockCodes.Count != 0)
         this.StockCodeList = common.system.MakeConditionStr(stockCodes, "'", "'", ",");
     else this.StockCodeList = null;
     this.TimeScale = timeScale;
 }
开发者ID:oghenez,项目名称:trade-software,代码行数:10,代码来源:dataClass.cs

示例4: TradeAlertItem

 public TradeAlertItem(string stockCode, string strategy, AppTypes.TimeScale timeScale, DateTime onDateTime,
                       double price, double volume, TradePointInfo tradePoint)
 {
     this.StockCode = stockCode;
     this.TimeScale = timeScale;
     this.Strategy = strategy;
     this.OnDateTime = onDateTime;
     this.Price = price;
     this.Volume = volume;
     this.TradePoint = tradePoint;
 }
开发者ID:oghenez,项目名称:trade-software,代码行数:11,代码来源:TradeAlertLibs.cs

示例5: ShowNew

        public databases.baseDS.portfolioRow ShowNew(AppTypes.PortfolioTypes type,string investorCode)
        {
            codeEd.Text = Consts.constMarkerNEW;
            nameEd.Text = "";
            descriptionEd.Text = "";

            this.nameEd.Focus();
            this.myInvestorCode = investorCode;
            this.myPortfolioType = type;
            this.ShowDialog();
            return (myPortfolioTbl.Count>0?myPortfolioTbl[0]:null);
        }
开发者ID:oghenez,项目名称:trade-software,代码行数:12,代码来源:watchListNew.cs

示例6: GetDataList

        public static double[] GetDataList(databases.baseDS.priceDataDataTable dataTbl, int startIdx,int endIdx,AppTypes.PriceDataType type)
        {
            double[] data = new double[endIdx - startIdx+1];
            switch (type)
            {
                case AppTypes.PriceDataType.High:
                    for (int i = startIdx, j = 0; i <= endIdx; i++, j++)
                    {
                        if (dataTbl[i].RowState == System.Data.DataRowState.Deleted) continue;
                        data[j] = (double)dataTbl[i].highPrice;
                    }
                    break;
                case AppTypes.PriceDataType.Low:
                    for (int i = startIdx, j = 0; i <=endIdx; i++, j++)
                    {
                        if (dataTbl[i].RowState == System.Data.DataRowState.Deleted) continue;
                        data[j] = (double)dataTbl[i].lowPrice;
                    }
                    break;
                case AppTypes.PriceDataType.Open:
                    for (int i = startIdx, j = 0; i <= endIdx; i++, j++)
                    {
                        if (dataTbl[i].RowState == System.Data.DataRowState.Deleted) continue;
                        data[j] = (double)dataTbl[i].openPrice;
                    }
                    break;
                case AppTypes.PriceDataType.Close:
                    for (int i = startIdx, j = 0; i <= endIdx; i++, j++)
                    {
                        if (dataTbl[i].RowState == System.Data.DataRowState.Deleted) continue;
                        data[j] = (double)dataTbl[i].closePrice;
                    }
                    break;
                case AppTypes.PriceDataType.Volume:
                    for (int i = startIdx, j = 0; i <= endIdx; i++, j++)
                    {
                        if (dataTbl[i].RowState == System.Data.DataRowState.Deleted) continue;
                        data[j] = (double)dataTbl[i].volume;
                    }
                    break;

                case AppTypes.PriceDataType.DateTime:
                    for (int i = startIdx, j = 0; i <= endIdx; i++, j++)
                    {
                        if (dataTbl[i].RowState == System.Data.DataRowState.Deleted) continue;
                        data[j] = dataTbl[i].onDate.ToOADate();
                    }
                    break;
                default:
                    common.system.ThrowException("Invalid dataField in MakeDataList()"); break;
            }
            return data;
        }
开发者ID:oghenez,项目名称:trade-software,代码行数:53,代码来源:Libs.cs

示例7: ShowForm

 public void ShowForm(string stockCode,  StringCollection strategyCodes, AppTypes.TimeScale timeScale)
 {
     watchListLb.LoadData(commonClass.SysLibs.sysLoginCode, false);
     this.myStrategyCodes = strategyCodes;
     this.codeEd.Text = stockCode;
     this.timeScaleCb.myValue = timeScale;
     strategyLb.Items.Clear();
     for (int idx = 0; idx < strategyCodes.Count; idx++)
     {
         strategyLb.Items.Add(application.Strategy.StrategyLibs.GetMetaName(strategyCodes[idx]));
     }
     this.timeScaleCb.myValue = timeScale;
     this.ShowDialog();
 }
开发者ID:oghenez,项目名称:trade-software,代码行数:14,代码来源:addToWatchList_StockAndStrategy.cs

示例8: ImportSteamConfigFile

        /// <summary>
        /// Loads category info from the given steam config file.
        /// </summary>
        /// <param name="filePath">The path of the file to open</param>
        /// <param name="ignore">Set of game IDs to ignore</param>
        /// <param name="forceInclude">If true, include games even if they are not of an included type</param>
        /// <returns>The number of game entries found</returns>
        public int ImportSteamConfigFile( string filePath, SortedSet<int> ignore, AppTypes includedTypes )
        {
            Program.Logger.Write( LoggerLevel.Info, GlobalStrings.GameData_OpeningSteamConfigFile, filePath );
            VdfFileNode dataRoot;

            try {
                using( StreamReader reader = new StreamReader( filePath, false ) ) {
                    dataRoot = VdfFileNode.LoadFromText( reader, true );
                }
            } catch( ParseException e ) {
                Program.Logger.Write( LoggerLevel.Error, GlobalStrings.GameData_ErrorParsingConfigFileParam, e.Message );
                throw new ApplicationException( GlobalStrings.GameData_ErrorParsingSteamConfigFile + e.Message, e );
            } catch( IOException e ) {
                Program.Logger.Write( LoggerLevel.Error, GlobalStrings.GameData_ErrorOpeningConfigFileParam, e.Message );
                throw new ApplicationException( GlobalStrings.GameData_ErrorOpeningSteamConfigFile + e.Message, e );
            }

            VdfFileNode appsNode = dataRoot.GetNodeAt( new string[] { "Software", "Valve", "Steam", "apps" }, true );
            int count = IntegrateGamesFromVdf( appsNode, ignore, includedTypes );
            Program.Logger.Write( LoggerLevel.Info, GlobalStrings.GameData_SteamConfigFileLoaded, count );
            return count;
        }
开发者ID:Theo47,项目名称:depressurizer,代码行数:29,代码来源:GameData.cs

示例9: IntegrateGamesFromVdf

        /// <summary>
        /// Loads in games from a VDF node containing a list of games.
        /// Any games in the node not found in the game list will be added to the gamelist.
        /// If a game in the node has a tags subnode, the "favorite" field will be overwritten.
        /// If a game in the node has a category set, it will overwrite any categories in the gamelist.
        /// If a game in the node does NOT have a category set, the category in the gamelist will NOT be cleared.
        /// </summary>
        /// <param name="appsNode">Node containing the game nodes</param>
        /// <param name="ignore">Set of games to ignore</param>
        /// <param name="forceInclude">Include games even if their type is not an included type</param>
        /// <returns>Number of games loaded</returns>
        private int IntegrateGamesFromVdf( VdfFileNode appsNode, SortedSet<int> ignore, AppTypes includedTypes )
        {
            int loadedGames = 0;

            Dictionary<string, VdfFileNode> gameNodeArray = appsNode.NodeArray;
            if( gameNodeArray != null ) {
                foreach( KeyValuePair<string, VdfFileNode> gameNodePair in gameNodeArray ) {
                    int gameId;
                    if( int.TryParse( gameNodePair.Key, out gameId ) ) {
                        if( ( ignore != null && ignore.Contains( gameId ) ) || !Program.GameDB.IncludeItemInGameList( gameId, includedTypes ) ) {
                            Program.Logger.Write( LoggerLevel.Verbose, GlobalStrings.GameData_SkippedProcessingGame, gameId );
                        } else if( gameNodePair.Value != null && gameNodePair.Value.NodeType == ValueType.Array ) {
                            GameInfo game = null;

                            // Add the game to the list if it doesn't exist already
                            if( !Games.ContainsKey( gameId ) ) {
                                game = new GameInfo( gameId, Program.GameDB.GetName( gameId ), this );
                                Games.Add( gameId, game );
                                Program.Logger.Write( LoggerLevel.Verbose, GlobalStrings.GameData_AddedNewGame, gameId, game.Name );
                            } else {
                                game = Games[gameId];
                            }

                            loadedGames++;

                            game.ApplySource( GameListingSource.SteamConfig );

                            game.Hidden = ( gameNodePair.Value.ContainsKey( "hidden" ) && gameNodePair.Value["hidden"].NodeInt != 0 );

                            VdfFileNode tagsNode = gameNodePair.Value["tags"];
                            if( tagsNode != null ) {
                                Dictionary<string, VdfFileNode> tagArray = tagsNode.NodeArray;
                                if( tagArray != null ) {
                                    List<Category> cats = new List<Category>( tagArray.Count );
                                    foreach( VdfFileNode tag in tagArray.Values ) {
                                        string tagName = tag.NodeString;
                                        if( tagName != null ) {
                                            Category c = GetCategory( tagName );
                                            if( c != null ) cats.Add( c );
                                        }
                                    }
                                    if( cats.Count > 0 ) {
                                        SetGameCategories( gameId, cats, false );
                                    }
                                }
                            }

                            Program.Logger.Write( LoggerLevel.Verbose, GlobalStrings.GameData_ProcessedGame, gameId, string.Join( ",", game.Categories ) );
                        }
                    }
                }
            }

            return loadedGames;
        }
开发者ID:Theo47,项目名称:depressurizer,代码行数:66,代码来源:GameData.cs

示例10: GetLastPlayedFromVdf

        /// <summary>
        /// Get LastPlayed date from a VDF node containing a list of games.
        /// Any games in the node not found in the game list will be added to the gamelist.
        /// </summary>
        /// <param name="appsNode">Node containing the game nodes</param>
        /// <param name="ignore">Set of games to ignore</param>
        /// <param name="forceInclude">Include games even if their type is not an included type</param>
        private void GetLastPlayedFromVdf(VdfFileNode appsNode, SortedSet<int> ignore, AppTypes includedTypes)
        {
            Dictionary<string, VdfFileNode> gameNodeArray = appsNode.NodeArray;
            if (gameNodeArray != null)
            {
                foreach (KeyValuePair<string, VdfFileNode> gameNodePair in gameNodeArray)
                {
                    int gameId;
                    if (int.TryParse(gameNodePair.Key, out gameId))
                    {
                        if ((ignore != null && ignore.Contains(gameId)) || !Program.GameDB.IncludeItemInGameList(gameId, includedTypes))
                        {
                            Program.Logger.Write(LoggerLevel.Verbose, GlobalStrings.GameData_SkippedProcessingGame, gameId);
                        }
                        else if (gameNodePair.Value != null && gameNodePair.Value.NodeType == ValueType.Array)
                        {
                            GameInfo game = null;

                            // Add the game to the list if it doesn't exist already
                            if (!Games.ContainsKey(gameId))
                            {
                                game = new GameInfo(gameId, Program.GameDB.GetName(gameId), this);
                                Games.Add(gameId, game);
                                Program.Logger.Write(LoggerLevel.Verbose, GlobalStrings.GameData_AddedNewGame, gameId, game.Name);
                            }
                            else {
                                game = Games[gameId];
                            }

                            if (gameNodePair.Value.ContainsKey("LastPlayed") && gameNodePair.Value["LastPlayed"].NodeInt != 0)
                            {
                                DateTime dt = Utility.GetDTFromUTime(gameNodePair.Value["LastPlayed"].NodeInt);
                                if (dt > game.LastPlayed) game.LastPlayed = dt;
                                Program.Logger.Write(LoggerLevel.Verbose, GlobalStrings.GameData_ProcessedGame, gameId, game.LastPlayed.ToString());
                            }
                        }
                    }
                }
            }
        }
开发者ID:Theo47,项目名称:depressurizer,代码行数:47,代码来源:GameData.cs

示例11: IntegrateXmlGameList

 /// <summary>
 /// Integrates list of games from an XmlDocument into the loaded game list.
 /// </summary>
 /// <param name="doc">The XmlDocument containing the new game list</param>
 /// <param name="overWrite">If true, overwrite the names of games already in the list.</param>
 /// <param name="ignore">A set of item IDs to ignore.</param>
 /// <param name="ignoreDlc">Ignore any items classified as DLC in the database.</param>
 /// <param name="newItems">The number of new items actually added</param>
 /// <returns>Returns the number of games successfully processed and not ignored.</returns>
 public int IntegrateXmlGameList( XmlDocument doc, bool overWrite, SortedSet<int> ignore, AppTypes includedTypes, out int newItems )
 {
     newItems = 0;
     if( doc == null ) return 0;
     int loadedGames = 0;
     XmlNodeList gameNodes = doc.SelectNodes( "/gamesList/games/game" );
     foreach( XmlNode gameNode in gameNodes ) {
         int appId;
         XmlNode appIdNode = gameNode["appID"];
         if( appIdNode != null && int.TryParse( appIdNode.InnerText, out appId ) ) {
             XmlNode nameNode = gameNode["name"];
             if( nameNode != null ) {
                 bool isNew;
                 GameInfo integratedGame = IntegrateGame( appId, nameNode.InnerText, overWrite, ignore, includedTypes, GameListingSource.WebProfile, out isNew );
                 if( integratedGame != null ) {
                     loadedGames++;
                     if( isNew ) {
                         newItems++;
                     }
                 }
             }
         }
     }
     Program.Logger.Write( LoggerLevel.Info, GlobalStrings.GameData_IntegratedXMLDataIntoGameList, loadedGames, newItems );
     return loadedGames;
 }
开发者ID:Theo47,项目名称:depressurizer,代码行数:35,代码来源:GameData.cs

示例12: ShowStock

 protected void ShowStock(string stockCode, AppTypes.TimeRanges timeRange, AppTypes.TimeScale timeScale)
 {
     if (myShowStock == null) return;
     myShowStock(stockCode, timeRange, timeScale);
 }
开发者ID:oghenez,项目名称:trade-software,代码行数:5,代码来源:baseTesting.cs

示例13: ShowStockHandler

 private void ShowStockHandler(string stockCode,AppTypes.TimeRanges timeRange, AppTypes.TimeScale timeScale)
 {
     try
     {
         ShowStockChart(stockCode, timeRange, timeScale);
     }
     catch (Exception er)
     {
         this.ShowError(er);
     }
 }
开发者ID:oghenez,项目名称:trade-software,代码行数:11,代码来源:main.cs

示例14: GetPortfolioDetail_ByType

 public static databases.baseDS.portfolioDetailDataTable GetPortfolioDetail_ByType(AppTypes.PortfolioTypes[] types)
 {
     try
     {
         lock (myClient)
         {
             return myClient.GetPortfolioDetail_ByType(types);
         }
     }
     catch (Exception er)
     {
         if (OnError != null) OnError(er);
     }
     return null;
 }
开发者ID:oghenez,项目名称:trade-software,代码行数:15,代码来源:dataLibs.cs

示例15: GetPortfolio_ByInvestorAndType

 public static databases.baseDS.portfolioDataTable GetPortfolio_ByInvestorAndType(string investorCode, AppTypes.PortfolioTypes type)
 {
     try
     {
         lock (myClient)
         {
             return myClient.GetPortfolio_ByInvestorAndType(investorCode, type);
         }
     }
     catch (Exception er)
     {
         if (OnError != null) OnError(er);
     }
     return null;
 }
开发者ID:oghenez,项目名称:trade-software,代码行数:15,代码来源:dataLibs.cs


注:本文中的AppTypes类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。