• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Controls.MyButton类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中MissionPlanner.Controls.MyButton的典型用法代码示例。如果您正苦于以下问题:C# MyButton类的具体用法?C# MyButton怎么用?C# MyButton使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



MyButton类属于MissionPlanner.Controls命名空间,在下文中一共展示了MyButton类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Activate

        /*
#if (FRAME_CONFIG == QUAD_FRAME)
        MAV_TYPE_QUADROTOR,
#elif (FRAME_CONFIG == TRI_FRAME)
        MAV_TYPE_TRICOPTER,
#elif (FRAME_CONFIG == HEXA_FRAME || FRAME_CONFIG == Y6_FRAME)
        MAV_TYPE_HEXAROTOR,
#elif (FRAME_CONFIG == OCTA_FRAME || FRAME_CONFIG == OCTA_QUAD_FRAME)
        MAV_TYPE_OCTOROTOR,
#elif (FRAME_CONFIG == HELI_FRAME)
        MAV_TYPE_HELICOPTER,
#elif (FRAME_CONFIG == SINGLE_FRAME)  //because mavlink did not define a singlecopter, we use a rocket
        MAV_TYPE_ROCKET,
#elif (FRAME_CONFIG == COAX_FRAME)  //because mavlink did not define a singlecopter, we use a rocket
        MAV_TYPE_ROCKET,
#else
  #error Unrecognised frame type
#endif*/

        public void Activate()
        {
            int x = 20;
            int y = 40;

            int motormax = 8;

            if (!MainV2.comPort.MAV.param.ContainsKey("FRAME"))
            {
                this.Enabled = false;
                return;
            }

            HIL.Motor[] motors = new HIL.Motor[0];

            if (MainV2.comPort.MAV.aptype == MAVLink.MAV_TYPE.TRICOPTER)
            {
                motormax = 4;

                motors = HIL.Motor.build_motors(MAVLink.MAV_TYPE.TRICOPTER, (int)(float)MainV2.comPort.MAV.param["FRAME"]);
            }
            else if (MainV2.comPort.MAV.aptype == MAVLink.MAV_TYPE.QUADROTOR)
            {
                motormax = 4;

                motors = HIL.Motor.build_motors(MAVLink.MAV_TYPE.QUADROTOR, (int)(float)MainV2.comPort.MAV.param["FRAME"]);
            }
            else if (MainV2.comPort.MAV.aptype == MAVLink.MAV_TYPE.HEXAROTOR)
            {
                motormax = 6;

                motors = HIL.Motor.build_motors(MAVLink.MAV_TYPE.HEXAROTOR, (int)(float)MainV2.comPort.MAV.param["FRAME"]);
            }
            else if (MainV2.comPort.MAV.aptype == MAVLink.MAV_TYPE.OCTOROTOR)
            {
                motormax = 8;

                motors = HIL.Motor.build_motors(MAVLink.MAV_TYPE.OCTOROTOR, (int)(float)MainV2.comPort.MAV.param["FRAME"]);
            }
            else if (MainV2.comPort.MAV.aptype == MAVLink.MAV_TYPE.HELICOPTER)
            {
                motormax = 0;
            }

            for (int a = 1; a <= motormax; a++)
            {

                MyButton but = new MyButton();
                but.Text = "Test motor " + (char)((a-1) + 'A');
                but.Location = new Point(x,y);
                but.Click += but_Click;
                but.Tag = a;

                this.Controls.Add(but);

                y += 25;
            }
        }
开发者ID:tesidroni,项目名称:mp,代码行数:77,代码来源:ConfigMotorTest.cs


示例2: Activate

        /*
#if (FRAME_CONFIG == QUAD_FRAME)
        MAV_TYPE_QUADROTOR,
#elif (FRAME_CONFIG == TRI_FRAME)
        MAV_TYPE_TRICOPTER,
#elif (FRAME_CONFIG == HEXA_FRAME || FRAME_CONFIG == Y6_FRAME)
        MAV_TYPE_HEXAROTOR,
#elif (FRAME_CONFIG == OCTA_FRAME || FRAME_CONFIG == OCTA_QUAD_FRAME)
        MAV_TYPE_OCTOROTOR,
#elif (FRAME_CONFIG == HELI_FRAME)
        MAV_TYPE_HELICOPTER,
#elif (FRAME_CONFIG == SINGLE_FRAME)  //because mavlink did not define a singlecopter, we use a rocket
        MAV_TYPE_ROCKET,
#elif (FRAME_CONFIG == COAX_FRAME)  //because mavlink did not define a singlecopter, we use a rocket
        MAV_TYPE_ROCKET,
#else
  #error Unrecognised frame type
#endif*/

        public void Activate()
        {
            var x = 20;
            var y = 40;

            var motormax = this.get_motormax();

            MyButton but;
            for (var a = 1; a <= motormax; a++)
            {
                but = new MyButton();
                but.Text = "Test motor " + (char) ((a - 1) + 'A');
                but.Location = new Point(x, y);
                but.Click += but_Click;
                but.Tag = a;

                Controls.Add(but);

                y += 25;
            }

            but = new MyButton();
            but.Text = "Test all motors";
            but.Location = new Point(x, y);
            but.Size = new Size(75, 37);
            but.Click += but_TestAll;
            Controls.Add(but);

            y += 39;

            but = new MyButton();
            but.Text = "Stop all motors";
            but.Location = new Point(x, y);
            but.Size = new Size(75, 37);
            but.Click += but_StopAll;
            Controls.Add(but);

            y += 39;

            but = new MyButton();
            but.Text = "Test all in Sequence";
            but.Location = new Point(x, y);
            but.Size = new Size(75, 37);
            but.Click += but_TestAllSeq;
            Controls.Add(but);

            Utilities.ThemeManager.ApplyThemeTo(this);
        }
