public void Reload(ISwObject pict, ISwDrawing drw) { var info = FindInfo(pict, drw); var data = info.ToData(); info.Picture = m_QrCodeManager.Reload(pict, data.Location, data.Source, drw); }
public void Edit(ISwObject pict, ISwDrawing drw) { m_CurPict = pict; m_CurInfo = FindInfo(pict, drw); m_CurInsertQrCodePageData = m_CurInfo.ToData(); HidePicture(m_CurPict, true); base.Insert(drw); }
private QrCodeInfo FindInfo(ISwObject pict, ISwDrawing drw) { var handler = m_App.Documents.GetHandler <QrCodeDrawingHandler>(drw); var qrCode = handler.QrCodes.FirstOrDefault(d => d.Picture.Equals(pict)); if (qrCode == null) { throw new UserException("This picture does not contain QR code data"); } return(qrCode); }
private ISwObject GetSelectedPicture(ISwDrawing drw) { var pict = (ISwObject)drw.Selections.Last(); if (pict is ISwFeature) { pict = drw.CreateObjectFromDispatch <ISwObject>( ((ISwFeature)pict).Feature.GetSpecificFeature2()); } return(pict); }
internal SwDrawingView(IView drwView, ISwDrawing drw, ISheet sheet, bool created) : base(drw.Model, drwView) { m_Drawing = drw; m_Creator = new ElementCreator <IView>(CreateDrawingView, drwView, created); if (created) { sheet = drwView.Sheet; } else { m_CachedLocation = new Point(0, 0, 0); } m_Sheet = sheet; }
public void UpdateInPlace(ISwObject pict, ISwDrawing drw) { var data = FindInfo(pict, drw); data.Picture = m_QrCodeManager.UpdateInPlace(pict, data.ToData().Source, drw); }