Beispiel #1
0
        /// <summary>
        /// コンストラクタ
        /// </summary>
        /// <param name="localPort">自分のポート</param>
        public RemoteHost(int localPort, DebugWindow debugwindow/*, TerminalConnection.TerminalConnection TC*/)
        {
            try
            {
                this.UP_Cliant = new UDP_PACKETS_CLIANT.UDP_PACKETS_CLIANT(localPort);
                this.UP_Encoder = new UDP_PACKETS_CODER.UDP_PACKETS_ENCODER();
                this.UP_Decoder = new UDP_PACKETS_CODER.UDP_PACKETS_DECODER();
                this.id = localPort;

                this.CTS = new CancellationTokenSource();
                this.mytask = new Task(() => this.Main_Task(), CTS.Token);

                this.mytask.Start();
                this.fpsa = new FPSAdjuster.FPSAdjuster();

                this.debugwindow = debugwindow;
                this.debugwindow.DebugLog = "[Port:" + localPort.ToString() + "]受信を開始します";

                //this.TC = TC;
            }
            catch (Exception ex)
            {
                while (true)
                {
                    myDialog dialog = new myDialog(ex.Message);
                    if (dialog.ShowDialog() == true)
                    {
                        break;
                    }
                }
            }
        }
Beispiel #2
0
        /// <summary>
        /// コンストラクタ
        /// </summary>
        /// <param name="localPort">自分のポート</param>
        public RemoteHost(int localPort, DebugWindow debugwindow, TerminalConnection.TerminalConnection TC)
        {
            try
            {
                this.UP_Cliant  = new UDP_PACKETS_CLIANT.UDP_PACKETS_CLIANT(localPort);
                this.UP_Encoder = new UDP_PACKETS_CODER.UDP_PACKETS_ENCODER();
                this.UP_Decoder = new UDP_PACKETS_CODER.UDP_PACKETS_DECODER();
                this.id         = localPort;

                this.CTS    = new CancellationTokenSource();
                this.mytask = new Task(() => this.Main_Task(), CTS.Token);

                this.mytask.Start();
                this.fpsa = new FPSAdjuster.FPSAdjuster();

                this.debugwindow          = debugwindow;
                this.debugwindow.DebugLog = "[Port:" + localPort.ToString() + "]受信を開始します";

                this.TC = TC;
            }
            catch (Exception ex)
            {
                while (true)
                {
                    myDialog dialog = new myDialog(ex.Message);
                    if (dialog.ShowDialog() == true)
                    {
                        break;
                    }
                }
            }
        }
Beispiel #3
0
    // Use this for initialization
    void Start()
    {
        this.pointcloud = pointCloudShadow.GetComponent<PointCloud>();


        this.FpsAd = new FPSAdjuster.FPSAdjuster();
        this.FpsAd.Fps = 30;
        this.FpsAd.Start();
    }
Beispiel #4
0
    // Update is called once per frame
    void Update()
    {

        if (OpenFileChoose)
        {
            FilePath = EditorUtility.OpenFilePanel("ファイル選択", " ", " ");

            if(FilePath != null)
            {
                this.reader = new BinaryReader(File.OpenRead("C:\\Users\\yamakawa\\Documents\\UnitySave" + @"\" + ReadFileName));
                this.thread = new Thread(new ThreadStart(this.ReadData));
                this.thread.Start();

                this.FpsAd = new FPSAdjuster.FPSAdjuster();
                this.FpsAd.Fps = 30;
                this.FpsAd.Start();
            }

            OpenFileChoose = false;
        }


    }