/// <summary>
    /// Find all the neighbouring nodes, that are possible to move to
    /// from the current node.
    /// </summary>
    /// <param name="currentNode">Currently evaluated node</param>
    private void FindNextNodes(ButtonNode currentNode)
    {
        nextNodes.Clear();

        // Possible directions to move to
        // Assumed that there are only 4 moves possible
        int[,] directions = new int[4, 2] {
            { 0, 1 }, { 1, 0 }, { 0, -1 }, { -1, 0 }
        };

        for (int i = 0; i < 4; i++)
        {
            // Calculate coordinates of the new node
            int newX = currentNode.X + directions[i, 0];
            int newY = currentNode.Y + directions[i, 1];

            // Check if it is within bounds of the grid
            if (newX > 0 && newX <= gridManager.Width && newY > 0 && newY <= gridManager.Height)
            {
                // Check if it not a blocked button
                if (!gridManager.IsBlocked(newX - 1, newY - 1))
                {
                    // Create and add the new node to the list
                    ButtonNode newNode = new ButtonNode(newX, newY, currentNode);
                    nextNodes.Add(newNode);
                }
            }
            else
            {
                continue;
            }
        }
    }
示例#2
0
        private void addFileNo(string endereco)
        {
            var        nome    = Path.GetFileName(endereco);
            ButtonNode btnNode = new ButtonNode();

            btnNode.NodeButton.Texto("main.ama");
        }
        private void AddAllowedStashTabNode(StashTabNode node)
        {
            var deleteTabButton       = new ButtonNode();
            var deleteTabButtonDrawer = new ButtonSettingDrawer(deleteTabButton, "Delete", GetUniqDrawerId());

            AllowedStashTabsRoot.Children.Insert(AllowedStashTabsRoot.Children.Count - 1, deleteTabButtonDrawer);

            var buttonSameLineDrawer = new SameLineSettingDrawer("", GetUniqDrawerId());//Delete button and stash node should be on same line

            AllowedStashTabsRoot.Children.Insert(AllowedStashTabsRoot.Children.Count - 1, buttonSameLineDrawer);

            var stashNodeDrawer = new StashTabNodeSettingDrawer(node, "", GetUniqDrawerId());

            AllowedStashTabsRoot.Children.Insert(AllowedStashTabsRoot.Children.Count - 1, stashNodeDrawer);//AllowedStashTabsRoot.Children.Count - 1,


            deleteTabButton.OnPressed += delegate
            {
                //Delete stash node related drawers
                AllowedStashTabsRoot.Children.Remove(deleteTabButtonDrawer);
                AllowedStashTabsRoot.Children.Remove(buttonSameLineDrawer);
                AllowedStashTabsRoot.Children.Remove(stashNodeDrawer);
                Settings.AllowedStashTabs.Remove(stashNodeDrawer.StashNode);
                StashTabController.UnregisterStashNode(stashNodeDrawer.StashNode);//No sence to update data in deleted stash node
            };

            StashTabController.RegisterStashNode(node);
        }
示例#4
0
        public Settings()
        {
            LeagueList      = new ListNode();
            ReloadButton    = new ButtonNode();
            AutoReload      = new ToggleNode();
            AutoReloadTimer = new RangeNode <int>(15, 1, 60);
            UniTextColor    = Color.White;
            Debug           = new ToggleNode(false);

            // Visible stash tab
            VisibleStashValue           = new ToggleNode(true);
            StashValueX                 = new RangeNode <int>(100, 0, 5000);
            StashValueY                 = new RangeNode <int>(800, 0, 5000);
            StashValueColorNode         = new ColorNode(Color.AliceBlue);
            StashValueFontSize          = new RangeNode <int>(20, 0, 200);
            StashValueSignificantDigits = new RangeNode <int>(5, 0, 10);

            // Inventory Value
            VisibleInventoryValue           = new ToggleNode(true);
            InventoryValueX                 = new RangeNode <int>(100, 0, 5000);
            InventoryValueY                 = new RangeNode <int>(800, 0, 5000);
            InventoryValueColorNode         = new ColorNode(Color.AliceBlue);
            InventoryValueSignificantDigits = new RangeNode <int>(5, 0, 10);

            HighlightUniqueJunk        = new ToggleNode(true);
            HelmetEnchantPrices        = new ToggleNode(true);
            HighlightColor             = new ColorNode(Color.AliceBlue);
            HighlightFontSize          = new RangeNode <int>(20, 0, 200);
            HighlightSignificantDigits = new RangeNode <int>(5, 0, 10);
            InventoryValueCutOff       = new RangeNode <int>(1, 0, 10);
        }
