Esempio n. 1
0
        void contexMenu_ItemClicked(object sender, Forms.ToolStripItemClickedEventArgs e)
        {
            string msg = String.Format("Item clicked: {0}", e.ClickedItem.Text);

            Forms.ToolStripItem item = e.ClickedItem;
            Console.WriteLine(msg);
        }
 void OnMenuClicked(object sender, ToolStripItemClickedEventArgs args)
 {
     foreach (var i in _guiElements) {
         if (i.MenuTitle == args.ClickedItem.Text)
             i.Form.Show();
     }
 }
		void ctxColumns_ItemClicked(object sender, ToolStripItemClickedEventArgs e)	{
			// F4.CheckOnClick=False because mni stays unchecked after I just checked
			ToolStripMenuItem mni = e.ClickedItem as ToolStripMenuItem;
			if (mni == null) {
				string msg = "You clicked on something not being a ToolStripMenuItem";
				Assembler.PopupException(msg);
				return;
			}
			mni.Checked = !mni.Checked;
			if (columnsByFilters.ContainsKey(mni) == false) {
				string msg = "Add ToolStripMenuItem[" + mni.Name + "] into columnsByFilters";
				Assembler.PopupException(msg);
				return;
			}
			bool newCheckedState = mni.Checked;
			// F4.CheckOnClick=true mni.Checked = newState;
//			this.settingsManager.Set("ExecutionForm." + mni.Name + ".Checked", mni.Checked);
//			this.settingsManager.SaveSettings();

			List<OLVColumn> columns = columnsByFilters[mni];
			if (columns.Count == 0) return;

			foreach (OLVColumn column in columns) {
				column.IsVisible = newCheckedState;
			}
			this.OrdersTree.RebuildColumns();
		}
Esempio n. 4
0
        private void CotxMenu_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
        {
            switch (e.ClickedItem.ToString())
            {
                case "Editar":
                    lblTitulo.Text = "Editar Cliente";
                    txtNombre.Text = grid.Rows[currentMouseOverRow].Cells[1].Value.ToString();
                    txtAp.Text = grid.Rows[currentMouseOverRow].Cells[2].Value.ToString();
                    txtAm.Text = grid.Rows[currentMouseOverRow].Cells[3].Value.ToString();
                    txtCalle.Text = grid.Rows[currentMouseOverRow].Cells[4].Value.ToString();
                    txtColonia.Text = grid.Rows[currentMouseOverRow].Cells[6].Value.ToString();
                    txtNumero.Text = grid.Rows[currentMouseOverRow].Cells[5].Value.ToString();
                    txtCP.Text = grid.Rows[currentMouseOverRow].Cells[7].Value.ToString();
                    txtRFC.Text = grid.Rows[currentMouseOverRow].Cells[14].Value.ToString();
                    string fecha = grid.Rows[currentMouseOverRow].Cells[9].Value.ToString();

                    DateTime dt = DateTime.Parse(fecha);
                    DateFechaNacimiento.Value = dt;
                    if (grid.Rows[currentMouseOverRow].Cells[11].Value.ToString() == "M")
                        radHombre.Checked = true;
                    else
                        radMujer.Checked = true;

                    Dialogo("Editar Producto");
                    break;
                case "Eliminar":
                    //manda un mensaje de si esta seguro (solo es logico)
                    break;
            }
        }
