Exemplo n.º 1
0
    public void Data2Comand(string Msg)
    {
        string[] splitdata = RecivedData(data);
        //Initial connection
        List <string> Msg;
        //Count = c / 2;
        Point3d PT = new Point3d(1, 1, 1);
        string  dataType;

        switch (Msg[1])
        {
        case "Add":
            Add(Msg);
            break;

        case "Uppdate":
            Uppdate(Msg);
            break;

        case "Del":
            Del(Msg);
            break;

        case "Res0":
            Static.Clear();
            c = -1;
            break;

        default:
            Console.WriteLine("null message");
            break;
        }
    }
Exemplo n.º 2
0
    /// <summary>
    /// This procedure contains the user code. Input parameters are provided as regular arguments,
    /// Output parameters as ref arguments. You don't have to assign output parameters,
    /// they will have a default value.
    /// </summary>
    private void RunScript(List <Point3d> PTList, string INmsg, bool Run, bool Reset, ref object Count, ref object NewList)
    {
        List <string> Msg;

        Count = c / 2;
        Point3d PT = new Point3d(1, 1, 1);

        if (Run)
        {
            Msg = RecivedData(INmsg);
            if (Reset)
            {
                Static.Clear();
                c = -1;
            }

            List1 = LoadList();



            switch (Msg[0])
            {
            case "Add":
                Add(Msg[1]);
                break;

            case "Del":
                Del(Msg[1]);
                break;

            case "Res0":
                Static.Clear();
                c = -1;
                break;

            default:
                Console.WriteLine("null message");
                break;
            }
        }

        NewList = List1;
        Static  = List1;
    }