예제 #1
0
 // Methods
 internal static UIElement CreateUserControl(ClipboardControl cc)
 {
     if (cc.ControlType == "Bama.Controls.ImageEx")
     {
         return(ReplaceControls.CreateImageExWithId(cc.ImagePath, cc.SysId));
     }
     return(null);
 }
예제 #2
0
 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);
 }
예제 #3
0
 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();
     }
 }
예제 #4
0
        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);
        }