//==== Instantiates and Injects the Arable Module into the Main workspace
 public void OnModule1Click(object sender, EventArgs e)
 {
     if (!View.MainShellForm.InitialisedWorkspaces.Contains(ShConstants.WorkspaceArable))
     {
         var newArableWorkspace = new ArableWorkspace();
         ControlInjector.InjectIntoZone(newArableWorkspace, View.MainShellForm.MainZone);
         View.MainShellForm.InitialisedWorkspaces.Add(ShConstants.WorkspaceArable);
         View.MainShellForm.Modules.Add(newArableWorkspace);
     }
 }
Exemple #2
0
        public void OnCropRotationClick(object sender, EventArgs e)
        {
            //if (View.CurrentWorkspace.CurrentDefineView == null)
            //{
            //    var newDefineView = new ArableDefineFieldView.ArableDefineFieldView();
            //    View.CurrentWorkspace.CurrentDefineView = newDefineView;
            //}
            //ControlInjector.InjectIntoZone(View.CurrentWorkspace.CurrentDefineView, View.CurrentWorkspace.ArableMainZone);
            var ctrl = new System.Windows.Forms.UserControl();

            ControlInjector.InjectIntoZone(ctrl, View.CurrentWorkspace.ArableMainZone);
        }
Exemple #3
0
        public void OnDefineFieldClick(object sender, EventArgs e)
        {
            if (View.CurrentWorkspace.CurrentDefineView == null)
            {
                var newDefineView = new ArableDefineFieldView.ArableDefineFieldView();
                View.CurrentWorkspace.CurrentDefineView = newDefineView;
            }
            ControlInjector.InjectIntoZone(View.CurrentWorkspace.CurrentDefineView, View.CurrentWorkspace.ArableMainZone);

            View.CurrentWorkspace.CurrentMapView.IsCreateMode     = true;
            View.CurrentWorkspace.CurrentMapView.CreateIsNewField = true;
        }
Exemple #4
0
        public ArableWorkspace()
        {
            InitializeComponent();
            ArableRibbonZone = pnlArableRibbon;
            ArableMainZone   = pnlArableMain;
            ArableMapZone    = pnlArableMap;

            //--- Instantiate the Ribbon
            CurrentArableRibbon = new ArableRibbonView.ArableRibbonView(this);
            ControlInjector.InjectIntoZone((UserControl)CurrentArableRibbon, ArableRibbonZone);

            //--- Instantiate the Map View
            CurrentMapView = new ArableMapView.ArableMapView(this);
            ControlInjector.InjectIntoZone((UserControl)CurrentMapView, ArableMapZone);
        }
Exemple #5
0
        /// <summary>
        /// Initial Startup of the ShellForm should Inject the Main RibbonBar and Tiles,
        /// and apply the associated colours, styles and labels to them as defined in the ShConstants
        /// class
        /// </summary>
        /// <remarks
        /// Author  : Stephen Brown
        /// Date    : 30/07/2019
        /// </remarks>
        public void OnStartup()
        {
            MainRibbonBar = new ShellRibbonView(this);
            ControlInjector.InjectIntoZone((UserControl)MainRibbonBar, RibbonZone);

            MainRibbonBar.Module1Tile.Style = ShConstants._modColour1;
            MainRibbonBar.Module2Tile.Style = ShConstants._modColour2;
            MainRibbonBar.Module3Tile.Style = ShConstants._modColour3;
            MainRibbonBar.Module4Tile.Style = ShConstants._modColour4;

            MainRibbonBar.Module1Tile.Text = ShConstants._module1Name;
            MainRibbonBar.Module2Tile.Text = ShConstants._module2Name;
            MainRibbonBar.Module3Tile.Text = ShConstants._module3Name;
            MainRibbonBar.Module4Tile.Text = ShConstants._module4Name;

            InitialisedWorkspaces = new List <string>();
            Modules = new List <UserControl>();
        }