public void AddControl(SIEEControl ctrl) { control = ctrl; control.Location = new System.Drawing.Point(0, 0); control.Name = "SIEEControl"; control.TabIndex = 1; control.Anchor = AnchorStyles.Top | AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Bottom; control.Dock = DockStyle.Fill; control.BackColor = Color.FromName("LightGray"); // Remove later this.panel.Controls.Add(control); }
private void loadExportExtention(SIEEFactory factory) { try { control = new SIEEControl(factory); settings = (SIEESettings)factory.CreateSettings(); export = (SIEEExport)factory.CreateExport(); description = (SIEEDescription)factory.CreateDescription(); } catch (Exception ex) { MessageBox.Show("Factory error.\n" + ex.Message); } if (chbox_reloadConfiguration.Checked && Properties.Settings.Default.SavedConfigurationType == description.TypeName) { try { settings = (SIEESettings)SIEESerializer.StringToObject(Properties.Settings.Default.SavedConfiguration); } catch (Exception e) { MessageBox.Show("Loading saved configuration failed. Rason:\n" + e.Message); } } btn_configure.Enabled = false; btn_capture.Enabled = false; btn_export.Enabled = false; try { SIEESerializer.StringToObject(SIEESerializer.ObjectToString(settings)); } catch (Exception ex) { MessageBox.Show("Serialization for settings object failed:\n" + ex.Message); cbox_extensionSelector.SelectedText = Properties.Settings.Default.CurrentExtension; return; } pict_Icon.Image = description.Image; btn_configure.Enabled = true; Properties.Settings.Default.CurrentExtension = cbox_extensionSelector.Text; lbl_status.Text = "Extension selected"; }
public SIEEWriterControl(SIEEFactory f) { embeddedControl = new SIEEControl(f); InitializeComponent(); }