예제 #1
0
        /// <summary>
        /// 在指定控件右下角显示提示窗体
        /// </summary>
        /// <param name="control">控件,当控件为null指屏幕右下角</param>
        /// <param name="captiontext">主标题(窗体)</param>
        /// <param name="text">提示文字</param>
        public static void ShowTips(System.Windows.Forms.Control control, string captiontext, string text)
        {
            DevComponents.DotNetBar.Balloon balloon = new DevComponents.DotNetBar.Balloon();
            balloon.ShowInTaskbar  = false;
            balloon.Style          = eBallonStyle.Alert;
            balloon.CaptionText    = captiontext;
            balloon.Text           = text;
            balloon.AlertAnimation = eAlertAnimation.BottomToTop;
            balloon.AutoResize();
            balloon.AutoClose        = true;
            balloon.AutoCloseTimeOut = 50;
            balloon.TopLevel         = true;
            //balloon.Owner = FrmMain.Instance;
            Rectangle rect;

            if (control == null || control.IsDisposed)
            {
                rect = Screen.PrimaryScreen.WorkingArea;
            }
            else
            {
                rect = Screen.GetWorkingArea(control);
            }
            balloon.Location = new System.Drawing.Point(rect.Right - balloon.Width, rect.Bottom - balloon.Height);
            balloon.Show(false);
        }
예제 #2
0
 private void txtID_MouseClick(object sender, MouseEventArgs e)
 {
     DevComponents.DotNetBar.Balloon b = new DevComponents.DotNetBar.Balloon();
     b.Style          = eBallonStyle.Balloon;
     b.CaptionText    = "注意事项";
     b.Text           = "请输入3位工号,例如001";
     b.AlertAnimation = eAlertAnimation.TopToBottom;
     b.AutoResize();
     b.AutoClose        = true;
     b.AutoCloseTimeOut = 2;
     b.Owner            = this;
     b.Show(txtID, false);
 }
예제 #3
0
        private void button3_Click(object sender, EventArgs e)
        {
            ToggleEndlessProgress.Execute();
            circularProgress1.IsRunning = true;
            #region GP工具的使用
            //得到参数
            IFeatureLayer layer     = GetFeatureLayer((string)comboBox1.SelectedItem); //输入点要素
            string        Zfield    = (string)comboBox2.SelectedItem;                  //Z字段
            string        outRaster = textBox2.Text;                                   //输出栅格
            object        cellSize  = textBox3.Text;                                   //输出像元大小
            double        power     = double.Parse(textBox4.Text);                     //幂
            string        searchRadius;                                                //搜索半径
            if (radioButton1.Checked)
            {
                searchRadius = "RadiusVariable(" + textBox5.Text + "," + textBox6.Text + ")";
            }
            else
            {
                searchRadius = "RadiusFixed(" + textBox5.Text + "," + textBox6.Text + ")";
            }
            //实例化GP工具
            Geoprocessor gp = new Geoprocessor();
            gp.OverwriteOutput = true;
            //设置IDW参数
            Idw idw = new Idw();
            idw.in_point_features = layer;
            idw.z_field           = Zfield;
            idw.out_raster        = outRaster;
            idw.cell_size         = cellSize;
            idw.power             = power;
            idw.search_radius     = searchRadius;
            //执行GP工具
            IGeoProcessorResult results = (IGeoProcessorResult)gp.Execute(idw, null);
            #endregion
            circularProgress1.IsRunning = false;
            #region 运行完成之后的信息提示窗口
            balloonTipFocus.Enabled = true;

            DevComponents.DotNetBar.Balloon b = new DevComponents.DotNetBar.Balloon();
            b.Style = eBallonStyle.Alert;
            //b.CaptionImage = balloonTipFocus.CaptionImage.Clone() as Image;
            b.CaptionText    = "信息提示";
            b.Text           = "运行成功!";
            b.AlertAnimation = eAlertAnimation.TopToBottom;
            b.AutoResize();
            b.AutoClose        = true;
            b.AutoCloseTimeOut = 4;
            b.Owner            = this;
            b.Show(button3, false);
            #endregion
        }
예제 #4
0
 /// <summary>
 /// 错误提示信息输出
 /// </summary>
 /// <param name="referenceControl"></param>
 /// <param name="messageInfo"></param>
 public void Message(BaseItem referenceControl, string messageInfo)
 {
     DevComponents.DotNetBar.Balloon balloon = new DevComponents.DotNetBar.Balloon();
     balloon.Style          = eBallonStyle.Office2007Alert;
     balloon.CaptionImage   = balloonTipFocus.CaptionImage.Clone() as Image;
     balloon.CaptionText    = "        警告";
     balloon.Text           = messageInfo;
     balloon.AlertAnimation = eAlertAnimation.TopToBottom;
     balloon.AutoResize();
     balloon.AutoClose        = true;
     balloon.AutoCloseTimeOut = 2;
     balloon.Owner            = this;
     balloon.Show(referenceControl, false);
 }