示例#5
0
        public override void ClipChildren(Node node, Context context)
        {
            ButtonNode button = node as ButtonNode;

            context.RoundedRectangle(0.5, 0.5, button.Width - 1, button.Height - 1, button.Rounding);
            context.Clip();
        }
示例#6
0
    ButtonNode FindHelper(ButtonNode cur, ref SceneNode sn)
    {
        // Base case if current node's SceneNode matches the requested one.
        if (cur.data.GetSceneNode() == sn)
        {
            return(cur);
        }

        // Local variable to contain any SceneNode brought back by recursive calls
        // farther down the tree.
        ButtonNode b;

        for (int i = 0; i < cur.children.Count; i++)
        {
            // Recursive call to each child node of the current ButtonNode.
            b = FindHelper(cur.children[i], ref sn);
            if (b != null)
            {
                return(b);
            }
        }

        // Returns null if no SceneNode was found.
        return(null);
    }
示例#7
0
    ButtonNode FindParentHelper(ButtonNode cur, ref SceneNode sn)
    {
        // Base case if current node doesn't have any children.
        if (cur.children.Count == 0)
        {
            return(null);
        }

        // Local variable to contain any SceneNode brought back by recursive calls
        // farther down the tree.
        ButtonNode b;

        for (int i = 0; i < cur.children.Count; i++)
        {
            // Base case if the current node is the parent of the requested SceneNode.
            if (cur.children[i].data.GetSceneNode() == sn)
            {
                return(cur);
            }

            // Recursive call to current ButtonNode's children
            b = FindParentHelper(cur.children[i], ref sn);
            if (b != null)
            {
                return(b);
            }
        }

        // Returns null if no SceneNode was found.
        return(null);
    }
示例#8
0
        private void AddRefill(RefillProcessor refill)
        {
            refill.CurrencyClass.Values = RefillCurrencyNames;

            var refillRoot = new BaseSettingsDrawer("", GetUniqDrawerId());

            RefillMenuRootMenu.Children.Insert(RefillMenuRootMenu.Children.Count - 1, refillRoot);

            refillRoot.Children.Add(new ComboBoxSettingDrawer(refill.CurrencyClass, "Currency", GetUniqDrawerId()));

            refill.Amount.Max = refill.MaxStackAmount;
            refillRoot.Children.Add(new IntegerSettingsDrawer(refill.Amount, "Amount", GetUniqDrawerId()));

            refillRoot.Children.Add(new IntegerSettingsDrawer(refill.InventPosX, "Inventory Pos X", GetUniqDrawerId()));
            refillRoot.Children.Add(new IntegerSettingsDrawer(refill.InventPosY, "Inventory Pos Y", GetUniqDrawerId()));

            var removeButton       = new ButtonNode();
            var removeButtonDrawer = new ButtonSettingDrawer(removeButton, "Delete Refill", GetUniqDrawerId());

            refillRoot.Children.Add(removeButtonDrawer);

            removeButton.OnPressed += delegate
            {
                RefillMenuRootMenu.Children.Remove(refillRoot);
                Settings.Refills.Remove(refill);
            };
        }