Esempio n. 5
0
 public void cmsTreeNodeEdit_ItemClicked(object sender, System.Windows.Forms.ToolStripItemClickedEventArgs e)
 {
     //setting the edited node new value
     nodeEdited.Text = e.ClickedItem.Text;
     // saving station object or port number in tag
     nodeEdited.Tag = e.ClickedItem.Tag;
 }
 private void toolBar_ButtonClick(object sender, System.Windows.Forms.ToolStripItemClickedEventArgs e)
 {
     if (e.ClickedItem == toolBarButtonOpen)
     {
         menuItemOpen_Click(null, null);
     }
     else if (e.ClickedItem == toolBarButtonSolutionExplorer)
     {
         menuItemSolutionExplorer_Click(null, null);
     }
     else if (e.ClickedItem == toolBarButtonPropertyWindow)
     {
         menuItemPropertyWindow_Click(null, null);
     }
     else if (e.ClickedItem == toolBarButtonToolbox)
     {
         menuItemToolbox_Click(null, null);
     }
     else if (e.ClickedItem == toolBarButtonOutputWindow)
     {
         menuItemOutputWindow_Click(null, null);
     }
     else if (e.ClickedItem == toolBarButtonTaskList)
     {
         menuItemTaskList_Click(null, null);
     }
     else if (e.ClickedItem == toolBarButtonLayoutByCode)
     {
         menuItemLayoutByCode_Click(null, null);
     }
     else if (e.ClickedItem == toolBarButtonLayoutByXml)
     {
         menuItemLayoutByXml_Click(null, null);
     }
 }
Esempio n. 7
0
        private void AttachmentToolStrip_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
        {
            if (e.ClickedItem.Tag == null)
                return;
            else if(e.ClickedItem.Tag.ToString() == "Add")
            {
                OpenFileDialog dialog = new OpenFileDialog();

                if (dialog.ShowDialog() == DialogResult.OK)
                {
                    ListViewItem item = new ListViewItem(Path.GetFileName(dialog.FileName) + " (" + ((double)(new FileInfo(dialog.FileName).Length / 1000)).ToString("f2") + " KB)");
                    item.ImageIndex = 0;
                    item.Tag = dialog.FileName;
                    this.attachments.Add(dialog.FileName);
                    this.Attachments.Items.Add(item);
                }
            }
            else if (e.ClickedItem.Tag.ToString() == "Delete")
            {
                if (this.Attachments.SelectedItems.Count > 0)
                {
                    this.attachments.Remove(this.Attachments.SelectedItems[0].Tag.ToString());
                    this.Attachments.SelectedItems[0].Remove();
                }
            }
        }
 private void bindingNavigator1_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
 {
     if (e.ClickedItem.Text == "关闭")
     {
         this.Close();
     }
     if (e.ClickedItem.Text == "上一页")
     {
         pageCurrent--;
         if (pageCurrent <= 0)
         {
             MessageBox.Show("已经是第一页,请点击“下一页”查看!");
             return;
         }
         else
         {
             nCurrent = pageSize * (pageCurrent - 1);
         }
         LoadData();
     }
     if (e.ClickedItem.Text == "下一页")
     {
         pageCurrent++;
         if (pageCurrent > pageCount)
         {
             MessageBox.Show("已经是最后一页,请点击“上一页”查看!");
             return;
         }
         else
         {
             nCurrent = pageSize * (pageCurrent - 1);
         }
         LoadData();
     }
 }
 private void contextMenuStrip1_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
 {
     try
     {
         if (e.ClickedItem == mnuAdd)
         {
             this.AddMachine();
         }
         if (e.ClickedItem == mnuDelete)
         {
             if (dataGridView1.SelectedRows[0] != null)
             {
                 ContextMenuStrip context = sender as ContextMenuStrip;
                 context.Close();
                 this.DeleteMachine(dataGridView1.SelectedRows[0]);
             }
         }
         if (e.ClickedItem == mnuEdit)
         {
             if (dataGridView1.SelectedRows != null && dataGridView1.SelectedRows.Count > 0)
             {
                 this.EditMachine(dataGridView1.SelectedRows[0]);
             }
         }
     }
     catch(Exception ex)
     {
         Log.LogError("contextMenuStrip1_ItemClicked", ex);
     }
 }
        private void MenuItemClicked(object sender, ToolStripItemClickedEventArgs e)
        {
            ToolStripMenuItem menuItem = e.ClickedItem as ToolStripMenuItem;

            if (menuItem == null)
                return;

            switch (menuItem.Text)
            {
                case EXPORT_TO_EXCEL:
                    ToExcel();
                    break;

                case EXPORT_TO_CSV:
                    ToCsv();
                    break;

                case SEARCH:
                    ShowSearch();
                    break;

                default:
                    if (!menuItem.Checked || Columns.GetColumnCount(DataGridViewElementStates.Visible) > 1)
                    {
                        DataGridViewColumn column = (DataGridViewColumn)menuItem.Tag;
                        column.Visible            = !menuItem.Checked;
                        menuItem.Checked          = column.Visible;
                    }
                    break;
            }
        }
