当前位置: 首页>>代码示例>>C#>>正文


C# Forms.ToolBarButtonClickEventArgs类代码示例

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


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

示例1: tBar_ButtonClick

 void tBar_ButtonClick(object sender, ToolBarButtonClickEventArgs e)
 {
     OpenFileDialog f1;
     SaveFileDialog f2;
     switch (e.Button.ImageIndex)
     {
         case 0:
             
             f1 = new OpenFileDialog();
             if (f1.ShowDialog() == DialogResult.OK)
             {
                StreamReader r= File.OpenText(f1.FileName);
                textBox1.Text = r.ReadToEnd();
             }
             break;
         case 1:
             f2 = new SaveFileDialog();
             if (f2.ShowDialog() == DialogResult.OK)
             {
                 StreamWriter w = new StreamWriter(f2.FileName);
                 w.WriteLine(textBox1.Text);
                 w.Close();
             }
             break;
         case 2: Close(); break;
     }
 }
开发者ID:xs2ranjeet,项目名称:13ns9-1spr,代码行数:27,代码来源:Form1.cs

示例2: ToolBar1_ButtonClick

        void ToolBar1_ButtonClick(object sender, ToolBarButtonClickEventArgs e) {
            if (e.Button == ToolBarButtonFilter) {
                entidadeList1.FilterVisible = ToolBarButtonFilter.Pushed;
                ToolBarButtonNew.Pushed = false;
                ToolBarButtonEdit.Pushed = false;
                entidadeList1.DisableEdit();
            } else {
                if (e.Button == ToolBarButtonNew) {
                    entidadeList1.AddEntidadeMovimento();
                } else if (e.Button == ToolBarButtonEdit) {
                    if (e.Button.Pushed) {
                        entidadeList1.EnableEdit();
                    } else {
                        entidadeList1.DisableEdit();
                    }
                } else if (e.Button == ToolBarButtonDelete) {
                    var selectedEntity = entidadeList1.SelectedItems[0].Tag as GISADataset.MovimentoEntidadeRow;
                    if (CanDeleteEntity(selectedEntity))
                        entidadeList1.DeleteSelectedEntidade();
                    else
                        MessageBox.Show("Só é permitido apagar entidades requerentes que ainda não estejam associadas a requisições/devoluções.", "Eliminação de entidades requerentes", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
                Model.PersistencyHelper.save();
                Model.PersistencyHelper.cleanDeletedData();
            }

            UpdateEditGroup();
        }
开发者ID:aureliopires,项目名称:gisa,代码行数:28,代码来源:FormMovimentos.cs

示例3: ProjectNewAction_ButtonClick

		private void ProjectNewAction_ButtonClick(object sender, ToolBarButtonClickEventArgs e)
		{
			if (e.Button == _button)
			{
				DoAction();
			}
		}
开发者ID:ralescano,项目名称:castle,代码行数:7,代码来源:ViewAvailableItemsAction.cs

示例4: toolBar_ButtonClick

        protected virtual void toolBar_ButtonClick(object sender, ToolBarButtonClickEventArgs e)
        {
            if (e.Button.Equals(tbOkButton))
                resultButton.DialogResult = DialogResult.OK;
            else resultButton.DialogResult = DialogResult.Cancel;

            resultButton.raiseclick();
        }
开发者ID:ntj,项目名称:GravurGIS,代码行数:8,代码来源:IDialog.cs

示例5: OnClicked

        void OnClicked(object sender, ToolBarButtonClickEventArgs e)
        {
            FolderBrowserDialog dialog = new FolderBrowserDialog();

            if (dialog.ShowDialog(this) == DialogResult.OK) {
                selectedFolder = dialog.SelectedPath;
                statusbar.Text = selectedFolder;
            }
        }
开发者ID:SAUCS,项目名称:CPTR-571-A,代码行数:9,代码来源:MainForm2.cs

示例6: Handle_ToolbarButtonClick

        private void Handle_ToolbarButtonClick( object pComponent, ToolBarButtonClickEventArgs e )
        {
            if( m_Dictionary.Contains( e.Button ))
            {
                MenuCommand pMenuItem = (MenuCommand) m_Dictionary[ e.Button ];

                if( pMenuItem != null )
                    pMenuItem.PerformClick( );
            }
        }
开发者ID:NeuroRoboticTech,项目名称:AnimatLabVersion1,代码行数:10,代码来源:ButtonManager.cs

示例7: toolBar_ButtonClick

 private void toolBar_ButtonClick(object sender, ToolBarButtonClickEventArgs e) {
     string tag = (e.Button.Tag as string);
     if (tag == null)
         return;
     switch (tag.ToLower()) {
         case "clear":
             if (onClear != null)
                 onClear();
             break;
     }
 }
开发者ID:satr,项目名称:regexexplorer,代码行数:11,代码来源:CheckClearToolBarControl.cs

示例8: OnButtonClick

        protected override void OnButtonClick(ToolBarButtonClickEventArgs e)
        {
            if (this.wholeDropDownButtons.Contains(e.Button))
            {
                // As the click event has fired for a whole dropdown we aren't
                // running under Windows, so show it ourselves
                this.ShowDropdownMenu(e.Button);
                return;
            }

            base.OnButtonClick(e);
        }
开发者ID:ribbons,项目名称:RadioDownloader,代码行数:12,代码来源:ExtToolBar.cs

示例9: toolBar_ButtonClick

 void toolBar_ButtonClick(object sender, ToolBarButtonClickEventArgs e)
 {
     if (e.Button == backButton)
     {
         shellView.NavigateBack();
     }
     else if (e.Button == forwardButton)
     {
         shellView.NavigateForward();
     }
     else if (e.Button == upButton)
     {
         shellView.NavigateParent();
     }
 }
开发者ID:modulexcite,项目名称:gong-shell,代码行数:15,代码来源:ExplorerForm.cs

示例10: toolBar_ButtonClick

 private void toolBar_ButtonClick(object sender, ToolBarButtonClickEventArgs e) {
     string tag = (e.Button.Tag as string);
     if (tag == null)
         return;
     switch (tag.ToLower()) {
         case "scaleup":
             if (onScaleUp != null)
                 onScaleUp();
             break;
         case "scaledown":
             if (onScaleDown != null)
                 onScaleDown();
             break;
     }
 }
开发者ID:satr,项目名称:regexexplorer,代码行数:15,代码来源:ScalerToolBarControl.cs

示例11: MainToolBar_ButtonClick

		private void MainToolBar_ButtonClick(object sender, ToolBarButtonClickEventArgs e)
		{
			if (e.Button == toolBarButton1)
			{
				using(DatabaseConnectionDialog dialog = new DatabaseConnectionDialog())
				{
					DialogResult result = dialog.ShowDialog(Workspace.ActiveWindow);

					if (result == DialogResult.OK)
					{
						IDatabaseDefinitionBuilder defBuilder = 
							ServiceRegistry.Instance[ typeof(IDatabaseDefinitionBuilder) ] as IDatabaseDefinitionBuilder;

						DatabaseDefinition def = defBuilder.Build(dialog.Alias, dialog.ConnectionString);

						Model.CurrentProject.AddDatabaseDefinition(def);

						Model.Update();
					}
				}
			}
		}
开发者ID:atczyc,项目名称:castle,代码行数:22,代码来源:AddDatabaseAction.cs

示例12: controlBbar_ButtonClick

        void controlBbar_ButtonClick(object sender, ToolBarButtonClickEventArgs e)
        {
            if (e.Button == _mainForm.TbbtnBack)
            {
                //_browser.Navigate(new Uri("http://georize.de:9494/demo/index.html"));
                _browser.Navigate(new Uri("http://demo.krypsis.org/demo/index.html"));
            }
            else if (e.Button == _mainForm.TbbtnForward)
            {
                string path = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase);
                CfgFile cfg = new CfgFile(path + "\\confini.ci");
                string id = cfg.getValue("DATA", "uniqueid", true);
                if (id == "") {
                    MessageBox.Show("---");
                    SecurityProvider sp = new SecurityProvider();
                    id = sp.GetUniqueIDWithTimestamp(32);
                    cfg.setValue("DATA", "uniqueid", id ,true);
                    cfg.Save();
                }
                MessageBox.Show(id);
            }
            else if (e.Button == _mainForm.TbbtnNew)
            {

            }
            else if (e.Button == _mainForm.TbbtnSearch)
            {

            }
            else if (e.Button == _mainForm.TbbtnShow)
            {

            }
            else if (e.Button == _mainForm.TbbtnFavorites)
            {
                MessageBox.Show(DeviceInfo.GetSystemCountry()+"   "+DeviceInfo.GetSysstemLanguage());
            }
        }
开发者ID:ssoller,项目名称:Krypsis,代码行数:38,代码来源:MainController.cs

示例13: toolBarBrushType_ButtonClick

        private void toolBarBrushType_ButtonClick(object sender, ToolBarButtonClickEventArgs e)
        {
            // 设置Button按下状态
            foreach (ToolBarButton button in toolBarBrushType.Buttons)
            {
                button.Pushed = (button == e.Button);
            }

            // 检测按钮按下状态,处理之
            if (toolBarButtonPull.Pushed)
            {
                mEditTerrainHelper.DeformBrushType = 1;
            }
            else if (toolBarButtonSmooth.Pushed)
            {
                mEditTerrainHelper.DeformBrushType = 2;
            }
            else if (toolBarButtonNoise.Pushed)
            {
                mEditTerrainHelper.DeformBrushType = 3;
            }
            else if (toolBarButtonAverage.Pushed)
            {
                mEditTerrainHelper.DeformBrushType = 4;
            }
            else if (toolBarButtonFlat.Pushed)
            {
                mEditTerrainHelper.DeformBrushType = 5;
            }

            // 更新UI Panel
            trackerBarWidgetOutterRadius.Value = Convert.ToDecimal(mEditTerrainHelper.DeformBrushOutterRadius);
            trackerBarWidgetInnerRadius.Value = Convert.ToDecimal(mEditTerrainHelper.DeformBrushInnerRadius);
            trackerBarWidgetBrushPower.Value = Convert.ToDecimal(mEditTerrainHelper.DeformBrushHardness);
            trackerBarWidgetHeight.Value = Convert.ToDecimal(mEditTerrainHelper.DeformBrushHeight);
        }
开发者ID:arundev,项目名称:dev-code,代码行数:36,代码来源:TerrainDeformPanel.cs

示例14: ToolBar_ButtonClick

        void ToolBar_ButtonClick(object sender, ToolBarButtonClickEventArgs e) {
            foreach (NodeTypeEntry nte in m_NodeTypes)
                if (nte.Button == e.Button) {
                    var center = new Point();
                    var random = new Random(1);

                    var rect1 = gViewer.ClientRectangle; //gViewer.Graph.GeometryGraph.BoundingBox;
                    var rect2 = gViewer.Graph.BoundingBox;
                    Point p = gViewer.ScreenToSource(rect1.Location);
                    Point p2 = gViewer.ScreenToSource(rect1.Location + rect1.Size);
                    if (p.X < rect2.Left)
                        p.X = rect2.Left;
                    if (p2.X > rect2.Right)
                        p2.X = rect2.Right;
                    if (p.Y > rect2.Top)
                        p.Y = rect2.Top;
                    if (p2.Y < rect2.Bottom)
                        p2.Y = rect2.Bottom;
                    var rect = new Microsoft.Msagl.Core.Geometry.Rectangle(p, p2);

                    center.X = rect.Left + random.NextDouble()*rect.Width;
                    center.Y = rect.Bottom + random.NextDouble()*rect.Height;

                    
                }
        }
开发者ID:filipparacka,项目名称:Diplomovka,代码行数:26,代码来源:GraphEditor.cs

示例15: chartToolBar_ButtonClick

 private void chartToolBar_ButtonClick(object sender, ToolBarButtonClickEventArgs e)
 {
     if (e.Button == this.btnZoomIn)
         this.ZoomIn();
     if (e.Button == this.btnZoomOut)
         this.ZoomOut();
     if (e.Button == this.btnCrosshair)
         this.Crosshair();
     if (e.Button == this.btnCursor)
         this.Pointer();
     if (e.Button == this.btnLinear)
         this.Linear();
     if (e.Button == this.btnLog)
         this.Log();
     if (e.Button == this.btnCandle)
         this.Candle();
     if (e.Button == this.btnBar)
         this.Bar();
     if (e.Button == this.btnLine)
         this.Line();
     if (e.Button == this.btnWholeRange)
         this.WholeRange();
     if (e.Button == this.btnTrailing)
         this.Trailing();
     if (e.Button == this.btnFixed)
         this.Fixed();
     if (e.Button != this.btnPnF)
         return;
     this.PnF();
 }
开发者ID:28427328,项目名称:SQCharts,代码行数:30,代码来源:ToolBar.cs


注:本文中的System.Windows.Forms.ToolBarButtonClickEventArgs类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。