Esempio n. 1
0
        private void DebugOptionsItemOnSelected(object sender1, EventArgs eventArgs)
        {
            var dlg = new DebugOptionsWindow();

            dlg.AddOption("Show debug info",
                          () => { ShowDebugInfo = true; },
                          () => { ShowDebugInfo = false; });

            dlg.ShowModal(_desktop);
        }
Esempio n. 2
0
        public AllWidgets()
        {
            BuildUI();

            _imageButton.Click += (sender, args) =>
            {
                var debugWindow = new DebugOptionsWindow();
                debugWindow.ShowModal();
            };

            var tree = new Tree
            {
                HasRoot    = false,
                GridColumn = 1,
                GridRow    = 8
            };

            var node1 = tree.AddSubNode("node1");
            var node2 = node1.AddSubNode("node2");
            var node3 = node2.AddSubNode("node3");

            node3.AddSubNode("node4");
            node3.AddSubNode("node5");
            node3.AddSubNode("node7");
            node3.AddSubNode("node8");
            node3.AddSubNode("node9");
            node3.AddSubNode("node10");

            var node4 = node2.AddSubNode("node6");

            node4.AddSubNode("node11");
            node4.AddSubNode("node12");
            node4.AddSubNode("node13");
            node4.AddSubNode("node14");
            node4.AddSubNode("node15");
            node4.AddSubNode("node16");
            node4.AddSubNode("node17");
            node4.AddSubNode("node18");
            _gridRight.Widgets.Add(tree);
        }
Esempio n. 3
0
        private void DebugOptionsItemOnSelected(object sender1, EventArgs eventArgs)
        {
            var debugOptions = new DebugOptionsWindow();

            debugOptions.ShowModal();
        }
Esempio n. 4
0
        private void DebugOptionsOnDown(object sender, EventArgs e)
        {
            var dlg = new DebugOptionsWindow();

            dlg.ShowModal();
        }
Esempio n. 5
0
        public AllWidgets()
        {
            BuildUI();

            _menuItemOpenFile.Image = DefaultAssets.UITextureRegionAtlas["icon-folder"];
            _menuItemSaveFile.Image = DefaultAssets.UITextureRegionAtlas["icon-folder-new"];

            _menuItemOpenFile.Selected     += (s, a) => OpenFile();
            _menuItemSaveFile.Selected     += (s, a) => SaveFile();
            _menuItemChooseColor.Selected  += (s, a) => ChooseColor();
            _menuItemChooseFolder.Selected += (s, a) => ChooseFolder();
            _menuItemQuit.Selected         += (s, a) => Quit();

            _buttonOpenFile.Image  = DefaultAssets.UITextureRegionAtlas["icon-star"];
            _buttonOpenFile.Click += (sender, args) => OpenFile();

            _buttonSaveFile.Image  = DefaultAssets.UITextureRegionAtlas["icon-star"];
            _buttonSaveFile.Click += (sender, args) => SaveFile();

            _buttonChooseFolder.Image  = DefaultAssets.UITextureRegionAtlas["icon-star"];
            _buttonChooseFolder.Click += (sender, args) => ChooseFolder();

            _buttonChooseColor.Click += (sender, args) => ChooseColor();

            _imageButton.Image  = DefaultAssets.UITextureRegionAtlas["icon-star-outline"];
            _imageButton.Click += (sender, args) =>
            {
                var debugWindow = new DebugOptionsWindow();
                debugWindow.ShowModal(Desktop);
            };

            _menuItemAbout.Selected += (sender, args) =>
            {
                var messageBox = Dialog.CreateMessageBox("AllWidgets", "Myra AllWidgets Sample " + MyraEnvironment.Version);
                messageBox.ShowModal(Desktop);
            };

            var tree = new Tree
            {
                HasRoot        = false,
                GridColumn     = 1,
                GridRow        = 12,
                GridColumnSpan = 2
            };
            var node1 = tree.AddSubNode("node1");
            var node2 = node1.AddSubNode("node2");
            var node3 = node2.AddSubNode("node3");

            node3.AddSubNode("node4");
            node3.AddSubNode("node5");
            node3.AddSubNode("node7");
            node3.AddSubNode("node8");
            node3.AddSubNode("node9");
            node3.AddSubNode("node10");

            var node4 = node2.AddSubNode("node6");

            node4.AddSubNode("node11");
            node4.AddSubNode("node12");
            node4.AddSubNode("node13");
            node4.AddSubNode("node14");
            node4.AddSubNode("node15");
            node4.AddSubNode("node16");
            node4.AddSubNode("node17");
            node4.AddSubNode("node18");
            _gridRight.Widgets.Add(tree);
        }