コード例 #1
0
 private void RateSlider_Scroll(object sender, EventArgs e)
 {
     frameRate = RateSlider.Value / 100.0f * 60.0f;
     Properties.Settings.Default.FrameRate = frameRate;
     Properties.Settings.Default.Save();
     ValuesTooltip.SetToolTip(RateSlider, frameRate.ToString());
 }
コード例 #2
0
 private void PrescaleSlider_Scroll(object sender, EventArgs e)
 {
     prescale = PrescaleSlider.Value / 100.0f;
     Properties.Settings.Default.Prescaling = prescale;
     Properties.Settings.Default.Save();
     ValuesTooltip.SetToolTip(PrescaleSlider, prescale.ToString());
 }
コード例 #3
0
        private void ExposureSlider_Scroll(object sender, EventArgs e)
        {
            exposure = ExposureSlider.Value;
            Properties.Settings.Default.Exposure = exposure;
            Properties.Settings.Default.Save();

            Camera.Instance.Exposure = (int)exposure;
            ValuesTooltip.SetToolTip(ExposureSlider, exposure.ToString());
        }
コード例 #4
0
        private void DistanceSlider_Scroll(object sender, EventArgs e)
        {
            //distance = DistanceSlider.Value / 10.0f + 0.5f;
            //distance = (float)Math.Log(distance) + 0.5f;
            if (DistanceSlider.Value < 50)
            {
                distance = 0.5f + DistanceSlider.Value / 100.0f;
            }
            else if (DistanceSlider.Value >= 50)
            {
                distance = 1 + (DistanceSlider.Value - 50) / 5.0f;
            }
            server.SendText("{\"distance\": " + distance + "}\"");

            ValuesTooltip.SetToolTip(DistanceSlider, distance.ToString());
        }
コード例 #5
0
        private void SendPosition(float mouseX, float mouseY)
        {
            //float distX = (float)(x - mouseStartPosition.X) / ServerDisplay.Width;
            //float distY = (float)(y - mouseStartPosition.Y) / ServerDisplay.Height;

            //distY = -distY;

            //distX /= 3;
            //distY /= 3;

            //if (draggingLeft)
            //{
            //    server.SendText("{\"position\": {\"x\": " + distX + ", \"y\": " + distY + ", \"z\": 0}}");
            //}
            //else if (draggingRight)
            //{
            //    server.SendText("{\"position\": {\"x\": 0, \"y\": 0, \"z\": " + distY + "}}");
            //}

            mouseX = (mouseX - ServerDisplay.Width * 0.15f) / (ServerDisplay.Width * 0.6f);
            mouseY = (mouseY - (ServerDisplay.Height / 2 - ServerDisplay.Width * 9.0f / 16.0f * 0.35f)) / (ServerDisplay.Width * 9.0f / 16.0f * 0.65f);

            float x = 2 * mouseX - 1;
            float y = 2 * mouseY - 1;

            y = -y;

            if (draggingLeft)
            {
                locationX = x;
                locationY = y;
                server.SendText("{\"position\": {\"x\": " + locationX + ", \"y\": " + locationY + "}}");
                ValuesTooltip.SetToolTip(ServerDisplay, "(" + locationX + ", " + locationY + ", " + locationZ + ")");
            }
            else if (draggingRight)
            {
                locationZ = y;
                server.SendText("{\"position\": {\"z\": " + locationZ + "}}");
                ValuesTooltip.SetToolTip(ServerDisplay, "(" + locationX + ", " + locationY + ", " + locationZ + ")");
            }
        }
コード例 #6
0
 private void ClientStreamingRateSlider_Scroll(object sender, EventArgs e)
 {
     server.SendText("{\"streamingrate\": " + ClientStreamingRateSlider.Value + "}");
     ValuesTooltip.SetToolTip(ClientStreamingRateSlider, ClientStreamingRateSlider.Value.ToString());
 }
コード例 #7
0
 private void ResetPositionButton_Click(object sender, EventArgs e)
 {
     server.SendText("{\"position\": \"reset\"}");
     ValuesTooltip.SetToolTip(ServerDisplay, "reset");
 }
コード例 #8
0
 private void ZoomSlider_Scroll(object sender, EventArgs e)
 {
     zoom = ZoomSlider.Value / 25.0f;
     server.SendText("{\"zoom\": " + zoom + "}");
     ValuesTooltip.SetToolTip(ZoomSlider, zoom.ToString());
 }
コード例 #9
0
 private void SizeSlider_Scroll(object sender, EventArgs e)
 {
     size = SizeSlider.Value / 10.0f + 1;
     server.SendText("{\"size\": " + size + "}");
     ValuesTooltip.SetToolTip(SizeSlider, size.ToString());
 }