// Methods internal static UIElement CreateUserControl(ClipboardControl cc) { if (cc.ControlType == "Bama.Controls.ImageEx") { return(ReplaceControls.CreateImageExWithId(cc.ImagePath, cc.SysId)); } return(null); }
private void Register() { WindowsClipboard.m_Control = new ClipboardControl(); WindowsClipboard.m_Control.ClipboardChanged += new EventHandler((sender, e) => { if (this.ContentsChanged != null) { this.ContentsChanged(null, new EventArgs()); } }); (Central.Manager.IDE as WindowsIDE).Controls.Add(WindowsClipboard.m_Control); }
public WindowsClipboard() { WindowsClipboard.m_Control = new ClipboardControl(); if (Central.Manager.IDE == null || (Central.Manager.IDE as WindowsIDE).Visible == false) { Central.Manager.IDEOpened += new EventHandler((_a, _b) => { this.Register(); }); } else { this.Register(); } }
public static UIElement ReplaceWithMyControls(UIElement control) { if (control is Image) { Image image = control as Image; return(CreateImageEx(CreateFileFromImageSource(image.Source), null)); } ClipboardControl cc = control as ClipboardControl; if (cc != null) { return(ClipboardMgr.CreateUserControl(cc)); } return(null); }