Esempio n. 11
0
 private void editMenu_Clicked(object sender, ToolStripItemClickedEventArgs e)
 {
     //srcGrid.SelectedColumns[0].Index
     source = srcGrid.SelectedCells[0];
     srcTab = cTab.SelectedIndex;
     cTab.SelectedIndex = destTab;
 }
Esempio n. 12
0
        private void toolStrip1_ItemClick(object sender, System.Windows.Forms.ToolStripItemClickedEventArgs e)
        {
            switch (e.ClickedItem.Text.ToString())
            {
            case "Reload":
                Reload();
                break;

            case "Add":
                Add();
                break;

            case "Delete":
                Delete();
                break;

            case "Search":
                Search();
                break;

            case "Modify":
                Modify();
                break;

            case "Exit":
                Exit();
                break;

            default:
                break;
            }
        }
Esempio n. 13
0
        private void dropDownButton_DropDownItemClicked(object sender, ToolStripItemClickedEventArgs e)
        {
            var curItem = e.ClickedItem as ToolStripMenuItem;

            if (curItem == null || !curItem.Checked)
                return;

            foreach (var toolStripItem in Items)
            {
                var buttonItem = toolStripItem as ToolStripButton;

                if (buttonItem != null && buttonItem.Checked)
                    buttonItem.Checked = false;

                var dropDownButton = toolStripItem as ToolStripDropDownButton;

                if (dropDownButton != null && dropDownButton != curItem.OwnerItem)
                {
                    foreach (ToolStripMenuItem item in dropDownButton.DropDownItems)
                        item.Checked = false;
                }
            }

            Invalidate();
        }
Esempio n. 14
0
 public void lms_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
 {
     try {
         Process.Start(Options.settings.Editor, Main.StartupPath + "/mariadb/data/" + e.ClickedItem.Text);
     } catch (Exception ex) {
         Log.wnmp_log_error(ex.Message, Log.LogSection.WNMP_MARIADB);
     }
 }
Esempio n. 15
0
 private void globalScriptsToolStripMenuItem_DropDownItemClicked(object sender, ToolStripItemClickedEventArgs e)
 {
     if (e.ClickedItem.Tag != null)
     {
         var name = e.ClickedItem.Tag as string;
         PluginEngine.Default.ExecuteByName(name);
     }
 }
Esempio n. 16
0
 protected void ToolStrip1ItemClicked(object sender, ToolStripItemClickedEventArgs e)
 {
     if (ToolBarClick != null)
     {
         ToolBarClick(sender, e);
         
     }
 }
Esempio n. 17
0
 void FileToolBar_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
 {
     if (e.ClickedItem == tOpenDocument) Global.MainForm.Open();
     else if (e.ClickedItem == tSaveFile) Global.MainForm.DoSave();
     else if (e.ClickedItem == tSaveAll) Global.MainForm.DoSaveAll();
     else if (e.ClickedItem == tPrint) Global.MainForm.DoPrint();
     else if (e.ClickedItem == tPrintPreview) Global.MainForm.DoPrintPreview();
 }
Esempio n. 18
0
		private void ItemsListContextMenuItemClicked(object sender, ToolStripItemClickedEventArgs e)
		{
			if (e.ClickedItem.Text == @"Copy value")
			{
				var selectedValue = _itemsListView.SelectedItems[0].Text;
				Clipboard.SetText(selectedValue);
			}
		}
