Example #1
0
        public DockPanelService(IAppContext context, TableEditorPresenter presenter, TableEditorPlugin plugin)
        {
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }
            if (presenter == null)
            {
                throw new ArgumentNullException("presenter");
            }
            if (plugin == null)
            {
                throw new ArgumentNullException("plugin");
            }

            var panels = context.DockPanels;

            panels.Lock();
            var panel = panels.Add(presenter.GetInternalObject(), DockPanelKeys.TableEditor, plugin.Identity);

            panel.Caption = "Table editor";
            panel.SetIcon(Resources.ico_table24);

            panel.DockTo(DockPanelState.Bottom, 300);
            panel.Visible = false;

            panels.Unlock();
        }
Example #2
0
 public TableEditorPresenter(IAppContext context, ITableEditorView view, TableEditorPlugin plugin) : base(view)
 {
     if (context == null)
     {
         throw new ArgumentNullException("context");
     }
     _context = context;
     _plugin  = plugin;
 }
Example #3
0
        public MenuGenerator(IAppContext context, TableEditorPlugin plugin)
        {
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }
            _context  = context;
            _commands = new MenuCommands(plugin);

            InitToolbars();

            InitMenu();
        }
Example #4
0
        public MenuListener(IAppContext context, TableEditorPlugin plugin, TableEditorPresenter presenter)
            : base(context, plugin.Identity)
        {
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }
            if (presenter == null)
            {
                throw new ArgumentNullException("presenter");
            }

            _presenter                 = presenter;
            plugin.ItemClicked        += PluginItemClicked;
            plugin.ViewUpdating       += ViewUpdating;
            plugin.MessageBroadcasted += OnPluginMessageBroadcasted;
        }
Example #5
0
        public DockPanelService(IAppContext context, TableEditorPresenter presenter, TableEditorPlugin plugin)
        {
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }
            if (presenter == null)
            {
                throw new ArgumentNullException("presenter");
            }
            if (plugin == null)
            {
                throw new ArgumentNullException("plugin");
            }

            var panels = context.DockPanels;

            panels.Lock();
            DockPanel panel = panels.Add(presenter.GetInternalObject() as IDockPanelView, plugin.Identity);

            panel.Visible = false;
            panels.Unlock();
        }
Example #6
0
 public MenuCommands(TableEditorPlugin plugin)
     : base(plugin.Identity)
 {
 }