Beispiel #1
0
        private void CurrentSsg_Changed(ISsg ssg)
        {
            if (ssg == null)
            {
                return;
            }

            var panel = this.UIServices.CreatePanelForSsg();
            var ok    = ssg.Initialize(this, this.Model, panel);

            if (ok)
            {
            }
        }
Beispiel #2
0
        private void CurrentSsg_Changed(ISsg ssg)
        {
            // setup tab indexes
            var queue = new Queue <Control>();

            queue.Enqueue(this);
            var idx = 0;

            while (queue.Count != 0)
            {
                var ctl = queue.Dequeue();
                ctl.TabIndex = idx++;

                if (ctl is TableLayoutPanel)
                {
                    var table = (TableLayoutPanel)ctl;
                    for (int itRow = 0; itRow < table.RowCount; itRow++)
                    {
                        for (int itColumn = 0; itColumn < table.ColumnCount; itColumn++)
                        {
                            var child = table.GetControlFromPosition(itColumn, itRow);
                            if (child != null)
                            {
                                queue.Enqueue(child);
                            }
                        }
                    }
                }
                else
                {
                    foreach (Control child in ctl.Controls.OfType <Control>())
                    {
                        queue.Enqueue(child);
                    }
                }
            }
        }
Beispiel #3
0
 private void CurrentSsg_Changing(Bindable <ISsg> sender, ref ISsg value, ISsg prev, ref bool cancel)
 {
     prev?.Dispose();
     this.UIServices.ClearPanelForSsg();
 }