public void DeleteScrap(int scrapid) { ScrapBook sb = new ScrapBook(); sb = GetScrap(scrapid); _db.ScrapBooks.DeleteOnSubmit(sb); }
public Mainform() { this.InitializeComponent(); this.scrapBook = new ScrapBook(this); this.scrapBook.addKeyPressListener(this); this.scrapBook.addScrapAddedListener(this); this.scrapBook.addScrapRemovedListener(this); this.optSetuna = new SetunaOption(); this.dustbox = new Queue <ScrapBase>(); this.scrapBook.DustBox = this.dustbox; this.scrapBook.DustBoxCapacity = 5; this.keyBook = this.optSetuna.GetKeyItemBook(); this._imgpool = new Queue <ScrapSource>(); this.SetSubMenu(); }
void RestoreScraps(ScrapBook mainBook) { var directoryInfo = new DirectoryInfo(Path); if (!directoryInfo.Exists) { directoryInfo.Create(); } var directories = directoryInfo.GetDirectories("*", SearchOption.TopDirectoryOnly); var list = new List <CacheItem>(directories.Length); foreach (var directory in directories) { var item = CacheItem.Read(directory.FullName); if ((item?.IsValid ?? false) == false) { continue; } list.Add(item); } list.Sort((x, y) => x.SortingOrder.CompareTo(y.SortingOrder)); AddScrap(0); void AddScrap(int index) { if (index >= list.Count) { IsInit = true; return; } var item = list[index]; mainBook.AddScrapFromCache(item, () => { AddScrap(++index); }); } }
public ActionResult ScrapBook(FormCollection formValues) { int from_id; int to_id; to_id = (int)Session["to_id"]; from_id = (int)((User)Session["Current"]).UserID; string Scrap_Text = Request.Form["PostScrap"]; ScrapBook _scrap = new ScrapBook(); _scrap.ToID = to_id; _scrap.FromID = from_id; _scrap.Scrap = Scrap_Text; _scrap.Timestamp = DateTime.Now; userRep.PostScrap(_scrap); userRep.Save(); return(View("ScrapBook", userRep.GetScraps(to_id))); }
// Token: 0x060001EE RID: 494 RVA: 0x0000A4C4 File Offset: 0x000086C4 public Mainform() { Instance = this; _isstart = false; _iscapture = false; _isoption = false; InitializeComponent(); scrapBook = new ScrapBook(this); scrapBook.addKeyPressListener(this); scrapBook.addScrapAddedListener(this); scrapBook.addScrapRemovedListener(this); optSetuna = new SetunaOption(); dustbox = new Queue <ScrapBase>(); scrapBook.DustBox = dustbox; scrapBook.DustBoxCapacity = 5; keyBook = optSetuna.GetKeyItemBook(); _imgpool = new List <ScrapSource>(); SetSubMenu(); Text = $"SETUNA {Application.ProductVersion}"; NetUtils.Init(); }
public virtual ToolStripItem GetToolStrip(ScrapBook scrapbook) => this.GetToolStrip();
// Token: 0x060002BB RID: 699 RVA: 0x0000F4E9 File Offset: 0x0000D6E9 public override ToolStripItem GetToolStrip(ScrapBook scrapbook) { return(new ToolStripScrapList(base.GetDisplayName(), scrapbook)); }
public override ToolStripItem GetToolStrip(ScrapBook scrapbook) => new ToolStripDustboxList(base.GetDisplayName(), scrapbook);
public void PostScrap(ScrapBook _scrap) { _db.ScrapBooks.InsertOnSubmit(_scrap); }