Esempio n. 1
0
        public ToolButton(IExTool tool)
        {
            this.Tool = tool;

            base.Header = LocalizedResources.GetResString(tool.Name, tool.Name);
            base.Icon   = base.LargeIcon = ImageFactory.FromBitmap(tool.Image as global::System.Drawing.Image);
        }
Esempio n. 2
0
        private void SetPanelVisibity()
        {
            switch (_panelIndex)
            {
            case 0:
                panelStep2.Visible = false;
                panelStep1.Visible = true;
                btnBack.Visible    = false;
                btnNext.Enabled    = (txtTargetClass.Text != String.Empty);
                btnNext.Text       = LocalizedResources.GetResString("String.Next", "Next") + " >";
                break;

            case 1:
                panelStep1.Visible = false;
                panelStep2.Visible = true;
                btnBack.Visible    = true;
                btnNext.Text       = LocalizedResources.GetResString("String.Export", "Export");

                if (_listViewItem.MaxFieldLength > MaximumFieldLength(_dataset))
                {
                    _listViewItem       = new FeatureClassListViewItem(_sourceFeatureClass, MaximumFieldLength(_dataset));
                    gvFields.DataSource = _listViewItem.Fields;
                }
                break;
            }
        }
Esempio n. 3
0
        public FormFavoritesList(FormCatalogTree tree)
        {
            InitializeComponent();

            this.Name = LocalizedResources.GetResString("MenuHeader.Favorites", "Favorites");
            _tree     = tree;
        }
Esempio n. 4
0
        public ContentsList()
        {
            InitializeComponent();

            listView.SmallImageList  = ExplorerImageList.List.ImageList;
            _renameMenuItem          = new ToolStripMenuItem(LocalizedResources.GetResString("Menu.Rename", "Rename"));
            _renameMenuItem.Click   += new EventHandler(_renameMenuItem_Click);
            _deleteMenuItem          = new ToolStripMenuItem(LocalizedResources.GetResString("Menu.Delete", "Delete"));
            _deleteMenuItem.Click   += new EventHandler(_deleteMenuItem_Click);
            _metadataMenuItem        = new ToolStripMenuItem(LocalizedResources.GetResString("Menu.Metadata", "Metadata..."));
            _metadataMenuItem.Click += new EventHandler(_metadataMenuItem_Click);

            _appendReplicationIDMenuItem        = new ToolStripMenuItem("Append ReplicationID");
            _appendReplicationIDMenuItem.Click += new EventHandler(_appendReplicationIDMenuItem_Click);
            _checkoutMenuItem        = new ToolStripMenuItem("Checkout...");
            _checkoutMenuItem.Click += new EventHandler(_checkoutMenuItem_Click);
            _checkinMenuItem         = new ToolStripMenuItem("Checkin...");

            _checkinMenuItem.Click += new EventHandler(_checkinMenuItem_Click);
            _replicationMenuItem    = new ToolStripMenuItem("Replication");
            _replicationMenuItem.DropDownItems.Add(_appendReplicationIDMenuItem);
            _replicationMenuItem.DropDownItems.Add(_checkoutMenuItem);
            _replicationMenuItem.DropDownItems.Add(_checkinMenuItem);

            _contextItemCount = contextStrip.Items.Count;

            LocalizedResources.GlobalizeMenuItem(contextStrip);
        }
Esempio n. 5
0
        public FormIdentify()
        {
            InitializeComponent();

            this.Name = LocalizedResources.GetResString("String.QueryResults", "Query Results");

            this.showMode = ShowMode.Features;
        }
Esempio n. 6
0
        public FormSolveConflicts(IMapDocument doc)
        {
            InitializeComponent();

            _doc = doc;

            _rootNode = new TreeNode(LocalizedResources.GetResString("String.Conflicts", "Conflicts"));
            conflictControl1.MapDocument = _doc;
        }
Esempio n. 7
0
        public FormMeasure(IMapDocument doc)
        {
            InitializeComponent();

            this.Name           = LocalizedResources.GetResString("Tools.Measure", "Measure");
            _doc                = doc;
            _tool               = MeasureTool;
            _tool.ShapeChanged += new Measure.ShapeChangedEventHandler(tool_ShapeChanged);
        }
Esempio n. 8
0
        public ContextMenuButton(IContextMenuTool tool, IContextType contextType, IMapDocument mapDocument)
        {
            this.Tool    = tool;
            _contextType = contextType;
            _doc         = mapDocument;

            base.Header = LocalizedResources.GetResString(tool.Name, tool.Name);
            base.Icon   = base.LargeIcon = ImageFactory.FromBitmap(tool.Image as global::System.Drawing.Image);

            base.Click += new RoutedEventHandler(ContextMenuButton_Click);
        }
