public DesignerTransactionImpl(DesignerHostImpl host,string description)
     : base(description)
 {
     this.host = host;
     description = (description==null)?"":description;
     // push this descriptions.
     host.Transactions.Push(description);
     // when we start the first transaction, we have fire
     // the opening and opened events
     if (host.Transactions.Count == 1)
     {
         // we can fire both back to back instread of
         // pushing and opening and the firing opened
         host.OnTransactionOpening(EventArgs.Empty);
         host.OnTransactionOpened(EventArgs.Empty);
     }
 }
Beispiel #2
0
 public DesignerTransactionImpl(DesignerHostImpl host, string description)
     : base(description)
 {
     this.host   = host;
     description = (description == null)?"":description;
     // push this descriptions.
     host.Transactions.Push(description);
     // when we start the first transaction, we have fire
     // the opening and opened events
     if (host.Transactions.Count == 1)
     {
         // we can fire both back to back instread of
         // pushing and opening and the firing opened
         host.OnTransactionOpening(EventArgs.Empty);
         host.OnTransactionOpened(EventArgs.Empty);
     }
 }
Beispiel #3
0
        private void FormDesigner_Load(object sender, EventArgs e)
        {
            AddBaseServices();

            // create host
            host = new DesignerHostImpl(serviceContainer);
            GenerateControls();

            // we need to subscribe to selection changed events so
            // that we can update our properties grid

            ISelectionService selectionService = host.GetService(typeof(ISelectionService)) as ISelectionService;

            selectionService.SelectionChanged += new EventHandler(selectionService_SelectionChanged);
            // activate the host
            host.Activate();
            btnSave.Text = UIMessage.Get_Message(btnSave.Name);
        }
Beispiel #4
0
 public SiteImpl(IComponent comp,string name,DesignerHostImpl host)
 {
     if(comp==null)
     {
         throw new ArgumentException("comp");
     }
     if(host==null)
     {
         throw new ArgumentException("host");
     }
     if(name==null || name.Trim().Length==0)
     {
         throw new ArgumentException("name");
     }
     component=comp;
     this.host=host;
     this.name=name;
     // create a dictionary service for this site
     dictionaryService = new DictionaryServiceImpl();
 }
Beispiel #5
0
 public SiteImpl(IComponent comp, string name, DesignerHostImpl host)
 {
     if (comp == null)
     {
         throw new ArgumentException("comp");
     }
     if (host == null)
     {
         throw new ArgumentException("host");
     }
     if (name == null || name.Trim().Length == 0)
     {
         throw new ArgumentException("name");
     }
     component = comp;
     this.host = host;
     this.name = name;
     // create a dictionary service for this site
     dictionaryService = new DictionaryServiceImpl();
 }
        private void FormDesigner_Load(object sender, EventArgs e)
        {
            AddBaseServices();

            // create host
            host = new DesignerHostImpl(serviceContainer);
            GenerateControls();

            // we need to subscribe to selection changed events so
            // that we can update our properties grid

            ISelectionService selectionService = host.GetService(typeof(ISelectionService)) as ISelectionService;
            selectionService.SelectionChanged += new EventHandler(selectionService_SelectionChanged);
            // activate the host
            host.Activate();
            btnSave.Text = UIMessage.Get_Message(btnSave.Name);
        }