示例#9
0
        public Settings()
        {
            LeagueList      = new ListNode();
            ReloadButton    = new ButtonNode();
            AutoReload      = new ToggleNode();
            AutoReloadTimer = new RangeNode <int>(15, 1, 60);
            UniTextColor    = Color.White;
            Debug           = new ToggleNode(false);

            // Visible stash tab
            VisibleStashValue           = new ToggleNode(true);
            StashValueX                 = new RangeNode <int>(100, 0, 1920);
            StashValueY                 = new RangeNode <int>(800, 0, 1080);
            StashValueColorNode         = new ColorNode(Color.AliceBlue);
            StashValueFontSize          = new RangeNode <int>(20, 0, 200);
            StashValueSignificantDigits = new RangeNode <int>(5, 0, 10);

            // Inventory Value
            HighlightUniqueJunk        = new ToggleNode(true);
            HighlightColor             = new ColorNode(Color.AliceBlue);
            HighlightFontSize          = new RangeNode <int>(20, 0, 200);
            HighlightSignificantDigits = new RangeNode <int>(5, 0, 10);
            InventoryValueCutOff       = new RangeNode <int>(1, 0, 10);

            ProphecyBackground = Color.Black;

            ProphecyChaosValue      = Color.White;
            ProphecyProecyName      = Color.White;
            ProphecyProecySealColor = Color.White;
        }
示例#10
0
        public override void InitializeSettingsMenu()
        {
            base.InitializeSettingsMenu();

            AllowedStashTabsRoot =
                new CheckboxSettingDrawer(Settings.OnlyAllowedStashTabs, "Allowed Stash Tabs", GetUniqDrawerId());
            SettingsDrawers.Add(AllowedStashTabsRoot); //Adding checkbox to settings menu drawers

            var addTabButton       = new ButtonNode();
            var addTabButtonDrawer = new ButtonSettingDrawer(addTabButton, "Add Stash Tab", GetUniqDrawerId());

            AllowedStashTabsRoot.Children.Add(addTabButtonDrawer);

            addTabButton.OnPressed += delegate
            {
                var newNode = new StashTabNode();
                AddAllowedStashTabNode(newNode);
                Settings.AllowedStashTabs.Add(newNode);
            };

            foreach (var node in Settings.AllowedStashTabs)
            {
                AddAllowedStashTabNode(node);
            }
        }
示例#11
0
    //ボタンにテキストを代入するメソッド
    public void SetButtonText(Dictionary <int, JsonStructure.Item> dictionary, int j)
    {
        ButtonNode separateButton1 = SeparateButton1.GetComponent <ButtonNode>();
        ButtonNode separateButton2 = SeparateButton2.GetComponent <ButtonNode>();

        separateButton1.text.text = dictionary[j].separate[0].separate_text;
        separateButton2.text.text = dictionary[j].separate[1].separate_text;
    }
示例#12
0
 public DPSMeterSettings()
 {
     ShowInTown      = new ToggleNode(false);
     DpsFontColor    = new ColorBGRA(220, 190, 130, 255);
     PeakFontColor   = new ColorBGRA(220, 190, 130, 255);
     BackgroundColor = new ColorBGRA(0, 0, 0, 255);
     ClearNode       = new ButtonNode();
 }
示例#13
0
 public DpsMeterSettings()
 {
     Enable          = false;
     ShowInTown      = false;
     DpsFontColor    = new ColorBGRA(220, 190, 130, 255);
     PeakFontColor   = new ColorBGRA(220, 190, 130, 255);
     BackgroundColor = new ColorBGRA(0, 0, 0, 255);
     ClearNode       = new ButtonNode();
 }
示例#14
0
    public bool Insert(ref SceneNode sn, SceneNode parent)
    {
        // Case for if the SceneNode being inserted is null.
        if (sn == null)
        {
            return(false);
        }

        // Base case if head is null.
        if (head == null)
        {
            // Create new button and connect to necessary elements.
            head = new ButtonNode();
            Button newb = Instantiate(buttonTemplate, transform);
            head.data = newb.GetComponent <ButtonControl>();
            head.data.mainController = mainC;
            size++;
            head.data.SetSceneNode(ref sn, size);
            head.children    = new List <ButtonNode>();
            theWorld.TheRoot = head.data.GetSceneNode();
            head.data.SetSelectedObject();
            return(true);
        }

        // Check to make sure there is a
        if (parent == null)
        {
            return(false);
        }

        // Recursive call to FindHelper to find parent SceneNode.
        ButtonNode b = FindHelper(head, ref parent);

        // Check to see if parent was found, if not, returns false.
        if (b == null)
        {
            return(false);
        }

        // Create new button and connect to necessary elements.
        ButtonNode newNode = new ButtonNode();

        b.children.Add(newNode);
        Button newButton = Instantiate(buttonTemplate, transform);

        newNode.data = newButton.GetComponent <ButtonControl>();
        newNode.data.mainController = mainC;
        size++;
        newNode.data.SetSceneNode(ref sn, size);
        newNode.children = new List <ButtonNode>();

        DisplayAll();

        // Return true to signify successful insertion.
        return(true);
    }