Esempio n. 19
0
 private void cMSTray_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
 {
     if (e.ClickedItem.Name == cMSTray_Start.Name)
         this.StartListenerThread();
     else if (e.ClickedItem.Name == cMSTray_Stop.Name)
         this.StopListenerThread();
     else if (e.ClickedItem.Name == cMSTray_Exit.Name)
         this.Close();
 }
Esempio n. 20
0
 private void contextMenuStrip1_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
 {
     if (e.ClickedItem.Text.StartsWith("Item"))
     {
         ToolStripMenuItem ptrMenu = (ToolStripMenuItem) e.ClickedItem;
         if (ptrMenu.HasDropDownItems) return;
         MessageBox.Show(ptrMenu.Text);
     }
 }
		protected override void OnDropDownItemClicked(ToolStripItemClickedEventArgs e) {
			ToolStripItem clickedItem = e.ClickedItem;
			if(Tag == null || !Tag.Equals(clickedItem.Tag)) {
				Tag = clickedItem.Tag;   
				Image = clickedItem.Image;
				if(PropertyChanged != null) PropertyChanged(this, new PropertyChangedEventArgs("SelectedTag"));
			}
			base.OnDropDownItemClicked(e);
		}
Esempio n. 22
0
 void EditToolBar_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
 {
     if (e.ClickedItem == tUndo) Global.MainForm.CurrentDocumentUndo();
     else if (e.ClickedItem == tRedo) Global.MainForm.CurrentDocumentRedo();
     else if (e.ClickedItem == tCut) Global.MainForm.CurrentDocumentCut();
     else if (e.ClickedItem == tCopy) Global.MainForm.CurrentDocumentCopy();
     else if (e.ClickedItem == tPaste) Global.MainForm.CurrentDocumentPaste();
     else if (e.ClickedItem == tDelete) Global.MainForm.CurrentDocumentDelete();
 }
Esempio n. 23
0
        private void toolBar_ItemClicked(object sender, System.Windows.Forms.ToolStripItemClickedEventArgs e)
        {
            MenuCommand cmd = e.ClickedItem.Tag as MenuCommand;

            if (cmd == null)
            {
                throw new NotImplementedException("Button not hooked up.");
            }
            Execute(cmd.CommandID);
        }
Esempio n. 24
0
 private void cmsServer_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
 {
     if (e.ClickedItem.Name == "tsmCreateDataBase")
     {
         FrmCreateDataBase frmCdb = new FrmCreateDataBase(lstDb);
         DialogResult dr = frmCdb.ShowDialog(this);
         if (dr == System.Windows.Forms.DialogResult.OK)
             populateTreeView();
     }
 }
        protected override void OnItemClicked(ToolStripItemClickedEventArgs e)
        {
            if (_ignoreNextItemClicked)
            {
                _ignoreNextItemClicked = false;
                return;
            }

            base.OnItemClicked(e);
        }
        protected override void OnItemClicked(ToolStripItemClickedEventArgs e)
        {
            AudioToolStripMenuItem item = e.ClickedItem as AudioToolStripMenuItem;
            if (item != null && !item.AutoCloseOnClick)
            {
                _cancelNextAttemptedClose = true;
            }

            base.OnItemClicked(e);
        }
Esempio n. 27
0
 private void toolS_NavBar_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
 {
     // Reset style on all navigation items
     foreach (ToolStripItem item in toolS_NavBar.Items)
         item.Font = new Font(item.Font.FontFamily, mainWindowParser.GetData<Single>("NavItemFontSize"),FontStyle.Regular);
     // Set style on the selected navigation item
     e.ClickedItem.Font = new Font(e.ClickedItem.Font.FontFamily, mainWindowParser.GetData<Single>("SelectedNavItemFontSize"), FontStyle.Bold);
     // Navigate to selected view
     panel_MainContainer.Controls.Clear();
     panel_MainContainer.Controls.Add(navigationDict[e.ClickedItem.Text]);
 }
