private void RefreshState() { if (ContextId.Length > 0 && OwnerId.Length > 0) { if (_context is null) { _context = new MemoMeister.RemarkContext(); _context.Load(ContextId, OwnerId, UserId); } else if (ContextId != _context.ContextId) { _context.Load(ContextId, OwnerId, UserId); } else if (OwnerId != _context.OwnerId) { _context.OwnerId = OwnerId; } else { return; } } else { btnShow.Image = imageList1.Images[0]; btnShow.Text = ""; _context = null; } if (_context != null) { UpdateControl(true); } }
public RemarkViewer() { InitializeComponent(); _context = new MemoMeister.RemarkContext(); }