示例#1
0
        //マウスがある位置まで再生時間を移動
        void Location_MouseDown(object sender, System.Windows.Input.MouseEventArgs e)
        {
            IsMouseDown = true;
            FModChannel.getPaused(ref IsPause);
            FModChannel.setPaused(true);
            //計算大変だった...
            System.Drawing.Point p = new System.Drawing.Point();
            int    w = Screen.GetBounds(p).Width;
            double Width_Display_From_1920  = (double)w / 1920;
            int    Location_Mouse_X_Display = Math.Abs((int)Location_S.PointToScreen(new Point()).X - System.Windows.Forms.Cursor.Position.X) - 10;
            double Percent = Location_Mouse_X_Display / (double)(260 * Width_Display_From_1920);

            Location_S.Value = Location_S.Maximum * Percent;
        }
示例#2
0
        //音声の再生位置を変更
        private void Location_Board_MouseDown(object sender, MouseButtonEventArgs e)
        {
            IsMouseDown = true;
            FModChannel.getPaused(ref IsPause);
            FModChannel.setPaused(true);
            System.Drawing.Point p = new System.Drawing.Point();
            int    w = Screen.GetBounds(p).Width;
            double Width_Display_From_1920  = (double)w / 1920;
            int    Location_Mouse_X_Display = Math.Abs((int)Location_S.PointToScreen(new Point()).X - System.Windows.Forms.Cursor.Position.X) - 10;
            double Percent = Location_Mouse_X_Display / (260 * Width_Display_From_1920);

            Location_S.Value = Location_S.Maximum * Percent;
            FModChannel.setPosition((uint)Location_S.Value, FMOD_API.TIMEUNIT.MS);
            if (!IsPause)
            {
                FModChannel.setPaused(false);
            }
            Set_Position_TextBlock(false);
            IsMouseDown = false;
        }