private void ProjectNewAction_ButtonClick(object sender, ToolBarButtonClickEventArgs e)
		{
			if (e.Button == _button)
			{
				DoAction();
			}
		}
Exemple #2
0
        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();
        }
Exemple #3
0
 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;
     }
 }
Exemple #4
0
        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();
        }
Exemple #5
0
        void OnClicked(object sender, ToolBarButtonClickEventArgs e)
        {
            FolderBrowserDialog dialog = new FolderBrowserDialog();

            if (dialog.ShowDialog(this) == DialogResult.OK) {
                selectedFolder = dialog.SelectedPath;
                statusbar.Text = selectedFolder;
            }
        }
        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( );
            }
        }
 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;
     }
 }
        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);
        }
Exemple #9
0
        private void toolBarToolbar_ButtonClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e)
        {
            if (e.Button == this.toolBarButtonRefresh)
            {
                this.RefreshTree();
            }
            else if (e.Button == this.toolBarButtonMode)
            {
                this.ChangeMode();
            }
            else if (e.Button == this.toolBarButtonOpen)
            {
                this.Open();
            }
            else if (e.Button == this.toolBarButtonExecute)
            {
                this.Execute();
            }
            else if (e.Button == this.toolBarButtonExecuteSavedInput)
            {
                this.ExecuteSavedInput();
            }
            else if (e.Button == this.toolBarButtonSaveInput)
            {
                this.SaveInput();
            }
            else if (e.Button == this.toolBarButtonWeb)
            {
                try
                {
                    if (templateLibrary == null)
                    {
                        templateLibrary = new WebTemplateLibrary(treeBuilder.IdPathHash);
                    }

                    templateLibrary.ShowDialog(this);
                    foreach (string uniqueid in templateLibrary.UpdatedTemplateIDs)
                    {
                        this.OnTemplateUpdate(uniqueid);
                    }

                    this.RefreshTree();
                }
                catch
                {
                    templateLibrary = null;
                    MessageBox.Show("The WebUpdate feature failed to connect to the server.");
                }
            }
        }
Exemple #10
0
 private void toolBar1_ButtonClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e)
 {
     if (e.Button == this.tbbRefresh)
     {
         Refill();
     }
     else if (e.Button == this.tbbStore)
     {
         if (this.updateSaldo())
         {
             dsBankAccountsStates1.AcceptChanges();
         }
     }
 }
Exemple #11
0
        private void toolBarStandar_ButtonClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e)
        {
            gridEXCompAImputar.UpdateData();
            gridEXCompDestino.UpdateData();
            switch (toolBarStandar.Buttons.IndexOf(e.Button))
            {
            case 0:
                Save();
                break;

            default:
                break;
            }
        }
