RemoveAll() public method

public RemoveAll ( ) : void
return void
コード例 #1
0
 public void SetText(string text)
 {
     if (IsDiff(_toolTipText, text))
     {
         _toolTipText = text;
         if (_toolTipText == null)
         {
             _toolTip.RemoveAll();
         }
         else if (_toolTipText.Length == 0)
         {
             _toolTip.RemoveAll();
         }
         else
         {
             /* update the hover text and rearm the delay so we
              * hover as long as the API will allow */
             _toolTip.SetToolTip(_control, _toolTipText);
             _toolTip.AutoPopDelay = 32767;
         }
     }
     else
     {
         /* nothing to do */
     }
 }
コード例 #2
0
 private void button1_MouseHover(object sender, EventArgs e)
 {
     ToolTip tt = new ToolTip();
     if (this.project.is_bid_added)
     { tt.SetToolTip(this.button1, "¬ы уже добавили ставку к этому проекту"); }
     else { tt.RemoveAll(); }
 }
コード例 #3
0
ファイル: ToolTipTest.cs プロジェクト: nlhepler/mono
		public void RemoveToolTipTest ()
		{
			ToolTip myToolTip = new ToolTip ();
			Button myButton = new Button ();
			myToolTip.ShowAlways = true;
			myToolTip.SetToolTip (myButton, "My Button");
			myToolTip.RemoveAll ();
			Assert.AreEqual ("", myToolTip.GetToolTip (myButton), "#Mtd2");
		}
コード例 #4
0
        void TemplateDocTemplate_DocAdded(Document doc)
        {
            TemplateDoc tmpd = (TemplateDoc)doc;

            tmpd.ModifiedChanged += new TemplateDoc.ModifiedChangedHandler(TemplateDoc_ModifiedChanged);
            tmpd.NameChanged     += new TemplateDoc.NameChangedHandler(TemplateDoc_NameChanged);
            ComboItem ci = new ComboItem(tmpd);

            comboDocs.SelectedIndex = comboDocs.Items.Add(ci);
            Template[] atmpl    = tmpd.GetTemplates();
            ArrayList  alsNames = new ArrayList();

            foreach (Template tmpl in atmpl)
            {
                alsNames.Add(tmpl.Name);
            }
            toolTip.RemoveAll();
            TemplateDocTemplate_TemplatesAdded(tmpd, (string[])alsNames.ToArray(typeof(string)));
        }
コード例 #5
0
        /// <summary>
        ///   Clears all errors
        /// </summary>
        public void ClearErrors()
        {
            foreach (KeyValuePair <Control, Color> pair in _originalColors)
            {
                pair.Key.BackColor = pair.Value;
            }

            _errorTexts.Clear();
            _toolTip.RemoveAll();
            _erroredControls.Clear();
        }
コード例 #6
0
 private void FillDescription()
 {
     if (editorID.Text != string.Empty)
     {
         labelDescription.Text = GetDescription(editorID.Text);
         SetToolTip(GetToolTipString());
     }
     else
     {
         toolTip.RemoveAll();
     }
 }
コード例 #7
0
        private void FillDescription()
        {
            if (editorID.Text != string.Empty)
            {
                //if(_description == null		)
                _description = GetDescription(editorID.Text);

                labelDescription.Text = _description;
                if (_description == "")
                {
                    editorID.Text = "";
                    //Nuevo German 01/09/2005 *********************************************
                    _selectedItems.Clear();
                    _selectedRow = null;
                    //*********************************************************************
                }
                else
                {
                    SetToolTip(GetToolTipString());
                }
            }
            else
            {
                toolTip.RemoveAll();
                labelDescription.Text = "";
                //Nuevo German 01/09/2005 *********************************************
                _selectedItems.Clear();
                _selectedRow = null;
                //*********************************************************************
            }
            if (ValueChanged != null)
            {
                ValueChanged(this, new System.EventArgs());
            }
            if (DataValueChanged != null)
            {
                DataValueChanged(this, new EventArgs());
            }
        }