Esempio n. 28
0
 void connectorToolStripDropDownButton_DropDownItemClicked(object sender, System.Windows.Forms.ToolStripItemClickedEventArgs e)
 {
     foreach (ToolStripMenuItem item in connectorToolStripDropDownButton.DropDownItems)
     {
         if (item.Checked)
         {
             item.Checked = false;
         }
     }
     (e.ClickedItem as ToolStripMenuItem).Checked = true;
 }
Esempio n. 29
0
 private void nicMainContextMenuStrip_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
 {
     if (e.ClickedItem == nicMainCtxMenuItemShow)
     {
         WindowState = FormWindowState.Normal;
     }
     else if (e.ClickedItem == nicMainCtxMenuItemExit)
     {
         Close();
     }
 }
Esempio n. 30
0
 private void DropDownExport_DropDownItemClicked(object sender, System.Windows.Forms.ToolStripItemClickedEventArgs e)
 {
     foreach (RenderingExtension ext in ReportViewer1.ServerReport.ListRenderingExtensions())
     {
         if (ext.LocalizedName == e.ClickedItem.Text)
         {
             ReportViewer1.ExportDialog(ext);
             break;
         }
     }
 }
Esempio n. 31
0
        private void addComponent_Click(object sender, ToolStripItemClickedEventArgs e)
        {
            string componentName = e.ClickedItem.Text;

            GameCore.AddComponent(int.Parse(e.ClickedItem.Tag.ToString()));
            RefreshSelectedEntity();

            // set the previous component index back to the component added
            for (int i = 0; i < componentsMenu.Items.Count; i++)
                if (componentsMenu.Items[i].ToString() == componentName)
                    componentsMenu.SelectedIndex = i;
        }
Esempio n. 32
0
    private void addReceiverCombo_DropDownItemClicked(object sender, ToolStripItemClickedEventArgs e)
    {
      ReceiverFactory.ReceiverInfo info = e.ClickedItem.Tag as ReceiverFactory.ReceiverInfo;
      if (info != null)
      {
        // Instantiates a new receiver based on the selected type
        IReceiver receiver = ReceiverFactory.Instance.Create(info.Type.FullName);

        AddedReceivers.Add(receiver);
        AddReceiver(receiver);
      }
    }
Esempio n. 33
0
 private void toolStrip1_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
 {
     switch (e.ClickedItem.Tag.ToString())
     {
         //case "NewDoc":
         //    Form newChild = new Form(); newChild.MdiParent = this; newChild.Show();
         //    newChild.Text = newChild.Text + " " + ++++openDocuments;
         //    break;
         //case "Cascade": this.LayoutMdi(System.Windows.Forms.MdiLayout.Cascade); break;
         //case "Title": this.LayoutMdi(System.Windows.Forms.MdiLayout.TileHorizontal); break;
     }
 }
Esempio n. 34
0
        private void toolStrip1_ItemClicked(object sender, System.Windows.Forms.ToolStripItemClickedEventArgs e)
        {
            ToolStrip tool = sender as ToolStrip;

            foreach (ToolStripButton selecteditem in tool.Items)
            {
                if (selecteditem.BackColor == Color.LightBlue)
                {
                    selecteditem.BackColor = System.Drawing.Color.Transparent;
                }
            }
            e.ClickedItem.BackColor = Color.LightBlue;
        }
Esempio n. 35
0
 void contextMenuStrip1_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
 {
     String text = e.ClickedItem.Text;
     foreach (DataSource s in gPane.Sources)
     {
         if (s.Name == text)
         {
             s.Active ^= true;
             gPane.Invalidate();
             break;
         }
     }
 }