开发者ID:ArduPilot,项目名称:MissionPlanner,代码行数:67,代码来源:ConfigMotorTest.cs


示例3: Activate

        public void Activate()
        {
            int x = 20;
            int y = 40;

            int motormax = 8;

            //HIL.Motor.build_motors("");

            if (MainV2.comPort.MAV.aptype == MAVLink.MAV_TYPE.QUADROTOR)
            {
                motormax = 4;
            }
            else if (MainV2.comPort.MAV.aptype == MAVLink.MAV_TYPE.HEXAROTOR)
            {
                motormax = 6;
            }
            else if (MainV2.comPort.MAV.aptype == MAVLink.MAV_TYPE.OCTOROTOR)
            {
                motormax = 8;
            }
            else if (MainV2.comPort.MAV.aptype == MAVLink.MAV_TYPE.TRICOPTER)
            {
                motormax = 3;
            }
            else if (MainV2.comPort.MAV.aptype == MAVLink.MAV_TYPE.HELICOPTER)
            {
                motormax = 0;
            }

            for (int a = 1; a <= motormax; a++)
            {

                MyButton but = new MyButton();
                but.Text = "Test motor " + a;
                but.Location = new Point(x,y);
                but.Click += but_Click;
                but.Tag = a;

                this.Controls.Add(but);

                y += 25;
            }
        }
开发者ID:Bravojul,项目名称:MissionPlanner,代码行数:44,代码来源:ConfigMotorTest.cs


示例4: InitializeComponent

        private void InitializeComponent()
        {
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Georefimage));
            this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
            this.TXT_logfile = new System.Windows.Forms.TextBox();
            this.TXT_jpgdir = new System.Windows.Forms.TextBox();
            this.TXT_offsetseconds = new System.Windows.Forms.TextBox();
            this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
            this.TXT_outputlog = new System.Windows.Forms.TextBox();
            this.label1 = new System.Windows.Forms.Label();
            this.BUT_Geotagimages = new MissionPlanner.Controls.MyButton();
            this.BUT_estoffset = new MissionPlanner.Controls.MyButton();
            this.BUT_doit = new MissionPlanner.Controls.MyButton();
            this.BUT_browsedir = new MissionPlanner.Controls.MyButton();
            this.BUT_browselog = new MissionPlanner.Controls.MyButton();
            this.NUM_latpos = new System.Windows.Forms.NumericUpDown();
            this.NUM_lngpos = new System.Windows.Forms.NumericUpDown();
            this.NUM_altpos = new System.Windows.Forms.NumericUpDown();
            this.NUM_ATT_Heading = new System.Windows.Forms.NumericUpDown();
            this.label2 = new System.Windows.Forms.Label();
            this.label3 = new System.Windows.Forms.Label();
            this.label4 = new System.Windows.Forms.Label();
            this.label5 = new System.Windows.Forms.Label();
            this.BUT_networklinkgeoref = new MissionPlanner.Controls.MyButton();
            this.NUM_time = new System.Windows.Forms.NumericUpDown();
            this.label10 = new System.Windows.Forms.Label();
            this.label11 = new System.Windows.Forms.Label();
            this.label12 = new System.Windows.Forms.Label();
            this.RDIO_TimeOffset = new System.Windows.Forms.RadioButton();
            this.RDIO_CAMMsgSynchro = new System.Windows.Forms.RadioButton();
            this.PANEL_TIME_OFFSET = new System.Windows.Forms.Panel();
            this.label13 = new System.Windows.Forms.Label();
            this.label14 = new System.Windows.Forms.Label();
            this.NUM_CAM_Alt = new System.Windows.Forms.NumericUpDown();
            this.label15 = new System.Windows.Forms.Label();
            this.NUM_CAM_Lon = new System.Windows.Forms.NumericUpDown();
            this.NUM_CAM_Lat = new System.Windows.Forms.NumericUpDown();
            this.label16 = new System.Windows.Forms.Label();
            this.PANEL_CAM = new System.Windows.Forms.Panel();
            this.NUM_CAM_Week = new System.Windows.Forms.NumericUpDown();
            this.label26 = new System.Windows.Forms.Label();
            this.panel2 = new System.Windows.Forms.Panel();
            this.NUM_ATT_Roll = new System.Windows.Forms.NumericUpDown();
            this.label25 = new System.Windows.Forms.Label();
            this.NUM_ATT_Pitch = new System.Windows.Forms.NumericUpDown();
            this.label24 = new System.Windows.Forms.Label();
            this.label6 = new System.Windows.Forms.Label();
            this.label23 = new System.Windows.Forms.Label();
            this.NUM_GPS_Week = new System.Windows.Forms.NumericUpDown();
            this.panel1 = new System.Windows.Forms.Panel();
            this.NUM_CAM_Time = new System.Windows.Forms.NumericUpDown();
            this.label22 = new System.Windows.Forms.Label();
            this.label21 = new System.Windows.Forms.Label();
            this.NUM_GPS_AMSL_Alt = new System.Windows.Forms.NumericUpDown();
            this.label20 = new System.Windows.Forms.Label();
            this.NUM_CAM_Pitch = new System.Windows.Forms.NumericUpDown();
            this.label19 = new System.Windows.Forms.Label();
            this.NUM_CAM_Roll = new System.Windows.Forms.NumericUpDown();
            this.label18 = new System.Windows.Forms.Label();
            this.NUM_CAM_Heading = new System.Windows.Forms.NumericUpDown();
            this.label17 = new System.Windows.Forms.Label();
            this.label9 = new System.Windows.Forms.Label();
            this.num_camerarotation = new System.Windows.Forms.NumericUpDown();
            this.label8 = new System.Windows.Forms.Label();
            this.label7 = new System.Windows.Forms.Label();
            this.num_hfov = new System.Windows.Forms.NumericUpDown();
            this.num_vfov = new System.Windows.Forms.NumericUpDown();
            this.panel3 = new System.Windows.Forms.Panel();
            this.CHECK_AMSLAlt_Use = new System.Windows.Forms.CheckBox();
            this.PANEL_SHUTTER_LAG = new System.Windows.Forms.Panel();
            this.TXT_shutterLag = new System.Windows.Forms.TextBox();
            this.label27 = new System.Windows.Forms.Label();
            ((System.ComponentModel.ISupportInitialize)(this.NUM_latpos)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.NUM_lngpos)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.NUM_altpos)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.NUM_ATT_Heading)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.NUM_time)).BeginInit();
            this.PANEL_TIME_OFFSET.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.NUM_CAM_Alt)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.NUM_CAM_Lon)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.NUM_CAM_Lat)).BeginInit();
            this.PANEL_CAM.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.NUM_CAM_Week)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.NUM_ATT_Roll)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.NUM_ATT_Pitch)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.NUM_GPS_Week)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.NUM_CAM_Time)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.NUM_GPS_AMSL_Alt)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.NUM_CAM_Pitch)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.NUM_CAM_Roll)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.NUM_CAM_Heading)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.num_camerarotation)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.num_hfov)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.num_vfov)).BeginInit();
            this.panel3.SuspendLayout();
            this.PANEL_SHUTTER_LAG.SuspendLayout();
            this.SuspendLayout();
            // 
            // openFileDialog1
            // 
