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; }}"); }
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; }
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>")); }
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; } }
public IActionResult Get(string id) { DataAccess accessor = new DataAccess(); style currentRecipe = accessor.Get <style>(id); return(Json(currentRecipe)); }
/// <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)); } }
public Vendég(string vendegNeve, bool betepve, int testSuly, style style) { this.vendegNeve = vendegNeve; this.betepve = betepve; this.testSuly = testSuly; this.style = style; }
public ActionResult DeleteConfirmed(int id) { style style = db.styles.Find(id); db.styles.Remove(style); db.SaveChanges(); return(RedirectToAction("Index")); }
string SetColor(style style, fg_color fgColor, bg_color bgColor) { if (color) { return((char)codes.ESC + "[" + (int)style + ";" + (int)fgColor + "m"); } return(""); }
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>
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)); }
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))); }
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); }
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; }
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(); } }
// 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)); }
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); } }
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; }
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(); }
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(); }
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; }
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); }
// 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); } }
/// <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, "错误,此控件已有样式!")); } }
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); }
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; } }
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); }
Initialize(family, emSize, style, unit, gdiCharSet, gdiVerticalFont);
partial void Deletestyle(style instance);
partial void Updatestyle(style instance);
partial void Insertstyle(style instance);
internal StateStack(DrawStyle style, Matrix4x4 mtx) => Push(style, mtx);
/// <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; } } } } }
/// <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); }
FontName = GetFontName(style, fontScheme),