Example #1
0
 private void SetActiveControl(RuleGridView activeGrid)
 {
     Debug.WriteLine($"Set active composite rule grid to: {activeGrid.GetHashCode()}");
     splitContainer1.Panel2.Controls.Clear();
     activeGrid.Dock = DockStyle.Fill;
     splitContainer1.Panel2.Controls.Add(activeGrid);
 }
Example #2
0
        private void lstStyles_SelectedIndexChanged(object sender, EventArgs e)
        {
            btnDelete.Enabled = false;
            var style = lstStyles.SelectedItem as ICompositeTypeStyle;

            if (style != null)
            {
                btnDelete.Enabled = true;
                if (!_compositeRuleGrids.ContainsKey(style))
                {
                    var grid = new RuleGridView();
                    grid.Init(_parent.EditorService, _vsr, style);
                    _compositeRuleGrids[style] = grid;
                }

                //Update offset
                if (lstStyles.SelectedIndex >= 0)
                {
                    int offset = 0;
                    for (int i = 0; i < lstStyles.SelectedIndex; i++)
                    {
                        offset += _cts[i].RuleCount;
                    }
                    _compositeRuleGrids[style].ThemeIndexOffest = offset;
                }

                SetActiveControl(_compositeRuleGrids[style]);
            }
        }
Example #3
0
 private void SetActiveControl(RuleGridView activeGrid)
 {
     Debug.WriteLine(string.Format("Set active composite rule grid to: {0}", activeGrid.GetHashCode()));
     splitContainer1.Panel2.Controls.Clear();
     activeGrid.Dock = DockStyle.Fill;
     splitContainer1.Panel2.Controls.Add(activeGrid);
 }
Example #4
0
        private void lstStyles_SelectedIndexChanged(object sender, EventArgs e)
        {
            btnDelete.Enabled = false;
            var style = lstStyles.SelectedItem as ICompositeTypeStyle;
            if (style != null)
            {
                btnDelete.Enabled = true;
                if (!_compositeRuleGrids.ContainsKey(style))
                {
                    var grid = new RuleGridView();
                    grid.Init(_parent.EditorService, _vsr, style);
                    _compositeRuleGrids[style] = grid;
                }

                //Update offset
                if (lstStyles.SelectedIndex >= 0)
                {
                    int offset = 0;
                    for (int i = 0; i < lstStyles.SelectedIndex; i++)
                    {
                        offset += _cts[i].RuleCount;
                    }
                    _compositeRuleGrids[style].ThemeIndexOffest = offset;
                }

                SetActiveControl(_compositeRuleGrids[style]);
            }
        }