private void MyImage_MouseMove(object sender, MouseEventArgs e)
        {
            //マウスドラッグ移動の距離だけスクロールさせるには
            //(直前のカーソル位置 - 今のカーソル位置) + (スクロールバーのOffset位置)
            //この値をSetOffsetする
            if (e.RightButton == MouseButtonState.Pressed)
            {
                MyImage.Cursor = Cursors.ScrollAll;//カーソル形状を変更
                //今のマウスの座標
                var mouseP = e.GetPosition(this);
                //マウスの移動距離=直前の座標と今の座標の差
                var xd = MyPoint.X - mouseP.X;
                var yd = MyPoint.Y - mouseP.Y;
                //xd *= 2;//2倍速
                //yd *= 2;

                //移動距離+今のスクロール位置
                xd += MyScroll.HorizontalOffset;
                yd += MyScroll.VerticalOffset;
                //スクロール位置の指定
                MyScroll.ScrollToHorizontalOffset(xd);
                MyScroll.ScrollToVerticalOffset(yd);

                MyPoint = mouseP;//直前の座標を今の座標に変更
            }
        }
Example #2
0
    // Use this for initialization
    void Start()
    {
        // セーブデータロード
        settingdb = SaveData.GetClass <SettingDB.SetDB>("Setting", new SettingDB.SetDB());

        numbCnt          = settingdb.Q_num;
        NumbDisp.text    = numbCnt.ToString();
        BGMToggle.isOn   = settingdb.BGMToggle;
        CardInclude.isOn = settingdb.CardInclude;
//        TGL_WORD_DISPLAY.isOn = settingdb.SETTING_WORD_DISPLAY;
        time1.isOn = settingdb.PushNoticeA;
        time2.isOn = settingdb.PushNoticeB;

        MyScroll mscript = ScrollViewHourA.GetComponent <MyScroll> ();

        mscript.thisTime = settingdb.HourA;
        setScrollHour(mscript.cnt - 1, settingdb.HourA, ScrollViewHourA);

        mscript          = ScrollViewMinA.GetComponent <MyScroll> ();
        mscript.thisTime = settingdb.MinA;
        setScrollMin(mscript.cnt - 1, settingdb.MinA, ScrollViewMinA);

        mscript          = ScrollViewHourB.GetComponent <MyScroll> ();
        mscript.thisTime = settingdb.HourB;
        setScrollHour(mscript.cnt - 1, settingdb.HourB, ScrollViewHourB);

        mscript          = ScrollViewMinB.GetComponent <MyScroll> ();
        mscript.thisTime = settingdb.MinB;
        setScrollMin(mscript.cnt - 1, settingdb.MinB, ScrollViewMinB);
    }
Example #3
0
        void ReleaseDesignerOutlets()
        {
            if (MyPager != null)
            {
                MyPager.Dispose();
                MyPager = null;
            }

            if (MyScroll != null)
            {
                MyScroll.Dispose();
                MyScroll = null;
            }

            if (MyView != null)
            {
                MyView.Dispose();
                MyView = null;
            }

            if (ProgressTable != null)
            {
                ProgressTable.Dispose();
                ProgressTable = null;
            }

            if (ReportTable != null)
            {
                ReportTable.Dispose();
                ReportTable = null;
            }

            if (textfield1 != null)
            {
                textfield1.Dispose();
                textfield1 = null;
            }

            if (textfield2 != null)
            {
                textfield2.Dispose();
                textfield2 = null;
            }

            if (textfield3 != null)
            {
                textfield3.Dispose();
                textfield3 = null;
            }
        }