示例#15
0
        private void Tab_MouseClick(object sender, MouseEventArgs e)
        {
            ButtonNode node = Buttons.FirstOrDefault(x => CheckIfClicked(e.Location, x));

            if (node != null)
            {
                node.OnMouseClick(this, e);
            }
            Render();
        }
示例#16
0
        private void determination()
        {
            NODE = new ButtonNode();

            NODE.TextLabel.Text   = ratio;
            NODE.FeatureImg.Image = var_es._imgs[8];

            NODE.CustomizeButton.Click  += new EventHandler(Node_CustomizeButton_Click);
            NODE.DeleteNodeButton.Click += new EventHandler(Node_DeleteNodeButton_Click);
        }
示例#17
0
 public Settings()
 {
     GoodColor                    = new ColorNode(new Color(0, 125, 0, 150));
     VendorColor                  = new ColorNode(new Color(125, 0, 0, 150));
     MapsBorderColor              = new ColorNode(new Color(150, 110, 70, 150));
     ReloadSettingsNode           = new ButtonNode();
     ReloadSettingsNode.OnPressed = () => {
         XmlSerializer xmlSerializer = new XmlSerializer(typeof(Filter.FilterContainer));
         InventoryHelper.FilterContainer = (Filter.FilterContainer)xmlSerializer.Deserialize(new StreamReader("test.xml"));
     };
 }
    /// <summary>
    /// Constructor for child nodes.
    /// </summary>
    /// <param name="x">X coordinate</param>
    /// <param name="y">Y coordinate</param>
    /// <param name="parent">Parent node</param>
    public ButtonNode(int x, int y, ButtonNode parent)
    {
        X = x;
        Y = y;

        CombinedDistance  = 0;
        DistanceFromStart = 0;
        DistanceToGoal    = 0;

        Parent = parent;
    }
示例#19
0
 void DeleteHelper(ButtonNode cur)
 {
     for (int i = 0; i < cur.children.Count; i++)
     {
         DeleteHelper(cur.children[i]);
     }
     cur.children.Clear();
     cur.data.Delete();
     cur.children = null;
     cur.data     = null;
     size--;
 }
示例#20
0
    void DisplayHelper(ButtonNode cur, int level, ref int counter)
    {
        cur.data.transform.localPosition = new Vector3(cur.data.transform.localPosition.x,
                                                       -14 + (-18 * counter), 0);
        cur.data.SetSpacing(level);

        counter++;

        for (int i = 0; i < cur.children.Count; i++)
        {
            DisplayHelper(cur.children[i], level + 1, ref counter);
        }
    }
示例#21
0
    void FindByNameListHelper(ButtonNode cur, ref string name, ref List <SceneNode> list)
    {
        // Base case if current node's SceneNode matches the requested name.
        if (cur.data.GetSceneNode().name == name)
        {
            list.Add(cur.data.GetSceneNode());
        }

        for (int i = 0; i < cur.children.Count; i++)
        {
            // Recursive call to each child node of the current ButtonNode.
            FindByNameListHelper(cur.children[i], ref name, ref list);
        }
    }
