void StartEdit() { if (!flags.editing) { flags.editing = true; foreach (IReflectorPluginDropFileTarget acceptor in local.drop_acceptors) { IReflectorEdit edit = acceptor as IReflectorEdit; if (edit != null) { edit.BeginEdit(); } } ContextMenuStrip = my_context_menu; current_page.Hide(); Refresh(); } }
void EndEdit() { if (flags.editing) { flags.editing = false; foreach (IReflectorPluginDropFileTarget acceptor in local.drop_acceptors) { IReflectorEdit edit = acceptor as IReflectorEdit; if (edit != null) { edit.EndEdit(); } } SaveConfig(); ContextMenuStrip = null; this.SuspendLayout(); // at this point if a canvas was created // this will be the first time it is shown... // default page must be created (and will be within display) current_page.Show(); Refresh(); this.ResumeLayout(); } }