コード例 #1
0
        public SelectWindow(MainWindow mainWindow, String direction)
        {
            InitializeComponent();
            mMainWindow = mainWindow;
            mDirection = direction;

            // 설정하고자 하는 방향에 대한 정보를 확인함
            if (mDirection.Equals("LeftTop"))
            {
                mClickedImg = mMainWindow.GetLeftTopIconImage();
                mData = mMainWindow.LeftUp;
            }
            else if (mDirection.Equals("RightTop"))
            {
                mClickedImg = mMainWindow.GetRightTopIconImage();
                mData = mMainWindow.RightUp;
            }
            else if (mDirection.Equals("LeftDown"))
            {
                mClickedImg = mMainWindow.GetLeftDownIconImage();
                mData = mMainWindow.LeftDown;
            }
            else if (mDirection.Equals("RightDown"))
            {
                mClickedImg = mMainWindow.GetRightDownIconImage();
                mData = mMainWindow.RightDown;
            }
            SetButtonImageSource();
        }
コード例 #2
0
 public IconWindow(MainWindow mMainWindow, int mainIdx)
 {
     InitializeComponent();
     this.mMainWindow = mMainWindow;
     this.mainIdx = mainIdx;
     // 초기 테마 설정
     ThemeManager.ChangeAppStyle(Application.Current, mMainWindow.CurrentAccent, mMainWindow.Light);
     this.FontFamily = mMainWindow.sFont;
 }
コード例 #3
0
        public SelectWindow(MainWindow mainWindow)
        {
            InitializeComponent();
            mMainWindow = mainWindow;
            // 초기 테마 설정
            ThemeManager.ChangeAppStyle(Application.Current, mMainWindow.CurrentAccent, mMainWindow.Light);
            this.FontFamily = mMainWindow.sFont;

            InitializeModeButtons();
            //ModeList.Items.Add()
        }
コード例 #4
0
        public DriverWindow(MainWindow mainWindow)
        {
            mMainWindow = mainWindow;
            InitializeComponent();

            // 설치된 마우스 정보를 가져온다.
            GetDeviceList dList = new GetDeviceList();
            usbDevice = dList.getList();
            foreach (var usbList in usbDevice)
            {
                Console.WriteLine("\nDevice VID : {0}\nDevice PID : {1}\nDevice NAME : {2}\n", usbList.VID, usbList.PID, usbList.NAME);
                MouseList.Add(usbList.NAME);
            }
            this.DeviceList.ItemsSource = MouseList;

            //RegisterMouseEvnet();

        }
コード例 #5
0
        public DriverWindow(MainWindow mainWindow)
        {
            mMainWindow = mainWindow;
            InitializeComponent();

            // 초기 테마 설정
            ThemeManager.ChangeAppStyle(Application.Current, mMainWindow.CurrentAccent, mMainWindow.Light);
            this.FontFamily = mMainWindow.sFont;

            // 설치된 마우스 정보를 가져온다.
            GetDeviceList dList = new GetDeviceList();
            usbDevice = dList.getList();
            foreach (var usbList in usbDevice)
            {
                Console.WriteLine("\nDevice VID : {0}\nDevice PID : {1}\nDevice NAME : {2}\n", usbList.VID, usbList.PID, usbList.NAME);
                MouseList.Add(usbList.NAME);
            }
            this.DeviceList.ItemsSource = MouseList;

            //RegisterMouseEvnet();

        }
コード例 #6
0
        public InputDevice(IntPtr hwnd, MainWindow mainWindow)
        {
            mMainWindow = mainWindow;

            RAWINPUTDEVICE[] rid = new RAWINPUTDEVICE[2];

            rid[0].usUsagePage = HidUsagePage.GENERIC;
            rid[0].usUsage = HidUsage.Keyboard;
            rid[0].dwFlags = RawInputDeviceFlags.INPUTSINK;// | RawInputDeviceFlags.DEVNOTIFY;
            //rid[0].dwFlags = RawInputDeviceFlags.INPUTSINK;// | RawInputDeviceFlags.DEVNOTIFY;
            //rid[0].dwFlags = 0;
            rid[0].hwndTarget = hwnd;

            rid[1].usUsagePage = HidUsagePage.GENERIC;
            rid[1].usUsage = HidUsage.Mouse;
            rid[1].dwFlags = RawInputDeviceFlags.INPUTSINK;// | RawInputDeviceFlags.DEVNOTIFY;
            //rid[1].dwFlags = RawInputDeviceFlags.INPUTSINK;// | RawInputDeviceFlags.DEVNOTIFY;
            //rid[1].dwFlags = 0;
            rid[1].hwndTarget = hwnd;


            /*
            RAWINPUTDEVICE[] rid = new RAWINPUTDEVICE[1];
            rid[0].usUsagePage = 0x01;
            rid[0].usUsage = 0x02;
            //rid[1].dwFlags = RIDEV_INPUTSINK;
            //rid[0].dwFlags = RIDEV_NOLEGACY;
            rid[0].dwFlags = 0;
            rid[0].hwndTarget = hwnd;
            */


            if (!RegisterRawInputDevices(rid, (uint)rid.Length, (uint)Marshal.SizeOf(rid[0])))
            {
                throw new ApplicationException("Failed to register raw input device(s).");
            }
        }
コード例 #7
0
 public FileStructure(MainWindow mainWindow)
 {
     mMainWindow = mainWindow;
     trackball_UP = 2;
 }