private void ShowPanel(int index)
        {
            try
            {
                this.SuspendLayout();
                pnlEdit.SuspendLayout();
                pnlEdit.Controls.Clear();

                EditPanelBase panel = panels[index];
                if (panel != null)
                {
                    Translator.TranslateControl(panel, false);
                    panel.Visible = true;
                    panel.SetTask(BkgTask as Task);

                    lblPreview.Visible      = panel.ShowPreview;
                    cmbWordCasing.Visible   = panel.ShowWordCasing;
                    lblWordHandling.Visible = panel.ShowWordCasing;

                    pnlEdit.Controls.Add(panel);
                }

                selectedPanel = index;
            }
            finally
            {
                pnlEdit.ResumeLayout();
                this.ResumeLayout();
            }
        }
 private void AddPanel(EditPanelBase panel)
 {
     cmbEditType.Items.Add(Translator.Translate(panel.Title));
     panels.Add(panel);
     panel.Visible = false;
     panel.Dock    = DockStyle.Fill;
 }
Пример #3
0
 private void AddPanel(EditPanelBase panel)
 {
     cmbEditType.Items.Add(Translator.Translate(panel.Title));
     panels.Add(panel);
     panel.Visible = false;
     panel.Dock = DockStyle.Fill;
     pnlEdit.Controls.Add(panel);
 }