Exemple #12
0
        //工具栏按钮事件
        private void ToolBar1_ButtonClick(System.Object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e)
        {
            switch (ToolBar1.Buttons.IndexOf(e.Button))
            {
            case 0:                     //营业报表
                ShowYybb();
                break;

            case 1:                     //结帐查询
                ShowBalanceQry();
                break;

            case 2:                     //收款/结帐类别查询
                ShowBalanceTypeQry();
                break;

            case 4:                     // 菜品销售
                ShowFoodSaleRpt();
                break;

            case 5:                     // 桌台使用率
                ShowTableUseFreqRpt();
                break;

            case 6:                     //厅堂使用收入汇总
                ShowTableTypeRpt();
                break;

            case 8:                     //部门销售统计汇总
                ShowDeptSaleRpt();
                break;

            case 9:                     //部门消耗统计汇总
                ShowDeptCostRpt();
                break;

            case 10:                     //部门毛利润汇总
                ShowDeptStatRpt();
                break;

            case 12:                     //关于
                MenuItem10_Click(sender, e);
                break;

            case 14:
                this.Close();
                break;
            }
        }
        private void mtlbMain_ButtonClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e)
        {
            try
            {
                if (e.Button == mtlnButtonOverlay)
                {
                    var focus_form = new frmFocusParameters();
                    focus_form.FocusMZ          = mctl_rawdata.FocusMZ;
                    focus_form.FocusScan        = mctl_rawdata.FocusScan;
                    focus_form.FocusMZTolerance = mflt_sic_mz_tolerance;

                    if (focus_form.ShowDialog(this) == DialogResult.OK)
                    {
                        if (focus_form.FocusMZ != mctl_rawdata.FocusMZ || focus_form.FocusScan != mctl_rawdata.FocusScan ||
                            focus_form.FocusMZTolerance != mflt_sic_mz_tolerance)
                        {
                            mctl_rawdata.FocusMZ   = focus_form.FocusMZ;
                            mctl_rawdata.FocusScan = focus_form.FocusScan;
                            mflt_sic_mz_tolerance  = focus_form.FocusMZTolerance;
                            // now its been set. Calculate the new selected ion chromatogram and set that to the
                            SetDataPlots();
                        }
                    }
                }
                else if (e.Button == mtlbButtonLinkRaw)
                {
                    LinkRawFile();
                }
                else if (e.Button == mtlnButtonLinkZoom)
                {
                    mtlnButtonLinkZoom.Pushed = !mtlnButtonLinkZoom.Pushed;
                }
                else if (e.Button == mtlnButtonSelectBackground)
                {
                    var frmThreshold = new frmFloatDialog();
                    frmThreshold.Prompt       = "Please enter background intensity";
                    frmThreshold.EditingValue = mfltMinIntensity;
                    if (frmThreshold.ShowDialog() == DialogResult.OK)
                    {
                        mfltMinIntensity = frmThreshold.EditingValue;
                        SetData(mobj_results);
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(this, ex.Message + ex.StackTrace);
            }
        }
        private void toolBarStandar_ButtonClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e)
        {
            switch (toolBarStandar.Buttons.IndexOf(e.Button))
            {
            case 4:                    //Cancelar
                //this.ResetearDatos();
                break;

            case 2:                    //Guardar
                System.DateTime fechaCierre = Convert.ToDateTime(txtFechaCierre.Text);
                _uiController.FechaCierre = fechaCierre;
                _uiController.Execute();
                break;
            }
        }
Exemple #15
0
 private void toolBar1_ButtonClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e)
 {
     if (e.Button == this.tbbUpdt)
     {
         this.fillDs();
     }
     else if (e.Button == this.tbbAdd)
     {
         this.addPermission();
     }
     else if (e.Button == this.tbbEdit)
     {
         this.editPermission();
     }
 }
Exemple #16
0
        private void toolBar_ButtonClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e)
        {
            switch (toolBar.Buttons.IndexOf(e.Button))
            {
            case 0:
                currentIndex--;
                ShowFeed(currentIndex);
                break;

            case 1:
                currentIndex++;
                ShowFeed(currentIndex);
                break;
            }
        }
Exemple #17
0
 private void toolBar1_ButtonClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e)
 {
     if (e.Button.Tag.ToString() == "BUILD")
     {
         BuildDynCtls();
     }
     else
     {
         frmQuestion form = new frmQuestion(panel1, _seq++, QuestionTypes.Text);
         if (form.ShowDialog(this) == DialogResult.OK)
         {
             AddQuestionToTVW(form.Question);
         }
     }
 }
 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();
     }
 }
Exemple #19
0
 private void toolBar1_ButtonClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e)
 {
     if (e.Button == tbOpen)
     {
         OpenFile();
     }
     else if (e.Button == tbSave)
     {
         SaveFile();
     }
     else if (e.Button == tbParse)
     {
         ParseText();
     }
 }
        private void toolBarStandar_ButtonClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e)
        {
            switch (toolBarStandar.Buttons.IndexOf(e.Button))
            {
            case 0:
                //clickprevio = true;
                _uiController.Previous();
                break;

            case 2:
                //clickprevio = true;
                ComenzarSolicitud();
                break;
            }
        }
 private void toolBar1_ButtonClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e)
 {
     if (e.Button == tbbDelete)
     {
         this.btnDelete_Click(this, EventArgs.Empty);
     }
     else if (e.Button == tbbExit)
     {
         Close();
     }
     else if (e.Button == tbbQuery)
     {
         this.SwitchQueryPane();
     }
 }
Exemple #22
0
 private void toolBar1_ButtonClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e)
 {
     if (((string)e.Button.Tag) == "Load")
     {
         LoadDomain();
     }
     else if (((string)e.Button.Tag) == "Parse")
     {
         ParseQuery();
     }
     else if (((string)e.Button.Tag) == "Run")
     {
         RunQuery();
     }
 }
Exemple #23
0
        private void toolBarFind_ButtonClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e)
        {
            switch (e.Button.Tag.ToString())
            {
            case "Search":
                LaunchSearch();
                break;

            case "StopSearch":
                tblButtonStop.Enabled = false;
                tbButtonFind.Enabled  = true;
                this._Cancel          = true;
                break;
            }
        }
