示例#1
0
 public TemplateViewPresenter(IAppContext context, ITemplateView view, TemplatePlugin plugin)
     : base(view)
 {
     if (context == null)
     {
         throw new ArgumentNullException("context");
     }
     _context = context;
     _plugin  = plugin;
     view.Initialize(_context, _plugin);
 }
示例#2
0
        public MenuGenerator(IAppContext context, TemplatePlugin 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();
        }
示例#3
0
 public void Initialize(IAppContext context, TemplatePlugin plugin)
 {
     try
     {
         _context = context;
         _plugin  = plugin;
         if (_plugin != null)
         {
             _databases = new List <ITemplateDatabase>();
             LoadDefaultDatabase();
         }
     }
     catch (Exception ex)
     {
         MessageService.Current.Warn(ex.Message);
     }
 }
示例#4
0
        public frmQuickCreateFeatureClass(IAppContext context, TemplatePlugin plugin)
        {
            InitializeComponent();
            _context = context;
            _map     = _context.FocusMap;
            _plugin  = plugin;
            ISpatialReference spatialReference = _map.SpatialReference;

            txtSpatialRef.Text = spatialReference.Name;

            IActiveView pActiveView = _map as IActiveView;
            IEnvelope   pEnv        = pActiveView.Extent;

            txtXMin.EditValue = Math.Floor(pEnv.XMin);
            txtYMin.EditValue = Math.Floor(pEnv.YMin);
            txtXMax.EditValue = Math.Ceiling(pEnv.XMax);
            txtYMax.EditValue = Math.Ceiling(pEnv.YMax);
            LoadTemplates();
        }
示例#5
0
        public TemplateViewService(IAppContext context, TemplateViewPresenter presenter, TemplatePlugin 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;
        }
示例#6
0
        public frmQuickCreateFeatureDataset(IAppContext context, TemplatePlugin plugin)
        {
            InitializeComponent();
            _context = context;
            _map     = _context.FocusMap;
            ISpatialReference spatialReference = _map.SpatialReference;

            txtSpatialRef.Text = spatialReference.Name;
            _database          = plugin.TemplateDatabase;

            IActiveView pActiveView = _map as IActiveView;
            IEnvelope   pEnv        = pActiveView.Extent;

            txtXMin.EditValue = Math.Floor(pEnv.XMin);
            txtYMin.EditValue = Math.Floor(pEnv.YMin);
            txtXMax.EditValue = Math.Ceiling(pEnv.XMax);
            txtYMax.EditValue = Math.Ceiling(pEnv.YMax);
            LoadObjectDatasets();
            chkNamePre.Checked  = true;
            chkNameNext.Checked = false;
        }
示例#7
0
 public CmdCreateFeatureDatasetByTemplate(IAppContext context, BasePlugin plugin)
 {
     OnCreate(context);
     _plugin = plugin as TemplatePlugin;
 }