//.........这里部分代码省略.........
开发者ID:KuiQ,项目名称:MissionPlanner,代码行数:101,代码来源:georefimage.cs


示例5: flightPlannerToolStripMenuItem_Click

        private void flightPlannerToolStripMenuItem_Click(object sender, EventArgs e)
        {
            foreach (Control ctl in splitContainer1.Panel2.Controls)
            {
                ctl.Visible = false;
            }

            foreach (MainSwitcher.Screen sc in MainV2.View.screens)
            {
                if (sc.Name == "FlightPlanner")
                {
                    MyButton but = new MyButton
                    {
                        Location = new Point(splitContainer1.Panel2.Width/2, 0),
                        Text = "Close"
                    };
                    but.Click += but_Click;

                    splitContainer1.Panel2.Controls.Add(but);
                    splitContainer1.Panel2.Controls.Add(sc.Control);
                    ThemeManager.ApplyThemeTo(sc.Control);

                    sc.Control.Dock = DockStyle.Fill;
                    sc.Control.Visible = true;

                    if (sc.Control is IActivate)
                    {
                        ((IActivate) (sc.Control)).Activate();
                    }

                    but.BringToFront();
                    break;
                }
            }
        }
开发者ID:Viousa,项目名称:MissionPlanner,代码行数:35,代码来源:FlightData.cs


示例6: MessageShowAgain

        public static DialogResult MessageShowAgain(string title, string promptText)
        {
            Form form = new Form();
            System.Windows.Forms.Label label = new System.Windows.Forms.Label();
            CheckBox chk = new CheckBox();
            Controls.MyButton buttonOk = new Controls.MyButton();
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainV2));
            form.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));

            form.Text = title;
            label.Text = promptText;

            chk.Tag = ("SHOWAGAIN_" + title.Replace(" ", "_"));
            chk.AutoSize = true;
            chk.Text = "Show me again?";
            chk.Checked = true;
            chk.Location = new Point(9, 80);

            if (MainV2.config[(string)chk.Tag] != null && (string)MainV2.config[(string)chk.Tag] == "False") // skip it
            {
                form.Dispose();
                chk.Dispose();
                buttonOk.Dispose();
                label.Dispose();
                return DialogResult.OK;
            }

            chk.CheckStateChanged += new EventHandler(chk_CheckStateChanged);

            buttonOk.Text = "OK";
            buttonOk.DialogResult = DialogResult.OK;
            buttonOk.Location = new Point(form.Right - 100, 80);

            label.SetBounds(9, 40, 372, 13);

            label.AutoSize = true;

            form.ClientSize = new Size(396, 107);
            form.Controls.AddRange(new Control[] { label, chk, buttonOk });
            form.ClientSize = new Size(Math.Max(300, label.Right + 10), form.ClientSize.Height);
            form.FormBorderStyle = FormBorderStyle.FixedDialog;
            form.StartPosition = FormStartPosition.CenterScreen;
            form.MinimizeBox = false;
            form.MaximizeBox = false;

            ThemeManager.ApplyThemeTo(form);

            DialogResult dialogResult = form.ShowDialog();

            form.Dispose();

            form = null;

            return dialogResult;
        }
