public ActionResult Index() { new ChapterManager().DownloadChapters(1); var novels = new NovelManager().GetNovels(); return(View(novels)); }
private static void Mesage(object s, MessageEventArgs e) { string[] parser = e.Data.Split('/'); if (parser[0] == "Avtorization") { NovelManager.Avtorization(parser[1]); } else if (parser[0] == "Registartion") { NovelManager.Registration(parser[1]); } else if (parser[0] == "UpdateUser") { SetUI.AddControlGamers(parser[1], parser[2]); } else if (parser[0] == "RemoveUser") { SetUI.removeUser(parser[1]); } else if (parser[0] == "UpdateGame") { SetUI.AddControlGame(parser[1]); } else if (parser[0] == "NewRoom") { SetUI.AddControlRoom(parser[1], parser[2], "1 из 2"); } }
void Start() { novelManager = GameObject.FindGameObjectWithTag("NovelManager").GetComponent <NovelManager> (); GameObject.FindGameObjectWithTag("TitleText").GetComponent <GUIText>().text = "VisualNovelProject"; clearStyle = new GUIStyle(); clearStyle.font = guiSkin.font; clearStyle.normal.background = null; clearStyle.hover.background = guiSkin.button.normal.background; clearStyle.border = new RectOffset(10, 10, 10, 10); clearStyle.padding = new RectOffset(6, 6, 3, 3); }
protected void Application_Start() { AreaRegistration.RegisterAllAreas(); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); var novelManager = new NovelManager(); Task.Factory.StartNew(() => { novelManager.Start(); }); }
/// <summary> /// 增加一条数据 /// </summary> public bool Add(NovelManager.Model.novel_chapter_content model) { StringBuilder strSql = new StringBuilder(); StringBuilder strSql1 = new StringBuilder(); StringBuilder strSql2 = new StringBuilder(); strSql1.Append("base_id,"); strSql2.Append("" + model.base_id + ","); if (model.nid != null) { strSql1.Append("Nid,"); strSql2.Append("'" + model.nid + "',"); } strSql1.Append("Cid,"); strSql2.Append("" + model.cid + ","); if (model.content != null) { strSql1.Append("Content,"); strSql2.Append("'" + model.content + "',"); } strSql.Append("insert into novel_chapter_content("); strSql.Append(strSql1.ToString().Remove(strSql1.Length - 1)); strSql.Append(")"); strSql.Append(" values ("); strSql.Append(strSql2.ToString().Remove(strSql2.Length - 1)); strSql.Append(")"); int rows = DbHelperMySQL.ExecuteSql(strSql.ToString()); if (rows > 0) { return true; } else { return false; } }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(NovelManager.Model.novel_chapter_content model) { StringBuilder strSql = new StringBuilder(); strSql.Append("update novel_chapter_content set "); strSql.Append("base_id=" + model.base_id + ","); if (model.content != null) { strSql.Append("Content='" + model.content + "',"); } int n = strSql.ToString().LastIndexOf(","); strSql.Remove(n, 1); strSql.Append(" where Nid='" + model.nid + "' and Cid=" + model.cid + " "); int rowsAffected = DbHelperMySQL.ExecuteSql(strSql.ToString()); if (rowsAffected > 0) { return true; } else { return false; } }
// Use this for initialization void Start() { rend = GetComponent <MeshRenderer>(); manager = NovelManager.singleton; }
public ActionResult Details(int id) { var novel = new NovelManager().GetNovel(id); return(View(novel)); }
/// <summary> /// 增加一条数据 /// </summary> public bool Add(NovelManager.Model.novel_chapter_content model) { return dal.Add(model); }
/// <summary> /// 增加一条数据 /// </summary> public bool Add(NovelManager.Model.novel_detail model) { StringBuilder strSql = new StringBuilder(); StringBuilder strSql1 = new StringBuilder(); StringBuilder strSql2 = new StringBuilder(); strSql1.Append("base_id,"); strSql2.Append("" + model.base_id + ","); if (model.nid != null) { strSql1.Append("Nid,"); strSql2.Append("'" + model.nid + "',"); } if (model.url != null) { strSql1.Append("url,"); strSql2.Append("'" + model.url + "',"); } strSql1.Append("click,"); strSql2.Append("" + model.click + ","); strSql1.Append("recommend,"); strSql2.Append("" + model.recommend + ","); if (model.updatedate != null) { strSql1.Append("updatedate,"); strSql2.Append("'" + model.updatedate + "',"); } if (model.description != null) { strSql1.Append("description,"); strSql2.Append("" + model.description + ","); } if (model.sourcesite != null) { strSql1.Append("sourcesite,"); strSql2.Append("'" + model.sourcesite + "',"); } if (model.chapter != null) { strSql1.Append("chapter,"); strSql2.Append("" + model.chapter + ","); } if (model.blank_chapter != null) { strSql1.Append("blank_chapter,"); strSql2.Append("'" + model.blank_chapter + "',"); } if (model.cover_image != null) { strSql1.Append("cover_image,"); strSql2.Append("'" + model.cover_image + "',"); } strSql.Append("insert into novel_detail("); strSql.Append(strSql1.ToString().Remove(strSql1.Length - 1)); strSql.Append(")"); strSql.Append(" values ("); strSql.Append(strSql2.ToString().Remove(strSql2.Length - 1)); strSql.Append(")"); int rows = DbHelperMySQL.ExecuteSql(strSql.ToString()); if (rows > 0) { return true; } else { return false; } }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(NovelManager.Model.novel_base model) { StringBuilder strSql = new StringBuilder(); strSql.Append("update novel_base set "); if (model.nid != null) { strSql.Append("Nid='" + model.nid + "',"); } if (model.name != null) { strSql.Append("name='" + model.name + "',"); } if (model.author != null) { strSql.Append("author='" + model.author + "',"); } strSql.Append("chaptercount=" + model.chaptercount + ","); strSql.Append("blankchapter_type=" + model.blankchapter_type + ","); strSql.Append("blankchapter_count=" + model.blankchapter_count + ","); strSql.Append("novelstate=" + model.novelstate + ","); if (model.type != null) { strSql.Append("type='" + model.type + "',"); } strSql.Append("no_desc=" + model.no_desc + ","); strSql.Append("state=" + model.state + ","); int n = strSql.ToString().LastIndexOf(","); strSql.Remove(n, 1); strSql.Append(" where id=" + model.id + ""); int rowsAffected = DbHelperMySQL.ExecuteSql(strSql.ToString()); if (rowsAffected > 0) { return true; } else { return false; } }
/// <summary> /// 增加一条数据 /// </summary> public bool Add(NovelManager.Model.novel_base model) { StringBuilder strSql = new StringBuilder(); StringBuilder strSql1 = new StringBuilder(); StringBuilder strSql2 = new StringBuilder(); if (model.nid != null) { strSql1.Append("Nid,"); strSql2.Append("'" + model.nid + "',"); } if (model.name != null) { strSql1.Append("name,"); strSql2.Append("'" + model.name + "',"); } if (model.author != null) { strSql1.Append("author,"); strSql2.Append("'" + model.author + "',"); } strSql1.Append("chaptercount,"); strSql2.Append("" + model.chaptercount + ","); strSql1.Append("blankchapter_type,"); strSql2.Append("" + model.blankchapter_type + ","); strSql1.Append("blankchapter_count,"); strSql2.Append("" + model.blankchapter_count + ","); strSql1.Append("novelstate,"); strSql2.Append("" + model.novelstate + ","); if (model.type != null) { strSql1.Append("type,"); strSql2.Append("'" + model.type + "',"); } strSql1.Append("no_desc,"); strSql2.Append("" + model.no_desc + ","); strSql1.Append("state,"); strSql2.Append("" + model.state + ","); strSql.Append("insert into novel_base("); strSql.Append(strSql1.ToString().Remove(strSql1.Length - 1)); strSql.Append(")"); strSql.Append(" values ("); strSql.Append(strSql2.ToString().Remove(strSql2.Length - 1)); strSql.Append(")"); int rows = DbHelperMySQL.ExecuteSql(strSql.ToString()); if (rows > 0) { return true; } else { return false; } }
/// <summary> /// 增加一条数据 /// </summary> public bool Add(NovelManager.Model.novel_detail model) { return dal.Add(model); }
private static void Close(object s, CloseEventArgs e) { NovelManager.Disconnect(); }
void Awake() { singleton = this; }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(NovelManager.Model.novel_base model) { return dal.Update(model); }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(NovelManager.Model.novel_detail model) { StringBuilder strSql = new StringBuilder(); strSql.Append("update novel_detail set "); strSql.Append("base_id=" + model.base_id + ","); if (model.nid != null) { strSql.Append("Nid='" + model.nid + "',"); } if (model.url != null) { strSql.Append("url='" + model.url + "',"); } strSql.Append("click=" + model.click + ","); strSql.Append("recommend=" + model.recommend + ","); if (model.updatedate != null) { strSql.Append("updatedate='" + model.updatedate + "',"); } if (model.description != null) { strSql.Append("description=" + model.description + ","); } else { strSql.Append("description= null ,"); } if (model.sourcesite != null) { strSql.Append("sourcesite='" + model.sourcesite + "',"); } if (model.chapter != null) { strSql.Append("chapter=" + model.chapter + ","); } else { strSql.Append("chapter= null ,"); } if (model.blank_chapter != null) { strSql.Append("blank_chapter='" + model.blank_chapter + "',"); } else { strSql.Append("blank_chapter= null ,"); } if (model.cover_image != null) { strSql.Append("cover_image='" + model.cover_image + "',"); } int n = strSql.ToString().LastIndexOf(","); strSql.Remove(n, 1); strSql.Append(" where base_id="+model.base_id); int rowsAffected = DbHelperMySQL.ExecuteSql(strSql.ToString()); if (rowsAffected > 0) { return true; } else { return false; } }
/// <summary> /// 增加一条数据 /// </summary> public bool Add(NovelManager.Model.novel_base model) { return dal.Add(model); }
void Start() { novelManager = GameObject.FindGameObjectWithTag ( "NovelManager" ).GetComponent <NovelManager> (); GameObject.FindGameObjectWithTag ( "TitleText" ).GetComponent<GUIText>().text = "VisualNovelProject"; clearStyle = new GUIStyle (); clearStyle.font = guiSkin.font; clearStyle.normal.background = null; clearStyle.hover.background = guiSkin.button.normal.background; clearStyle.border = new RectOffset ( 10, 10, 10, 10 ); clearStyle.padding = new RectOffset ( 6, 6, 3, 3 ); }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(NovelManager.Model.novel_chapter_content model) { return dal.Update(model); }