Esempio n. 36
0
        private void contextMenuStrip1_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
        {
            DialogResult result = MessageBox.Show("Are you sure you want to delete the category?", "Expense Monitor Message", MessageBoxButtons.YesNo);

            if (result == DialogResult.Yes)
            {
                if (!deleteCategory())
                {
                    Helper.showMessage("Category could not be deleted as this category is used in some Expense item");
                }
            }
            refreshCategories();
        }
Esempio n. 37
0
        private void toolStrip1_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
        {
            List<SARCHashTable.SAHTEntry> list = new List<SARCHashTable.SAHTEntry>();
            foreach (var v in HashTable.Entries)
            {
                if (HashTable.GetEntryByHash(v.Hash) != v) continue;
                list.Add(v);
            }
            HashTable.Entries = list;

            HashTable.Entries.Sort((v1, v2) => v1.Name.CompareTo(v2.Name));
            UpdateEntries();
        }
Esempio n. 38
0
 private void contextMenuStripTray_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
 {
     switch (e.ClickedItem.Text.ToLower())
     {
         case "restore":
             this.ShowInTaskbar = true;
             notifyIcon1.Visible = false;
             break;
         case "exit":
             notifyIcon1.Visible = false;
             this.Close();
             break;
     }
 }
Esempio n. 39
0
 private void ToolBar_ButtonClick(object sender, System.Windows.Forms.ToolStripItemClickedEventArgs e)
 {
     if (e.ClickedItem == 新建NToolStripButton)
     {
         MenuItemNew_Click(null, null);
     }
     else if (e.ClickedItem == 打开OToolStripButton)
     {
         MenuItemOpen_Click(null, null);
     }
     else if (e.ClickedItem == 打印PToolStripButton)
     {
         MenuItemPrint_Click(null, null);
     }
 }
Esempio n. 40
0
        private void mnuCutCopy_ItemClicked(object sender, System.Windows.Forms.ToolStripItemClickedEventArgs e)
        {
            Clipboard.Clear();
            string strOutput = "";

            if (e.ClickedItem.Text == "Copy")
            {
                foreach (object item in lstErrors.Items)
                {
                    strOutput = strOutput + item.ToString() + Environment.NewLine;
                }

                Clipboard.SetText(strOutput);
            }
        }
Esempio n. 41
0
        /// <summary>
        /// Called if a ToolStripButton of the header context menu is pressed.
        /// </summary>
        private void ModListHeaderContextMenuStrip_ItemClicked(object sender, System.Windows.Forms.ToolStripItemClickedEventArgs e)
        {
            // ClickedItem is of type ToolStripItem, we need ToolStripButton.
            ToolStripMenuItem  clickedItem = e.ClickedItem    as ToolStripMenuItem;
            DataGridViewColumn col         = clickedItem?.Tag as DataGridViewColumn;

            if (col != null)
            {
                col.Visible = !clickedItem.Checked;
                configuration.SetColumnVisibility(col.Name, !clickedItem.Checked);
                if (col.Index == 0)
                {
                    InstallAllCheckbox.Visible = col.Visible;
                }
            }
        }
Esempio n. 42
0
 protected override void OnItemClicked(System.Windows.Forms.ToolStripItemClickedEventArgs e)
 {
     Oranikle.Studio.Controls.CtrlTabStripButton ctrlTabStripButton = e.ClickedItem as Oranikle.Studio.Controls.CtrlTabStripButton;
     if ((ctrlTabStripButton != null) && (ctrlTabStripButton != mySelTab))
     {
         bool flag = OnTabSelected(mySelTab, ctrlTabStripButton);
         if (!flag)
         {
             SuspendLayout();
             mySelTab = ctrlTabStripButton;
             ResumeLayout();
             base.OnItemClicked(e);
             Invalidate();
         }
     }
 }
