Beispiel #1
0
        private void addArgButton_Click(object sender, System.EventArgs e)
        {
            if (action == null)
            {
                return;
            }

            if (action.ParentService.GetStateVariables().Length == 0)
            {
                MessageBox.Show(this, "No state variables available", "Argument Creation", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                return;
            }

            UPnPArgument arg = new UPnPArgument("", null);

            arg.Direction = "in";
            UPnpArgumentEditControl argEdit = new UPnpArgumentEditControl(this, action, arg);

            argEdit.Dock = DockStyle.Top;
            ArrayList list = new ArrayList(argPanel.Controls);

            list.Insert(0, argEdit);
            argPanel.Controls.Clear();
            argPanel.Controls.AddRange(list.ToArray(typeof(Control)) as Control[]);
        }
Beispiel #2
0
        public void moveArgDown(UPnpArgumentEditControl ctrl)
        {
            int pos = argPanel.Controls.GetChildIndex(ctrl, false);

            if (pos >= 0)
            {
                argPanel.Controls.SetChildIndex(ctrl, pos + 1);
            }
        }
Beispiel #3
0
        private void SetAction(UPnPAction act)
        {
            actionNameTextBox.Text = act.Name;

            UPnPArgument[] args = act.ArgumentList;
            foreach (UPnPArgument arg in args)
            {
                UPnpArgumentEditControl argEdit = new UPnpArgumentEditControl(this, act, arg);
                argEdit.Dock = DockStyle.Top;
                argPanel.Controls.Add(argEdit);
                argPanel.Controls.SetChildIndex(argEdit, 0);
            }
        }
 public void moveArgDown(UPnpArgumentEditControl ctrl)
 {
     int pos = argPanel.Controls.GetChildIndex(ctrl,false);
     if (pos >= 0)
     {
         argPanel.Controls.SetChildIndex(ctrl,pos+1);
     }
 }
 public void moveArgBottom(UPnpArgumentEditControl ctrl)
 {
     int pos = argPanel.Controls.GetChildIndex(ctrl,false);
     argPanel.Controls.SetChildIndex(ctrl,999);
 }
        private void SetAction(UPnPAction act)
        {
            actionNameTextBox.Text = act.Name;

            UPnPArgument[] args = act.ArgumentList;
            foreach (UPnPArgument arg in args)
            {
                UPnpArgumentEditControl argEdit = new UPnpArgumentEditControl(this,act,arg);
                argEdit.Dock = DockStyle.Top;
                argPanel.Controls.Add(argEdit);
                argPanel.Controls.SetChildIndex(argEdit,0);
            }
        }
        private void addArgButton_Click(object sender, System.EventArgs e)
        {
            if (action == null) return;

            if (action.ParentService.GetStateVariables().Length == 0)
            {
                MessageBox.Show(this,"No state variables available","Argument Creation",MessageBoxButtons.OK,MessageBoxIcon.Asterisk);
                return;
            }

            UPnPArgument arg = new UPnPArgument("",null);
            arg.Direction = "in";
            UPnpArgumentEditControl argEdit = new UPnpArgumentEditControl(this,action,arg);
            argEdit.Dock = DockStyle.Top;
            ArrayList list = new ArrayList(argPanel.Controls);
            list.Insert(0, argEdit);
            argPanel.Controls.Clear();
            argPanel.Controls.AddRange(list.ToArray(typeof(Control)) as Control[]);
        }
 public void RemoveArg(UPnpArgumentEditControl ctrl)
 {
     argPanel.Controls.Remove(ctrl);
 }
Beispiel #9
0
        public void moveArgBottom(UPnpArgumentEditControl ctrl)
        {
            int pos = argPanel.Controls.GetChildIndex(ctrl, false);

            argPanel.Controls.SetChildIndex(ctrl, 999);
        }
Beispiel #10
0
 public void RemoveArg(UPnpArgumentEditControl ctrl)
 {
     argPanel.Controls.Remove(ctrl);
 }