Beispiel #1
0
        public void MouseUp(object sender, MouseEventArgs e)
        {
            if (!Control)
            {
                return;
            }
            if (!(e.Button == MouseButtons.Left))
            {
                return;
            }
            Layers.ButtonLayer b = (Layers.ButtonLayer)GML_.SelectedButton();
            if (b == null)
            {
                return;
            }
            Type       type = b.GetType();
            MethodInfo m    = type.GetMethod(b.Method);

            if (m == null)
            {
                return;
            }
            object[] args = new object[] { null };
            m.Invoke(b, args);
            // Console.WriteLine(args[0]);
            // if(b.Method.Contains("back"))
            if (b.Method.Contains("setting")) // test
            {
                isTransSetting_ = (bool)args[0];
            }
        }
Beispiel #2
0
        // 準TODO
        // 引数参照渡しでisTransBackを考えている。
        // それをメソッドの帰り値で変更できるように。
        public void MouseUp(object sender, MouseEventArgs e)
        {
            if (!Control)
            {
                return;
            }
            if (!(e.Button == MouseButtons.Left))
            {
                return;
            }
            if (SLM_.SelectedCheckBoxList() && !modified_)
            {
                modified_ = true;
            }
            if (SLM_.SelectedSlider() && !modified_)
            {
                modified_ = true;
            }
            // Console.WriteLine("SettingState.MouseUp:"+SLM_.SelectedCheckBoxList());
            Layers.ButtonLayer b = (Layers.ButtonLayer)SLM_.SelectedButton();
            if (b == null)
            {
                return;
            }
            Type       type = b.GetType();
            MethodInfo m    = type.GetMethod(b.Method);

            if (m == null)
            {
                return;
            }
            object[] args = new object[] { null };
            m.Invoke(b, args);
            // Console.WriteLine(args[0]);
            if (b.Method.Contains("back"))
            {
                isTransBack_ = (bool)args[0];
            }
        }