Exemple #24
0
        private void toolBar_ButtonClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e)
        {
            // Проверяем, какая кнопка была нажата, и
            // выполняем соответствующее действие.
            switch (e.Button.Tag.ToString())
            {
            case "view":
                this.ViewUsers();
                break;

            case "edit":
                this.EditUser();
                break;
            }
        }
Exemple #25
0
        private void toolBarStandar_ButtonClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e)
        {
            switch (toolBarStandar.Buttons.IndexOf(e.Button))
            {
            case 0: _uiController.Previous();
                break;

            case 2:
            {
                gridEXDetalle.UpdateData();
                _uiController.Execute();
                break;
            }
            }
        }
Exemple #26
0
 private void toolBar1_ButtonClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e)
 {
     if (e.Button == toolBarButtonQuick)
     {
         menuItemCompact_Click(sender, e);
     }
     else if (e.Button == toolBarButtonDetail)
     {
         menuItemDetial_Click(sender, e);
     }
     else if (e.Button == toolBarButtonExit)
     {
         menuItemExit_Click(sender, e);
     }
 }
Exemple #27
0
 private void toolBar1_ButtonClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e)
 {
     if (e.Button == this.copyButton)
     {
         this.editCopy_Click(null, null);
     }
     else if (e.Button == this.cutButton)
     {
         this.editCut_Click(null, null);
     }
     else if (e.Button == this.pasteButton)
     {
         this.editPaste_Click(null, null);
     }
 }
 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;
     }
 }
Exemple #29
0
        private void toolNavigation_ButtonClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e)
        {
            fromNavigate = true;

            if (e.Button == btBack)
            {
                history.Back();
            }
            else
            {
                history.Forward();
            }

            MoveNavigate();
        }
Exemple #30
0
 // Обработчик события, срабатывающий при нажатии кнопки на панели инструмен-
 void toolBar1_Click(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e)
 {
     if (e.Button.Text == "Open")
     {
         MessageBox.Show("Здесь мог бы открываться файл!");
     }
     else if (e.Button.Text == "New")
     {
         MessageBox.Show("Здесь мог бы создаваться файл!");
     }
     else if (e.Button.Text == "Copy")
     {
         MessageBox.Show("Здесь мог бы копироваться файл!");
     }
 }
Exemple #31
0
 private void toolBarToolbar_ButtonClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e)
 {
     if (e.Button == this.toolBarButtonRefresh)
     {
         this.RefreshTree();
     }
     else if (e.Button == this.toolBarButtonView)
     {
         this.View();
     }
     else if (e.Button == this.toolBarButtonSaveLocal)
     {
         this.Save();
     }
 }
Exemple #32
0
 private void tbMain_ButtonClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e)
 {
     if (e.Button == tbbSave)
     {
         m_SaveMap();
     }
     if (e.Button == tbbOpen)
     {
         LoadMap();
     }
     else if (e.Button == tbbNew)
     {
         NewMap();
     }
 }
Exemple #33
0
 private void _toolBar_ButtonClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e)
 {
     if (cmdAdd == e.Button)
     {
         AddContact();
     }
     else if (cmdRemove == e.Button)
     {
         RemoveContact();
     }
     else if (cmdRefresh == e.Button)
     {
         RefreshContactsView();
     }
 }
