コード例 #1
0
        private Panel CreateCompositeControlPanel()
        {
            Panel panel = new Panel();

            panel.Dock = DockStyle.Top;
            Size size = panel.Size;

            size.Height = 200;
            panel.Size  = size;

            Label label = new Label();

            label.Text = Controls.Count.ToString();
            label.Dock = DockStyle.Left;

            CompositeControl composite = new CompositeControl();

            composite.Dock = DockStyle.Fill;
            composite.EventGetUsedMethods   += GetEmptyMethod;
            composite.EventGetListFunctions += EventGetListFunctions;
            composite.EventNotyfiOfResult   += EventNotyfiOfResult;
            composite.EventNotyfiError      += EventNotyfiError;

            /*composite.Composite.EventNotifyOfResult += EventNotyfiOfResult;
             * composite.Composite.EventNotifyOfErrorRuning += EventNotyfiError;*/

            panel.Controls.AddRange(new Control[] { composite, label });

            return(panel);
        }
コード例 #2
0
 private EmptyMethod GetEmptyMethod(int number)
 {
     if (Controls.Count > number)
     {
         CompositeControl composite = Controls[number].Controls[0] as CompositeControl;
         if (composite != null)
         {
             return(composite.Composite);
         }
     }
     return(null);
 }