Esempio n. 43
0
        /// <summary>
        /// Throbber's context menu > "Query XXX".
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void throbberContextMenu_ItemClicked(object sender, System.Windows.Forms.ToolStripItemClickedEventArgs e)
        {
            var ccpCharacter = m_character as CCPCharacter;

            if (ccpCharacter == null)
            {
                return;
            }

            if (e.ClickedItem.Tag is APIMethods)
            {
                var method = (APIMethods)e.ClickedItem.Tag;
                throbber.State = ThrobberState.Rotating;
                ccpCharacter.QueryMonitors.Query(method);
            }
        }
        void contexMenuuu_ItemClicked(object sender, System.Windows.Forms.ToolStripItemClickedEventArgs e)
        {
            System.Windows.Forms.ToolStripItem item = e.ClickedItem;

            if (item.Text == "הדבק מתחרה")
            {
                if (VisualLeagueEvent.ClipBoardValue < 1000)
                {
                    // no contender was copied do nothing
                }
                else
                {
                    PasteVisualContender();
                    // delete the last contnder that was copied
                    VisualLeagueEvent.ClipBoardValue = 0;
                }
            }
        }
        private void ContextMenu_ItemClicked(object sender, Forms.ToolStripItemClickedEventArgs e)
        {
            try
            {
                switch (e.ClickedItem.Text)
                {
                case "Exit":
                    this.Close();
                    break;

                default:
                    break;
                }
            }
            catch (Exception exception)
            {
                MessageBox.Show(exception.Message);
            }
        }
Esempio n. 46
0
 private void toolBar_ButtonClick(object sender, System.Windows.Forms.ToolStripItemClickedEventArgs e)
 {
     if (e.ClickedItem == toolBarButtonLayoutByCode)
     {
         menuItemLayoutByCode_Click(null, null);
     }
     else if (e.ClickedItem == toolBarButtonSave)
     {
         menuItemSave_click(null, null);
     }
     else if (e.ClickedItem == toolBarButtonCopy)
     {
         menuItemCopy_Click(null, null);
     }
     else if (e.ClickedItem == toolBarButtonPaste)
     {
         menuItemPaste_Click(null, null);
     }
 }
Esempio n. 47
0
        /// <summary>
        /// 是否按下一个指定的工具条按钮
        /// </summary>
        /// <param name="toolbarName">工具条的名字</param>
        /// <param name="buttonName">被按下的按钮的名字</param>
        /// <returns>true,成功 false,失败</returns>
        public bool PressToolbarButton(string toolbarName, string buttonName)
        {
            try
            {
                foreach (ToolStripItem tsItem in ((ToolStrip)(m_CustomToolbars[toolbarName])).Items)
                {
                    if (tsItem.Name.ToLower() == buttonName.Trim().ToLower() && tsItem.Enabled)
                    {
                        System.Windows.Forms.ToolStripItemClickedEventArgs e = new System.Windows.Forms.ToolStripItemClickedEventArgs(tsItem);
                        Program.frmMain.tlbMain_ItemClicked(tsItem, e);
                        return(true);
                    }
                }
            }
            catch (Exception ex)
            {
                Program.g_error = ex.ToString();
            }

            return(false);
        }
        void View_ModelBind(object sender, System.Windows.Forms.ToolStripItemClickedEventArgs e)
        {
            if (Context.State.SelectItemIndex == -1)
            {
                return;
            }
            ActionBase actionElement = Model.ActiveActionModel[Context.State.SelectItemIndex - 1] as ActionBase;

            if (actionElement == null)
            {
                return;
            }
            if (actionElement.GetType().Name == "ActionClick")
            {
                return;
            }
            var mapField = (DataMapField)e.ClickedItem.Tag;

            actionElement.MapName = mapField.DisplayName;
            View.DataBind();
        }
Esempio n. 49
0
 private void OnButtonClicked(System.Object sender, System.Windows.Forms.ToolStripItemClickedEventArgs e)
 {
     TextBox.DisplaySearchDialog();
 }