コード例 #8
0
ファイル: BilliardForm.cs プロジェクト: h-dashti/Billiard
        private void buttonStart_Click(object sender, System.EventArgs e)
        {
            TurnOffAllMouseHandle();
            toolTip1.RemoveAll();

            if (((Button)sender).Text == "Start")
            {
                buttonPause.Text    = "Pause";
                buttonPause.Enabled = true;
                buttonStart.Text    = "Stop";

                timer.Tick += new EventHandler(timer_Tick);
                timer.Start();
            }
            else if (((Button)sender).Text == "Stop")
            {
                buttonPause.Text    = "Pause";
                buttonPause.Enabled = true;
                buttonStart.Text    = "Reset";

                timer.Tick -= new EventHandler(timer_Tick);
            }
            else if (((Button)sender).Text == "Reset")
            {
                string aboutballs = "Press left button and hold it to moving the ball." +
                                    "\r\n" + "Press right button to changing the ball's properties.";
                toolTip1.SetToolTip(pictureBox1, aboutballs);


                buttonPause.Text    = "Pause";
                buttonPause.Enabled = false;
                buttonStart.Text    = "Start";


                for (int i = 0; i < balls.Length; i++)
                {
                    if (tempBalls[i] != null)
                    {
                        balls[i] = new Ball(tempBalls[i].X, tempBalls[i].Y, tempBalls[i].Radius,
                                            tempBalls[i].Theta, tempBalls[i].V, tempBalls[i].MueG,
                                            tempBalls[i].Color, tempBalls[i].GetSetTable);
                    }
                }

                TurnOnAllMouseHandle();
            }
            pictureBox1.Invalidate();
        }
コード例 #9
0
ファイル: TrustManagerPromptUI.cs プロジェクト: ash2005/z
 private void linkLblFromUrl_MouseLeave(object sender, EventArgs e)
 {
     if (!controlToolTip && toolTipFromUrl != null && toolTipFromUrl.GetHandleCreated())
     {
         toolTipFromUrl.RemoveAll();
         IntSecurity.AllWindows.Assert();
         try
         {
             toolTipFromUrl.Hide(this);
         }
         finally
         {
             System.Security.CodeAccessPermission.RevertAssert();
         }
     }
 }
コード例 #10
0
        public LabelTextBox()
        {
            textToolTip.IsBalloon  = true;
            textToolTip.ShowAlways = true;

            this.MouseDown  += new MouseEventHandler(LabelTextBox_MouseDown);
            this.MouseLeave += new EventHandler(LabelTextBox_MouseLeave);
            this.KeyDown    += new KeyEventHandler(LabelTextBox_KeyDown);
            this.KeyUp      += new KeyEventHandler(LabelTextBox_KeyUp);
            this.Leave      += new EventHandler(LabelTextBox_Leave);
            this.KeyPress   += new KeyPressEventHandler(LabelTextBox_KeyPress);

            if (lblText != string.Empty)
            {
                this.ForeColor = lblColor;
                this.Text      = lblText;
            }

            textToolTip.RemoveAll();
            textToolTip.SetToolTip(this, lblText);
        }
コード例 #11
0
        public static void tooltip_graph_display(System.Windows.Forms.ToolTip t, System.Windows.Forms.MouseEventArgs e, Chart c, System.Drawing.Point?p)
        {
            t.RemoveAll();
            System.Drawing.Point pos = e.Location;
            if (p.HasValue && pos == p.Value)
            {
                return;
            }

            System.Windows.Forms.DataVisualization.Charting.HitTestResult[] results = new System.Windows.Forms.DataVisualization.Charting.HitTestResult[4];

            try
            {
                results = c.HitTest(pos.X, pos.Y, false, ChartElementType.DataPoint);

                foreach (System.Windows.Forms.DataVisualization.Charting.HitTestResult result in results)
                {
                    if (result.ChartElementType == ChartElementType.DataPoint)
                    {
                        DataPoint prop = result.Object as DataPoint;
                        if (prop != null)
                        {
                            double pointXPixel = result.ChartArea.AxisX.ValueToPixelPosition(prop.XValue);
                            double pointYPixel = result.ChartArea.AxisY.ValueToPixelPosition(prop.YValues[0]);

                            // check if the cursor is really close to the point (2 pixels around the point)
                            if (Math.Abs(pos.X - pointXPixel) < 2) //&& Math.Abs(pos.Y - pointYPixel) < 2)
                            {
                                t.Show("X=" + prop.XValue + ", Y=" + prop.YValues[0], c, pos.X, pos.Y - 15);
                            }
                        }
                    }
                }
            }
            catch
            { }
        }
