예제 #1
0
        void KeyboardKeyDown1(object sender, OpenTK.Input.KeyboardKeyEventArgs e)
        {
            if (e.Key == OpenTK.Input.Key.Escape)
            {
                Quit(null, null);
                return;
            }
            else if (e.Key == OpenTK.Input.Key.F1)
            {
                TestList.Add("new string");
                NotifyValueChanged("TestList", TestList);
                return;
            }
            else if (e.Key == OpenTK.Input.Key.F4)
            {
                GraphicObject w = CrowInterface.LoadInterface("Interfaces/Divers/testWindow.goml");
                w.DataSource = this;
                return;
            }
            else if (e.Key == OpenTK.Input.Key.F5)
            {
                GraphicObject w = CrowInterface.LoadInterface("Interfaces/Divers/testWindow2.goml");
                w.DataSource = this;
                return;
            }
            else if (e.Key == OpenTK.Input.Key.F6)
            {
                GraphicObject w = CrowInterface.LoadInterface("Interfaces/Divers/imlEditor.crow");
                w.DataSource = this;
                return;
            }
            else if (e.Key == OpenTK.Input.Key.F2)
            {
                idx--;
            }
            else if (e.Key == OpenTK.Input.Key.F3)
            {
                idx++;
            }
            else
            {
                return;
            }

            CrowInterface.ClearInterface();

            if (idx == testFiles.Length)
            {
                idx = 0;
            }
            else if (idx < 0)
            {
                idx = testFiles.Length - 1;
            }

            this.Title = testFiles [idx] + ". Press <F3> to cycle examples.";
            GraphicObject obj = CrowInterface.LoadInterface(testFiles[idx]);

            obj.DataSource = this;
        }
예제 #2
0
        void KeyboardKeyDown1(object sender, OpenTK.Input.KeyboardKeyEventArgs e)
        {
            if (e.Key == OpenTK.Input.Key.Escape)
            {
                Quit(null, null);
                return;
            }
            else if (e.Key == OpenTK.Input.Key.F1)
            {
                TestList.Add("new string");
                NotifyValueChanged("TestList", TestList);
                return;
            }
            else if (e.Key == OpenTK.Input.Key.F4)
            {
                GraphicObject w = CrowInterface.LoadInterface("Interfaces/TemplatedContainer/testWindow.goml");
                w.DataSource = this;
                return;
            }
            else if (e.Key == OpenTK.Input.Key.F5)
            {
                GraphicObject w = CrowInterface.LoadInterface("Interfaces/TemplatedContainer/testWindow2.goml");
                w.DataSource = this;
                return;
            }
            else if (e.Key == OpenTK.Input.Key.F6)
            {
                GraphicObject w = CrowInterface.LoadInterface("Interfaces/Divers/0.crow");
                w.DataSource = this;
                return;
            }
            else if (e.Key == OpenTK.Input.Key.F2)
            {
                idx--;
            }
            else if (e.Key == OpenTK.Input.Key.F3)
            {
                idx++;
            }
            else
            {
                return;
            }

            CrowInterface.ClearInterface();

            if (idx == testFiles.Length)
            {
                idx = 0;
            }
            else if (idx < 0)
            {
                idx = testFiles.Length - 1;
            }

            this.Title = testFiles [idx] + ". Press <F3> to cycle examples.";
            try {
                GraphicObject obj = CrowInterface.LoadInterface(testFiles[idx]);
                obj.DataSource = this;
            } catch (Exception ex) {
                Debug.WriteLine(ex.Message + ex.InnerException);
            }
        }