Foxoft.Ci.CiPadGroup.Load C# (CSharp) Method

Load() public method

public Load ( CiProgram program ) : void
program CiProgram
return void
        public void Load(CiProgram program, params SourceGenerator[] gens)
        {
            this.TabsToRemove = new HashSet<TabPage>(this.TabPages);
            foreach (SourceGenerator gen in gens) {
            gen.CreateTextWriter = this.CreatePadWriter;
            gen.Write(program);
            }
            foreach (TabPage page in this.TabsToRemove) {
            if (page == this.TabControl.SelectedTab)
                this.TabControl.SelectedIndex = -1; // WORKAROUND Mono 2.10.9 BUG: Java/AS translations disappear when changing class name
            this.TabControl.TabPages.Remove(page);
            }
            if (this.TabControl.SelectedIndex == -1)
            this.TabControl.SelectedIndex = 0; // WORKAROUND continued
        }