/// <summary> /// 保存序列图 /// </summary> /// <param name="index"></param> /// <param name="paths"></param> /// <returns>true: 保存成功 false:之前已有,保存失败</returns> public bool SaveXunLieTu(ushort index, string[] paths) // 保存 { string kName = Path.GetFileNameWithoutExtension(paths[0]); if (!string.IsNullOrEmpty(kName)) { kName = kName.Trim(); } else { return(false); } for (int i = 0; i < l_XunLieTuBean.Count; i++) { if (l_XunLieTuBean[i].KName == kName && l_XunLieTuBean[i].TuType == index) { return(false); } } XuLieSaveBean newBean = new XuLieSaveBean(); newBean.TuType = index; newBean.KName = kName; newBean.Paths = paths; l_XunLieTuBean.Add(newBean); return(true); }
public void DeleteXuLieTuSave(EXuLieTu index, string[] paths) // 删除单个 { string kName = Path.GetFileNameWithoutExtension(paths[0]); if (string.IsNullOrEmpty(kName)) { return; } kName = kName.Trim(); XuLieTuPathV_BeanV.Remove(kName); for (int i = 0; i < l_XunLieTuBean.Count; i++) { XuLieSaveBean bean = l_XunLieTuBean[i]; if (bean.KName == kName && bean.TuType == (ushort)index) { l_XunLieTuBean.RemoveAt(i); return; } } }