开发者ID:klonage,项目名称:nlt-gcs,代码行数:55,代码来源:Common.cs


示例7: LoadXML

        /// <summary>
        /// The template xml for the screen
        /// </summary>
        /// <param name="FileName"></param>
        public void LoadXML(string FileName)
        {
            int x = 20;
            int y = 0;

            int optionx = 300;
            int optiony = 0;

            string name = "";
            List<string> paramname = new List<string>();
            double rangemin = 0;
            double rangemax = 10;
            double step = 0.001;

            using (XmlReader reader = XmlReader.Create(FileName))
            {
                while (reader.Read())
                {
                    switch (reader.Name.ToUpper())
                    {
                        case "ITEM":

                            break;
                        case "HEAD":
                            y += 30;
                            string heading = reader.ReadString();

                            Label lbl = new Label();
                            lbl.AutoSize = true;
                            lbl.Text = heading;
                            lbl.Location = new Point(x,y);
                            lbl.Font = new Font(FontFamily.GenericSansSerif, 15,FontStyle.Bold);

                            this.Controls.Add(lbl);

                            Controls.MyButton but = new Controls.MyButton();

                            but.Text = "Save";
                            but.Location = new Point(optionx + 100, y);
                            but.Click += new EventHandler(but_Click);
                            this.Controls.Add(but);

                            y = lbl.Location.Y + lbl.Height + 10;

                            LineSeparator ls = new LineSeparator();

                            ls.Width = this.Width - 40;
                            ls.Location = new Point(x,y);

                            ls.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;

                            this.Controls.Add(ls);

                            y = ls.Location.Y + ls.Height;

                            break;
                        case "SUBHEAD":
                            y += 15;

                            optiony = y;
                            optionx = 300;
                            string subhead = reader.ReadString();

                            Label lbl2 = new Label();
                            lbl2.AutoSize = true;
                            lbl2.Text = subhead;
                            lbl2.Location = new Point(x,y);
                            lbl2.Font = new Font(FontFamily.GenericSansSerif, 10, FontStyle.Bold);

                            this.Controls.Add(lbl2);

                            y = lbl2.Location.Y + lbl2.Height;

                            break;
                        case "DESC":
                            y += 2;
                            string desc = reader.ReadString();

                            Label lbl3 = new Label();
                            lbl3.AutoSize = true;
                            lbl3.Text = AddNewLinesToText(desc);
                            lbl3.Location = new Point(x,y);
                            lbl3.Font = new Font(FontFamily.GenericSansSerif, 8, FontStyle.Bold);

                            this.Controls.Add(lbl3);

                            y = lbl3.Location.Y + lbl3.Height;

                            break;
                        case "FIELDS":
                            if (reader.NodeType == XmlNodeType.EndElement)
                            {
                                if (optiony > y)
                                    y = optiony;
                            }
                            break;
//.........这里部分代码省略.........
开发者ID:LeoTosti,项目名称:x-drone,代码行数:101,代码来源:ConfigPanel.cs


示例8: InitializeComponent

 private void InitializeComponent()
 {
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Georefimage));
     this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
     this.TXT_logfile = new System.Windows.Forms.TextBox();
     this.TXT_jpgdir = new System.Windows.Forms.TextBox();
     this.TXT_offsetseconds = new System.Windows.Forms.TextBox();
     this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
     this.TXT_outputlog = new System.Windows.Forms.TextBox();
     this.label1 = new System.Windows.Forms.Label();
     this.BUT_Geotagimages = new Controls.MyButton();
     this.BUT_estoffset = new Controls.MyButton();
     this.BUT_doit = new Controls.MyButton();
     this.BUT_browsedir = new Controls.MyButton();
     this.BUT_browselog = new Controls.MyButton();
     this.NUM_latpos = new System.Windows.Forms.NumericUpDown();
     this.NUM_lngpos = new System.Windows.Forms.NumericUpDown();
     this.NUM_altpos = new System.Windows.Forms.NumericUpDown();
     this.NUM_headingpos = new System.Windows.Forms.NumericUpDown();
     this.label2 = new System.Windows.Forms.Label();
     this.label3 = new System.Windows.Forms.Label();
     this.label4 = new System.Windows.Forms.Label();
     this.label5 = new System.Windows.Forms.Label();
     this.label6 = new System.Windows.Forms.Label();
     this.BUT_networklinkgeoref = new Controls.MyButton();
     this.num_vfov = new System.Windows.Forms.NumericUpDown();
     this.num_hfov = new System.Windows.Forms.NumericUpDown();
     this.label7 = new System.Windows.Forms.Label();
     this.label8 = new System.Windows.Forms.Label();
     this.num_camerarotation = new System.Windows.Forms.NumericUpDown();
     this.label9 = new System.Windows.Forms.Label();
     this.NUM_time = new System.Windows.Forms.NumericUpDown();
     this.label10 = new System.Windows.Forms.Label();
     ((System.ComponentModel.ISupportInitialize)(this.NUM_latpos)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.NUM_lngpos)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.NUM_altpos)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.NUM_headingpos)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.num_vfov)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.num_hfov)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.num_camerarotation)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.NUM_time)).BeginInit();
     this.SuspendLayout();
     //
     // openFileDialog1
     //
     this.openFileDialog1.FileName = "openFileDialog1";
     //
     // TXT_logfile
     //
     resources.ApplyResources(this.TXT_logfile, "TXT_logfile");
     this.TXT_logfile.Name = "TXT_logfile";
     this.TXT_logfile.TextChanged += new System.EventHandler(this.TXT_logfile_TextChanged);
     //
     // TXT_jpgdir
     //
     resources.ApplyResources(this.TXT_jpgdir, "TXT_jpgdir");
     this.TXT_jpgdir.Name = "TXT_jpgdir";
     //
     // TXT_offsetseconds
     //
     resources.ApplyResources(this.TXT_offsetseconds, "TXT_offsetseconds");
     this.TXT_offsetseconds.Name = "TXT_offsetseconds";
     //
     // TXT_outputlog
     //
     resources.ApplyResources(this.TXT_outputlog, "TXT_outputlog");
     this.TXT_outputlog.Name = "TXT_outputlog";
     this.TXT_outputlog.ReadOnly = true;
     //
     // label1
     //
     resources.ApplyResources(this.label1, "label1");
     this.label1.Name = "label1";
     //
     // BUT_Geotagimages
     //
     this.BUT_Geotagimages.BGGradBot = System.Drawing.Color.FromArgb(((int)(((byte)(205)))), ((int)(((byte)(226)))), ((int)(((byte)(150)))));
     this.BUT_Geotagimages.BGGradTop = System.Drawing.Color.FromArgb(((int)(((byte)(148)))), ((int)(((byte)(193)))), ((int)(((byte)(31)))));
     resources.ApplyResources(this.BUT_Geotagimages, "BUT_Geotagimages");
     this.BUT_Geotagimages.Name = "BUT_Geotagimages";
     this.BUT_Geotagimages.Outline = System.Drawing.Color.FromArgb(((int)(((byte)(121)))), ((int)(((byte)(148)))), ((int)(((byte)(41)))));
     this.BUT_Geotagimages.TextColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(87)))), ((int)(((byte)(4)))));
     this.BUT_Geotagimages.UseVisualStyleBackColor = true;
     this.BUT_Geotagimages.Click += new System.EventHandler(this.BUT_Geotagimages_Click);
     //
     // BUT_estoffset
     //
     this.BUT_estoffset.BGGradBot = System.Drawing.Color.FromArgb(((int)(((byte)(205)))), ((int)(((byte)(226)))), ((int)(((byte)(150)))));
     this.BUT_estoffset.BGGradTop = System.Drawing.Color.FromArgb(((int)(((byte)(148)))), ((int)(((byte)(193)))), ((int)(((byte)(31)))));
     resources.ApplyResources(this.BUT_estoffset, "BUT_estoffset");
     this.BUT_estoffset.Name = "BUT_estoffset";
     this.BUT_estoffset.Outline = System.Drawing.Color.FromArgb(((int)(((byte)(121)))), ((int)(((byte)(148)))), ((int)(((byte)(41)))));
     this.BUT_estoffset.TextColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(87)))), ((int)(((byte)(4)))));
     this.BUT_estoffset.UseVisualStyleBackColor = true;
     this.BUT_estoffset.Click += new System.EventHandler(this.BUT_estoffset_Click);
     //
     // BUT_doit
     //
     this.BUT_doit.BGGradBot = System.Drawing.Color.FromArgb(((int)(((byte)(205)))), ((int)(((byte)(226)))), ((int)(((byte)(150)))));
     this.BUT_doit.BGGradTop = System.Drawing.Color.FromArgb(((int)(((byte)(148)))), ((int)(((byte)(193)))), ((int)(((byte)(31)))));