예제 #5
0
        private void button2_Click(object sender, EventArgs e)
        {
            ToggleEndlessProgress.Execute();
            circularProgress1.IsRunning = true;
            #region GP工具的使用
            //得到参数
            string inRaster  = textBox4.Text; //输入栅格
            string outRaster = textBox1.Text; //输出栅格
            string cellSize;                  //输出栅格的像元大小
            if (radioButton1.Checked)
            {
                cellSize = textBox2.Text;
            }
            else
            {
                cellSize = textBox3.Text;
            }
            string resamplingType = (string)comboBox2.SelectedItem;//重采样技术

            //实例化GP工具
            Geoprocessor gp = new Geoprocessor();
            gp.OverwriteOutput = true;
            //设置重采样参数
            Resample resample = new Resample();
            resample.in_raster       = inRaster;
            resample.out_raster      = outRaster;
            resample.cell_size       = cellSize;
            resample.resampling_type = resamplingType;
            //执行GP工具
            IGeoProcessorResult results = (IGeoProcessorResult)gp.Execute(resample, null);
            #endregion
            circularProgress1.IsRunning = false;
            #region 运行完成之后的信息提示窗口
            balloonTipFocus.Enabled = true;

            DevComponents.DotNetBar.Balloon b = new DevComponents.DotNetBar.Balloon();
            b.Style = eBallonStyle.Alert;
            //b.CaptionImage = balloonTipFocus.CaptionImage.Clone() as Image;
            b.CaptionText    = "信息提示";
            b.Text           = "运行成功!";
            b.AlertAnimation = eAlertAnimation.TopToBottom;
            b.AutoResize();
            b.AutoClose        = true;
            b.AutoCloseTimeOut = 4;
            b.Owner            = this;
            b.Show(button2, false);
            #endregion
        }
예제 #6
0
        private void button3_Click(object sender, EventArgs e)
        {
            ToggleEndlessProgress.Execute();
            circularProgress1.IsRunning = true;
            #region GP工具的使用
            //得到参数
            IRasterLayer layer       = GetRasterLayer((string)comboBox1.SelectedItem);
            string       field       = (string)comboBox2.SelectedItem;
            string       out_polygon = textBox1.Text;
            string       simplify;
            if (radioButton1.Checked)
            {
                simplify = radioButton1.Text;
            }
            else
            {
                simplify = radioButton2.Text;
            }
            //实例化GP工具
            Geoprocessor gp = new Geoprocessor();
            gp.OverwriteOutput = true;
            //设置矢量转栅格参数
            RasterToPolygon rastertopolygon = new RasterToPolygon();
            rastertopolygon.in_raster            = layer;
            rastertopolygon.out_polygon_features = out_polygon;
            rastertopolygon.raster_field         = field;
            rastertopolygon.simplify             = simplify;
            //执行GP工具
            IGeoProcessorResult results = (IGeoProcessorResult)gp.Execute(rastertopolygon, null);
            #endregion
            circularProgress1.IsRunning = false;
            #region 运行完成之后的信息提示窗口
            balloonTipFocus.Enabled = true;

            DevComponents.DotNetBar.Balloon b = new DevComponents.DotNetBar.Balloon();
            b.Style = eBallonStyle.Alert;
            //b.CaptionImage = balloonTipFocus.CaptionImage.Clone() as Image;
            b.CaptionText    = "信息提示";
            b.Text           = "运行成功!";
            b.AlertAnimation = eAlertAnimation.TopToBottom;
            b.AutoResize();
            b.AutoClose        = true;
            b.AutoCloseTimeOut = 4;
            b.Owner            = this;
            b.Show(button4, false);
            #endregion
        }
예제 #7
0
        private void button2_Click(object sender, System.EventArgs e)
        {
            balloonTipFocus.Enabled = true;
            balloonTipHover.Enabled = true;

            DevComponents.DotNetBar.Balloon b = new DevComponents.DotNetBar.Balloon();
            b.Style          = eBallonStyle.Alert;
            b.CaptionImage   = balloonTipFocus.CaptionImage.Clone() as Image;
            b.CaptionText    = "Balloon Status Information";
            b.Text           = "Balloons are now enabled for Balloon Tip Test area. Hover mouse over the area and set the focus to any control.";
            b.AlertAnimation = eAlertAnimation.TopToBottom;
            b.AutoResize();
            b.AutoClose        = true;
            b.AutoCloseTimeOut = 4;
            b.Owner            = this;
            b.Show(button2, false);
        }
