Beispiel #1
0
        private void HeadrItemPropertyChanged(RootItem item, PropertyChangedEventArgs e)
        {
            var guiItem = GetItem(item.Key);

            switch (e.PropertyName)
            {
            case "Caption":
                guiItem.Text = item.Caption;
                break;

            case "Visible":
                guiItem.Visible = item.Visible;
                break;

            case "GroupCaption":
                break;

            case "RootKey":
                // note, this case will also be selected in the case that we set the Root key in our code.
                break;

            default:
                throw new NotSupportedException("This Header Control implementation doesn't have an implemenation for or has banned modifying that property.");
            }
        }
Beispiel #2
0
 private void AddMenuItems()
 {
     RootItem tabb = new RootItem() { Key = Properties.Resources.ToolsMenuKey, SortOrder = -1, Caption = "Tools" };
     App.HeaderControl.Add(tabb);
     App.HeaderControl.Add(new SimpleActionItem(Properties.Resources.ToolsMenuKey, "Import Data", ReadExcelFile_Click) { });
     //App.HeaderControl.Add(new SimpleActionItem(Properties.Resources.ToolsMenuKey, "View Raster Data", ViewRaterData_Click) { });
 }
Beispiel #3
0
        private void AddMenuItems(IHeaderControl header)
        {
            RootItem tabb = new RootItem() { Key = "ReportKey", SortOrder = -1, Caption = "Report" };
            header.Add(tabb);

            header.Add(new SimpleActionItem("ReportKey", "Settings", Settings_Click) { });
        }
Beispiel #4
0
        private void AddMenuItems()
        {
            RootItem tabb = new RootItem() { Key = "kTools", SortOrder = -1, Caption = "Tools" };
            App.HeaderControl.Add(tabb);

            App.HeaderControl.Add(new SimpleActionItem("kTools", "Import (X,Y,Z)", ImportXYZData_Click) { });

            App.HeaderControl.Add(new SimpleActionItem("kTools", "Preferences", Preferences_Click) { });
            
        }
        private ToolStripDropDownButton CreateToolStripDropDownButton(RootItem item)
        {
            ToolStripDropDownButton menu = new ToolStripDropDownButton(item.Caption);

            menu.Name = item.Key;
            menu.ShowDropDownArrow = false;
            menu.Visible           = false;
            menu.MergeIndex        = item.SortOrder;
            this._MenuStrip.Items.Add(menu);
            return(menu);
        }
Beispiel #6
0
        private void AddMenuItems()
        {
            string HomeMenuKey = HeaderControl.HomeRootItemKey;

            RootItem tabb = new RootItem() { Key = Properties.Resources.MenuKey, SortOrder = -1, Caption = "Interpolation" };
            App.HeaderControl.Add(tabb);
            App.HeaderControl.Add(new SimpleActionItem(Properties.Resources.MenuKey, Properties.Resources.KrigingText, Kriging_Click) { });

            App.HeaderControl.Add(new SimpleActionItem(HomeMenuKey, "Save", SaveInterpolation_Click) { Key = "Save", GroupCaption = "Save", ToolTipText = "Save", SmallImage = Properties.Resources.save_16X16, LargeImage = Properties.Resources.save_32X32, ToggleGroupKey = "Map_Tools_Group" });

            Classes.KrigingTemp.Fields = new List<Classes.KrigingInputField>();
        }
        private void AddMenuItems(IHeaderControl header)
        {
            string HomeMenuKey = HeaderControl.HomeRootItemKey;

            RootItem tabb = new RootItem() { Key = Properties.Resources.RootMenuKey, SortOrder = -4, Caption = Properties.Resources.RootMenu };
            header.Add(tabb);
            header.Add(new SimpleActionItem(Properties.Resources.RootMenuKey, Properties.Resources.ManageCustomers, ManageCustomer_Click) { });
            header.Add(new SimpleActionItem(Properties.Resources.RootMenuKey, Properties.Resources.ManageCustomerFarm, ManageCustomerFarm_Click) { });
            header.Add(new SimpleActionItem(Properties.Resources.RootMenuKey, Properties.Resources.CustomerInterpolation, ManageInterpolation_Click) { });

           // header.Add(new SimpleActionItem(HomeMenuKey, "Save", SaveInterpolation_Click) { Key = "Save", GroupCaption = "Save", ToolTipText = "Save", SmallImage = Properties.Resources.save_16X16, LargeImage = Properties.Resources.save_32X32, ToggleGroupKey = "Map_Tools_Group" });
            header.Add(new SimpleActionItem(HomeMenuKey, "DeleteFeature", DeleteFeature_Click_) { GroupCaption = "Map Tool", ToolTipText = "Remove Feature", SmallImage = Properties.Resources.delete, LargeImage = Properties.Resources.delete, ToggleGroupKey = "Map Tool" });
        }
