Exemple #1
0
        private void radGridViewTileConfig_DoubleClick(object sender, EventArgs e)
        {
            if (this.radGridViewTileConfig.CurrentRow is GridViewDataRowInfo)
            {
                TileConfig targetTileConfig = (TileConfig)radGridViewTileConfig.CurrentRow.DataBoundItem;

                SetCurrentSelectionIndex();

                TileDetails td = new TileDetails(targetTileConfig);
                td.ShowDialog();
            }
        }
Exemple #2
0
        private void radButtonAddTile_Click(object sender, EventArgs e)
        {
            int lastOrder = 0;
            List <TileConfig> lTileConfig = _lTileConfig != null ? _lTileConfig : new List <TileConfig>();

            foreach (TileConfig tc in lTileConfig)
            {
                if (tc.TileconfigID == 0 && tc.Order > lastOrder)
                {
                    lastOrder = tc.Order;
                }
            }

            System.Diagnostics.Debug.WriteLine("lastOrder: {0}", lastOrder);

            SetCurrentSelectionIndex();

            TileDetails td = new TileDetails(0, lastOrder + 1, (int)comboBoxTileConfig.SelectedItem.Value);

            td.ShowDialog();
        }
Exemple #3
0
        private void radButtonAddSubTile_Click(object sender, EventArgs e)
        {
            int parentTileConfigID        = 0;
            int lastOrder                 = 0;
            List <TileConfig> lTileConfig = _lTileConfig != null ? _lTileConfig : new List <TileConfig>();

            if (this.radGridViewTileConfig.CurrentRow is GridViewDataRowInfo)
            {
                TileConfig targetTileConfig = (TileConfig)radGridViewTileConfig.CurrentRow.DataBoundItem;

                if (targetTileConfig.TileconfigID == 0)
                {
                    parentTileConfigID = targetTileConfig.ID; // selected tile will be the parent
                }
                else
                {
                    parentTileConfigID = targetTileConfig.TileconfigID; // set the parent tile
                }
            }


            foreach (TileConfig tc in lTileConfig)
            {
                if (tc.TileconfigID == parentTileConfigID && tc.Order > lastOrder)
                {
                    lastOrder = tc.Order;
                }
            }

            System.Diagnostics.Debug.WriteLine("parentTileConfigID: {0}  lastOrder: {1}", parentTileConfigID, lastOrder);

            SetCurrentSelectionIndex();

            TileDetails td = new TileDetails(parentTileConfigID, lastOrder + 1, (int)comboBoxTileConfig.SelectedItem.Value);

            td.ShowDialog();
        }