示例#22
0
 public Settings()
 {
     PickUpKey        = Keys.F1;
     PickupRange      = new RangeNode <int>(600, 1, 1000);
     ChestRange       = new RangeNode <int>(500, 1, 1000);
     ExtraDelay       = new RangeNode <int>(0, 0, 200);
     PickupTimerDelay = new RangeNode <int>(124, 1, 200);
     Sockets          = true;
     TotalSockets     = new RangeNode <int>(6, 1, 6);
     Links            = true;
     LargestLink      = new RangeNode <int>(6, 1, 6);
     RGB                 = true;
     AllDivs             = true;
     AllCurrency         = true;
     AllUniques          = true;
     Maps                = true;
     UniqueMap           = true;
     MapFragments        = true;
     MapTier             = new RangeNode <int>(1, 1, 16);
     QuestItems          = true;
     Gems                = true;
     GemQuality          = new RangeNode <int>(1, 0, 20);
     GroundChests        = false;
     ShaperItems         = true;
     ElderItems          = true;
     Rares               = true;
     RareJewels          = true;
     RareRings           = true;
     RareRingsilvl       = new RangeNode <int>(1, 0, 100);
     RareAmulets         = true;
     RareAmuletsilvl     = new RangeNode <int>(1, 0, 100);
     RareBelts           = true;
     RareBeltsilvl       = new RangeNode <int>(1, 0, 100);
     RareGloves          = false;
     RareGlovesilvl      = new RangeNode <int>(1, 0, 100);
     RareBoots           = false;
     RareBootsilvl       = new RangeNode <int>(1, 0, 100);
     RareHelmets         = false;
     RareHelmetsilvl     = new RangeNode <int>(1, 0, 100);
     RareArmour          = false;
     RareArmourilvl      = new RangeNode <int>(1, 0, 100);
     PickUpEverything    = false;
     NormalRuleFile      = new ListNode();
     MagicRuleFile       = new ListNode();
     RareRuleFile        = new ListNode();
     UniqueRuleFile      = new ListNode();
     ReloadRules         = new ButtonNode();
     LeftClickToggleNode = true;
 }
    /// <summary>
    /// Checks if there is a node with the same coordinates
    /// in the open nodes list.
    /// </summary>
    /// <param name="newNode"></param>
    /// <returns></returns>
    private bool CheckClosedList(ButtonNode newNode)
    {
        for (int i = 0; i < closedNodes.Count; i++)
        {
            if (closedNodes[i].Equals(newNode))
            {
                if (closedNodes[i].CombinedDistance <= newNode.CombinedDistance)
                {
                    return(true);
                }
            }
        }

        return(false);
    }
示例#24
0
        public static void Main(string[] args)
        {
            Application.Init();
            MainWindow win = new MainWindow();

            Gtk.Canvas canvas = new Gtk.Canvas();
            canvas.Engine.SetBackground(new Color(0.5, 0.5, 0.5));
            win.Add(canvas);

            BoxNode box = new BoxNode(new Color(1, 1, 1), 100, 100);

            box.Draggable = true;
            canvas.Root.Add(box);

            PolygonNode poly = new PolygonNode(50, 50);

            poly.Color = new Color(0, 0, 1);
            poly.SetVerticies(new [] {
                new Point(0, 1),
                new Point(0, 0),
                new Point(1, 0.5),
            });
            poly.Draggable = true;
            canvas.Root.Add(poly);

            LabelNode label = new LabelNode("Label Node Test");

            label.Color     = new Color(1, 0, 0);
            label.Draggable = true;
            label.ClipInputToTextExtents = true;
            canvas.Root.Add(label);

            Random r = new Random();

            box.ActivatedEvent += (sender, e) => {
                box.RotateTo(r.NextDouble() * 5);
            };

            ButtonNode button = new ButtonNode(new LabelNode("Button"));

            canvas.Root.Add(button);
            button.MoveTo(300, 100);

            win.SetSizeRequest(800, 200);
            win.ShowAll();

            Application.Run();
        }
