void ShowTalk(TalkInfo info) { PlayerManager.Lock(); WillTool.GetChildInDepth <Text>("Name", transform).text = info.name; WillTool.GetChildInDepth <Text>("Content", transform).text = info.content; WillTool.GetChildInDepth <TypewriterEffect>("Content", transform).OnStart(); GameObject imageTarget = null; GameObject imageTarget1 = WillTool.GetChildInDepth("Image1", this.gameObject); GameObject imageTarget2 = WillTool.GetChildInDepth("Image2", this.gameObject); imageTarget1.SetActive(false); imageTarget2.SetActive(false); if (info.bShowLeft) { imageTarget = imageTarget1; } else { imageTarget = imageTarget2; } if (string.IsNullOrEmpty(info.imageSource)) { } else { imageTarget.SetActive(true); imageTarget.GetComponent <Image>().sprite = Resources.Load <Sprite>(info.imageSource); } }
/// <summary> /// 获取正在通话的集合 /// </summary> /// <returns></returns> public static void GeTalkInfos(ref List <TalkInfo> list) { //list = new List<TalkInfo>(); string sql = "SELECT * FROM ipvt_talkinginfotable"; MySqlDataReader reader = null; try { reader = CustomMySqlHelper.ExecuteDataReader(sql); if (reader != null) { while (reader.Read()) { var info = new TalkInfo(); info.From = reader["caller"].ToString(); info.To = reader["callee"].ToString(); list.Add(info); } } } catch (Exception ex) { LogHelper.MainLog("error in GeTalkInfos()!ex:" + ex); } finally { if (reader != null) { reader.Close(); } } }
private void FillData(TalkInfo entity) { entity.Title = txtTitle.Value; entity.Tag = txtTag.Value; entity.Content = GetString("txtContent"); entity.CorporationID = GetInt("corpid"); entity.Realname = Admin.Realname; }
private void FillData(TalkInfo entity) { entity.Title = txtTitle.Value; entity.Tag = txtTag.Value; entity.Content = GetString("txtContent"); entity.CorporationID = GetInt("corpid"); entity.Realname = Admin.Realname; }
protected void btnSubmit_Click(object sender, EventArgs e) { TalkInfo entity = new TalkInfo(); int id = GetInt("id"); if (id > 0) entity = Talks.Instance.GetModel(id, true); FillData(entity); if (id > 0) Talks.Instance.Update(entity); else Talks.Instance.Add(entity); Talks.Instance.ReloadTalkListCache(); Response.Redirect(string.IsNullOrEmpty(FromUrl) ? "talkmg.aspx" : FromUrl); }
private void LoadData() { int id = GetInt("id"); if (id > 0) { CurrentTalk = Talks.Instance.GetModel(id); if (CurrentTalk == null) WriteMessage("/message.aspx", "系统提示", "无效话术信息!", "", "/index.aspx"); else { if (!Admin.Administrator && Admin.CorporationID != CurrentTalk.CorporationID) WriteMessage("/message.aspx", "系统提示", "没有权限!", "", "/index.aspx"); txtTitle.Value = CurrentTalk.Title; txtTag.Value = CurrentTalk.Tag; } } }
private void LoadData() { int id = GetInt("id"); if (id > 0) { CurrentTalk = Talks.Instance.GetModel(id); if (CurrentTalk == null) { WriteMessage("/message.aspx", "系统提示", "无效话术信息!", "", "/index.aspx"); } else { if (!Admin.Administrator && Admin.CorporationID != CurrentTalk.CorporationID) { WriteMessage("/message.aspx", "系统提示", "没有权限!", "", "/index.aspx"); } txtTitle.Value = CurrentTalk.Title; txtTag.Value = CurrentTalk.Tag; } } }
protected void btnSubmit_Click(object sender, EventArgs e) { TalkInfo entity = new TalkInfo(); int id = GetInt("id"); if (id > 0) { entity = Talks.Instance.GetModel(id, true); } FillData(entity); if (id > 0) { Talks.Instance.Update(entity); } else { Talks.Instance.Add(entity); } Talks.Instance.ReloadTalkListCache(); Response.Redirect(string.IsNullOrEmpty(FromUrl) ? "talkmg.aspx" : FromUrl); }
public void Update(TalkInfo entity) { CommonDataProvider.Instance().UpdateTalk(entity); }
public void Add(TalkInfo entity) { CommonDataProvider.Instance().AddTalk(entity); }
void LoadData() { // 독스가 생기면 추가해 줘야됨. WWWData.RequestReadFromGoogleDrive((int)DocsDown.DocsNumber.Sound, (WWWData docs) => { SoundSCV[] infos = Utils.GetInstance_Docs <SoundSCV[]>(docs.Lines); if (infos.Length > 0) { //m_tutorialTable = SetTutorialData(infos); for (int i = 0; i < infos.Length; i++) { SoundInfo data = new SoundInfo(infos[i]); m_SoundTable.Add(data); } // GameDefine.IsLoadAssetBundleOK = true; } }); WWWData.RequestReadFromGoogleDrive((int)DocsDown.DocsNumber.StoryUIDesine, (WWWData docs) => { StoryUIDesineCSV[] infos = Utils.GetInstance_Docs <StoryUIDesineCSV[]>(docs.Lines); if (infos.Length > 0) { for (int i = 0; i < infos.Length; i++) { StoryUIDesineInfo data = new StoryUIDesineInfo(infos[i]); m_StoryUIDesineTable.Add(data); } // GameDefine.IsLoadDataDocs = true; } }); WWWData.RequestReadFromGoogleDrive((int)DocsDown.DocsNumber.Talk, (WWWData docs) => { TalkCSV[] infos = Utils.GetInstance_Docs <TalkCSV[]>(docs.Lines); if (infos.Length > 0) { for (int i = 0; i < infos.Length; i++) { TalkInfo data = new TalkInfo(infos[i]); m_TalkTable.Add(data); } // GameDefine.IsLoadDataDocs = true; } }); WWWData.RequestReadFromGoogleDrive((int)DocsDown.DocsNumber.StageMapSetting, (WWWData docs) => { StageMapSettingCSV[] infos = Utils.GetInstance_Docs <StageMapSettingCSV[]>(docs.Lines); if (infos.Length > 0) { for (int i = 0; i < infos.Length; i++) { StageMapSettingInfo data = new StageMapSettingInfo(infos[i]); m_StageMapSettingTable.Add(data); } GameDefine.IsLoadDataDocs = true; } }); }
public override void AddTalk(TalkInfo entity) { string sql = @"INSERT INTO ComOpp_Talk( [Title] ,[Content] ,[Tag] ,[Realname] ,[PublicUserID] ,[CorporationID] )VALUES( @Title ,@Content ,@Tag ,@Realname ,@PublicUserID ,@CorporationID )"; SqlParameter[] p = { new SqlParameter("@Title",entity.Title), new SqlParameter("@Content",entity.Content), new SqlParameter("@Tag",entity.Tag), new SqlParameter("@Realname",entity.Realname), new SqlParameter("@PublicUserID",entity.PublicUserID), new SqlParameter("@CorporationID",entity.CorporationID) }; SqlHelper.ExecuteNonQuery(_con, CommandType.Text, sql, p); }
public override void UpdateTalk(TalkInfo entity) { string sql = @" UPDATE ComOpp_Talk set Title = @Title ,Content = @Content ,Tag = @Tag WHERE ID=@ID"; SqlParameter[] parameters = { new SqlParameter("@ID", entity.ID), new SqlParameter("@Title", entity.Title), new SqlParameter("@Content", entity.Content), new SqlParameter("@Tag", entity.Tag) }; SqlHelper.ExecuteNonQuery(_con, CommandType.Text, sql, parameters); }
public abstract void UpdateTalk(TalkInfo entity);
public abstract void AddTalk(TalkInfo entity);
public static TalkInfo PopulateTalkInfo(IDataReader reader) { TalkInfo entity = new TalkInfo() { ID = (int)reader["ID"], Title = reader["Title"] as string, Content = reader["Content"] as string, Tag = reader["Tag"] as string, Realname = reader["Realname"] as string, PublicUserID = (int)reader["PublicUserID"], AddTime = DataConvert.SafeDate(reader["AddTime"]), CorporationID = (int)reader["CorporationID"] }; return entity; }