Ejemplo n.º 1
0
        /// <summary>
        /// Open an instance of the board editor
        /// </summary>
        /// <param name="hWnd"></param>
        public void Open(IntPtr hWnd)
        {
            lock (guiLock)
            {
                _uiWrapper = new WinFormsControlWrapper <BoardEditor>();
                // databind to board settings

                try
                {
                    Action a = () =>
                    {
                        _uiWrapper.SafeInstance.IsForPlugin   = true;
                        _uiWrapper.SafeInstance.BoardSettings = _plugin.BoardSettings;
                    };
                    if (_uiWrapper.SafeInstance.InvokeRequired)
                    {
                        a();
                    }
                    else
                    {
                        _uiWrapper.SafeInstance.BeginInvoke(a);
                    }
                }
                catch (Exception)
                {
                    // could give exceptions when handle is not created
                }

                _uiWrapper.Open(hWnd);

                IsOpen = true;
            }
        }
Ejemplo n.º 2
0
 public PluginEditor(PluginParameters parameters)
 {
     _parameters = parameters ?? throw new ArgumentNullException(nameof(parameters));
     _view       = new WinFormsControlWrapper <PluginEditorView>();
 }
Ejemplo n.º 3
0
 public PluginEditor()
 {
     _view = new WinFormsControlWrapper <FormMain>();
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Constructs a new instance.
 /// </summary>
 /// <param name="plugin">Must not be null.</param>
 public PluginEditor(Plugin plugin)
 {
     _plugin = plugin;
     _view   = new WinFormsControlWrapper <MidiNoteMapperUI>();
 }
Ejemplo n.º 5
0
 public PluginEditor(Plugin plugin)
 {
     _plugin = plugin;
     _view = new WinFormsControlWrapper<PluginEditorView>();
 }
Ejemplo n.º 6
0
 public PluginEditor(Plugin plugin)
 {
     _plugin = plugin;
     _view   = new WinFormsControlWrapper <PluginEditorView>();
 }
Ejemplo n.º 7
0
 public PluginEditor(Plugin plugin)
 {
     _plugin = plugin;
     _view   = new WinFormsControlWrapper <AccudrumsBase>();
 }