Esempio n. 9
0
 public WeightToolStripMenuItem(IGraphWeight weight)
 {
     _weight = weight;
     if (_weight == null)
     {
         base.Text = LocalizedResources.GetResString("String.none", "none");
     }
     else
     {
         base.Text = _weight.Name;
     }
 }
Esempio n. 10
0
        public GeoJsonServiceExplorerObject(IExplorerObject parent, string name, string connectionString)
            : base(parent, typeof(IFeatureDataset), 1)
        {
            _name             = name;
            _connectionString = connectionString;

            List <ToolStripMenuItem> items = new List <ToolStripMenuItem>();
            ToolStripMenuItem        item  = new ToolStripMenuItem(LocalizedResources.GetResString("Menu.ConnectionProperties", "Connection Properties..."));

            item.Click += new EventHandler(ConnectionProperties_Click);
            items.Add(item);

            _contextItems = items.ToArray();
        }
Esempio n. 11
0
        public EventTableObject(IExplorerObject parent, string name, EventTableConnection etconn)
            : base(parent, typeof(IFeatureClass), 1)
        {
            _name   = name;
            _etconn = etconn;

            List <ToolStripMenuItem> items = new List <ToolStripMenuItem>();
            ToolStripMenuItem        item  = new ToolStripMenuItem(LocalizedResources.GetResString("Menu.ConnectionProperties", "Connection Properties..."));

            item.Click += new EventHandler(ConnectionProperties_Click);
            items.Add(item);

            _contextItems = items.ToArray();
        }
Esempio n. 12
0
        public WeightSelector()
        {
            _menu = new ToolStripMenuItem(LocalizedResources.GetResString("String.NetworkWeights", "Weights"));

            _weights = new ToolStripMenuItem("Use Weight");
            _menu.DropDownItems.Add(_weights);
            _multiWeight = new ToolStripMenuItem("Use as weight");
            _trueCost    = new ToolStripMenuItem("Use as actual costs");

            _multiWeight.Click += new EventHandler(_multiWeight_Click);
            _trueCost.Click    += new EventHandler(_trueCost_Click);

            _menu.DropDownItems.Add(_multiWeight);
            _menu.DropDownItems.Add(_trueCost);
        }
Esempio n. 13
0
        public ToolButton(ITool tool)
        {
            this.Tool = tool;

            String toolName = !String.IsNullOrEmpty(tool.ToolTip) ? tool.ToolTip : LocalizedResources.GetResString(tool.Name, tool.Name);

            base.Header = toolName;
            base.Icon   = base.LargeIcon = ImageFactory.FromBitmap(tool.Image as System.Drawing.Image);

            if (tool is IScreenTip)
            {
                base.ToolTip = new Fluent.ScreenTip()
                {
                    Text = ((IScreenTip)tool).ScreenTip
                };
            }
        }
Esempio n. 14
0
 private void btnNext_Click(object sender, EventArgs e)
 {
     if (btnNext.Text == LocalizedResources.GetResString("String.Export", "Export"))
     {
         if (_listViewItem != null)
         {
             ExportDatasetObject(_listViewItem);
             _destDatasetElement = _dataset[_listViewItem.TargetName];
             this.DialogResult   = DialogResult.OK;
             this.Close();
         }
     }
     else
     {
         _panelIndex++;
         SetPanelVisibity();
     }
 }
Esempio n. 15
0
        public void OnEvent(object element, object parent)
        {
            if (_doc != null)
            {
                int    counter = _doc.Maps.Count + 1;
                string name    = LocalizedResources.GetResString("Tools.Map", "Map") + " " + (counter);

                while (_doc[name] != null)
                {
                    name = LocalizedResources.GetResString("Tools.Map", "Map") + " " + (++counter);
                }

                Map map = new Map();
                map.Name = name;

                _doc.AddMap(map);
            }
        }
Esempio n. 16
0
        public CreateNewToolStripItem(IExplorerObject exObject)
        {
            _exObject = exObject;
            string name = String.IsNullOrEmpty(_exObject.Name) ? _exObject.Type : _exObject.Name;

            if (!name.Contains("..."))
            {
                base.Text = LocalizedResources.GetResString("ArgString.Create", "Create " + name, name);
            }
            else
            {
                base.Text = name;
            }

            if (_exObject.Icon != null && _exObject.Icon.Image != null)
            {
                base.Image = _exObject.Icon.Image;
            }
        }