예제 #8
0
        private void button2_Click(object sender, EventArgs e)
        {
            ToggleEndlessProgress.Execute();
            circularProgress1.IsRunning = true;
            #region GP工具的使用
            //得到参数
            IFeatureLayer layer      = GetFeatureLayer((string)comboBox1.SelectedItem); //输入点要素
            string        Zfield     = (string)comboBox2.SelectedItem;                  //Z字段
            string        outRaster  = textBox1.Text;                                   //输出栅格
            object        cellSize   = textBox2.Text;                                   //输出像元大小
            string        splineType = (string)comboBox3.SelectedItem;                  //样条函数类型
            double        weight     = double.Parse(textBox3.Text);                     //权重
            int           numPoints  = int.Parse(textBox4.Text);                        //点数

            //实例化GP工具
            Geoprocessor gp = new Geoprocessor();
            gp.OverwriteOutput = true;
            //设置Spline参数
            Spline spline = new Spline();
            spline.in_point_features = layer;
            spline.z_field           = Zfield;
            spline.out_raster        = outRaster;
            spline.cell_size         = cellSize;
            spline.spline_type       = splineType;
            spline.weight            = weight;
            spline.number_points     = numPoints;
            //执行GP工具
            IGeoProcessorResult results = (IGeoProcessorResult)gp.Execute(spline, null);
            #endregion
            circularProgress1.IsRunning = false;
            #region 运行完成之后的信息提示窗口
            balloonTipFocus.Enabled = true;

            DevComponents.DotNetBar.Balloon b = new DevComponents.DotNetBar.Balloon();
            b.Style = eBallonStyle.Alert;
            //b.CaptionImage = balloonTipFocus.CaptionImage.Clone() as Image;
            b.CaptionText    = "信息提示";
            b.Text           = "运行成功!";
            b.AlertAnimation = eAlertAnimation.TopToBottom;
            b.AutoResize();
            b.AutoClose        = true;
            b.AutoCloseTimeOut = 4;
            b.Owner            = this;
            b.Show(button2, false);
            #endregion
        }
예제 #9
0
        public void ShowBalloon(string CaptionText, string Text)
        {
            DevComponents.DotNetBar.Balloon b = new DevComponents.DotNetBar.Balloon();
            Rectangle r = Screen.GetWorkingArea(this);
            b.Size = new Size(280, 120);
            b.Location = new Point(r.Right - b.Width, r.Bottom - b.Height);
            b.AlertAnimation = eAlertAnimation.BottomToTop;
            b.Style = eBallonStyle.Office2007Alert;
            b.CaptionText = CaptionText;
            b.Font = new Font("宋体", 11f);
            //b.Padding = new System.Windows.Forms.Padding(5);
            b.Text = Text;
            //b.AlertAnimation=eAlertAnimation.TopToBottom;
            //b.AutoResize();
            b.AutoClose = true;
            b.AutoCloseTimeOut = 3;
            //b.Owner=this;

            b.Show(false);
        }
예제 #10
0
        public void ShowBalloon(string CaptionText, string Text)
        {
            DevComponents.DotNetBar.Balloon b = new DevComponents.DotNetBar.Balloon();
            Rectangle r = Screen.GetWorkingArea(this);

            b.Size           = new Size(280, 120);
            b.Location       = new Point(r.Right - b.Width, r.Bottom - b.Height);
            b.AlertAnimation = eAlertAnimation.BottomToTop;
            b.Style          = eBallonStyle.Office2007Alert;
            //b.CaptionImage = balloonTipFocus.CaptionImage.Clone() as Image;
            b.CaptionText = CaptionText;
            b.Text        = Text;
            //b.AlertAnimation=eAlertAnimation.TopToBottom;
            //b.AutoResize();
            b.AutoClose        = true;
            b.AutoCloseTimeOut = 3;
            //b.Owner=this;

            b.Show(false);
        }
