Exemplo n.º 1
0
        public LayoutView(
            IAppContext context,
            PrintingPlugin plugin,
            IBroadcasterService broadcaster,
            IStyleService styleService,
            ElementsPresenter elements,
            PdfExportService pdfService
            )
        {
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }
            if (plugin == null)
            {
                throw new ArgumentNullException("plugin");
            }
            if (broadcaster == null)
            {
                throw new ArgumentNullException("broadcaster");
            }
            if (styleService == null)
            {
                throw new ArgumentNullException("styleService");
            }
            if (elements == null)
            {
                throw new ArgumentNullException("elements");
            }
            if (pdfService == null)
            {
                throw new ArgumentNullException("pdfService");
            }

            _context      = context;
            _plugin       = plugin;
            _broadcaster  = broadcaster;
            _styleService = styleService;
            _elements     = elements;
            _pdfService   = pdfService;

            InitializeComponent();

            // there is no way to get it other than in context of some Control
            ScreenHelper.ScreenDpi = layoutControl1.GetScreenDpi();

            InitControls();

            AttachEventHandlers();

            InitDockPanels();

            InitMenus();

            RestorePreviousState();

            statusStripEx1.ContextMenuStrip = null;

            FormClosing += LayoutViewFormClosing;
        }
Exemplo n.º 2
0
        public LayoutMenuGenerator(IAppContext context, PrintingPlugin plugin, ILayoutView view, LayoutMenuListener listener)
        {
            if (plugin == null)
            {
                throw new ArgumentNullException("plugin");
            }
            if (view == null)
            {
                throw new ArgumentNullException("view");
            }
            if (listener == null)
            {
                throw new ArgumentNullException("listener");
            }

            _plugin = plugin;

            _commands = new LayoutMenuCommands(plugin.Identity);

            _menu     = MenuFactory.CreateMenu(view.MenuManager);
            _toolbars = MenuFactory.CreateToolbars(view.MenuManager);

            InitMenu();

            ViewMenuHelper.Init(view.MenuManager, view.DockingManager, _menu, view.DockPanels, _plugin.Identity);

            InitToolbars();

            _menu.ItemClicked     += listener.OnItemClicked;
            _toolbars.ItemClicked += listener.OnItemClicked;
        }
Exemplo n.º 3
0
        public MenuUpdater(IAppContext context, PrintingPlugin plugin)
        {
            _context = context;
            _plugin  = plugin;

            _plugin.ViewUpdating += OnViewUpdating;
        }
Exemplo n.º 4
0
 public frmIndexMap(string connectionString, IIndexMap indexMap, PrintingPlugin plugin)
 {
     InitializeComponent();
     _connectionString = connectionString;
     _indexMap         = indexMap;
     _plugin           = plugin;
     FillTemplate();
     FillIndexMap();
 }
Exemplo n.º 5
0
 public TemplateConfigPage(IConfigService configService, PrintingPlugin plugin)
 {
     if (configService == null)
     {
         throw new ArgumentNullException("configService");
     }
     _configService = configService;
     _plugin        = plugin;
     InitializeComponent();
     Initialize();
 }
Exemplo n.º 6
0
        public MenuListener(IAppContext context, PrintingPlugin plugin)
            : base(context, plugin.Identity)
        {
            if (plugin == null)
            {
                throw new ArgumentNullException("plugin");
            }
            _plugin = plugin;

            plugin.ItemClicked  += OnItemClicked;
            plugin.ViewUpdating += ViewUpdating;
        }
Exemplo n.º 7
0
        public MapListener(IAppContext context, PrintingPlugin plugin)
        {
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }
            if (plugin == null)
            {
                throw new ArgumentNullException("plugin");
            }

            _context = context;
            _plugin  = plugin;

            plugin.SelectBoxFinal += OnSelectBoxFinal;
        }
