PKStudio.Tools.uVisionGenerator.Classes.uvProjectClasses.FileOptions.GetFileOptionsStrings C# (CSharp) Method

GetFileOptionsStrings() public method

public GetFileOptionsStrings ( int TargetNum ) : List
TargetNum int
return List
        public List<string> GetFileOptionsStrings(int TargetNum)
        {
            List<string> result = new List<string>();
            if (!this.IsDefault())
            {
                string str = string.Empty;
                result.Add("Options " + TargetNum + "," + this.file.Group.Num + "," + this.file.Num + "  // File '" + this.file.Name + "'");
                result.Add(" PropFld { " + this.PropFld + " }");
                result.Add(" IncBld=" + (int)this.IncBld);
                result.Add(" AlwaysBuild=" + (int)this.AlwaysBuild);
                result.Add(" GenAsm=" + (int)this.GenAsm);
                result.Add(" AsmAsm=" + (int)this.AsmAsm);
                result.Add(" PublicsOnly=" + (int)this.PublicsOnly);
                result.Add(" StopCode=" + (int)this.StopCode);
                str = " CustArgs (";
                if (this.CustArgs.Count > 0)
                {
                    for (int i = 0; i < this.CustArgs.Count - 1; i++)
                    {
                        str += this.CustArgs[i] + " ";
                    }
                    str += this.CustArgs[this.CustArgs.Count - 1];
                }
                str += ")";
                result.Add(str);

                str = " LibMods (";
                if (this.LibMods.Count > 0)
                {
                    for (int i = 0; i < this.LibMods.Count - 1; i++)
                    {
                        str += this.LibMods[i] + " ";
                    }
                    str += this.LibMods[this.LibMods.Count - 1];
                }
                str += ")";
                result.Add(str);

                string flg = string.Empty;
                string misc = string.Empty;
                string def = string.Empty;
                string undef = string.Empty;
                string inc = string.Empty;

                switch (this.file.Type)
                {
                    case PKStudio.Tools.uVisionGenerator.Classes.uvProjectClasses.File.FILE_TYPE.C_FILE:
                    case PKStudio.Tools.uVisionGenerator.Classes.uvProjectClasses.File.FILE_TYPE.CPP_FILE:
                        flg = "ADSCCFLG";
                        misc = "ADSCMISC";
                        def = "ADSCDEFN";
                        undef = "ADSCUDEF";
                        inc = "ADSCINCD";
                        break;
                    case PKStudio.Tools.uVisionGenerator.Classes.uvProjectClasses.File.FILE_TYPE.ASM_FILE:
                        flg = "ADSASFLG";
                        misc = "ADSAMISC";
                        def = "ADSADEFN";
                        undef = "ADSAUDEF";
                        inc = "ADSAINCD";
                        break;
                }
                if (!string.IsNullOrEmpty(misc))
                {
                    if (flg == "ADSCCFLG")
                        result.Add(" " + flg + " { " + this.ADSCCFLG.ToString() + " }");
                    if (flg == "ADSASFLG")
                        result.Add(" " + flg + " { " + this.ADSCCFLG + " }");
                    str = " " + misc + " (";
                    if (this.Misc.Count > 0)
                    {
                        for (int i = 0; i < this.Misc.Count - 1; i++)
                        {
                            str += this.Misc[i] + " ";
                        }
                        str += this.Misc[this.Misc.Count - 1];
                    }
                    str += ")";
                    result.Add(str);

                    str = " " + def + " (";
                    if (this.Define.Count > 0)
                    {
                        for (int i = 0; i < this.Define.Count - 1; i++)
                        {
                            str += this.Define[i] + ", ";
                        }
                        str += this.Define[this.Define.Count - 1];
                    }
                    str += ")";
                    result.Add(str);

                    str = " " + undef + " (";
                    if (this.UnDefine.Count > 0)
                    {
                        for (int i = 0; i < this.UnDefine.Count - 1; i++)
                        {
                            str += this.UnDefine[i] + ", ";
                        }
                        str += this.UnDefine[this.UnDefine.Count - 1];
                    }
                    str += ")";
                    result.Add(str);

                    str = " " + inc + " (";
                    if (this.Include.Count > 0)
                    {
                        for (int i = 0; i < this.Include.Count - 1; i++)
                        {
                            str += this.Include[i] + ";";
                        }
                        str += this.Include[this.Include.Count - 1];
                    }
                    str += ")";
                    result.Add(str);
                }
                result.Add("EndOpt");
            }

            return result;
        }
    }