//.........这里部分代码省略.........
开发者ID:LeoTosti,项目名称:x-drone,代码行数:101,代码来源:georefimage.cs


示例9: InitializeComponent

 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     this.progressBar1 = new MissionPlanner.Controls.MyProgressBar();
     this.lblProgressMessage = new System.Windows.Forms.Label();
     this.btnCancel = new MissionPlanner.Controls.MyButton();
     this.imgWarning = new System.Windows.Forms.PictureBox();
     this.linkLabel1 = new System.Windows.Forms.LinkLabel();
     this.btnClose = new MissionPlanner.Controls.MyButton();
     this.timer1 = new System.Windows.Forms.Timer(this.components);
     ((System.ComponentModel.ISupportInitialize)(this.imgWarning)).BeginInit();
     this.SuspendLayout();
     //
     // progressBar1
     //
     this.progressBar1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
     | System.Windows.Forms.AnchorStyles.Right)));
     this.progressBar1.BGGradBot = System.Drawing.Color.FromArgb(((int)(((byte)(127)))), ((int)(((byte)(167)))), ((int)(((byte)(42)))));
     this.progressBar1.BGGradTop = System.Drawing.Color.FromArgb(((int)(((byte)(102)))), ((int)(((byte)(139)))), ((int)(((byte)(26)))));
     this.progressBar1.Location = new System.Drawing.Point(11, 90);
     this.progressBar1.Name = "progressBar1";
     this.progressBar1.Outline = System.Drawing.Color.FromArgb(((int)(((byte)(150)))), ((int)(((byte)(171)))), ((int)(((byte)(112)))));
     this.progressBar1.Size = new System.Drawing.Size(277, 13);
     this.progressBar1.Style = System.Windows.Forms.ProgressBarStyle.Continuous;
     this.progressBar1.TabIndex = 0;
     this.progressBar1.TextColor = System.Drawing.Color.FromArgb(((int)(((byte)(31)))), ((int)(((byte)(54)))), ((int)(((byte)(8)))));
     //
     // lblProgressMessage
     //
     this.lblProgressMessage.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     | System.Windows.Forms.AnchorStyles.Left)
     | System.Windows.Forms.AnchorStyles.Right)));
     this.lblProgressMessage.Location = new System.Drawing.Point(13, 13);
     this.lblProgressMessage.Name = "lblProgressMessage";
     this.lblProgressMessage.Size = new System.Drawing.Size(275, 74);
     this.lblProgressMessage.TabIndex = 1;
     this.lblProgressMessage.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
     //
     // btnCancel
     //
     this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
     this.btnCancel.Location = new System.Drawing.Point(213, 109);
     this.btnCancel.Name = "btnCancel";
     this.btnCancel.Size = new System.Drawing.Size(75, 23);
     this.btnCancel.TabIndex = 2;
     this.btnCancel.Text = "Cancel";
     this.btnCancel.UseVisualStyleBackColor = true;
     this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
     //
     // imgWarning
     //
     this.imgWarning.Image = global::MissionPlanner.Controls.Properties.Resources.iconWarning48;
     this.imgWarning.Location = new System.Drawing.Point(13, 22);
     this.imgWarning.Name = "imgWarning";
     this.imgWarning.Size = new System.Drawing.Size(48, 48);
     this.imgWarning.TabIndex = 3;
     this.imgWarning.TabStop = false;
     this.imgWarning.Visible = false;
     //
     // linkLabel1
     //
     this.linkLabel1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
     this.linkLabel1.AutoSize = true;
     this.linkLabel1.Location = new System.Drawing.Point(240, 90);
     this.linkLabel1.Name = "linkLabel1";
     this.linkLabel1.Size = new System.Drawing.Size(48, 13);
     this.linkLabel1.TabIndex = 4;
     this.linkLabel1.TabStop = true;
     this.linkLabel1.Text = "Details...";
     this.linkLabel1.Visible = false;
     this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);
     //
     // btnClose
     //
     this.btnClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
     this.btnClose.Location = new System.Drawing.Point(213, 109);
     this.btnClose.Name = "btnClose";
     this.btnClose.Size = new System.Drawing.Size(75, 23);
     this.btnClose.TabIndex = 5;
     this.btnClose.Text = "Close";
     this.btnClose.UseVisualStyleBackColor = true;
     this.btnClose.Click += new System.EventHandler(this.btn_Close_Click);
     //
     // timer1
     //
     this.timer1.Enabled = true;
     this.timer1.Interval = 200;
     this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
     //
     // ProgressReporterDialogue
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     this.ClientSize = new System.Drawing.Size(306, 144);
     this.ControlBox = false;
     this.Controls.Add(this.btnClose);