Esempio n. 50
0
 protected override void OnItemClicked(ToolStripItemClickedEventArgs e)
 {
     base.OnItemClicked(e);
 }
Esempio n. 51
0
 private void DropdownMenu_ItemClicked(object sender, System.Windows.Forms.ToolStripItemClickedEventArgs e)
 {
     Pages.CurrentPage = (TabPage)e.ClickedItem.Tag;
 }
Esempio n. 52
0
 private void MenuChooseTableEntries_DropDownItemClicked(object sender, System.Windows.Forms.ToolStripItemClickedEventArgs e)
 {
 }
Esempio n. 53
0
 private void toolStrip1_ItemClicked(object sender, System.Windows.Forms.ToolStripItemClickedEventArgs e)
 {
 }
Esempio n. 54
0
        private void toolBar_ButtonClick(object sender, System.Windows.Forms.ToolStripItemClickedEventArgs e)
        {
            if (e.ClickedItem == toolBarButtonNew)
            {
                menuItemNew_Click(null, null);
            }
            else if (e.ClickedItem == toolBarButtonOpen)
            {
                menuItemOpen_Click(null, null);
            }
            else if (e.ClickedItem == toolBarButtonSolutionExplorer)
            {
                menuItemSolutionExplorer_Click(null, null);
            }
            else if (e.ClickedItem == toolBarButtonPropertyWindow)
            {
                menuItemPropertyWindow_Click(null, null);
            }
            else if (e.ClickedItem == toolBarButtonToolbox)
            {
                menuItemToolbox_Click(null, null);
            }
            else if (e.ClickedItem == toolBarButtonOutputWindow)
            {
                menuItemOutputWindow_Click(null, null);
            }
            else if (e.ClickedItem == toolBarButtonBibliographyList)
            {
                menuItemBibliographyList_Click(null, null);
            }
            else if (e.ClickedItem == toolBarButtonLayoutByCode)
            {
                //    menuItemLayoutByCode_Click(null, null);
                MessageBox.Show("No Implementation");
            }
            else if (e.ClickedItem == toolBarButtonLayoutByXml)
            {
                MessageBox.Show("No Implementation");
            }
            //    menuItemLayoutByXml_Click(null, null);
            else if (e.ClickedItem == toolBarButtonSave)
            {
                saveToolStripMenuItem_Click(null, null);
            }
            else if (e.ClickedItem == toolStripButtonSaveAll)
            {
                saveAllToolStripMenuItem_Click(null, null);
            }
            else if (e.ClickedItem == toolStripButtonQuickFind)
            {
                this.quickSearchToolStripMenuItem_Click(null, null);
            }
            else if (e.ClickedItem == toolStripButtonClose)
            {
                this.menuItemClose_Click(null, null);
            }
            //else if (e.ClickedItem == toolStripButtonRun)
            //{
            //    if (!this.m_outputWindow.Visible)
            //    {
            //        this.m_outputWindow.DockState = DockState.DockBottom;
            //        this.m_outputWindow.Visible = true;
            //    }
            //    this.m_outputWindow.UpdateContent(this.dockPanel.ActiveDocument);
            //    this.SaveFile();

            //    this.m_outputWindow.Compile();
            //}
            else if (e.ClickedItem == toolStripButtonViewPDF)
            {
                this.m_outputWindow.UpdateContent(this.dockPanel.ActiveDocument);
                this.m_outputWindow.ViewPDF();
            }
            else if (e.ClickedItem == toolBarButtonSpellCheck)
            {
                this.ActiveDocument.SpellCheck();
            }
        }
Esempio n. 55
0
 void btnLanguages_DropDownItemClicked(object sender, System.Windows.Forms.ToolStripItemClickedEventArgs e)
 {
     langIndex = int.Parse(e.ClickedItem.Tag.ToString());
     ReadStrings("data/message/msg_data_" + langNames[int.Parse(e.ClickedItem.Tag.ToString())] + ".bin");
 }