예제 #11
0
 private void bSound_Click(object sender, EventArgs e)
 {
     if (string.IsNullOrEmpty(txtSound.Text))
     {
         DevComponents.DotNetBar.Balloon b = new DevComponents.DotNetBar.Balloon();
         b.Style          = eBallonStyle.Balloon;
         b.CaptionText    = "注意事项";
         b.Text           = "请先选取声音文件!";
         b.AlertAnimation = eAlertAnimation.TopToBottom;
         b.AutoResize();
         b.AutoClose        = true;
         b.AutoCloseTimeOut = 2;
         b.Owner            = this;
         b.Show(bSound, false);
     }
     else
     {
         SoundPlayer sndPlayer = new System.Media.SoundPlayer(Application.StartupPath + @"\sound\" + txtSound.Text + "");
         sndPlayer.Play();
     }
 }
예제 #12
0
        /// <summary>
        /// 确定BUTTON事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button2_Click(object sender, EventArgs e)
        {
            ToggleEndlessProgress.Execute();
            circularProgress1.IsRunning = true;
            #region GP工具的使用
            //得到参数
            IFeatureLayer layer      = GetFeatureLayer((string)comboBox1.SelectedItem);
            string        field      = (string)comboBox2.SelectedItem;
            string        out_raster = textBox1.Text;
            object        cellSize   = textBox2.Text;
            //实例化GP工具
            Geoprocessor gp = new Geoprocessor();
            gp.OverwriteOutput = true;
            //设置矢量转栅格参数
            FeatureToRaster featuretoraster = new FeatureToRaster();
            featuretoraster.in_features = layer;
            featuretoraster.field       = field;
            featuretoraster.cell_size   = cellSize;
            featuretoraster.out_raster  = out_raster;
            //执行GP工具
            IGeoProcessorResult results = (IGeoProcessorResult)gp.Execute(featuretoraster, null);
            #endregion
            circularProgress1.IsRunning = false;
            #region 运行完成之后的信息提示窗口
            balloonTipFocus.Enabled = true;

            DevComponents.DotNetBar.Balloon b = new DevComponents.DotNetBar.Balloon();
            b.Style = eBallonStyle.Alert;
            //b.CaptionImage = balloonTipFocus.CaptionImage.Clone() as Image;
            b.CaptionText    = "信息提示";
            b.Text           = "运行成功!";
            b.AlertAnimation = eAlertAnimation.TopToBottom;
            b.AutoResize();
            b.AutoClose        = true;
            b.AutoCloseTimeOut = 4;
            b.Owner            = this;
            b.Show(button2, false);
            #endregion
        }
예제 #13
0
        private void button3_Click(object sender, EventArgs e)
        {
            ToggleEndlessProgress.Execute();
            circularProgress1.IsRunning = true;
            #region GP工具的使用
            //得到参数
            IRasterLayer layer      = GetRasterLayer((string)comboBox1.SelectedItem);
            string       out_raster = textBox1.Text;
            //实例化GP工具
            Geoprocessor gp = new Geoprocessor();
            gp.OverwriteOutput = true;
            //设置栅格投影转换参数
            ProjectRaster PR = new ProjectRaster();
            PR.in_raster  = layer;
            PR.out_raster = out_raster;

            IEnvelope tempRaster = GetRasterLayer((string)comboBox2.SelectedItem).VisibleExtent;
            PR.out_coor_system = tempRaster.SpatialReference;

            //执行GP工具
            IGeoProcessorResult results = (IGeoProcessorResult)gp.Execute(PR, null);
            #endregion
            #region 运行完成之后的信息提示窗口
            balloonTipFocus.Enabled = true;

            DevComponents.DotNetBar.Balloon b = new DevComponents.DotNetBar.Balloon();
            b.Style = eBallonStyle.Alert;
            //b.CaptionImage = balloonTipFocus.CaptionImage.Clone() as Image;
            b.CaptionText    = "信息提示";
            b.Text           = "运行成功!";
            b.AlertAnimation = eAlertAnimation.TopToBottom;
            b.AutoResize();
            b.AutoClose        = true;
            b.AutoCloseTimeOut = 4;
            b.Owner            = this;
            b.Show(button3, false);
            #endregion
        }
예제 #14
0
        private void button5_Click(object sender, EventArgs e)
        {
            ToggleEndlessProgress.Execute();
            circularProgress1.IsRunning = true;
            #region GP工具的使用
            //得到参数
            IFeatureLayer layer       = GetFeatureLayer((string)comboBox3.SelectedItem);
            string        out_feature = textBox2.Text;
            //实例化GP工具
            Geoprocessor gp = new Geoprocessor();
            gp.OverwriteOutput = true;
            //设置矢量投影转换参数
            Project pro = new Project();
            pro.in_dataset  = layer;
            pro.out_dataset = out_feature;
            IEnvelope tempfeature = GetFeatureLayer((string)comboBox4.SelectedItem).AreaOfInterest;
            pro.out_coor_system = tempfeature.SpatialReference;
            //执行GP工具
            IGeoProcessorResult results = (IGeoProcessorResult)gp.Execute(pro, null);
            #endregion
            #region 运行完成之后的信息提示窗口
            balloonTipFocus.Enabled = true;

            DevComponents.DotNetBar.Balloon b = new DevComponents.DotNetBar.Balloon();
            b.Style = eBallonStyle.Alert;
            //b.CaptionImage = balloonTipFocus.CaptionImage.Clone() as Image;
            b.CaptionText    = "信息提示";
            b.Text           = "运行成功!";
            b.AlertAnimation = eAlertAnimation.TopToBottom;
            b.AutoResize();
            b.AutoClose        = true;
            b.AutoCloseTimeOut = 4;
            b.Owner            = this;
            b.Show(button5, false);
            #endregion
        }
예제 #15
0
        private void button2_Click(object sender, EventArgs e)
        {
            ToggleEndlessProgress.Execute();
            circularProgress1.IsRunning = true;
            #region GP工具的使用
            //得到参数
            string inRaster = textBox4.Text;//输入栅格
            string outRaster = textBox1.Text;//输出栅格
            string cellSize;//输出栅格的像元大小
            if (radioButton1.Checked)
                cellSize = textBox2.Text;
            else
                cellSize = textBox3.Text;
            string resamplingType = (string)comboBox2.SelectedItem;//重采样技术

            //实例化GP工具
            Geoprocessor gp = new Geoprocessor();
            gp.OverwriteOutput = true;
            //设置重采样参数
            Resample resample = new Resample();
            resample.in_raster = inRaster;
            resample.out_raster = outRaster;
            resample.cell_size = cellSize;
            resample.resampling_type = resamplingType;
            //执行GP工具
            IGeoProcessorResult results = (IGeoProcessorResult)gp.Execute(resample, null);
            #endregion
            circularProgress1.IsRunning = false;
            #region 运行完成之后的信息提示窗口
            balloonTipFocus.Enabled = true;

            DevComponents.DotNetBar.Balloon b = new DevComponents.DotNetBar.Balloon();
            b.Style = eBallonStyle.Alert;
            //b.CaptionImage = balloonTipFocus.CaptionImage.Clone() as Image;
            b.CaptionText = "信息提示";
            b.Text = "运行成功!";
            b.AlertAnimation = eAlertAnimation.TopToBottom;
            b.AutoResize();
            b.AutoClose = true;
            b.AutoCloseTimeOut = 4;
            b.Owner = this;
            b.Show(button2, false);
            #endregion
        }
예제 #16
0
		/// <summary>
		/// Closes Balloon control if visible.
		/// </summary>
		public virtual void CloseBalloon()
		{
			m_BalloonTriggerControl=null;

			if(m_BalloonControl==null)
				return;

			CancelEventArgs e=new CancelEventArgs(false);
			if(BalloonClosing!=null)
				BalloonClosing(this,e);
			if(e.Cancel)
				return;

			if(m_BalloonControl.Visible)
			{
				m_BalloonControl.Hide();
			}
            
			m_BalloonControl.Close();
            m_BalloonControl.Dispose();
            m_BalloonControl=null;
		}
예제 #17
0
        private void button3_Click(object sender, EventArgs e)
        {
            ToggleEndlessProgress.Execute();
            circularProgress1.IsRunning = true;
            #region GP工具的使用
            //得到参数
            IRasterLayer layer = GetRasterLayer((string)comboBox1.SelectedItem);
            string out_raster = textBox1.Text;
            //实例化GP工具
            Geoprocessor gp = new Geoprocessor();
            gp.OverwriteOutput = true;
            //设置栅格投影转换参数
            ProjectRaster PR = new ProjectRaster();
            PR.in_raster = layer;
            PR.out_raster = out_raster;

            IEnvelope tempRaster = GetRasterLayer((string)comboBox2.SelectedItem).VisibleExtent;
            PR.out_coor_system = tempRaster.SpatialReference;

            //执行GP工具
            IGeoProcessorResult results = (IGeoProcessorResult)gp.Execute(PR, null);
            #endregion
            #region 运行完成之后的信息提示窗口
            balloonTipFocus.Enabled = true;

            DevComponents.DotNetBar.Balloon b = new DevComponents.DotNetBar.Balloon();
            b.Style = eBallonStyle.Alert;
            //b.CaptionImage = balloonTipFocus.CaptionImage.Clone() as Image;
            b.CaptionText = "信息提示";
            b.Text = "运行成功!";
            b.AlertAnimation = eAlertAnimation.TopToBottom;
            b.AutoResize();
            b.AutoClose = true;
            b.AutoCloseTimeOut = 4;
            b.Owner = this;
            b.Show(button3, false);
            #endregion
        }
예제 #18
0
        private void button5_Click(object sender, EventArgs e)
        {
            ToggleEndlessProgress.Execute();
            circularProgress1.IsRunning = true;
            #region GP工具的使用
            //得到参数
            IFeatureLayer layer = GetFeatureLayer((string)comboBox3.SelectedItem);
            string out_feature = textBox2.Text;
            //实例化GP工具
            Geoprocessor gp = new Geoprocessor();
            gp.OverwriteOutput = true;
            //设置矢量投影转换参数
            Project pro = new Project();
            pro.in_dataset = layer;
            pro.out_dataset = out_feature;
            IEnvelope tempfeature = GetFeatureLayer((string)comboBox4.SelectedItem).AreaOfInterest;
            pro.out_coor_system = tempfeature.SpatialReference;
            //执行GP工具
            IGeoProcessorResult results = (IGeoProcessorResult)gp.Execute(pro, null);
            #endregion
            #region 运行完成之后的信息提示窗口
            balloonTipFocus.Enabled = true;

            DevComponents.DotNetBar.Balloon b = new DevComponents.DotNetBar.Balloon();
            b.Style = eBallonStyle.Alert;
            //b.CaptionImage = balloonTipFocus.CaptionImage.Clone() as Image;
            b.CaptionText = "信息提示";
            b.Text = "运行成功!";
            b.AlertAnimation = eAlertAnimation.TopToBottom;
            b.AutoResize();
            b.AutoClose = true;
            b.AutoCloseTimeOut = 4;
            b.Owner = this;
            b.Show(button5, false);
            #endregion
        }
예제 #19
0
파일: frmMain.cs 프로젝트: viticm/pap2
		private void CloseInfoBalloon()
		{
			if(m_InfoBalloon!=null)
			{
				m_InfoBalloon.Close();
				m_InfoBalloon.Dispose();
				m_InfoBalloon=null;
			}
		}
예제 #20
0
        private void button3_Click(object sender, EventArgs e)
        {
            ToggleEndlessProgress.Execute();
            circularProgress1.IsRunning = true;
            #region GP工具的使用
            //得到参数
            IRasterLayer layer = GetRasterLayer((string)comboBox1.SelectedItem);
            string field = (string)comboBox2.SelectedItem;
            string out_polygon = textBox1.Text;
            string simplify;
            if (radioButton1.Checked)
            {
                simplify = radioButton1.Text;
            }
            else
            {
                simplify = radioButton2.Text;
            }
            //实例化GP工具
            Geoprocessor gp = new Geoprocessor();
            gp.OverwriteOutput = true;
            //设置矢量转栅格参数
            RasterToPolygon rastertopolygon = new RasterToPolygon();
            rastertopolygon.in_raster = layer;
            rastertopolygon.out_polygon_features = out_polygon;
            rastertopolygon.raster_field = field;
            rastertopolygon.simplify = simplify;
            //执行GP工具
            IGeoProcessorResult results = (IGeoProcessorResult)gp.Execute(rastertopolygon, null);
            #endregion
            circularProgress1.IsRunning = false;
            #region 运行完成之后的信息提示窗口
            balloonTipFocus.Enabled = true;

            DevComponents.DotNetBar.Balloon b = new DevComponents.DotNetBar.Balloon();
            b.Style = eBallonStyle.Alert;
            //b.CaptionImage = balloonTipFocus.CaptionImage.Clone() as Image;
            b.CaptionText = "信息提示";
            b.Text = "运行成功!";
            b.AlertAnimation = eAlertAnimation.TopToBottom;
            b.AutoResize();
            b.AutoClose = true;
            b.AutoCloseTimeOut = 4;
            b.Owner = this;
            b.Show(button4, false);
            #endregion
        }
예제 #21
0
파일: frmMain.cs 프로젝트: viticm/pap2
		private void timerInfoBallon_Tick(object sender, System.EventArgs e)
		{
			timerInfoBallon.Enabled=false;
			m_InfoBalloon=new Balloon();
			m_InfoBalloon.CaptionImage=new Bitmap(typeof(frmMain),"Info.png");
			m_InfoBalloon.CaptionText="New DotNetBar Feature Alert...";
			m_InfoBalloon.Text="DotNetBar now includes Balloon control to help you convey your information effectively to the end-user.\nCheck out Find command implementation in this sample for an example of highly customized Balloon control.";
			m_InfoBalloon.AutoResize();
			m_InfoBalloon.AutoCloseTimeOut=10;
			m_InfoBalloon.Owner=this;
			m_InfoBalloon.Show(bFind,false); // Show below the Find toolbar button
		}
예제 #22
0
        private void button3_Click(object sender, EventArgs e)
        {
            ToggleEndlessProgress.Execute();
            circularProgress1.IsRunning = true;
            #region GP工具的使用
            //得到参数
            IFeatureLayer layer = GetFeatureLayer((string)comboBox1.SelectedItem);//输入点要素
            string Zfield = (string)comboBox2.SelectedItem;//Z字段
            string outRaster = textBox2.Text;//输出栅格
            object cellSize = textBox3.Text;//输出像元大小
            double power = double.Parse(textBox4.Text);//幂
            string searchRadius;//搜索半径
            if (radioButton1.Checked)
            {
                searchRadius = "RadiusVariable(" + textBox5.Text + "," + textBox6.Text + ")";
            }
            else
            {
                searchRadius = "RadiusFixed(" + textBox5.Text + "," + textBox6.Text + ")";
            }
            //实例化GP工具
            Geoprocessor gp = new Geoprocessor();
            gp.OverwriteOutput = true;
            //设置IDW参数
            Idw idw = new Idw();
            idw.in_point_features = layer;
            idw.z_field = Zfield;
            idw.out_raster = outRaster;
            idw.cell_size = cellSize;
            idw.power = power;
            idw.search_radius = searchRadius;
            //执行GP工具
            IGeoProcessorResult results = (IGeoProcessorResult)gp.Execute(idw, null);
            #endregion
            circularProgress1.IsRunning = false;
            #region 运行完成之后的信息提示窗口
            balloonTipFocus.Enabled = true;

            DevComponents.DotNetBar.Balloon b = new DevComponents.DotNetBar.Balloon();
            b.Style = eBallonStyle.Alert;
            //b.CaptionImage = balloonTipFocus.CaptionImage.Clone() as Image;
            b.CaptionText = "信息提示";
            b.Text = "运行成功!";
            b.AlertAnimation = eAlertAnimation.TopToBottom;
            b.AutoResize();
            b.AutoClose = true;
            b.AutoCloseTimeOut = 4;
            b.Owner = this;
            b.Show(button3, false);
            #endregion
        }
예제 #23
0
        private void button2_Click(object sender, EventArgs e)
        {
            ToggleEndlessProgress.Execute();
            circularProgress1.IsRunning = true;
            #region GP工具的使用
            //得到参数
            IFeatureLayer layer = GetFeatureLayer((string)comboBox1.SelectedItem);//输入点要素
            string Zfield = (string)comboBox2.SelectedItem;//Z字段
            string outRaster = textBox1.Text;//输出栅格
            object cellSize = textBox2.Text;//输出像元大小
            string splineType = (string)comboBox3.SelectedItem;//样条函数类型
            double weight = double.Parse(textBox3.Text);//权重
            int numPoints = int.Parse(textBox4.Text);//点数

            //实例化GP工具
            Geoprocessor gp = new Geoprocessor();
            gp.OverwriteOutput = true;
            //设置Spline参数
            Spline spline = new Spline();
            spline.in_point_features = layer;
            spline.z_field = Zfield;
            spline.out_raster = outRaster;
            spline.cell_size = cellSize;
            spline.spline_type = splineType;
            spline.weight = weight;
            spline.number_points = numPoints;
            //执行GP工具
            IGeoProcessorResult results = (IGeoProcessorResult)gp.Execute(spline, null);
            #endregion
            circularProgress1.IsRunning = false;
            #region 运行完成之后的信息提示窗口
            balloonTipFocus.Enabled = true;

            DevComponents.DotNetBar.Balloon b = new DevComponents.DotNetBar.Balloon();
            b.Style = eBallonStyle.Alert;
            //b.CaptionImage = balloonTipFocus.CaptionImage.Clone() as Image;
            b.CaptionText = "信息提示";
            b.Text = "运行成功!";
            b.AlertAnimation = eAlertAnimation.TopToBottom;
            b.AutoResize();
            b.AutoClose = true;
            b.AutoCloseTimeOut = 4;
            b.Owner = this;
            b.Show(button2, false);
            #endregion
        }
예제 #24
0
		private Balloon CreateBalloonControl(BalloonTipInfo info)
		{
			Balloon b=new Balloon();
			b.CaptionText=info.Caption;
			b.Text=info.Text;
			b.AutoClose=m_AutoClose;
			b.AutoCloseTimeOut=m_AutoCloseTimeOut;
			b.CaptionImage=this.CaptionImage;
			b.CaptionIcon=this.CaptionIcon;
			b.AlertAnimation=m_AlertAnimation;
			b.AlertAnimationDuration=m_AlertAnimationDuration;
			b.ShowCloseButton=m_ShowCloseButton;
			b.Style=m_Style;
            b.MinimumBalloonWidth = _MinimumBalloonWidth;
			if(info.Caption=="" || info.Caption==null)
			{
				b.Width=this.DefaultBalloonWidth;
			}
			else
				b.AutoResize();

			return b;
		}
예제 #25
0
        /// <summary>
        /// 确定BUTTON事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button2_Click(object sender, EventArgs e)
        {
            ToggleEndlessProgress.Execute();
            circularProgress1.IsRunning = true;
            #region GP工具的使用
            //得到参数
            IFeatureLayer layer = GetFeatureLayer((string)comboBox1.SelectedItem);
            string field = (string)comboBox2.SelectedItem;
            string out_raster = textBox1.Text;
            object cellSize = textBox2.Text;
            //实例化GP工具
            Geoprocessor gp = new Geoprocessor();
            gp.OverwriteOutput = true;
            //设置矢量转栅格参数
            FeatureToRaster featuretoraster = new FeatureToRaster();
            featuretoraster.in_features = layer;
            featuretoraster.field = field;
            featuretoraster.cell_size = cellSize;
            featuretoraster.out_raster = out_raster;
            //执行GP工具
            IGeoProcessorResult results = (IGeoProcessorResult)gp.Execute(featuretoraster, null);
            #endregion
            circularProgress1.IsRunning = false;
            #region 运行完成之后的信息提示窗口
            balloonTipFocus.Enabled = true;

            DevComponents.DotNetBar.Balloon b = new DevComponents.DotNetBar.Balloon();
            b.Style = eBallonStyle.Alert;
            //b.CaptionImage = balloonTipFocus.CaptionImage.Clone() as Image;
            b.CaptionText = "信息提示";
            b.Text = "运行成功!";
            b.AlertAnimation = eAlertAnimation.TopToBottom;
            b.AutoResize();
            b.AutoClose = true;
            b.AutoCloseTimeOut = 4;
            b.Owner = this;
            b.Show(button2, false);
            #endregion
        }
예제 #26
0
        private void bAdd_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(txtID.Text))
            {
                DevComponents.DotNetBar.Balloon b = new DevComponents.DotNetBar.Balloon();
                b.Style          = eBallonStyle.Balloon;
                b.CaptionText    = "ERROR";
                b.Text           = "工号不能为空!";
                b.AlertAnimation = eAlertAnimation.TopToBottom;
                b.AutoResize();
                b.AutoClose        = true;
                b.AutoCloseTimeOut = 2;
                b.Owner            = this;
                b.Show(txtID, false);
            }
            else
            {
                if (string.IsNullOrEmpty(txtName.Text))
                {
                    DevComponents.DotNetBar.Balloon b = new DevComponents.DotNetBar.Balloon();
                    b.Style          = eBallonStyle.Balloon;
                    b.CaptionText    = "ERROR";
                    b.Text           = "姓名不能为空!";
                    b.AlertAnimation = eAlertAnimation.TopToBottom;
                    b.AutoResize();
                    b.AutoClose        = true;
                    b.AutoCloseTimeOut = 2;
                    b.Owner            = this;
                    b.Show(txtName, false);
                }
                else
                {
                    if (string.IsNullOrEmpty(Convert.ToString(comboBoxEx1.SelectedItem)))
                    {
                        DevComponents.DotNetBar.Balloon b = new DevComponents.DotNetBar.Balloon();
                        b.Style          = eBallonStyle.Balloon;
                        b.CaptionText    = "ERROR";
                        b.Text           = "请选择性别!";
                        b.AlertAnimation = eAlertAnimation.TopToBottom;
                        b.AutoResize();
                        b.AutoClose        = true;
                        b.AutoCloseTimeOut = 2;
                        b.Owner            = this;
                        b.Show(comboBoxEx1, false);
                    }
                    else
                    {
                        string         sql = "insert into [user](ID,Name,PinYin,Sex,InDate,OutDate,Sound) values(@ID,@Name,@PinYin,@Sex,@InDate,@OutDate,@Sound)";
                        SqlParameter[] sp  = new SqlParameter[]
                        {
                            new SqlParameter("@ID", txtID.Text),
                            new SqlParameter("@Name", txtName.Text),
                            new SqlParameter("@PinYin", txtPinYin.Text),
                            new SqlParameter("@Sex", Convert.ToString(comboBoxEx1.SelectedItem)),
                            new SqlParameter("@InDate", dtiInDate.Text),
                            new SqlParameter("@OutDate", dtiOutDate.Text),
                            new SqlParameter("@Sound", txtSound.Text),
                        };
                        string sMes = sgClass.DbHelperSQL.ExecuteSql(sql, sp);
                        if (sMes == "1")
                        {
                            DevComponents.DotNetBar.Balloon b = new DevComponents.DotNetBar.Balloon();
                            b.Style          = eBallonStyle.Balloon;
                            b.CaptionText    = "OK";
                            b.Text           = "用户添加成功!";
                            b.AlertAnimation = eAlertAnimation.TopToBottom;
                            b.AutoResize();
                            b.AutoClose        = true;
                            b.AutoCloseTimeOut = 2;
                            b.Owner            = this;
                            b.Show(bAdd, false);

                            auMD();
                        }
                        else
                        {
                            MessageBox.Show(sMes);
                        }
                    }
                }
            }
        }