示例#25
0
        public WelcomePopup(Game game)
        {
            _packageContentManager = new PackageContentManager(game, game.Platform.FileSystem.AssetStorage.CreateBinaryPackage("welcome.bip", true));
            View = _packageContentManager.Load <AbstractNode>("sceneWelcomePopup4x3.object");

            _tittle        = View.FindById <BitmapTextNode>("TitleTxt");
            _centralButton = View.FindById <ButtonNode>("NewGameBtn");
            _inputNameTxt  = View.FindById <MultilineBitmapTextNode>("inputFieldTxt");
            _backButton    = View.FindById <ButtonNode>("backBtn");

            View.PostToStateMachine(new ParamEvent <string>("showPopup"));

            _backButton.Hidden            = true;
            _tittle.TextLineRenderer.Text = "Borcuha";
            _centralButton.Clicked       += OnCentralClicked;
        }
示例#26
0
        // Teste de carregamento da Tree de arquivos
        public void carregarFiles()
        {
            ButtonNode btnNode  = new ButtonNode();
            ButtonNode btnNode2 = new ButtonNode();
            ButtonNode btnNode3 = new ButtonNode();


            btnNode2.AddChild(btnNode3);

            btnNode2.NodeButton.Texto("Main");
            btnNode3.NodeButton.Texto("main.ama");
            btnNode3.NodeButton.pictureBox1.Image = Properties.Resources.c;
            btnNode.NodeButton.Texto("Projecto");
            btnNode.AddChild(btnNode2);

            buttonTree1.Add(btnNode);
        }
示例#27
0
    public bool Delete(ref SceneNode sn)
    {
        // Case for if the SceneNode being deleted is null.
        if (sn == null)
        {
            return(false);
        }

        bool isHead = false;

        if (sn == head.data.GetSceneNode())
        {
            isHead = true;
        }

        // Call to recursive FindHelper function to find the requested SceneNode.
        ButtonNode b = FindHelper(head, ref sn);

        // Call to recursive FindParentHelper function to find the requested SceneNode's parent.
        ButtonNode parent = FindParentHelper(head, ref sn);

        // Case for if the requested SceneNode isn't found.
        if (b == null)
        {
            return(false);
        }

        // If the parent isn't null, remove the ButtonNode that will be deleted.
        if (parent != null)
        {
            parent.children.Remove(b);
        }

        // Call to recursive helper function that actually does the removal.
        DeleteHelper(b);

        if (isHead)
        {
            head = null;
        }

        // Redisplay hierarchy.
        DisplayAll();
        return(true);
    }
示例#28
0
        public override void Render(Node node, Context context)
        {
            ButtonNode button = node as ButtonNode;

            context.RoundedRectangle(0.5, 0.5, button.Width - 1, button.Height - 1, button.Rounding);
            if (button.Relief)
            {
                using (var lg = new global::Cairo.LinearGradient(0, 0, 0, button.Height)) {
                    CreateGradient(lg, button.State, button.Opacity);
                    context.Pattern = lg;
                    context.FillPreserve();
                }

                context.LineWidth = 1;
                context.Color     = new Color(0.8, 0.8, 0.8, button.Opacity).ToCairo();
                context.Stroke();
            }
        }
示例#29
0
    public SceneNode FindByName(string name)
    {
        // Base case for if head or sn are null.
        if (head == null || name == null)
        {
            return(null);
        }

        // Recursive call to FindByNameHelper to find requested SceneNode.
        ButtonNode b = FindByNameHelper(head, ref name);

        // Return null if SceneNode with name can't be found.
        if (b == null)
        {
            return(null);
        }

        return(b.data.GetSceneNode());
    }
