public void showProperties()
{
CheckDisposed();
var pic = (ICmPicture)Object;
var app = (IApp)m_mediator.PropertyTable.GetValue("App");
using (var dlg = new PicturePropertiesDialog(m_cache, pic, m_mediator.HelpTopicProvider, app, true))
{
if (dlg.Initialize())
{
var stylesheet = FontHeightAdjuster.StyleSheetFromMediator(m_mediator);
dlg.UseMultiStringCaption(m_cache, WritingSystemServices.kwsVernAnals, stylesheet);
dlg.SetMultilingualCaptionValues(pic.Caption);
if (dlg.ShowDialog() == DialogResult.OK)
{
UndoableUnitOfWorkHelper.Do(DetailControlsStrings.ksUndoUpdatePicture, DetailControlsStrings.ksRedoUpdatePicture, m_obj, () =>
{
string strLocalPictures = CmFolderTags.DefaultPictureFolder;
dlg.GetMultilingualCaptionValues(pic.Caption);
pic.UpdatePicture(dlg.CurrentFile, null, strLocalPictures, 0);
});
InstallPicture(m_picBox);
m_lastSize = new Size(0, 0); // forces OnSizeChanged to do something (we need to adjust to new aspect ratio).
OnSizeChanged(new EventArgs());
}
}
}
}