Exemple #34
0
 private void toolBar1_ButtonClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e)
 {
     if (e.Button == this.tbtnRefresh)
     {
         try
         {
             this.dsLocksList1.Locks.Clear();
             this.sqlDataAdapter1.Fill(this.dsLocksList1.Locks);
         }
         catch (Exception ex)
         {
             MessageBox.Show("Ошибка чтения данных: " + ex.Message, "BP2", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
     }
 }
Exemple #35
0
        /*
         #region Execute, Open, RefreshTree, ChangeMode, WebUpdate
         * public void Execute()
         * {
         *      if (this.treeViewTemplates.SelectedNode is TemplateTreeNode)
         *      {
         *              ZeusTemplate template = new ZeusTemplate(this.treeViewTemplates.SelectedNode.Tag.ToString());
         *              ExecuteTemplate(template);
         *      }
         * }
         *
         * public void SaveInput()
         * {
         *      if (this.treeViewTemplates.SelectedNode is TemplateTreeNode)
         *      {
         *              ZeusTemplate template = new ZeusTemplate(this.treeViewTemplates.SelectedNode.Tag.ToString());
         *              SaveInput(template);
         *      }
         * }
         *
         * public void ExecuteSavedInput()
         * {
         *      ExecuteLoadedInput();
         * }
         *
         * public void Open()
         * {
         *      if (this.treeViewTemplates.SelectedNode is TemplateTreeNode)
         *      {
         *              OnTemplateOpen( this.treeViewTemplates.SelectedNode.Tag.ToString() );
         *      }
         * }
         *
         * public void RefreshTree()
         * {
         *      fsRootNode = null;
         *      nsRootNode = null;
         *
         *      if (this.toolBarButtonMode.Pushed) this.LoadTemplatesByFile();
         *      else this.LoadTemplates();
         * }
         #endregion
         */

        private void toolBarToolbar_ButtonClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e)
        {
            if (e.Button == this.toolBarButtonRefresh)
            {
                //this.RefreshTree();
            }
            else if (e.Button == this.toolBarButtonExecute)
            {
                //this.ChangeMode();
            }
            else if (e.Button == this.toolBarButtonView)
            {
                //this.Open();
            }
        }
        private void MyToolbar_ButtonClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e)
        {
            //System.Windows.Forms.MessageBox.Show(MyTextEditor.Rtf);
            //e.Button.Enabled = false;
            switch (e.Button.Tag.ToString())
            {
            case "New":
                File_New_Click(this, e);
                break;

            case "Open":
                File_Open_Click(this, e);
                break;

            case "Save":
                File_Save_Click(this, e);
                break;

            case "Copy":
                Edit_Copy_Click(this, e);
                break;

            case "Cut":
                Edit_Cut_Click(this, e);
                break;

            case "Paste":
                Edit_Paste_Click(this, e);
                break;

            case "Undo":
                Edit_Undo_Click(this, e);
                break;

            case "Redo":
                Edit_Redo_Click(this, e);
                break;

            case "Run":
                Run_Run_Click(this, e);
                break;

            case "Compile":
                Run_Compile_Click(this, e);
                break;
            }
            UpdateToolbar();
        }
        private void tBar_ButtonClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e)
        {
            if (e.Button == bRefresh)
            {
                RefreshInfo();
            }
            else if (e.Button == bCreateFolder)
            {
                TreeNode n = new TreeNode("NewFolder");
                n.ImageIndex         = 1;
                n.SelectedImageIndex = 1;

                if (m_File == null)
                {
                    Tree.SelectedNode.Nodes.Add(n);
                }
                else
                {
                    Tree.SelectedNode.Parent.Nodes.Add(n);
                }

                Tree.SelectedNode = n;

                m_CreateFolder = true;

                n.BeginEdit();
            }
            else if (e.Button == bDownload)
            {
                Download();
            }
            else if (e.Button == bUpload)
            {
                Upload();
            }
            else if (e.Button == bDelete)
            {
                DeleteFromServer();
            }
            else if (e.Button == bExit)
            {
                Close();
            }
            else if (e.Button == bEdit)
            {
                RemoteEdit();
            }
        }
Exemple #38
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void toolBar1_ButtonClick(object sender,
                                          System.Windows.Forms.ToolBarButtonClickEventArgs e)
        {
            switch (e.Button.Text.Trim())
            {
            case "添加":
                Add();
                break;

            case "编辑":
                Edit();
                break;

            case "删除":
                Delete();
                break;

            case "打印":
                Print();
                break;

            case "查询":
                m_Set = false;
                ShowQueryBar(toolBar1.Buttons[3].Pushed);
                if (toolBar1.Buttons[3].Pushed != false)
                {
                    this.UnQuery();
                }
                break;

            case "分析":
                m_Set = true;
                ShowQueryBar(toolBar1.Buttons[4].Pushed);
                if (toolBar1.Buttons[4].Pushed != false)
                {
                    this.UnQuery();
                }
                break;

            case "退出":
                this.Close();
                break;

            case "字体":
                ChangeFont();
                break;
            }
        }
