public BathymetryControl_MainPattern(DataGridViewControl DataSourseControl, Point Location,Control ParentControlled,DockStyle Style)
 {
     _Init(DataSourseControl, Location,ParentControlled,Style);
 }
 public BathymetryControl_MainPattern(DataGridViewControl DataSourseControl,Control ParentControlled)
 {
     _Init(DataSourseControl, new Point(100, 150), ParentControlled, DockStyle.None);
 }
 private void _Init(DataGridViewControl DataSourseControl, Control ParentControlled, DockStyle Style)
 {
     try
     {
         _parentcontroller = ParentControlled;
         this.Parent = ParentControlled;
         this.Dock = Style;
         GridSpacing = 30;
         MainPattern = new BathymetryControl_MainPattern(DataSourseControl, this);
         MainPattern.DataSourse.Cms.ItemClicked += new ToolStripItemClickedEventHandler(_Cms_ItemClicked);
     }
     catch (System.Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
 public BathymetryControl(DataGridViewControl DataSourseControl, Control ParentControlled, DockStyle Style)
 {
     _Init(DataSourseControl, ParentControlled, Style);
 }
        private void _Init(DataGridViewControl DataSourseControl, Point Location, Control ParentControlled, DockStyle Style)
        {
            try
            {

            DataSourse = DataSourseControl;
            PanelWidth = DataSourse.Ncols ;
            PanelHeight = DataSourse.Nrows ;
            this.Location = Location;
            this.Parent = ParentControlled;
            this.Dock = Style;

            #region Format Elevation Color

            ElevationColor[0] = _ConvertToColor("#ff0000");
            ElevationColor[1] = _ConvertToColor("#ed5c09");
            ElevationColor[2] = _ConvertToColor("#ffa40f");
            ElevationColor[3] = _ConvertToColor("#f7ff0f");
            ElevationColor[4] = _ConvertToColor("#b1f902");
            ElevationColor[5] = _ConvertToColor("#59fc0d");
            ElevationColor[6] = _ConvertToColor("#1bef0f");
            ElevationColor[7] = _ConvertToColor("#07df3e");
            ElevationColor[8] = _ConvertToColor("#12ba7d");
            ElevationColor[9] = _ConvertToColor("#0aa4a2");
            ElevationColor[10] = _ConvertToColor("#0371bc");
            ElevationColor[11] = _ConvertToColor("#003cd8");
            ElevationColor[12] = _ConvertToColor("#0101f7");
            ElevationColor[13] = _ConvertToColor("#2d00d3");
            ElevationColor[14] = _ConvertToColor("#5800aa");
            ElevationColor[15] = _ConvertToColor("#85007f");

            #endregion

            this.MouseMove += new MouseEventHandler(_BathymetryControl_MainPattern_MouseMove);
            this.MouseDown += new MouseEventHandler(_BathymetryControl_MainPattern_MouseDown);
            this.MouseUp += new MouseEventHandler(_BathymetryControl_MainPattern_MouseUp);

               /* timer11 = new Timer();
            this.timer11.Tick += new EventHandler(timer11_Tick);
            this.timer11.Interval = 500;
            this.timer11.Start();*/

            }
            catch (System.Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Пример #6
0
 public Form1()
 {
     InitializeComponent();
     _rightTable = new DataGridViewControl(this.panel1, DockStyle.Fill);
     aa = new BathymetryControl(_rightTable, this.panel2, DockStyle.Fill);
 }