Beispiel #8
0
        private ToolStripDropDownButton CreateToolStripDropDownButton(RootItem item)
        {
            var menu = new ToolStripDropDownButton(item.Caption)
            {
                Name = item.Key,
                ShowDropDownArrow = false,
                Visible           = false,
                MergeIndex        = item.SortOrder
            };

            _menuStrip.Items.Add(menu);
            return(menu);
        }
 public override void Add(RootItem item)
 {
     MenuItem submenu = null;
     if (!this.mainmenu.MenuItems.ContainsKey(item.Key))
     {
         submenu = new MenuItem();
         submenu.Name = item.Key;
         submenu.Visible = item.Visible;
         submenu.Text = item.Caption;
         submenu.MergeOrder = item.SortOrder;
         item.PropertyChanged += new PropertyChangedEventHandler(RootItem_PropertyChanged);
         mainmenu.MenuItems.Add(submenu);
     }
 }
        /// <summary>
        /// Adds the specified root item.
        /// </summary>
        /// <param name="item">
        /// The root item.
        /// </param>
        /// <remarks>
        /// </remarks>
        public override void Add(RootItem item)
        {
            // The root may have already been created.
            var root = this._MenuStrip.Items[item.Key] as ToolStripDropDownButton;
            if (root == null)
            {
                // if not we need to create it.
                CreateToolStripDropDownButton(item);
            }
            else
            {
                // We have already created the RootItem in anticipation of it being needed. (As it was specified by some HeaderItem already)
                // Update the caption and sort order of the root.
                root.Text = item.Caption;
                root.MergeIndex = item.SortOrder;
            }

            RefreshRootItemOrder();
        }
        /// <summary>
        /// Adds the specified root item.
        /// </summary>
        /// <param name="item">
        /// The root item.
        /// </param>
        /// <remarks>
        /// </remarks>
        public override void Add(RootItem item)
        {
            // The root may have already been created.
            var root = this._MenuStrip.Items[item.Key] as ToolStripDropDownButton;

            if (root == null)
            {
                // if not we need to create it.
                CreateToolStripDropDownButton(item);
            }
            else
            {
                // We have already created the RootItem in anticipation of it being needed. (As it was specified by some HeaderItem already)
                // Update the caption and sort order of the root.
                root.Text       = item.Caption;
                root.MergeIndex = item.SortOrder;
            }

            RefreshRootItemOrder();
        }
Beispiel #12
0
 /// <summary>
 /// Adds the specified root item.
 /// </summary>
 /// <param name="item">The root item.</param>
 /// <remarks>The RootItem should not be visible until it contains other items.</remarks>
 public abstract void Add(RootItem item);