예제 #27
0
파일: frmMain.cs 프로젝트: etechuk/hcfcpc
 private void ShowTooltip()
 {
     b = new Balloon();
     b.AutoCloseTimeOut = 10;
     b.Owner = this;
 }
예제 #28
0
		/// <summary>
		/// Shows Balloon for specific control. Control must have Balloon already assigned to it.
		/// </summary>
		/// <param name="control">Control that has Balloon already assigned.</param>
		public virtual void ShowBalloon(Control control)
		{
			if(m_BalloonsInfo.Contains(control))
			{
				BalloonTipInfo info=m_BalloonsInfo[control] as BalloonTipInfo;
				if(info!=null)
				{
					CloseBalloon();

					// Closing of balloon was denied exit.
					if(m_BalloonControl!=null)
					{
						return;
					}

					m_BalloonControl=CreateBalloonControl(info);
					m_BalloonControl.Location=new System.Drawing.Point(0,0);
					m_BalloonTriggerControl=control;
					
					if(BalloonDisplaying!=null)
						BalloonDisplaying(this,new EventArgs());

					// If Balloon Control is still around
					if(m_BalloonControl!=null)
					{
						Form parentForm=control.FindForm();
						if(parentForm!=null)
							m_BalloonControl.Owner=parentForm;
						if(!m_BalloonControl.Location.IsEmpty)
							m_BalloonControl.Show(m_BalloonFocus);
						else
							m_BalloonControl.Show(control,m_BalloonFocus);
					}
				}
			}
		}