コード例 #12
0
        private void removeExpenseCategoryToolTip(ToolTip expenseCategoriesTip, TextBox autoText)
        {
            expenseCategoriesTip.RemoveAll();

            //Creates a blank autocomplete collection
            autoText.AutoCompleteMode = AutoCompleteMode.Suggest;
            autoText.AutoCompleteSource = AutoCompleteSource.CustomSource;
            AutoCompleteStringCollection dataCollection = new AutoCompleteStringCollection();

            //Associates it with the textbox to remove any autocorrect fields
            autoCompleteItems(dataCollection, false);
            autoText.AutoCompleteCustomSource = dataCollection;
        }
コード例 #13
0
ファイル: MainForm.cs プロジェクト: CPutz/MyMap
        public void Initialize()
        {
            this.ClientSize = new Size(600, 600);
            this.MinimumSize = new Size(600, 530);
            this.BackColor = Color.WhiteSmoke;
            this.Text = null;
            ResourceManager resourcemanager
            = new ResourceManager("MyMap.Properties.Resources"
                     , Assembly.GetExecutingAssembly());
            this.Icon = (Icon)resourcemanager.GetObject("F_icon");
            MainFormText();
            //this.DoubleBuffered = true;

            // Hide the form so it seems like it closes faster
            this.Closing += (sender, e) => {
                this.Hide();
            };

            // Sends the scroll event to the map.
            this.MouseWheel += (object o, MouseEventArgs mea) =>
            {
                map.OnMouseScroll(o, new MouseEventArgs(mea.Button,
                                                        mea.Clicks,
                                                        mea.X - map.Location.X,
                                                        mea.Y - map.Location.Y,
                                                        mea.Delta));
            };

            #region UI Elements

            StreetSelectBox fromBox, toBox, viaBox;
            Label fromLabel, toLabel, viaLabel, checkLabel;
            MapDragButton startButton, endButton, viaButton, myBike, myCar;
            GroupBox radioBox;
            RadioButton fastButton, shortButton;
            ToolTip toolTipStart = new ToolTip(),
                    toolTipEnd = new ToolTip(),
                    toolTipVia = new ToolTip(),
                    toolTipBike = new ToolTip(),
                    toolTipCar = new ToolTip(),
                    toolTipCheckBike = new ToolTip(),
                    toolTipCheckCar = new ToolTip(),
                    toolTipCheckPT = new ToolTip(),
                    toolTipStartBox = new ToolTip(),
                    toolTipViaBox = new ToolTip(),
                    toolTipEndBox = new ToolTip();

            map = new MapDisplay(10, 110, this.ClientSize.Width - 20, this.ClientSize.Height - 120, loadingThread);
            map.Anchor = (AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Right | AnchorStyles.Bottom);
            this.Controls.Add(map);

            fromLabel = new Label();
            toLabel = new Label();
            viaLabel = new Label();
            ptCheck = new CheckBox();
            carCheck = new CheckBox();
            bikeCheck = new CheckBox();
            checkLabel = new Label();
            radioBox = new GroupBox();
            fastButton = new RadioButton();
            shortButton = new RadioButton();

            startButton = new MapDragButton(map, (Bitmap)resourcemanager.GetObject("start"), ButtonMode.From, this, true);
            endButton = new MapDragButton(map, (Bitmap)resourcemanager.GetObject("end"), ButtonMode.To, this, true);
            viaButton = new MapDragButton(map, (Bitmap)resourcemanager.GetObject("via"), ButtonMode.Via, this, false);
            myBike = new MapDragButton(map, (Bitmap)resourcemanager.GetObject("bike"), ButtonMode.NewBike, this, false);
            myCar = new MapDragButton(map, (Bitmap)resourcemanager.GetObject("car"), ButtonMode.NewCar, this, false);

            fromBox = new StreetSelectBox(map, loadingThread, IconType.Start, startButton, this);
            toBox = new StreetSelectBox(map, loadingThread, IconType.End, endButton, this);
            viaBox = new StreetSelectBox(map, loadingThread, IconType.Via, viaButton, this);

            fromBox.Location = new Point(100, 8);
            fromBox.Size = new Size(200, 30);
            toolTipStartBox.SetToolTip(fromBox, "Search for streets, press Enter to place from icon.");
            this.Controls.Add(fromBox);

            viaBox.Location = new Point(100, 38);
            viaBox.Size = new Size(200, 30);
            toolTipStartBox.SetToolTip(fromBox, "Search for streets, press Enter to place via icon.");
            this.Controls.Add(viaBox);

            toBox.Location = new Point(100, 68);
            toBox.Size = new Size(200, 30);
            toolTipStartBox.SetToolTip(fromBox, "Search for streets, press Enter to place to icon.");
            this.Controls.Add(toBox);

            fromLabel.Text = "From:";
            fromLabel.Font = new Font("Microsoft Sans Serif", 10);
            fromLabel.Location = new Point(10, 8);
            fromLabel.Size = new Size(45, 20);
            this.Controls.Add(fromLabel);

            viaLabel.Text = "Via:";
            viaLabel.Font = new Font("Microsoft Sans Serif", 10);
            viaLabel.Location = new Point(10, 38);
            viaLabel.Size = new Size(45, 20);
            this.Controls.Add(viaLabel);

            toLabel.Text = "To:";
            toLabel.Font = new Font("Microsoft Sans Serif", 10);
            toLabel.Location = new Point(10, 68);
            toLabel.Size = new Size(45, 20);
            this.Controls.Add(toLabel);

            startButton.Location = new Point(55, 3);
            startButton.Size = new Size(40, 32);
            //startButton.Click += (object o, EventArgs ea) => { map.BMode = ButtonMode.From; };
            startButton.FlatStyle = FlatStyle.Flat;
            startButton.BackgroundImage = (Bitmap)resourcemanager.GetObject("start");
            startButton.FlatAppearance.BorderColor = backColor;
            startButton.FlatAppearance.MouseOverBackColor = backColor;
            startButton.FlatAppearance.MouseDownBackColor = backColor;
            toolTipStart.SetToolTip(startButton, "Drag icon to map to set your start location");
            this.Controls.Add(startButton);

            viaButton.Location = new Point(55, 33);
            viaButton.Size = new Size(40, 32);
            //viaButton.Click += (object o, EventArgs ea) => { map.BMode = ButtonMode.Via; };
            viaButton.BackgroundImage = (Bitmap)resourcemanager.GetObject("via");
            viaButton.FlatStyle = FlatStyle.Flat;
            viaButton.FlatAppearance.BorderColor = backColor;
            viaButton.FlatAppearance.MouseOverBackColor = backColor;
            viaButton.FlatAppearance.MouseDownBackColor = backColor;
            toolTipVia.SetToolTip(viaButton, "Drag icon to map to add a through location");
            this.Controls.Add(viaButton);

            endButton.Location = new Point(55, 63);
            endButton.Size = new Size(40, 32);
            //endButton.Click += (object o, EventArgs ea) => { map.BMode = ButtonMode.To;};
            endButton.BackgroundImage = (Bitmap)resourcemanager.GetObject("end");
            endButton.FlatStyle = FlatStyle.Flat;
            endButton.FlatAppearance.BorderColor = backColor;
            endButton.FlatAppearance.MouseOverBackColor = backColor;
            endButton.FlatAppearance.MouseDownBackColor = backColor;
            toolTipEnd.SetToolTip(endButton, "Drag icon to map to set your end location");
            this.Controls.Add(endButton);

            checkLabel.Location = new Point(309, 8);
            checkLabel.Text = "Enable/Disable";
            checkLabel.Font = new Font("Microsoft Sans Serif", 10);
            checkLabel.Size = new Size(130, 20);
            this.Controls.Add(checkLabel);

            bikeCheck.Location = new Point(309, 29);
            bikeCheck.Size = new Size(34, 34);
            bikeCheck.Appearance = Appearance.Button;
            bikeCheck.BackgroundImage = (Bitmap)resourcemanager.GetObject("bike_check");
            bikeCheck.FlatStyle = FlatStyle.Flat;
            bikeCheck.FlatAppearance.CheckedBackColor = Color.FromArgb(224, 224, 224);
            bikeCheck.Checked = true;
            bikeCheck.FlatAppearance.CheckedBackColor = Color.LightGreen;
            bikeCheck.BackColor = Color.Red;
            bikeCheck.CheckedChanged += (object o, EventArgs ea) => { map.UpdateRoute(); };
            toolTipCheckBike.SetToolTip(bikeCheck, "Disable Bicycles");
            bikeCheck.CheckedChanged += (object o, EventArgs ea) =>
            {
                toolTipCheckBike.RemoveAll();
                if (bikeCheck.Checked)
                    toolTipCheckBike.SetToolTip(bikeCheck, "Disable Bicycles");
                else
                    toolTipCheckBike.SetToolTip(bikeCheck, "Enable Bicycles");
            };
            this.Controls.Add(bikeCheck);

            carCheck.Location = new Point(354, 29);
            carCheck.Size = new Size(34, 34);
            carCheck.Appearance = Appearance.Button;
            carCheck.BackgroundImage = (Bitmap)resourcemanager.GetObject("car_check");
            carCheck.FlatStyle = FlatStyle.Flat;
            carCheck.FlatAppearance.CheckedBackColor = Color.FromArgb(224, 224, 224);
            carCheck.Checked = true;
            carCheck.FlatAppearance.CheckedBackColor = Color.LightGreen;
            carCheck.BackColor = Color.Red;
            carCheck.CheckedChanged += (object o, EventArgs ea) => { map.UpdateRoute(); };
            toolTipCheckCar.SetToolTip(carCheck, "Disable Cars");
            carCheck.CheckedChanged += (object o, EventArgs ea) =>
            {
                toolTipCheckCar.RemoveAll();
                if (carCheck.Checked)
                    toolTipCheckCar.SetToolTip(carCheck, "Disable Cars");
                else
                    toolTipCheckCar.SetToolTip(carCheck, "Enable Cars");
            };
            this.Controls.Add(carCheck);

            ptCheck.Location = new Point(399, 29);
            ptCheck.Size = new Size(34, 34);
            ptCheck.Appearance = Appearance.Button;
            ptCheck.BackgroundImage = (Bitmap)resourcemanager.GetObject("ov");
            ptCheck.FlatStyle = FlatStyle.Flat;
            ptCheck.FlatAppearance.CheckedBackColor = Color.FromArgb(224, 224, 224);
            ptCheck.Checked = true;
            ptCheck.FlatAppearance.CheckedBackColor = Color.LightGreen;
            ptCheck.BackColor = Color.Red;
            ptCheck.CheckedChanged += (object o, EventArgs ea) => { map.UpdateRoute(); };
            toolTipCheckPT.SetToolTip(ptCheck, "Disable Public Transport");
            ptCheck.CheckedChanged += (object o, EventArgs ea) =>
            {
                toolTipCheckPT.RemoveAll();
                if (ptCheck.Checked)
                    toolTipCheckPT.SetToolTip(ptCheck, "Disable Public Transport");
                else
                    toolTipCheckPT.SetToolTip(ptCheck, "Enable Public Transport");
            };
            this.Controls.Add(ptCheck);

            myBike.Location = new Point(310, 74);
            myBike.Size = new Size(32, 32);
            myBike.BackgroundImage = (Bitmap)resourcemanager.GetObject("bike");
            myBike.FlatStyle = FlatStyle.Flat;
            myBike.FlatAppearance.BorderColor = backColor;
            myBike.FlatAppearance.MouseOverBackColor = backColor;
            myBike.FlatAppearance.MouseDownBackColor = backColor;
            myBike.FlatAppearance.BorderSize = 0;
            toolTipBike.SetToolTip(myBike, "Drag icon to map to place a personal bycicle");
            this.Controls.Add(myBike);

            myCar.Location = new Point(355, 74);
            myCar.Size = new Size(32, 32);
            myCar.BackgroundImage = (Bitmap)resourcemanager.GetObject("car");
            myCar.FlatStyle = FlatStyle.Flat;
            myCar.FlatAppearance.BorderColor = backColor;
            myCar.FlatAppearance.MouseOverBackColor = backColor;
            myCar.FlatAppearance.MouseDownBackColor = backColor;
            myCar.FlatAppearance.BorderSize = 0;
            toolTipCar.SetToolTip(myCar, "Drag icon to map to place a personal car");
            this.Controls.Add(myCar);

            radioBox.Location = new Point(445, 8);
            radioBox.Size = new Size(80, 65);
            radioBox.Text = "Route Options";

            fastButton.Location = new Point(450, 23);
            fastButton.Size = new Size(67, 17);
            fastButton.Text = "Fastest";
            fastButton.Checked = true;
            fastButton.CheckedChanged += (object o, EventArgs ea) => { if (fastButton.Checked) { map.RouteMode = RouteMode.Fastest; } };
            this.Controls.Add(fastButton);

            shortButton.Location = new Point(450, 48);
            shortButton.Size = new Size(67, 17);
            shortButton.Text = "Shortest";
            shortButton.CheckedChanged += (object o, EventArgs ea) => { if (shortButton.Checked) { map.RouteMode = RouteMode.Shortest; } };
            this.Controls.Add(shortButton);

            this.Controls.Add(radioBox);

            System.Windows.Forms.Timer timer = new System.Windows.Forms.Timer();
            timer.Interval = 10;
            timer.Tick += (object o, EventArgs ea) => {
                if (loadingThread.Graph != null && User != -1) { GraphLoaded(loadingThread.Graph, new EventArgs()); timer.Dispose(); } };
            timer.Start();

            this.GraphLoaded += (object o, EventArgs ea) => { Addvehicle(); this.Save(); };

            #endregion
        }