//.........这里部分代码省略.........
开发者ID:kellyschrock,项目名称:MissionPlanner,代码行数:101,代码来源:ProgressReporterDialogue.designer.cs


示例10: doButtontoUI

        void doButtontoUI(string name, int x, int y)
        {
            MyLabel lbl = new MyLabel();
            ComboBox cmbbutton = new ComboBox();
            Controls.MyButton mybut = new Controls.MyButton();
            HorizontalProgressBar hbar = new HorizontalProgressBar();
            ComboBox cmbaction = new ComboBox();

            // do this here so putting in text works
            this.Controls.AddRange(new Control[] { lbl, cmbbutton, mybut, hbar, cmbaction });

            lbl.Location = new Point(x, y);
            lbl.Size = new Size(47, 13);
            lbl.Text = "Button " + name;

            cmbbutton.Location = new Point(72, y);
            cmbbutton.Size = new Size(70, 21);
            cmbbutton.DataSource = getButtonNumbers();
            cmbbutton.DropDownStyle = ComboBoxStyle.DropDownList;
            cmbbutton.Name = "cmbbutton" + name;
            if (MainV2.config["butno" + name] != null)
                cmbbutton.Text = (MainV2.config["butno" + name].ToString());
            cmbbutton.SelectedIndexChanged += new EventHandler(cmbbutton_SelectedIndexChanged);

            mybut.Location = new Point(BUT_detch1.Left, y);
            mybut.Size = BUT_detch1.Size;
            mybut.Text = BUT_detch1.Text;
            mybut.Name = "mybut" + name;
            mybut.Click += new EventHandler(BUT_detbutton_Click);

            hbar.Location = new Point(progressBar1.Left, y);
            hbar.Size = progressBar1.Size;
            hbar.Name = "hbar" + name;

            cmbaction.Location = new Point(hbar.Right + 5, y);
            cmbaction.Size = new Size(100, 21);

            cmbaction.DataSource = Common.getModesList(MainV2.comPort.MAV.cs);
            cmbaction.ValueMember = "Key";
            cmbaction.DisplayMember = "Value";

            cmbaction.DropDownStyle = ComboBoxStyle.DropDownList;
            cmbaction.Name = "cmbaction" + name;
            if (MainV2.config["butaction" + name] != null)
                cmbaction.Text = MainV2.config["butaction" + name].ToString();

            this.Height += 25;
        }
开发者ID:GCBrentA,项目名称:MissionPlanner,代码行数:48,代码来源:JoystickSetup.cs


