コード例 #1
0
        public static string base_styles(style s, bool light = false)
        {
            string m = light ? "0pt" : "2pt";

            return($@"html {{ padding: {m}; margin: {m}; }}

            body {{ font-family:{s.font_family_light} !important; background-color: {s.css_clr(s.back_color_page)}; 
                color:{s.css_clr(s.fore_color)}; font-size:{s.fs2}pt !important; padding:{m}; margin:{m}; }}

            .f-sb {{ font-family:{s.font_family_semibold} !important; }}
            .f-l {{ font-family:{s.font_family_light} !important; }}
             
            .fc-1 {{ color: {s.css_clr(s.fc1)} !important; }}
            .fc-2 {{ color: {s.css_clr(s.fc2)} !important; }}
            .fc-3 {{ color: {s.css_clr(s.fc3)} !important; }}
            .fc-4 {{ color: {s.css_clr(s.fc4)} !important; }}

            .link {{ color:{s.css_clr(s.fore_color_link)} !important; }}
            .cancel-link {{ color:{s.css_clr(s.fore_color_cancel_link)} !important; }}

            .light {{ color:{s.css_clr(s.fore_color_light)} !important; }}
            .light2 {{ color:{s.css_clr(s.fore_color_light2)} !important; }}

            .error {{ color:{s.css_clr(s.fore_color_error)} !important; }}
            .warning {{ color:{s.css_clr(s.fore_color_warning)} !important; }}

            .tltp {{
              font-family:{s.font_family_semibold}; color:white; font-size:{s.font_size_normal - 2}pt !important; 
              background-color:{s.css_clr(s.bc_tooltip2)} !important; margin:4px !important;
            }}");
        }
コード例 #2
0
 void KeyInput()
 {
     if (Input.GetKeyDown(KeyCode.Z))
     {
         StartCoroutine(PlayControl("soldier", 1));
     }
     if (Input.GetKey(KeyCode.A))
     {
         Style = style.Defensive;
         BattleStyle(Style);
     }
     if (Input.GetKey(KeyCode.D))
     {
         Style = style.Offensive;
         BattleStyle(Style);
     }
     if (Input.GetKeyDown(KeyCode.Space))
     {
         if (TacticsGauge == 100)
         {
             OnSpecialSkill();
         }
     }
     Style = style.Normal;
 }
コード例 #3
0
ファイル: light_view.cs プロジェクト: stonetempledev/root
        public void set_html(string html, string styles = "")
        {
            style s = this.style;

            this.browser.Navigate(write_to_temp_file($@"<!DOCTYPE html>
         <html lang='en'><head>
          <meta charset='utf-8'>
          <meta http-equiv='X-UA-Compatible' content='IE=edge'>
          <meta name='viewport' content='width=device-width, initial-scale=1'>
          <style>
            {web_view.base_styles(s, true)}

            {styles}
          </style>
          <link rel='stylesheet' href=""..\js\bootstrap.css""></script>
          <link rel='stylesheet' href=""..\js\bootstrap-theme.css""></script>
          <link rel='stylesheet' href=""..\js\base_view.css""></script>
          <script type=""text/javascript"" src=""..\js\jquery-3.6.0.min.js""></script>
          <script type=""text/javascript"" src=""..\js\bootstrap.js""></script>
          <script type=""text/javascript"" src=""..\js\base_view.js""></script>

          <script language='javascript'>

            $( document ).ready(function() {{ init_page(); }});

          </script>

        </head>
        <body>
        <div class='container-fluid'>
          {html}
        </div>
        </body></html>"));
        }
コード例 #4
0
    public void BattleStyle(style _styletype)
    {
        switch (_styletype)
        {
        case style.Normal:
            break;

        case style.Offensive:
            _TacticsGauge--;
            if (_TacticsGauge <= 0)
            {
                _TacticsGauge = 0;
            }
            _slider.value = TacticsGauge;
            break;

        case style.Defensive:
            _TacticsGauge++;
            if (_TacticsGauge >= 100)
            {
                _TacticsGauge = 100;
            }
            _slider.value = TacticsGauge;
            break;

        case style.MAX:
            break;
        }
    }
コード例 #5
0
        public IActionResult Get(string id)
        {
            DataAccess accessor      = new DataAccess();
            style      currentRecipe = accessor.Get <style>(id);

            return(Json(currentRecipe));
        }
コード例 #6
0
 /// <summary>
 /// 获取样式表信息
 /// </summary>
 /// <returns></returns>
 public OperateResult GetStyle(int htmlID)
 {
     using (var db = new CGDataBase())
     {
         var   list  = db.style.Where(s => s.c_id == htmlID).FirstOrDefault();
         style style = null;
         if (list != null)
         {
             style = new style()
             {
                 id          = list.id,
                 c_id        = list.c_id,
                 content_css = StringDispose.AESDecrypt(list.content_css)
             };
         }
         else
         {
             style = new style()
             {
                 id          = 0,
                 c_id        = 0,
                 content_css = "未查询到样式信息!"
             };
         }
         return(new OperateResult(ResultStatus.Success, "ok", style));
     }
 }
コード例 #7
0
ファイル: Vendég.cs プロジェクト: Hamamamam/FirstProject
 public Vendég(string vendegNeve, bool betepve, int testSuly, style style)
 {
     this.vendegNeve = vendegNeve;
     this.betepve    = betepve;
     this.testSuly   = testSuly;
     this.style      = style;
 }
コード例 #8
0
        public ActionResult DeleteConfirmed(int id)
        {
            style style = db.styles.Find(id);

            db.styles.Remove(style);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
コード例 #9
0
    string SetColor(style style, fg_color fgColor, bg_color bgColor)
    {
        if (color)
        {
            return((char)codes.ESC + "[" + (int)style + ";" + (int)fgColor + "m");
        }

        return("");
    }
コード例 #10
0
        private async Task <string> PrepareReportTempHtmlFile()
        {
            // get report and render HTML together with CSS
            var report = GetReport();
            var result = report.Execute(RenderType.Html, parameters: GetReportParams());

            var reportHtml = @$ "<html>
    <head>
        <style type='text/css'>{Encoding.UTF8.GetString(result.SecondaryStream)}</style>
コード例 #11
0
 public ActionResult Edit([Bind(Include = "id,name,s_type,category,category_number,style_letter,style_guide,og_min,og_max,fg_min,fg_max,ibu_min,ibu_max,color_min,color_max,abv_min,abv_max,carb_min,carb_max,notes,profile,ingredients,examples,deleted,display,folder")] style style)
 {
     if (ModelState.IsValid)
     {
         db.Entry(style).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(style));
 }
コード例 #12
0
        public IActionResult Post([FromBody] style value, string id)
        {
            //double ibu = MathFunctions.IBU.basicIBU(value, 1.07);

            DataAccess accessor = new DataAccess();

            value = GlobalFunctions.AddIdIfNeeded(value, id);

            return(Json(accessor.Post(value)));
        }
コード例 #13
0
        public style getStyle(string styleID)
        {
            RegistryKey adsfa   = Registry.CurrentUser.OpenSubKey("SOFTWARE/Brewmeister");
            string      dataurl = GetDataProvider();
            string      jsonurl = dataurl + "/beernet/style/" + styleID;
            style       hopList = new style();
            var         json    = new WebClient().DownloadString(jsonurl);

            hopList = JsonConvert.DeserializeObject <style>(json);
            return(hopList);
        }
コード例 #14
0
ファイル: light_view.cs プロジェクト: stonetempledev/root
        public light_view(style s, WebBrowser b)
        {
            this.style = s;

            this.browser = b;
            this.browser.AllowNavigation                = false;
            this.browser.AllowWebBrowserDrop            = false;
            this.browser.IsWebBrowserContextMenuEnabled = false;
            this.browser.ScriptErrorsSuppressed         = true;
            this.browser.WebBrowserShortcutsEnabled     = false;
        }
コード例 #15
0
    public override void OnInspectorGUI()
    {
        DrawDefaultInspector();

        if (GUILayout.Button("Refresh UI", GUILayout.Width(utils.GetPercent(Screen.width, 90)), GUILayout.Height(40)))
        {
            if (_style == null)
            {
                _style = (style)target;
            }

            _style.Setup();
        }
    }
コード例 #16
0
        // GET: styles/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            style style = db.styles.Find(id);

            if (style == null)
            {
                return(HttpNotFound());
            }
            return(View(style));
        }
コード例 #17
0
        public void open_page(object data = null)
        {
            try {
                style s = this.main.style;

                // load objects
                try {
                    this.clear_objects();
                    this.load_objects(data);
                } catch (Exception ex) { this.add_element(new web_err_page(ex)); }

                // gen html
                this.browser.ObjectForScripting = this.interop;
                this.browser.Navigate(write_to_temp_file($@"<!DOCTYPE html>
         <html lang='en'><head>
          <meta charset='utf-8'>
          <meta http-equiv='X-UA-Compatible' content='IE=edge'>
          <meta name='viewport' content='width=device-width, initial-scale=1'>
          <style>
            {base_styles(s)}

            {string.Join("\r\n\r\n", this.styles.Select(x => x.css))}
          </style>
          <link rel='stylesheet' href=""..\js\bootstrap.css""></script>
          <link rel='stylesheet' href=""..\js\bootstrap-theme.css""></script>
          <link rel='stylesheet' href=""..\js\checkbox-slider.css""></script>
          <link rel='stylesheet' href=""..\js\base_view.css""></script>
          <script type=""text/javascript"" src=""..\js\jquery-3.6.0.min.js""></script>
          <script type=""text/javascript"" src=""..\js\bootstrap.js""></script>
          <script type=""text/javascript"" src=""..\js\base_view.js""></script>

          <script language='javascript'>

            $( document ).ready(function() {{ init_page(); }});

          </script>

          {string.Join("\r\n", this.scripts.Select(x => $@"<script language=javascript>
            {x.script}
          </script>"))}

        </head>
        <body>
         <div class='container-fluid' oncontextmenu='context_body(event)'>
          { string.Join("\r\n", this.htmls.Select(x => x.html))}
        </div>
        </body></html>"));
            } catch (Exception ex) { this.main.set_status_err(ex); }
        }
コード例 #18
0
ファイル: Vendég.cs プロジェクト: Hamamamam/FirstProject
        public Vendég(string vendegNeve)
        {
            this.vendegNeve = vendegNeve;
            int i = rnd.Next(1, 101);

            if (i <= 50)
            {
                betepve = true;
            }
            else
            {
                betepve = false;
            }
            testSuly = SulyGeneral();
            style    = style.mediocre;
        }
コード例 #19
0
ファイル: Themes.cs プロジェクト: EdiCarlos/MyPractices
 public static void Add(dbDataContext db, string name, string text, string borders, string body, string links, string hover, string button, string headers, string alt, string background)
 {
     style s = new style();
     s.style_name = name;
     s.text_color = text;
     s.borders = borders;
     s.body = body;
     s.links = links;
     s.hover = hover;
     s.button_text = button;
     s.header = headers;
     s.alt_rows = alt;
     s.background = background;
     db.styles.InsertOnSubmit(s);
     db.SubmitChanges();
 }
コード例 #20
0
 void Start()
 {
     //DontDestroyOnLoad(gameObject);
     _money        = 20;
     _plusmoney    = 1;
     _TacticsGauge = 30;
     texted.text   = "資金: 0";
     _slider       = GameObject.Find("TacticalGauge").GetComponent <Slider>();
     spawns        = GetComponent <MobSpawn>();
     Style         = style.Normal;
     _slider.value = TacticsGauge;
     pause         = false;
     tt            = TOWER.GetComponent <tower>();
     times         = 0;
     //StartCoroutine(Loop());
     //GetComponent<Text>().text = (Money).ToString();
 }
コード例 #21
0
ファイル: Styles.cs プロジェクト: EdiCarlos/MyPractices
    public static string Import(Stream xmlFile)
    {
        string output = string.Empty;
        try
        {
            TextReader rdr = new StreamReader(xmlFile);
            XElement x = XElement.Load(rdr);
            var styles = from p in x.Descendants("style") select p;

            foreach (XElement xe in styles)
            {
                dbDataContext db = new dbDataContext();
                Dictionary<string, string> styleAttributes = new Dictionary<string, string>();
                style s = new style();
                foreach (XAttribute xa in xe.Attributes())
                {
                    styleAttributes.Add(xa.Name.ToString(), xa.Value);
                }
                s.alt_rows = styleAttributes["alt_rows"];
                s.background = styleAttributes["background"];
                s.body = styleAttributes["body"];
                s.borders = styleAttributes["borders"];
                s.button_text = styleAttributes["button_text"];
                s.header = styleAttributes["header"];
                s.hover = styleAttributes["hover"];
                s.links = styleAttributes["links"];
                s.style_name = styleAttributes["style_name"];
                s.text_color = styleAttributes["text_color"];
                db.styles.InsertOnSubmit(s);
                try
                {
                    db.SubmitChanges(); //inefficient to submit each time, *but* this will tell which styles got inserted and which didn't
                    output += "<div class='success'>-" + styleAttributes["style_name"] + " " + Resources.Common.Updated + "</div>";
                }
                catch// (Exception ex)
                {
                    output += "<div class='error'>" + Resources.Common.Error + " " + styleAttributes["style_name"] + " - <span class='smaller'>most likely a duplicate</span></div>";
                }
            }
        }
        catch (Exception ex)
        {
            output = "<div class='error'>" + Resources.Common.Error + ": <div class='sub_error'>" + ex.Message + "</div></div>";
        }
        return output;
    }
コード例 #22
0
ファイル: RecipeEditor.cs プロジェクト: malkyore/BrewForge
        public static List <style> getStyleOptions()
        {
            style a = new style();

            a.name        = "test";
            a.description = "no";

            style b = new style();

            a.name        = "test2";
            a.description = "no2";

            List <style> styles = new List <style>();

            styles.Add(a);
            styles.Add(b);
            return(styles);
        }
コード例 #23
0
 // Update is called once per frame
 void Update()
 {
     times += Time.deltaTime;
     if (times >= 1.0f)
     {
         times = 0.0f;
         TimetoMoney();
         //Debug.Log(Money);
     }
     KeyInput();
     if (Style == style.Offensive || Style == style.Defensive)
     {
         Style = style.Normal;
     }
     if (tt.HP <= 0)
     {
         Invoke("TITLE", 3);
     }
 }
コード例 #24
0
 /// <summary>
 /// 单独添加一条css样式
 /// </summary>
 /// <returns></returns>
 public OperateResult AddFistStyleCss(int cid, string styCss)
 {
     //先检测此控件是否已有样式
     using (var db = new CGDataBase())
     {
         var list = db.style.Where(s => s.c_id == cid).FirstOrDefault();
         if (list == null)
         {
             style style = new style()
             {
                 c_id        = cid,
                 content_css = StringDispose.AESEncrypt(styCss)
             };
             db.style.Add(style);
             if (db.SaveChanges() > 0)
             {
                 return(new OperateResult(ResultStatus.Success, "添加样式成功!"));
             }
         }
         return(new OperateResult(ResultStatus.Error, "错误,此控件已有样式!"));
     }
 }
コード例 #25
0
ファイル: u3tbCommon.cs プロジェクト: utak3r/u3Toolbox
        public style findStyleFromName(string name)
        {
            style foundStyle = style.LightGreys;

            if (name == "DarkGreys")
            {
                foundStyle = style.DarkGreys;
            }
            if (name == "LightGreys")
            {
                foundStyle = style.LightGreys;
            }
            if (name == "LightBlues")
            {
                foundStyle = style.LightBlues;
            }
            if (name == "Steel")
            {
                foundStyle = style.Steel;
            }
            return(foundStyle);
        }
コード例 #26
0
ファイル: u3tbCommon.cs プロジェクト: utak3r/u3Toolbox
        public void setCurrentStyle(style aStyle)
        {
            currentStyle = aStyle;
            switch (currentStyle)
            {
            case style.DarkGreys:
                gradientColor1 = Color.FromArgb(150, 150, 150);
                gradientColor2 = Color.FromArgb(90, 90, 90);
                frameColor     = Color.WhiteSmoke;
                textColor      = Color.WhiteSmoke;
                textFontStyle  = FontStyle.Bold;
                break;

            case style.LightGreys:
                gradientColor1 = Color.FromArgb(220, 220, 220);
                gradientColor2 = Color.FromArgb(140, 140, 140);
                frameColor     = Color.WhiteSmoke;
                textColor      = Color.Black;
                textFontStyle  = FontStyle.Regular;
                break;

            case style.LightBlues:
                gradientColor1 = Color.FromArgb(249, 252, 254);
                gradientColor2 = Color.FromArgb(220, 231, 245);
                frameColor     = Color.Black;
                textColor      = Color.Black;
                textFontStyle  = FontStyle.Regular;
                break;

            case style.Steel:
                gradientColor1 = Color.FromArgb(244, 246, 247);
                gradientColor2 = Color.FromArgb(179, 188, 198);
                frameColor     = Color.FromArgb(63, 66, 68);
                textColor      = Color.FromArgb(63, 66, 68);
                textFontStyle  = FontStyle.Bold;
                break;
            }
        }
コード例 #27
0
ファイル: BeerXMLHandler.cs プロジェクト: malkyore/BeerNet
        public style mapStyle(styleObj styleFromXML)
        {
            style recipeStyle = new style();

            recipeStyle.category    = styleFromXML.CATEGORY_NUMBER.ToString();
            recipeStyle.description = styleFromXML.STYLE_GUIDE;
            recipeStyle.maxABV      = styleFromXML.ABV_MAX.Value;
            recipeStyle.minABV      = styleFromXML.ABV_MIN.Value;
            recipeStyle.maxColor    = styleFromXML.COLOR_MAX == null ? 0 : styleFromXML.COLOR_MAX.Value;
            recipeStyle.minColor    = styleFromXML.COLOR_MIN == null ? 0 : styleFromXML.COLOR_MIN.Value;
            recipeStyle.maxFG       = styleFromXML.FG_MAX == null ? 0 : styleFromXML.FG_MAX.Value;
            recipeStyle.minFG       = styleFromXML.FG_MIN == null ? 0 : styleFromXML.FG_MIN.Value;
            recipeStyle.maxIBU      = styleFromXML.IBU_MAX == null ? 0 : styleFromXML.IBU_MAX.Value;
            recipeStyle.minIBU      = styleFromXML.IBU_MIN == null ? 0 : styleFromXML.IBU_MIN.Value;
            recipeStyle.name        = styleFromXML.NAME;
            recipeStyle.maxOG       = styleFromXML.OG_MAX == null ? 0 : styleFromXML.OG_MAX.Value;
            recipeStyle.minOG       = styleFromXML.OG_MIN == null ? 0 : styleFromXML.OG_MIN.Value;

            //styleFromXML.STYLE_LETTER;
            //styleFromXML.TYPE;
            //styleFromXML.VERSION;
            return(recipeStyle);
        }
コード例 #28
0
 Initialize(family, emSize, style, unit, gdiCharSet, gdiVerticalFont);
コード例 #29
0
ファイル: db.designer.cs プロジェクト: EdiCarlos/MyPractices
 partial void Deletestyle(style instance);
コード例 #30
0
ファイル: db.designer.cs プロジェクト: EdiCarlos/MyPractices
 partial void Updatestyle(style instance);
コード例 #31
0
ファイル: db.designer.cs プロジェクト: EdiCarlos/MyPractices
 partial void Insertstyle(style instance);
コード例 #32
0
ファイル: StateStack.cs プロジェクト: pencilking2002/BioTower
 internal StateStack(DrawStyle style, Matrix4x4 mtx) => Push(style, mtx);
コード例 #33
0
        /// <summary>
        /// NetInfoコレクションにある信号を置き換える。
        /// </summary>
        private static void ReplaceTL(IEnumerable <NetInfo> roads)
        {
            Log.Display(Log.mode.warning, "ReplaceTL Init");

            foreach (var road in roads)
            {
                foreach (var lane in road.m_lanes)
                {
                    if (lane?.m_laneProps?.m_props == null)
                    {
                        continue;
                    }

                    foreach (var laneProp in lane.m_laneProps.m_props)
                    {
                        var prop = laneProp.m_finalProp;

                        if (prop == null)
                        {
                            continue;
                        }

                        // 道路を判別してstyleを指定する
                        style style = ReturnStyleFromRoadname(road.name);

                        // ここから置き換え
                        switch (prop.name)
                        {
                        //(右側通行)これと
                        case "Traffic Light 01":
                        case "Traffic Light European 01":
                        case "Traffic Light 02 Mirror":
                        case "Traffic Light European 02 Mirror":
                            switch (style)
                            {
                            case style.none:
                                laneProp.m_finalProp = null;
                                laneProp.m_prop      = null;
                                break;

                            case style.white:
                                laneProp.m_finalProp = JPTLmain;
                                laneProp.m_prop      = JPTLmain;
                                break;

                            case style.brown:
                                laneProp.m_finalProp = JPTLmainBrown;
                                laneProp.m_prop      = JPTLmainBrown;
                                break;

                            case style.brown2:
                                laneProp.m_finalProp = JPTLmainBrown2;
                                laneProp.m_prop      = JPTLmainBrown2;
                                break;
                            }
                            break;

                        //(右側通行)これの中身を入れ替え
                        case "Traffic Light 01 Mirror":
                        case "Traffic Light European 01 Mirror":
                        case "Traffic Light 02":
                        case "Traffic Light European 02":
                            //WideAvenueの時はTL1Mを消す。歩行者信号と重なってしまうため。
                            if (road.name.Contains("WideAvenue"))
                            {
                                style = style.none;
                            }

                            switch (style)
                            {
                            case style.none:
                                laneProp.m_finalProp = null;
                                laneProp.m_prop      = null;
                                break;

                            case style.white:
                                laneProp.m_finalProp = JPTLsub;
                                laneProp.m_prop      = JPTLsub;
                                break;

                            case style.brown:
                                laneProp.m_finalProp = JPTLsubBrown;
                                laneProp.m_prop      = JPTLsubBrown;
                                break;

                            case style.brown2:
                                laneProp.m_finalProp = JPTLsubBrown2;
                                laneProp.m_prop      = JPTLsubBrown2;
                                break;
                            }
                            break;

                        case "Traffic Light Pedestrian":
                        case "Traffic Light Pedestrian European":
                            //(右側通行)この行を削除
                            laneProp.m_angle = laneProp.m_angle + 180;

                            // FourDevidedLaneAvenueの時は消す。車道用信号か重なってしまうため。
                            if (road.name.Contains("FourDevidedLaneAvenue"))
                            {
                                style = style.none;
                            }

                            switch (style)
                            {
                            case style.none:
                                laneProp.m_finalProp = null;
                                laneProp.m_prop      = null;
                                break;

                            case style.white:
                                laneProp.m_finalProp = JPTLsub;
                                laneProp.m_prop      = JPTLsub;
                                break;

                            case style.brown:
                                laneProp.m_finalProp = JPTLsubBrown;
                                laneProp.m_prop      = JPTLsubBrown;
                                break;

                            case style.brown2:
                                laneProp.m_finalProp = JPTLsubBrown2;
                                laneProp.m_prop      = JPTLsubBrown2;
                                break;
                            }
                            break;
                        }
                    }
                }
            }
        }
コード例 #34
0
        /// <summary>
        /// 道路名に対応したsyleを返す。
        /// </summary>
        private static style ReturnStyleFromRoadname(string name)
        {
            style style = ReturnStyleFromConfig(config.Global);

            // Bus
            if (name.ToLower().Contains("bus") && config.EnableBus)
            {
                return(style = ReturnStyleFromConfig(config.Bus));
            }

            // Monorail
            if (name.Contains("Monorail") && config.EnableMonorail)
            {
                return(style = ReturnStyleFromConfig(config.Monorail));
            }

            // Grass
            if (name.Contains("Grass") && config.EnableGrass)
            {
                if (!name.Contains("Medium Road"))
                {
                    return(style = ReturnStyleFromConfig(config.Grass));
                }
            }

            // Trees
            if (name.Contains("Trees") && config.EnableTrees)
            {
                if (!name.Contains("Medium Road"))
                {
                    return(style = ReturnStyleFromConfig(config.Trees));
                }
            }

            // Tiny Roads
            if (
                name.Contains("Gravel Road") ||
                name.Contains("PlainStreet2L") ||
                name.Contains("Two-Lane Alley") ||
                name.Contains("Two-Lane Oneway") ||
                name.Contains("One-Lane Oneway With") ||
                name == "One-Lane Oneway"
                )
            {
                return(style = ReturnStyleFromConfig(config.TinyRoads));
            }

            // Small Roads
            if (
                name.Contains("Basic Road") ||
                name.Contains("BasicRoadPntMdn") ||
                name.Contains("BasicRoadMdn") ||
                name.Contains("Oneway Road") ||
                name.Contains("Asymmetrical Three Lane Road") ||
                name.Contains("One-Lane Oneway with") ||
                name.Contains("Small Busway") ||
                name.Contains("Harbor Road") ||
                name.Contains("Tram Depot Road") ||
                name.Contains("Small Road")
                )
            {
                return(style = ReturnStyleFromConfig(config.SmallRoads));
            }

            // Small Heavy Roads
            if (
                name.Contains("BasicRoadTL") ||
                name.Contains("AsymRoadL1R2") ||
                name.Contains("Oneway3L") ||
                name.Contains("Small Avenue") ||
                name.Contains("AsymRoadL1R3") ||
                name.Contains("Oneway4L") ||
                name.Contains("OneWay3L")
                )
            {
                return(style = ReturnStyleFromConfig(config.SmallHeavyRoads));
            }

            // Medium Roads
            if (
                name.Contains("Medium Road") ||
                name.Contains("Avenue Large With") ||
                name.Contains("Medium Avenue") ||
                name.Contains("FourDevidedLaneAvenue") ||
                name.Contains("AsymAvenueL2R4") ||
                name.Contains("AsymAvenueL2R3")
                )
            {
                return(style = ReturnStyleFromConfig(config.MediumRoads));
            }

            // Large Roads
            if (
                name.Contains("Large Road") ||
                name.Contains("Large Oneway") ||
                name.Contains("Eight-Lane Avenue")
                )
            {
                return(style = ReturnStyleFromConfig(config.LargeRoads));
            }

            // Wide Roads
            if (
                name.Contains("WideAvenue")
                )
            {
                return(style = ReturnStyleFromConfig(config.WideRoads));
            }

            // Highway
            if (
                name.Contains("Highway")
                )
            {
                return(style = ReturnStyleFromConfig(config.Highways));
            }

            // Pedestrian Roads
            if (name.Contains("Zonable Pedestrian"))
            {
                if (config.HidePedRoadsSignal)
                {
                    return(style = style.none);
                }
                else
                {
                    return(style = ReturnStyleFromConfig(config.PedestrianRoads));
                }
            }

            // Promenade
            if (name.Contains("Zonable Promenade"))
            {
                if (config.HidePromenadeSignal)
                {
                    return(style = style.none);
                }
                else
                {
                    return(style = ReturnStyleFromConfig(config.PedestrianRoads));
                }
            }

            return(style);
        }
コード例 #35
0
ファイル: DqStyleParser.cs プロジェクト: Igorious/DQ
 FontName     = GetFontName(style, fontScheme),