public ImageEditorBase() { InitializeComponent(); saveBtn.Enabled = HasBeenEdited; imageToolStripMenuItem.Enabled = false; adjustmentsToolStripMenuItem.Enabled = false; foreach (var type in Enum.GetValues(typeof(Runtime.PictureBoxBG)).Cast <Runtime.PictureBoxBG>()) { imageBGComboBox.Items.Add(type); } imageBGComboBox.SelectedItem = Runtime.pictureBoxStyle; UpdateBackgroundImage(); propertyGridToolStripMenuItem.Checked = Runtime.ImageEditor.ShowPropertiesPanel; propertiesEditor = new ImagePropertiesEditor(); propertiesEditor.Dock = DockStyle.Fill; if (!propertyGridToolStripMenuItem.Checked) { splitContainer1.Panel2Collapsed = true; splitContainer1.Panel2.Hide(); } else { splitContainer1.Panel2Collapsed = false; splitContainer1.Panel2.Show(); } if (ShowChannelEditor) { LoadChannelEditor(null); } if (PropertyShowTop) { splitContainer1.Panel1.Controls.Add(propertiesEditor); splitContainer1.Panel2.Controls.Add(stPanel1); splitContainer1.Orientation = Orientation.Horizontal; } else { splitContainer1.Panel2.Controls.Add(propertiesEditor); splitContainer1.Panel1.Controls.Add(stPanel1); splitContainer1.Orientation = Orientation.Vertical; } OnDataAcquiredEvent += new DataAcquired(ThreadReportsDataAquiredEvent); }
public ImageEditorBase() { InitializeComponent(); backgroundPB.BackColor = Runtime.CustomPicureBoxBGColor; backgroundPB.Visible = false; useComponentSelectorToolStripMenuItem.Checked = Runtime.ImageEditor.UseComponetSelector; enableZoomToolStripMenuItem.Checked = Runtime.ImageEditor.EnableImageZoom; displayAlphaToolStripMenuItem.Checked = Runtime.ImageEditor.DisplayAlpha; SetAlphaEnableUI(Runtime.ImageEditor.DisplayAlpha); propertiesEditor = new ImagePropertiesEditor(); propertiesEditor.Dock = DockStyle.Fill; saveBtn.Enabled = HasBeenEdited; imageToolStripMenuItem.Enabled = false; adjustmentsToolStripMenuItem.Enabled = false; editBtn.BackgroundImage = BitmapExtension.GrayScale(Properties.Resources.Edit); foreach (var type in Enum.GetValues(typeof(Runtime.PictureBoxBG)).Cast <Runtime.PictureBoxBG>()) { imageBGComboBox.Items.Add(type); } imageBGComboBox.SelectedItem = Runtime.pictureBoxStyle; UpdateBackgroundImage(); SetZoomSetting(); SetEditorOrientation(Runtime.ImageEditor.DisplayVertical, true); previewGammaFixSmashUltimateToolStripMenuItem.Checked = Runtime.ImageEditor.PreviewGammaFix; UpdateLabel(); propertyGridToolStripMenuItem.Checked = Runtime.ImageEditor.ShowPropertiesPanel; if (!propertyGridToolStripMenuItem.Checked) { HidePropertyGrid(true); } else { HidePropertyGrid(false); } OnDataAcquiredEvent += new DataAcquired(ThreadReportsDataAquiredEvent); SetUpFileSystemWatcher(); undoToolStripMenuItem.Enabled = false; redoToolStripMenuItem.Enabled = false; }
public void DetachDataAcquiredHandler(DataAcquired a) { lock (m_lock) OnDataAcquired -= a; }
public void AttachDataAcquiredHandler(DataAcquired a) { lock (m_lock) OnDataAcquired += a; }