示例#30
0
        private void AddRefill(RefillProcessor refill)
        {
            refill.CurrencyClass.Values = RefillCurrencyNames;

            var refillRoot = new BaseSettingsDrawer {
                SettingName = "", SettingId = GetUniqDrawerId()
            };

            RefillMenuRootMenu.Children.Insert(RefillMenuRootMenu.Children.Count - 1, refillRoot);

            refillRoot.Children.Add(new ComboBoxSettingDrawer(refill.CurrencyClass)
            {
                SettingName = "Currency", SettingId = GetUniqDrawerId()
            });
            refillRoot.Children.Add(new IntegerSettingsDrawer(refill.Amount)
            {
                SettingName = "Amount", SettingId = GetUniqDrawerId()
            });

            refillRoot.Children.Add(new IntegerSettingsDrawer(refill.InventPosX)
            {
                SettingName = "Inventory Pos X", SettingId = GetUniqDrawerId()
            });
            refillRoot.Children.Add(new IntegerSettingsDrawer(refill.InventPosY)
            {
                SettingName = "Inventory Pos Y", SettingId = GetUniqDrawerId()
            });

            var removeButton       = new ButtonNode();
            var removeButtonDrawer = new ButtonSettingDrawer(removeButton)
            {
                SettingName = "Delete Refill", SettingId = GetUniqDrawerId()
            };

            refillRoot.Children.Add(removeButtonDrawer);

            removeButton.OnPressed += delegate
            {
                RefillMenuRootMenu.Children.Remove(refillRoot);
                Settings.Refills.Remove(refill);
            };
        }
 private void LoadAvailableColumnsTree()
 {
     if (this.currentDataSource != null)
     {
         this.selectedDataSourceNode = new DataSourceNode();
         this.availableColumnsTree.Nodes.Add(this.selectedDataSourceNode);
     }
     ButtonNode node = new ButtonNode();
     this.availableColumnsTree.Nodes.Add(node);
     ButtonNode node2 = new ButtonNode("Select", System.Design.SR.GetString("DGCol_SelectButton"), System.Design.SR.GetString("DGCol_Node_Select"));
     node.Nodes.Add(node2);
     EditCommandNode node3 = new EditCommandNode();
     node.Nodes.Add(node3);
     ButtonNode node4 = new ButtonNode("Delete", System.Design.SR.GetString("DGCol_DeleteButton"), System.Design.SR.GetString("DGCol_Node_Delete"));
     node.Nodes.Add(node4);
     HyperLinkNode node5 = new HyperLinkNode();
     this.availableColumnsTree.Nodes.Add(node5);
     TemplateNode node6 = new TemplateNode();
     this.availableColumnsTree.Nodes.Add(node6);
 }
示例#32
0
 public ButtonNodeRenderer(ButtonNode node)
     : base(node)
 {
     this.node = node;
     SetView (new UIButton (UIButtonType.RoundedRect));
 }
 private void LoadAvailableFieldsTree()
 {
     IDataSourceFieldSchema[] fieldSchemas = this.GetFieldSchemas();
     if ((fieldSchemas != null) && (fieldSchemas.Length > 0))
     {
         this._selectedDataSourceNode = new DataSourceNode();
         this._availableFieldsTree.Nodes.Add(this._selectedDataSourceNode);
         this._selectedCheckBoxDataSourceNode = new BoolDataSourceNode();
         this._availableFieldsTree.Nodes.Add(this._selectedCheckBoxDataSourceNode);
     }
     HyperLinkNode node = new HyperLinkNode(this);
     this._availableFieldsTree.Nodes.Add(node);
     ImageNode node2 = new ImageNode(this);
     this._availableFieldsTree.Nodes.Add(node2);
     ButtonNode node3 = new ButtonNode(this);
     this._availableFieldsTree.Nodes.Add(node3);
     CommandNode node4 = new CommandNode(this);
     this._availableFieldsTree.Nodes.Add(node4);
     CommandNode node5 = new CommandNode(this, 0, System.Design.SR.GetString("DCFEditor_Node_Edit"), 6);
     node4.Nodes.Add(node5);
     if (this.Control is GridView)
     {
         CommandNode node6 = new CommandNode(this, 2, System.Design.SR.GetString("DCFEditor_Node_Select"), 5);
         node4.Nodes.Add(node6);
     }
     CommandNode node7 = new CommandNode(this, 3, System.Design.SR.GetString("DCFEditor_Node_Delete"), 7);
     node4.Nodes.Add(node7);
     if (this.Control is DetailsView)
     {
         CommandNode node8 = new CommandNode(this, 1, System.Design.SR.GetString("DCFEditor_Node_Insert"), 11);
         node4.Nodes.Add(node8);
     }
     TemplateNode node9 = new TemplateNode(this);
     this._availableFieldsTree.Nodes.Add(node9);
 }