Exemple #39
0
        private void tlbModel_ButtonClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e)
        {
            if ((string)e.Button.Tag == "NEWMODEL")
            {
                sc = new SourceCode(appOb);
                appOb.Solution.Create("c:\\CodeGen\\Eduardo", "Eduardo");
                this.tvwModel.Nodes.Clear();
                tnModel = new TreeNode("Eduardo", 0, 0);
                CreateTree(tnModel);
                this.tvwModel.Nodes.Add(tnModel);
            }

            if ((string)e.Button.Tag == "REFRESH")
            {
            }
        }
 private void toolBar1_ButtonClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e)
 {
     if (e.Button == toolBarButtonUp)
     {
         SelectFolders();
         FireUpSelected();
     }
     else if (e.Button == toolBarButtonFolders)
     {
         SelectFolders();
     }
     else if (e.Button == toolBarButtonSearch)
     {
         SelectSearch();
     }
 }
Exemple #41
0
		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();
					}
				}
			}
		}
Exemple #42
0
        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());
            }
        }
        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);
        }
 void toolbar_ButtonClick(object sender, ToolBarButtonClickEventArgs e)
 {
     try
     {
         if (e.Button.Tag != null)
         {
             string sButtonTag = e.Button.Tag.ToString();
             if (sButtonTag == this.FullName + ".M2M")
             {
                 this.Exec();
             }
             else if (sButtonTag == this.FullName + ".PrintFriendly")
             {
                 Connect.Plugins[PrinterFriendlyDimensionUsagePlugin.BaseName + typeof(PrinterFriendlyDimensionUsagePlugin).Name].Exec();
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Exemple #45
0
        private void tBarMain_ButtonClick(object sender, ToolBarButtonClickEventArgs e)
        {
            //Possible null reference exception may occur here
            if (e.Button == tbtnFind)
            {
                if (strMenuOption == "User...")
                {
                    fUser.FindPanel();
                }
                if ((strMenuOption == "Contact...") || (strMenuOption == "Instructor...") || (strMenuOption == "Client..."))
                {
                    fContact.FindPanel();
                }
                if (strMenuOption == "Department...")
                {
                    fDept.FindPanel();
                }
                if (strMenuOption == "Class...")
                {
                    fCourse.FindPanel();
                }
                if (strMenuOption == "Program...")
                {
                    fProgram.FindPanel();
                }
                if (strMenuOption == "Event...")
                {
                    fEvt.FindPanel();
                }
            }
            else if (e.Button == tbtnNew)
            {
                NewDialog();
            }
            else if (e.Button == tbtnOpen)
            {
                OpenDialog();
            }
            else if (e.Button == tbtnDelete)
            {
                Delete();
            }
            else if (e.Button == tbtnDuplicate)
            {
                Duplicate();
            }
            else if (e.Button == tbtnPrint)
            {
                Control c = null;
                GetGridControl(pnlBody, ref c);

                if (c == null)
                {
                    if (strMenuOption == "Calendar...")
                    {
                        if (fCalendar != null)
                        {
                            fCalendar.Print();
                        }
                        return;
                    }
                }
                GridControl gc = (GridControl) c;
                if (strMenuOption == "Transportation Expenses...")
                    fTransportationExpenses.PrintGrid(gc, true);
                else if (strMenuOption == "Payroll By Instructor...")
                    fpayrollByInstructor.PrintGrid(gc, true);
                else if (strMenuOption == "Pay Details By Instructor...")
                    fpayment.PrintGrid(gc, true);
                else if (strMenuOption == "Billing Infomation By Client...")
                    fReportBillingInfo.PrintGrid(gc, true);
                else
                    PrintGrid(gc);
            }
            else if (e.Button == tbtnInfoProgram)
            {
                fProgram.LoadProgramInfo();
            }
        }
	protected virtual void OnButtonClick(ToolBarButtonClickEventArgs e)
	{
		ToolBarButtonClickEventHandler handler;
		handler = ((ToolBarButtonClickEventHandler)
		           (GetHandler(EventId.ButtonClick)));
		if (handler != null)
		{
			handler(this, e);
		}
	}
	protected virtual void OnButtonDropDown(ToolBarButtonClickEventArgs e)
	{
		ToolBarButtonClickEventHandler handler;
		handler = ((ToolBarButtonClickEventHandler)
		           (GetHandler(EventId.ButtonDropDown)));
		if (handler != null)
		{
			handler(this, e);
		}
		ToolBarButton b = e.Button;
		ContextMenu menu = (b.DropDownMenu as ContextMenu);
		if (menu != null)
		{
			Rectangle rect;
			if (dropDownArrows)
			{
				rect = b.dropRectangle;
			}
			else
			{
				rect = b.viewRectangle;
			}
			int x = rect.X; // left
			int y = rect.Y+rect.Height; // bottom
			menu.Show(this,new Point(x,y));
		}
	}
        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;

                    
                }
        }
Exemple #49
0
 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();
 }
		protected virtual void OnButtonDropDown (ToolBarButtonClickEventArgs e) 
		{
			ToolBarButtonClickEventHandler eh = (ToolBarButtonClickEventHandler)(Events [ButtonDropDownEvent]);
			if (eh != null)
				eh (this, e);

			if (e.Button.DropDownMenu == null)
				return;

			ShowDropDownMenu (current_item);
		}
 private void toolBar_ButtonClick(object sender, ToolBarButtonClickEventArgs e) {
   string tag = (e.Button.Tag as string);
   if (tag == null)
     return;
   switch (tag.ToLower()){
     case "copy":
       if (onCopy != null)
         onCopy();
       break;
     case "cut":
       if (onCut != null)
         onCut();
       break;
     case "paste":
       if (onPaste != null)
         onPaste();
       break;
   }
 }
		void PerformButtonClick (ToolBarButtonClickEventArgs e)
		{
			// Only change pushed for ToogleButton
			if (e.Button.Style == ToolBarButtonStyle.ToggleButton) {
				if (! e.Button.Pushed)
					e.Button.Pushed = true;
				else
					e.Button.Pushed = false;
			}
			
			current_item.Pressed = false;
			current_item.Invalidate ();
			
#if NET_2_0
			button_for_focus = current_item.Button;
			button_for_focus.UIAHasFocus = true;
#endif
			OnButtonClick (e);
		}
		protected virtual void OnButtonClick (ToolBarButtonClickEventArgs e)
		{			
			ToolBarButtonClickEventHandler eh = (ToolBarButtonClickEventHandler)(Events [ButtonClickEvent]);
			if (eh != null)
				eh (this, e);
		}
 private void tlbMain_ButtonClick(object sender, ToolBarButtonClickEventArgs e)
 {
     switch (tlbMain.Buttons.IndexOf(e.Button))
       {
     case 1:
       //	---	Update record
       EditItem();
       break;
     case 3:
       // ---	Refresh grid
       DBGuid ID = DBGuid.Null;
       if (((DataTable) dtgMain.DataSource).DefaultView.Count != 0)
       {
     ID.Value = dtgMain.GetSelectedRowCell("ID");
       }
       FillDatagrid(ID);
       break;
       }
 }
Exemple #55
0
        private void _toolbar_ButtonClick(object sender, ToolBarButtonClickEventArgs e)
        {
            if (e.Button == _tbExit)
            {
                Close();
            }

            else if (e.Button == ReloadRoutingTable)
            {
                ReloadRoutingTableData();

            }
            else if (e.Button == toolBarReloadLabmanagerConnect)
            {
                ReloadLabmanagerConnect();

            }
        }
		private void ToolBar_ButtonClick(object sender, ToolBarButtonClickEventArgs e)
		{
			if (e.Button == MultiPanel.ToolBarButtonAuxList)
				ToggleNiveisSupportPanel(MultiPanel.ToolBarButtonAuxList.Pushed);
			else if (e.Button == MultiPanel.ToolBarButtonFiltro)
				grpFiltro.Visible = MultiPanel.ToolBarButtonFiltro.Pushed;
		}
 private void Toolbar_ButtonClick(object Sender, ToolBarButtonClickEventArgs e) {
     if (e.Button == btnFiltro)
         ClickBtnFiltro();
     else if (e.Button == btnRefresh)
         Refresh();
 }
Exemple #58
0
		private void ToolBar_ButtonClick(object sender, ToolBarButtonClickEventArgs e)
		{
			if (e.Button == MultiPanel.ToolBarButtonAuxList)
				ToggleControloAutoridade(MultiPanel.ToolBarButtonAuxList.Pushed);
		}
		void OnClickSmallButtonToolBar (object sender, ToolBarButtonClickEventArgs e)
		{
			if (e.Button == upToolBarButton) {
				mwfFileView.OneDirUp (CustomFilter);
			} else
			if (e.Button == backToolBarButton) {
				mwfFileView.PopDir (CustomFilter);
			} else
			if (e.Button == newdirToolBarButton) {
				mwfFileView.CreateNewFolder ();
			}
		}
Exemple #60
0
 private void toolBar1_ButtonClick(object sender, ToolBarButtonClickEventArgs e)
 {
     MessageBox.Show(e.Button.ImageIndex + "");
 }