示例11: AddButtonsToForm

        private static void AddButtonsToForm(Form msgBoxFrm, MessageBoxButtons buttons)
        {
            Rectangle screenRectangle = msgBoxFrm.RectangleToScreen(msgBoxFrm.ClientRectangle);
            int titleHeight = screenRectangle.Top - msgBoxFrm.Top;

            var t = Type.GetType("Mono.Runtime");
            if ((t != null))
                titleHeight = 25;

            switch (buttons)
            {
                case MessageBoxButtons.OK:
                    var but = new MyButton
                                  {
                                      Size = new Size(75, 23),
                                      Text = "确定",
                                      Left = msgBoxFrm.Width - 100 - FORM_X_MARGIN,
                                      Top = msgBoxFrm.Height - 40 - FORM_Y_MARGIN - titleHeight
                                  };

                    but.Click += delegate { _state = DialogResult.OK; msgBoxFrm.Close(); };
                    msgBoxFrm.Controls.Add(but);
                    msgBoxFrm.AcceptButton = but;
                    break;

                case MessageBoxButtons.YesNo:

                    if (msgBoxFrm.Width < (75 * 2 + FORM_X_MARGIN * 3))
                        msgBoxFrm.Width = (75 * 2 + FORM_X_MARGIN * 3);

                    var butyes = new MyButton
                    {
                        Size = new Size(75, 23),
                        Text = "是",
                        Left = msgBoxFrm.Width - 75 * 2 - FORM_X_MARGIN * 2,
                        Top = msgBoxFrm.Height - 23 - FORM_Y_MARGIN - titleHeight
                    };

                    butyes.Click += delegate { _state = DialogResult.Yes; msgBoxFrm.Close(); };
                    msgBoxFrm.Controls.Add(butyes);
                    msgBoxFrm.AcceptButton = butyes;

                    var butno = new MyButton
                    {
                        Size = new Size(75, 23),
                        Text = "否",
                        Left = msgBoxFrm.Width - 75 - FORM_X_MARGIN,
                        Top = msgBoxFrm.Height - 23 - FORM_Y_MARGIN - titleHeight
                    };

                    butno.Click += delegate { _state = DialogResult.No; msgBoxFrm.Close(); };
                    msgBoxFrm.Controls.Add(butno);
                    msgBoxFrm.CancelButton = butno;
                    break;

                case MessageBoxButtons.OKCancel:

                    if (msgBoxFrm.Width < (75 * 2 + FORM_X_MARGIN * 3))
                        msgBoxFrm.Width = (75 * 2 + FORM_X_MARGIN * 3);

                    var butok = new MyButton
                    {
                        Size = new Size(75, 23),
                        Text = "确定",
                        Left = msgBoxFrm.Width - 75 * 2 - FORM_X_MARGIN * 2,
                        Top = msgBoxFrm.Height - 23 - FORM_Y_MARGIN - titleHeight
                    };

                    butok.Click += delegate { _state = DialogResult.OK; msgBoxFrm.Close(); };
                    msgBoxFrm.Controls.Add(butok);
                    msgBoxFrm.AcceptButton = butok;

                    var butcancel = new MyButton
                    {
                        Size = new Size(75, 23),
                        Text = "取消",
                        Left = msgBoxFrm.Width - 75 - FORM_X_MARGIN,
                        Top = msgBoxFrm.Height - 23 - FORM_Y_MARGIN - titleHeight
                    };

                    butcancel.Click += delegate { _state = DialogResult.Cancel; msgBoxFrm.Close(); };
                    msgBoxFrm.Controls.Add(butcancel);
                    msgBoxFrm.CancelButton = butcancel;
                    break;

                default:
                    throw new NotImplementedException("Only MessageBoxButtons.OK and YesNo supported at this time");
            }
        }
开发者ID:lzq888,项目名称:PlayuavOSD,代码行数:89,代码来源:CustomMessageBox.cs