Esempio n. 17
0
        public ContextMenuButton(IContextMenuTool tool, IContextType contextType, IMapDocument mapDocument)
        {
            this.Tool    = tool;
            _contextType = contextType;
            _doc         = mapDocument;

            base.Header = LocalizedResources.GetResString(tool.Name, tool.Name);
            base.Icon   = base.LargeIcon = ImageFactory.FromBitmap(tool.Image as System.Drawing.Image);

            base.Click += new RoutedEventHandler(ContextMenuButton_Click);

            bool visible = false, enable = false;

            if (_contextType.ContextObject is IMap)
            {
                enable  = tool.Enable(contextType.ContextObject);
                visible = tool.Visible(contextType.ContextObject);
            }
            else if (_contextType.ContextObject is ITOCElement && ((ITOCElement)_contextType.ContextObject).Layers != null)
            {
                ITOCElement tocElement = (ITOCElement)_contextType.ContextObject;

                foreach (var layer in tocElement.Layers)
                {
                    if (visible == true && enable == true)
                    {
                        break;
                    }

                    if (!enable)
                    {
                        enable = tool.Enable(layer);
                    }
                    if (!visible)
                    {
                        visible = tool.Visible(layer);
                    }
                }
            }

            base.IsEnabled  = enable;
            base.Visibility = visible == false ? Visibility.Collapsed : Visibility.Visible;
        }
Esempio n. 18
0
        public ContextToolButton(ITool tool, object contextObject)
        {
            this.Tool = tool;

            String toolName = !String.IsNullOrEmpty(tool.ToolTip) ? tool.ToolTip : LocalizedResources.GetResString(tool.Name, tool.Name);

            base.Header = toolName;
            base.Icon   = base.LargeIcon = ImageFactory.FromBitmap(tool.Image as System.Drawing.Image);

            if (tool is IScreenTip)
            {
                base.ToolTip = new Fluent.ScreenTip()
                {
                    Text = ((IScreenTip)tool).ScreenTip
                };
            }

            _contextObject = contextObject;
            this.Click    += new RoutedEventHandler(ContextToolButton_Click);
        }
Esempio n. 19
0
        public Task <bool> OnEvent(object element, object parent)
        {
            if (_doc != null)
            {
                int    counter = _doc.Maps.Count() + 1;
                string name    = LocalizedResources.GetResString("Tools.Map", "Map") + " " + (counter);

                while (_doc[name] != null)
                {
                    name = LocalizedResources.GetResString("Tools.Map", "Map") + " " + (++counter);
                }

                Map map = new Map();
                map.Name = name;

                _doc.AddMap(map);
            }

            return(Task.FromResult(true));
        }
Esempio n. 20
0
        public MapServerConnectionExplorerObject(IExplorerObject parent)
            : base(parent, null, 0)
        {
            List <ToolStripItem> contextItems = new List <ToolStripItem>();

            ToolStripMenuItem importItem = new ToolStripMenuItem(LocalizedResources.GetResString("Menu.Import", "Import"));

            contextItems.Add(importItem);
            ToolStripMenuItem newService = new ToolStripMenuItem(LocalizedResources.GetResString("Menu.NewServiceFromMap", "New Service From gView Map..."));

            newService.Click += new EventHandler(newService_Click);
            newService.Image  = (new MapServiceIcon()).Image;
            importItem.DropDownItems.Add(newService);

            //ToolStripMenuItem newServiceColl = new ToolStripMenuItem("New Map Service Collection ...");
            //newServiceColl.Click += new EventHandler(newServiceColl_Click);
            //importItem.DropDownItems.Add(newServiceColl);

            PlugInManager compMan = new PlugInManager();

            foreach (Type serviceableType in compMan
                     .GetPlugins(Plugins.Type.IServiceableDataset))
            {
                IServiceableDataset ds = compMan.CreateInstance(serviceableType) as IServiceableDataset;
                if (ds == null)
                {
                    return;
                }

                if (importItem.DropDownItems.Count == 1)
                {
                    importItem.DropDownItems.Add(new ToolStripSeparator());
                }

                ToolStripItem item = new ServiceableDatasetItem(this, ds);
                item.Image = (new MapServiceIcon2()).Image;
                importItem.DropDownItems.Add(item);
            }

            _contextItems = contextItems.ToArray();
        }
Esempio n. 21
0
        public void BuildList()
        {
            lstFavorites.Items.Clear();

            lstFavorites.Items.Add(new ListViewItem(LocalizedResources.GetResString("Menu.AddToFavorites", "Add To Favorites..."), 1));

            foreach (MyFavorites.Favorite fav in (new MyFavorites()).Favorites)
            {
                if (fav == null)
                {
                    continue;
                }

                FavoriteItem item = new FavoriteItem(fav);
                if (fav.Image != null)
                {
                    imageList1.Images.Add(fav.Image);
                    item.ImageIndex = imageList1.Images.Count - 1;
                }

                lstFavorites.Items.Add(item);
            }
        }
Esempio n. 22
0
 public override string ToString()
 {
     return(LocalizedResources.GetResString("Tools." + ChartType.ToString(), Name));
 }
Esempio n. 23
0
 public override string ToString()
 {
     return(LocalizedResources.GetResString("String.Choose", "Choose"));
 }
Esempio n. 24
0
 public override string ToString()
 {
     return(LocalizedResources.GetResString("String.UserDefined", "User Defined"));
 }