Beispiel #13
0
        //add a datasheet plugin root item
        public void AddRibbon(string sender)
        {
            rootDatasheetTab = new RootItem(strPanelKey, strPanelCaption);
            rootDatasheetTab.SortOrder = (short)pluginType;
            App.HeaderControl.Add(rootDatasheetTab);

            //tell ProjMngr if this is being Shown
            if (sender == "Show")
            {
                //make this the selected root
                App.HeaderControl.SelectRoot(strPanelKey);
            }

            //add sub-ribbons
            const string tGroupCaption = "Add";

            btnImport = new SimpleActionItem(strPanelKey, "Import Data", btnImport_Click);
            btnImport.LargeImage = Properties.Resources.Import;
            btnImport.GroupCaption = tGroupCaption;
            btnImport.Enabled = true;
            App.HeaderControl.Add(btnImport);

            //section for validating
            const string grpValidate = "Validate";

            btnValidate = new SimpleActionItem(strPanelKey, "Validate Data", btnValidate_Click);
            btnValidate.LargeImage = Properties.Resources.Validate;
            btnValidate.GroupCaption = grpValidate;
            btnValidate.Enabled = false;
            App.HeaderControl.Add(btnValidate);

            //section for working with data
            const string grpManipulate = "Work with Data";

            btnComputeAO = new SimpleActionItem(strPanelKey, "Compute A O", _frmDatasheet.btnComputeAO_Click);
            btnComputeAO.LargeImage = Properties.Resources.Compute;
            btnComputeAO.GroupCaption = grpManipulate;
            btnComputeAO.Enabled = false;
            App.HeaderControl.Add(btnComputeAO);

            btnManipulate = new SimpleActionItem(strPanelKey, "Manipulate", _frmDatasheet.btnManipulate_Click);
            btnManipulate.LargeImage = Properties.Resources.Manipulate;
            btnManipulate.GroupCaption = grpManipulate;
            btnManipulate.Enabled = false;
            App.HeaderControl.Add(btnManipulate);

            btnTransform = new SimpleActionItem(strPanelKey, "Transform", _frmDatasheet.btnTransform_Click);
            btnTransform.LargeImage = Properties.Resources.Transform;
            btnTransform.GroupCaption = grpManipulate;
            btnTransform.Enabled = false;
            App.HeaderControl.Add(btnTransform);

            btnGoToModeling = new SimpleActionItem(strPanelKey, "Go To Model", btnGoToModeling_Click);
            btnGoToModeling.LargeImage = Properties.Resources.GoToModeling;
            btnGoToModeling.GroupCaption = grpManipulate;
            btnGoToModeling.Enabled = false;
            App.HeaderControl.Add(btnGoToModeling);
        }
 private ToolStripDropDownButton CreateToolStripDropDownButton(RootItem item)
 {
     var menu = new ToolStripDropDownButton(item.Caption)
     {
         Name = item.Key,
         ShowDropDownArrow = false,
         Visible = false,
         MergeIndex = item.SortOrder
     };
     _menuStrip.Items.Add(menu);
     return menu;
 }
 public override void Add(RootItem item)
 {
     if (!mainmenu.MenuItems.ContainsKey(item.Key))
     {
         var submenu = new MenuItem
         {
             Name = item.Key,
             Visible = item.Visible,
             Text = item.Caption,
             MergeOrder = item.SortOrder
         };
         item.PropertyChanged += RootItem_PropertyChanged;
         mainmenu.MenuItems.Add(submenu);
     }
     else
     {
         var root = mainmenu.MenuItems.Find(item.Key, true)[0];
         root.Text = item.Caption;
         root.MergeOrder = item.SortOrder;
     }
 }
Beispiel #16
0
        //add a datasheet plugin root item
        public void AddRibbon(string sender)
        {
            rootIPyPredictionTab = new RootItem(strPanelKey, strPanelCaption);
            rootIPyPredictionTab.SortOrder = (short)pluginType;
            App.HeaderControl.Add(rootIPyPredictionTab);

            //tell ProjMngr if this is being Shown
            if (sender == "Show")
            {
                //make this the selected root
                App.HeaderControl.SelectRoot(strPanelKey);
            }

            //add sub-ribbons
            const string rGroupCaption = "Predict";

            btnImportIV = new SimpleActionItem(strPanelKey, "Import IVs", btnImportIV_Click);
            btnImportIV.LargeImage = Properties.Resources.ImportIV;
            btnImportIV.GroupCaption = rGroupCaption;
            btnImportIV.Enabled = true;
            App.HeaderControl.Add(btnImportIV);

            btnImportOB = new SimpleActionItem(strPanelKey, "Import OBs", btnImportOB_Click);
            btnImportOB.LargeImage = Properties.Resources.ImportOB;
            btnImportOB.GroupCaption = rGroupCaption;
            btnImportOB.Enabled = true;
            App.HeaderControl.Add(btnImportOB);

            btnIVDataVal = new SimpleActionItem(strPanelKey, "IV Data Validation", btnIVDataVal_Click);
            btnIVDataVal.LargeImage = Properties.Resources.IVDataVal;
            btnIVDataVal.GroupCaption = rGroupCaption;
            btnIVDataVal.Enabled = false;
            App.HeaderControl.Add(btnIVDataVal);

            btnMakePred = new SimpleActionItem(strPanelKey, "Make Predicitons", btnMakePrediction_Click);
            btnMakePred.LargeImage = Properties.Resources.MakePrediction;
            btnMakePred.GroupCaption = rGroupCaption;
            btnMakePred.Enabled = false;
            App.HeaderControl.Add(btnMakePred);

            //extra
            const string sGroupCaption = "Manipulate";

            btnPlot = new SimpleActionItem(strPanelKey, "Plot", btnPlot_Ck);
            btnPlot.LargeImage = Properties.Resources.Plot;
            btnPlot.GroupCaption = sGroupCaption;
            btnPlot.Enabled = true;
            App.HeaderControl.Add(btnPlot);

            btnClear = new SimpleActionItem(strPanelKey, "Clear", btnClearTable_Ck);
            btnClear.LargeImage = Properties.Resources.Clear;
            btnClear.GroupCaption = sGroupCaption;
            btnClear.Enabled = true;
            App.HeaderControl.Add(btnClear);

            btnExportCSV = new SimpleActionItem(strPanelKey, "Export As CSV", btnExportTable_Ck);
            btnExportCSV.LargeImage = Properties.Resources.ExportAsCSV;
            btnExportCSV.GroupCaption = sGroupCaption;
            btnExportCSV.Enabled = true;
            App.HeaderControl.Add(btnExportCSV);
        }