示例12: ShowUI

        static DialogResult ShowUI(string title, string promptText, string value, bool password = false)
        {
            Form form = new Form();
            Label label = new Label();
            TextBox textBox = new TextBox();
            if (password)
                textBox.UseSystemPasswordChar = true;
            MyButton buttonOk = new MyButton();
            MyButton buttonCancel = new MyButton();
            //System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainV2));
            //form.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));

            // Suspend form layout.
            form.SuspendLayout();
            const int yMargin = 10;

            //
            // label
            //
            var y = 20;
            label.AutoSize = true;
            label.Location = new Point(9, y);
            label.Size = new Size(372, 13);
            label.Text = promptText;
            label.MaximumSize = new Size(372, 0);

            //
            // textBox
            //
            textBox.Size = new Size(372, 20);
            textBox.Text = value;
            textBox.TextChanged += textBox_TextChanged;

            //
            // buttonOk
            //
            buttonOk.Size = new Size(75, 23);
            buttonOk.Text = "OK";
            buttonOk.DialogResult = DialogResult.OK;
            
            //
            // buttonCancel
            //
            buttonCancel.Size = new Size(75, 23);
            buttonCancel.Text = "Cancel";
            buttonCancel.DialogResult = DialogResult.Cancel;
            
            //
            // form
            //
            form.TopMost = true;
            form.TopLevel = true;
            form.Text = title;
            form.ClientSize = new Size(396, 107);
            form.Controls.AddRange(new Control[] { label, textBox, buttonOk, buttonCancel });
            form.FormBorderStyle = FormBorderStyle.FixedSingle;
            form.StartPosition = FormStartPosition.CenterScreen;
            form.MinimizeBox = false;
            form.MaximizeBox = false;
            form.AcceptButton = buttonOk;
            form.CancelButton = buttonCancel;

            // Resume form layout
            form.ResumeLayout(false);
            form.PerformLayout();

            // Adjust the location of textBox, buttonOk, buttonCancel based on the content of the label.
            y = y + label.Height + yMargin;
            textBox.Location = new Point(12, y);
            y = y + textBox.Height + yMargin;
            buttonOk.Location = new Point(228, y);
            buttonCancel.Location = new Point(309, y);
            // Increase the size of the form.
            form.ClientSize = new Size(396, y + buttonOk.Height + yMargin);

            if (ApplyTheme != null)
                ApplyTheme(form);
            

            Console.WriteLine("Input Box " + System.Threading.Thread.CurrentThread.Name);

            Application.DoEvents();

            form.ShowDialog();

            Console.WriteLine("Input Box 2 " + System.Threading.Thread.CurrentThread.Name);

            DialogResult dialogResult = form.DialogResult;

            if (dialogResult == DialogResult.OK)
            {
                value = textBox.Text;
                InputBox.value = value;
            }

            form.Dispose();

            TextChanged = null;

            form = null;
//.........这里部分代码省略.........
开发者ID:duyisu,项目名称:MissionPlanner,代码行数:101,代码来源:InputBox.cs


示例13: InitializeComponent

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainV2));
            this.MainMenu = new System.Windows.Forms.MenuStrip();
            this.CTX_mainmenu = new System.Windows.Forms.ContextMenuStrip(this.components);
            this.autoHideToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.fullScreenToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.readonlyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.MenuFlightData = new System.Windows.Forms.ToolStripButton();
            this.MenuFlightPlanner = new System.Windows.Forms.ToolStripButton();
            this.MenuInitConfig = new System.Windows.Forms.ToolStripButton();
            this.MenuConfigTune = new System.Windows.Forms.ToolStripButton();
            this.MenuSimulation = new System.Windows.Forms.ToolStripButton();
            this.MenuTerminal = new System.Windows.Forms.ToolStripButton();
            this.MenuHelp = new System.Windows.Forms.ToolStripButton();
            this.MenuConnect = new System.Windows.Forms.ToolStripButton();

            this.MenuDonate = new System.Windows.Forms.ToolStripMenuItem();
            this.menu = new MissionPlanner.Controls.MyButton();
            this.panel1 = new System.Windows.Forms.Panel();
            this.connectionOptionsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.MainMenu.SuspendLayout();
            this.CTX_mainmenu.SuspendLayout();
            this.panel1.SuspendLayout();
            this.SuspendLayout();
            //
            // MainMenu
            //

            this.MainMenu.ContextMenuStrip = this.CTX_mainmenu;
            this.MainMenu.GripMargin = new System.Windows.Forms.Padding(0);
            this.MainMenu.ImageScalingSize = new System.Drawing.Size(0, 0);
            this.MainMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.MenuFlightData,
            this.MenuFlightPlanner,
            this.MenuInitConfig,
            this.MenuConfigTune,
            this.MenuSimulation,
            this.MenuTerminal,
            this.MenuHelp,
            this.MenuConnect,

            this.MenuDonate});
            resources.ApplyResources(this.MainMenu, "MainMenu");
            this.MainMenu.Name = "MainMenu";
            this.MainMenu.Stretch = false;
            this.MainMenu.ItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.MainMenu_ItemClicked);
            this.MainMenu.MouseLeave += new System.EventHandler(this.MainMenu_MouseLeave);
            //
            // CTX_mainmenu
            //
            this.CTX_mainmenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.autoHideToolStripMenuItem,
            this.fullScreenToolStripMenuItem,
            this.readonlyToolStripMenuItem,
            this.connectionOptionsToolStripMenuItem});
            this.CTX_mainmenu.Name = "CTX_mainmenu";
            resources.ApplyResources(this.CTX_mainmenu, "CTX_mainmenu");
            //
            // autoHideToolStripMenuItem
            //
            this.autoHideToolStripMenuItem.CheckOnClick = true;
            this.autoHideToolStripMenuItem.Name = "autoHideToolStripMenuItem";
            resources.ApplyResources(this.autoHideToolStripMenuItem, "autoHideToolStripMenuItem");
            this.autoHideToolStripMenuItem.Click += new System.EventHandler(this.autoHideToolStripMenuItem_Click);
            //
            // fullScreenToolStripMenuItem
            //
            this.fullScreenToolStripMenuItem.CheckOnClick = true;
            this.fullScreenToolStripMenuItem.Name = "fullScreenToolStripMenuItem";
            resources.ApplyResources(this.fullScreenToolStripMenuItem, "fullScreenToolStripMenuItem");
            this.fullScreenToolStripMenuItem.Click += new System.EventHandler(this.fullScreenToolStripMenuItem_Click);
            //
            // readonlyToolStripMenuItem
            //
            this.readonlyToolStripMenuItem.CheckOnClick = true;
            this.readonlyToolStripMenuItem.Name = "readonlyToolStripMenuItem";
            resources.ApplyResources(this.readonlyToolStripMenuItem, "readonlyToolStripMenuItem");
            this.readonlyToolStripMenuItem.Click += new System.EventHandler(this.readonlyToolStripMenuItem_Click);
            //
            // MenuFlightData
            //
            resources.ApplyResources(this.MenuFlightData, "MenuFlightData");
            this.MenuFlightData.F 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Controls.ProgressReporterDialogue类代码示例发布时间:2022-05-26
下一篇:
C# Controls.HUD类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap