//Must be called by the inherited constructor protected bool ShowView(Decal.Adapter.Wrappers.PluginHost H) { if (MyDialogContainer.DialogExists(iDialogKey)) { disp = true; GC.SuppressFinalize(this); return(false); } MyDialogContainer.Initialize(); MyDialogContainer.AddDialog(iDialogKey, this, Dispose); View = ViewSystemSelector.CreateViewXML(H, GetDialogXML()); View.Visible = true; //Center view System.Drawing.Rectangle wnd = H.Actions.RegionWindow; int x = (wnd.Width - View.Size.Width) / 2; int y = (wnd.Height - View.Size.Height) / 2; View.Location = new System.Drawing.Point(x, y); #if VVS_REFERENCED if (View.ViewType == ViewSystemSelector.eViewSystem.VirindiViewService) { SetVVSProps(); } #endif return(true); }
public virtual void Dispose() { if (disp) { return; } disp = true; GC.SuppressFinalize(this); MyDialogContainer.RemoveDialog(iDialogKey, this); OnDisposed(); if (View != null) { View.Dispose(); View = null; } }