Beispiel #17
0
        //add a datasheet plugin root item
        public void AddRibbon(string sender)
        {
            locationTab = new RootItem(strPanelKey, strPanelCaption);
            locationTab.SortOrder = (short)pluginType;
            App.HeaderControl.Add(locationTab);

            //tell ProjMngr if this is being Shown
            if (sender == "Show")
            {
                //make this the selected root
                App.HeaderControl.SelectRoot(strPanelKey);
            }

            //section for working with data
            const string grpManipulate = "Waste time and space";

            btnNull = new SimpleActionItem(strPanelKey, "Do nothing!", btnNull_Click);
            btnNull.LargeImage = Properties.Resources.USGS;
            btnNull.GroupCaption = grpManipulate;
            btnNull.Enabled = false;
            App.HeaderControl.Add(btnNull);

            //var validateBtn = new SimpleActionItem("Validate", btnValidate_Click) { RootKey = kVBLocation, ToolTipText = "Validate Data", LargeImage = Properties.Resources.validate };
            //App.HeaderControl.Add(validateBtn);

            //var computeBtn = new SimpleActionItem("Compute", btnCompute_Click) { RootKey = kVBLocation, ToolTipText = "Compute" };
            //App.HeaderControl.Add(computeBtn);

            //var manipulateBtn = new SimpleActionItem("Manipulate", btnManipulate_Click) { RootKey = kVBLocation, ToolTipText = "Manipulate", LargeImage = Properties.Resources.manipulate };
            //App.HeaderControl.Add(manipulateBtn);

            //var transformBtn = new SimpleActionItem("Transform", btnTransform_Click) { RootKey = kVBLocation, ToolTipText = "Transform", LargeImage = Properties.Resources.transform };
            //App.HeaderControl.Add(transformBtn);
        }
Beispiel #18
0
 /// <summary>
 /// Adds the specified root item.
 /// </summary>
 /// <param name="item">The root item.</param>
 /// <remarks>The RootItem should not be visible until it contains other items.</remarks>
 /// <returns>The added item.</returns>
 public abstract object Add(RootItem item);
Beispiel #19
0
 /// <summary>
 /// Adds the specified root item.
 /// </summary>
 /// <param name="item">The root item.</param>
 /// <remarks>The RootItem should not be visible until it contains other items.</remarks>
 public abstract void Add(RootItem item);
 private ToolStripDropDownButton CreateToolStripDropDownButton(RootItem item)
 {
     ToolStripDropDownButton menu = new ToolStripDropDownButton(item.Caption);
     menu.Name = item.Key;
     menu.ShowDropDownArrow = false;
     menu.Visible = false;
     menu.MergeIndex = item.SortOrder;
     this._MenuStrip.Items.Add(menu);
     return menu;
 }
Beispiel #21
0
        //add a datasheet plugin root item
        public void AddRibbon(string sender)
        {
            rootHeaderItem = new RootItem(strPanelKey, strPanelCaption);
            rootHeaderItem.SortOrder = (short)pluginType;
            App.HeaderControl.Add(rootHeaderItem);

            //tell ProjMngr if this is being Shown
            if (sender == "Show")
            {
                //make this the selected root
                App.HeaderControl.SelectRoot(strPanelKey);
            }

            //add sub-ribbon
            string rGroupCaption = strPanelCaption;

            btnRun = new SimpleActionItem(strPanelKey, "Run", btnRun_Click);
            btnRun.LargeImage = Properties.Resources.Run;
            btnRun.GroupCaption = rGroupCaption;
            btnRun.Enabled = true;
            App.HeaderControl.Add(btnRun);

            btnCancel = new SimpleActionItem(strPanelKey, "Cancel", btnCancel_Click);
            btnCancel.LargeImage = Properties.Resources.Cancel;
            btnCancel.GroupCaption = rGroupCaption;
            btnCancel.Enabled = false;
            App.HeaderControl.Add(btnCancel);
        }