コード例 #14
0
 private void ClearErrorProvider(ErrorProvider activeErrorProvider, ToolTip activeToolTip)
 {
     activeErrorProvider.Clear();
     activeToolTip.RemoveAll();
 }
コード例 #15
0
ファイル: Error_Handle.cs プロジェクト: jollywho/LFI
 public static void Clear(ToolTip tp)
 {
     tp.RemoveAll();
 }
コード例 #16
0
ファイル: Features.cs プロジェクト: ishanagrawal/sudoku
 public void toolTipReset(ToolTip tt)
 {
     tt.RemoveAll();
 }
コード例 #17
0
 /// <summary>
 /// 通用右键 离开事件
 /// </summary>
 /// <param name="p_objSender"></param>
 /// <param name="p_objArg"></param>
 private void m_mthHandleMouseLeaveControl(object p_objSender, EventArgs p_objArg)
                 #endregion
 {
     m_ttpTextInfo.RemoveAll();
 }
コード例 #18
0
 private void HideErrorBalloon(ToolTip toolTip, Label inputLabel) {
     toolTip.RemoveAll();
     toolTip.Hide(this);
     inputLabel.ForeColor = SystemColors.ControlText;
 }
コード例 #19
0
        //Pre: The DGV Control showing event arg. Provides access to the current textbox in the dgv expenses.
        //Post: Fills expense categorization textbox with autocomplete values.
        //Description: If the current textbox is in the fifth (exp. categorization) column, fills it up with autcomplete values.
        public void displayExpenseCategorizationInfo(DataGridViewEditingControlShowingEventArgs e)
        {
            //Creates a tool tip to allow the user to see all category options.
            ToolTip expenseCategoriesTip = new ToolTip();

            //Casts the event args as a textbox.
            TextBox autoText = e.Control as TextBox;

            //Removes all existing tool tips.
            expenseCategoriesTip.RemoveAll();

            //Ensures the box isn't null
            if (autoText != null)
            {
                associateToolTips(expenseCategoriesTip, autoText);
            }
        }