Exemplo n.º 8
0
        public MenuGenerator(IAppContext context, PrintingPlugin plugin)
        {
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }
            // if (pluginManager == null) throw new ArgumentNullException("pluginManager");

            _plugin  = plugin;
            _context = context;

            _menuManager     = _context.MainView.RibbonManager;
            _commands        = new YutaiCommands(_context, plugin.Identity);
            _commands.Plugin = plugin;
            InitMenus();
        }
Exemplo n.º 9
0
 public void Initialize(IAppContext context, PrintingPlugin plugin)
 {
     try
     {
         _context       = context;
         _plugin        = plugin;
         _layoutControl = _context.MainView.PageLayoutControl;
         LoadMapTemplate();
         FillScaleList();
         LoadIndexMaps();
         InitCommands();
     }
     catch (Exception ex)
     {
         MessageService.Current.Warn(ex.Message);
     }
 }
Exemplo n.º 10
0
        public MenuGenerator(IAppContext context, PrintingPlugin plugin)
        {
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }
            if (plugin == null)
            {
                throw new ArgumentNullException("plugin");
            }

            _commands = new MenuCommands(plugin.Identity);
            _context  = context;
            _plugin   = plugin;

            InitMenu();

            InitToolbar();
        }
Exemplo n.º 11
0
        public AutoLayoutPresenter(IAppContext context, IAutoLayoutView view, PrintingPlugin plugin)
            : base(view)
        {
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }
            _context = context;
            _plugin  = plugin;
            view.Initialize(_context, _plugin);
            ((IAppContextEvents)_context).OnActiveHookChanged += OnOnActiveHookChanged;
            _context.MainView.ArcGISControlChanging           += MainViewOnArcGisControlChanging;

            //view.ModeChanged += OnIdentifierModeChanged;
            //view.ItemSelected += OnItemSelected;
            //_plugin.MapIdentifying += PluginOnMapIdentifying;
            //_plugin.UnMapIdentify += PluginOnUnMapIdentify;
            //_plugin.StartMapIdentify += PluginOnStartMapIdentify;
        }
Exemplo n.º 12
0
        public AutoLayoutViewService(IAppContext context, AutoLayoutPresenter presenter, PrintingPlugin plugin)
        {
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }
            if (presenter == null)
            {
                throw new ArgumentNullException("presenter");
            }
            if (plugin == null)
            {
                throw new ArgumentNullException("plugin");
            }

            _context   = context;
            _presenter = presenter;
            _plugin    = plugin;

            var panels = context.DockPanels;
        }
Exemplo n.º 13
0
 public CmdPageSetup(IAppContext context, BasePlugin plugin)
 {
     OnCreate(context);
     _plugin = plugin as PrintingPlugin;
 }
Exemplo n.º 14
0
 public ToolFenceLineBuffer(IAppContext context, PrintingPlugin plugin)
 {
     OnCreate(context);
     _plugin = plugin;
 }
Exemplo n.º 15
0
 public ToolFencePolygon(IAppContext context, PrintingPlugin plugin)
 {
     OnCreate(context);
     _plugin = plugin;
 }
Exemplo n.º 16
0
 public CmdStartLayout(IAppContext context, BasePlugin plugin)
 {
     OnCreate(context);
     _plugin = plugin as PrintingPlugin;
 }
Exemplo n.º 17
0
 public ToolFenceCircle(IAppContext context, PrintingPlugin plugin)
 {
     OnCreate(context);
     _plugin = plugin;
 }
Exemplo n.º 18
0
 public CmdlFenceExtent(IAppContext context, PrintingPlugin plugin)
 {
     OnCreate(context);
     _plugin = plugin;
 }
Exemplo n.º 19
0
 public CmdApplyTfMapTemplate(IAppContext context, PrintingPlugin plugin)
 {
     OnCreate(context);
     _plugin = plugin;
 }
Exemplo n.º 20
0
 public CmdCloseLayoutDesign(IAppContext context, BasePlugin plugin)
 {
     OnCreate(context);
     _plugin = plugin as PrintingPlugin;
 }