Exemplo n.º 1
0
 private void Comandos_Click(object objSource, ToolBarItemEventArgs objArgs)
 {
     if (objArgs.ToolBarButton.Name == "btnAdicionar")
     {
         gridUsuarios.ClearSelection();
         addPainel(new Usuarios(gridUsuarios));
     }
     if (objArgs.ToolBarButton.Name == "btnEditar")
     {
         if (gridUsuarios.SelectedRows.Count > 0)
         {
             addPainel(new Usuarios(gridUsuarios));
         }
     }
     if (objArgs.ToolBarButton.Name == "btnRemover")
     {
         if (gridUsuarios.SelectedRows.Count == 1)
         {
             if (gridUsuarios
                 .SelectedRows[0]
                 .Cells["Usuário"].Value != "admin")
             {
                 new SysUserDao().delete(
                     gridUsuarios
                     .SelectedRows[0]
                     .Cells["Usuário"].Value == null
                 ? ""
                 : gridUsuarios
                     .SelectedRows[0]
                     .Cells["Usuário"].Value.ToString());
             }
         }
         gridUsuarios.DataSource = new SigaObjects.Session.SysUsers.SysUserDao().selectGrid().DefaultView;
     }
 }
Exemplo n.º 2
0
 private void ToolBar_ButtonClick(object sender, ToolBarItemEventArgs e)
 {
     try {
         if (e.Item == this.buttonItemCatalog ||
             e.Item == this.buttonItemCategorized ||
             e.Item == this.buttonItemAlphabetical)
         {
             ButtonItem item = (ButtonItem)e.Item;
             if (item.Checked)
             {
                 return;
             }
             this.buttonItemCatalog.Checked      = (e.Item == this.buttonItemCatalog);
             this.buttonItemCategorized.Checked  = (e.Item == this.buttonItemCategorized);
             this.buttonItemAlphabetical.Checked = (e.Item == this.buttonItemAlphabetical);
             this.LoadModel();
         }
         else if (e.Item == this.buttonItemRefresh)
         {
             this.LoadModel();
         }
     }
     catch (Exception ex) {
         ExceptionDialog.HandleException(ex);
     }
 }
Exemplo n.º 3
0
 protected virtual void OnToolBarItemCommand(ToolBarItemEventArgs e)
 {
     if (ToolBarItemCommand != null)
     {
         ToolBarItemCommand(this, e);
     }
 }
 private void ToolBar_ButtonClick(object sender, ToolBarItemEventArgs e)
 {
     if (e.Item == this.buttonItemNew)
     {
         XmlNode root = this.m_xmlDocument.SelectSingleNode("ROOT");
         root.RemoveAll();
         this.UpdateExceptionHandler();
     }
     else if (e.Item == this.buttonItemSave)
     {
         this.m_webBrowser.ShowSaveAsDialog();
     }
     else if (e.Item == this.buttonItemMessage)
     {
         if (string.IsNullOrEmpty(this.m_feedbackAddress))
         {
             return;
         }
         Process process = new Process();
         process.StartInfo.FileName       = this.m_feedbackAddress;
         process.StartInfo.Verb           = "Open";
         process.StartInfo.CreateNoWindow = false;
         process.Start();
     }
     else if (e.Item == this.buttonItemPrint)
     {
         this.m_webBrowser.ShowPrintDialog();
     }
     else if (e.Item == this.buttonItemPrintPreview)
     {
         this.m_webBrowser.ShowPrintPreviewDialog();
     }
     else if (e.Item == this.buttonItemPageSetup)
     {
         this.m_webBrowser.ShowPageSetupDialog();
     }
     else if (e.Item == this.buttonItemCopy)
     {
         if (this.m_webBrowser == null)
         {
             return;
         }
         this.m_webBrowser.Document.ExecCommand("SelectAll", false, null);
         this.m_webBrowser.Document.ExecCommand("Copy", false, null);
         this.m_webBrowser.Document.ExecCommand("Unselect", false, null);
     }
     else if (e.Item == this.buttonItemPlay)
     {
         this.m_enabled = true;
         this.Invoke(new EventHandler(this.Timer_Tick), new object[] { this, EventArgs.Empty });
     }
     else if (e.Item == this.buttonItemPause)
     {
         this.m_enabled = false;
         this.Invoke(new EventHandler(this.Timer_Tick), new object[] { this, EventArgs.Empty });
     }
 }
Exemplo n.º 5
0
        public const string CMD_SIMULATION = "cmdSimulation";  //移动机械臂仿真环境



        #endregion

        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void OnAnyToolBarButtonClick(object sender, ToolBarItemEventArgs e)
        {
            ICommand cmd = e.Item as ICommand;

            if (cmd != null)
            {
                cmd.Execute();
                mouse_event(MOUSEEVENTF_LEFTDOWN | MOUSEEVENTF_LEFTUP, 0, 0, 1, 0);
            }
        }
Exemplo n.º 6
0
		protected void tbMediaObjectActions_ItemCommand(object sender, ToolBarItemEventArgs e)
		{
			ToolBarItem tbi = e.Item;
			switch (tbi.ID)
			{
				case "tbiDownload": { DownloadMediaObjectToUser(); break; }
				case "tbiRotate": { RedirectToRotatePage(); break; }
				case "tbiMove": { RedirectToMovePage(); break; }
				case "tbiCopy": { RedirectToCopyPage(); break; }
			}
		}
Exemplo n.º 7
0
 /// <summary>
 /// Handles the ToolbarItemClicked event
 /// </summary>
 /// <param name="args">The arguments for the event</param>
 public void ToolbarItemClickedEventHandler(ToolBarItemEventArgs args)
 {
     // TODO: USE CONSTANTS FOR NAME
     if (args.ToolBarItem.Name == "SELECTION")
     {
         this.isPanMode = false;
     }
     else if (args.ToolBarItem.Name == "PAN")
     {
         this.isPanMode = true;
     }
 }
 private void ToolBar_ButtonClick(object sender, ToolBarItemEventArgs e)
 {
     try {
         if (e.Item == this.buttonItemErrors)
         {
             this.RefreshErrorList();
         }
         else if (e.Item == this.buttonItemWarnings)
         {
             this.RefreshErrorList();
         }
         else if (e.Item == this.dropDownMenuItemValidator)
         {
             this.dropDownMenuItemValidator.Show();
         }
     }
     catch (Exception ex) {
         ExceptionDialog.HandleException(ex);
     }
 }
Exemplo n.º 9
0
        /// <summary>
        /// Handles the ToolbarItemClicked event
        /// </summary>
        /// <param name="args">The arguments for the event</param>
        public void ToolbarItemClickedEventHandler(ToolBarItemEventArgs args)
        {
            NodeViewModelBase rootNode = GetGraphComponents(args.Scope).NodeSelector.SelectedNode;

            // TODO: USE CONSTANT FOR ITEM NAME
            // TODO: Controls should control their own behavior
            if (args.ToolBarItem.Name == "GENERATOR")
            {
                CreateRandomGraph(args.Scope);
            }
            else if (args.ToolBarItem.Name.EndsWith("_LAYOUT"))
            {
                LayoutBase layout = InitializeLayout(args.ToolBarItem.Name, args.Scope);

                // Perform the layout
                LayoutGraph(layout, false, args.Scope, rootNode);
            }
            else if (args.ToolBarItem.Name == "IMPORT")
            {
                PerformImport(args.Scope, new GraphMLGraphDataFormat());     // TODO: Determine which type at runtime
            }
            else if (args.ToolBarItem.Name == "EXPORT")
            {
                PerformExport(args.Scope);
            }
            else if (args.ToolBarItem.Name == "GRAPH_TO_IMAGE")
            {
                SaveGraphAsImage();
            }
            else if (args.ToolBarItem.Name == "PRINT_GRAPH")
            {
                PrintGraph();
            }
            else if (args.ToolBarItem.Name == "RESIZE")
            {
                UI.GraphViewModel graphVM = UI.ViewModelLocator.GraphDataStatic;
                graphVM.ResizeToFit();

                //TODO:  THIS SHOULD BE DECOUPLED
            }
        }
Exemplo n.º 10
0
 void tlbLogout_ItemCommand(object sender, ToolBarItemEventArgs e)
 {
     BUser.ClearUserCach();
     FormsAuthentication.SignOut();
     FormsAuthentication.RedirectToLoginPage();
 }
Exemplo n.º 11
0
 protected virtual void itemCommand(object sender, ToolBarItemEventArgs e)
 {
     OnToolBarItemCommand(e);
 }
Exemplo n.º 12
0
        private void ToolBar_ButtonClick(object sender, ToolBarItemEventArgs e) {
            try {
                if (e.Item == this.buttonItemNew) {
                    this.Invoke(new EventHandler(this.MenuItem_Activate), new object[] { this.menuButtonItemNew, EventArgs.Empty });
                }
                else if (e.Item == this.buttonItemOpen) {
                    this.Invoke(new EventHandler(this.MenuItem_Activate), new object[] { this.menuButtonItemOpen, EventArgs.Empty });
                }
                else if (e.Item == this.buttonItemSave) {
                    this.Invoke(new EventHandler(this.MenuItem_Activate), new object[] { this.menuButtonItemSave, EventArgs.Empty });
                }
                else if (e.Item == this.buttonItemPublish) {
                    this.Invoke(new EventHandler(this.MenuItem_Activate), new object[] { this.menuButtonItemPublish, EventArgs.Empty });
                }
                else if (e.Item == this.buttonItemExport) {
                    this.Invoke(new EventHandler(this.MenuItem_Activate), new object[] { this.menuButtonItemExport, EventArgs.Empty });
                }
                else if (e.Item == this.buttonItemPrint) {
                    this.Invoke(new EventHandler(this.MenuItem_Activate), new object[] { this.menuButtonItemPrint, EventArgs.Empty });
                }
                else if (e.Item == this.buttonItemCut) {
                    this.Invoke(new EventHandler(this.MenuItem_Activate), new object[] { this.menuButtonItemCut, EventArgs.Empty });
                }
                else if (e.Item == this.buttonItemCopy) {
                    this.Invoke(new EventHandler(this.MenuItem_Activate), new object[] { this.menuButtonItemCopy, EventArgs.Empty });
                }
                else if (e.Item == this.buttonItemPaste) {
                    this.Invoke(new EventHandler(this.MenuItem_Activate), new object[] { this.menuButtonItemPaste, EventArgs.Empty });
                }
                else if (e.Item == this.buttonItemDelete) {
                    this.Invoke(new EventHandler(this.MenuItem_Activate), new object[] { this.menuButtonItemDelete, EventArgs.Empty });
                }
                else if (e.Item == this.buttonItemUndo) {
                    this.Invoke(new EventHandler(this.MenuItem_Activate), new object[] { this.menuButtonItemUndo, EventArgs.Empty });
                }
                else if (e.Item == this.buttonItemRedo) {
                    this.Invoke(new EventHandler(this.MenuItem_Activate), new object[] { this.menuButtonItemRedo, EventArgs.Empty });
                }
                else if (e.Item == this.buttonItemCircular) {
                    this.Invoke(new EventHandler(this.MenuItem_Activate), new object[] { this.menuButtonItemCircular, EventArgs.Empty });
                }
                else if (e.Item == this.buttonItemForcedDirect) {
                    this.Invoke(new EventHandler(this.MenuItem_Activate), new object[] { this.menuButtonItemForcedDirect, EventArgs.Empty });
                }
                else if (e.Item == this.buttonItemHierachical) {
                    this.Invoke(new EventHandler(this.MenuItem_Activate), new object[] { this.menuButtonItemHierachical, EventArgs.Empty });
                }
                else if (e.Item == this.buttonItemOrthogonal) {
                    this.Invoke(new EventHandler(this.MenuItem_Activate), new object[] { this.menuButtonItemOrthogonal, EventArgs.Empty });
                }
                else if (e.Item == this.buttonItemTree) {
                    this.Invoke(new EventHandler(this.MenuItem_Activate), new object[] { this.menuButtonItemTree, EventArgs.Empty });
                }
                else if (e.Item == this.buttonItemAlignLeft) {
                    this.Invoke(new EventHandler(this.MenuItem_Activate), new object[] { this.menuButtonItemAlignLeft, EventArgs.Empty });
                }
                else if (e.Item == this.buttonItemAlignCenter) {
                    this.Invoke(new EventHandler(this.MenuItem_Activate), new object[] { this.menuButtonItemAlignCenter, EventArgs.Empty });
                }
                else if (e.Item == this.buttonItemAlignRight) {
                    this.Invoke(new EventHandler(this.MenuItem_Activate), new object[] { this.menuButtonItemAlignRight, EventArgs.Empty });
                }
                else if (e.Item == this.buttonItemAlignTop) {
                    this.Invoke(new EventHandler(this.MenuItem_Activate), new object[] { this.menuButtonItemAlignTop, EventArgs.Empty });
                }
                else if (e.Item == this.buttonItemAlignMiddle) {
                    this.Invoke(new EventHandler(this.MenuItem_Activate), new object[] { this.menuButtonItemAlignMiddle, EventArgs.Empty });
                }
                else if (e.Item == this.buttonItemAlignBottom) {
                    this.Invoke(new EventHandler(this.MenuItem_Activate), new object[] { this.menuButtonItemAlignBottom, EventArgs.Empty });
                }
                else if (e.Item == this.buttonItemNormal) {
                    this.Invoke(new EventHandler(this.MenuItem_Activate), new object[] { this.menuButtonItemNormalMode, EventArgs.Empty });
                }
                else if (e.Item == this.buttonItemLink) {
                    this.Invoke(new EventHandler(this.MenuItem_Activate), new object[] { this.menuButtonItemLinkMode, EventArgs.Empty });
                }
                else if (e.Item == this._zoomMenu) {
                    this._zoomMenu.Show();
                }
                else if (e.Item == this.statusBarItemError) {
                    this.statusBarItemError.Image = this._bitmapNoError;
                    this.statusBarItemError.ToolTipText = string.Empty;

                    ExceptionDialog exceptionDialog = ExceptionDialog.Default;
                    if (!exceptionDialog.Visible) {
                        exceptionDialog.Show();
                    }
                }
            }
            catch (Exception ex) {
                ExceptionDialog.HandleException(ex);
            }
        }
Exemplo n.º 13
0
 protected void TlbSystemMessage_ItemCheckChanged(object sender, ToolBarItemEventArgs e)
 {
     SendMessage_SystemMessage();
 }
Exemplo n.º 14
0
        private void menu_Click(object objSource, ToolBarItemEventArgs objArgs)
        {
            EmpresaVo empresa = new EmpresaVo();
            string    root    = System.Web.HttpContext.Current.Server.MapPath("");
            int       rootIdx = root.IndexOf("Route\\");

            root = root.Substring(0, rootIdx) + "arquivos\\";
            string filename = "Report_" + DateTime.Now.ToString("dd_MM_yyyy") + ".[?]";

            switch (objArgs.ToolBarButton.Name.ToLower())
            {
            case "tbbadd":
                #region ADD
                new PreCADASTRO(new CadContasAPagar(empresa), empresa).ShowWindow(this.Form);
                #endregion

                break;

            case "tbbver":
                #region VER
                if (dgvDados.SelectedRows.Count > 0)
                {
                    openRow(empresa, true);
                }
                #endregion

                break;

            case "tbbedit":
                #region EDIT
                if (dgvDados.SelectedRows.Count > 0)
                {
                    openRow(empresa, false);
                }
                else
                {
                    MessageBox.Show("Selecione uma linha pra edição.");
                }
                #endregion

                break;

            case "tbbdel":
                #region DEL
                if (dgvDados.SelectedRows.Count > 0)
                {
                    int status = (int)(dgvDados.DataSource as DataTable)
                                 .DefaultView[dgvDados.SelectedRows[0].Index]["STATUS"];

                    if (status != 1 &&
                        status != 4)
                    {
                        MessageBox.Show("Tem certeza que deseja deletar o registro?"
                                        , ""
                                        , MessageBoxButtons.YesNo
                                        , new EventHandler(rowDelete));
                    }
                    else
                    {
                        MessageBox.Show("Não é possivel remover o registro com status " +
                                        new Resources.Icons.status()[status][1].ToString()
                                        , "Negado!");
                    }
                }
                #endregion

                break;

            case "tbbexcel":
                #region EXCEL
                filename = filename.Replace("[?]", "xls");
                Carralero.ExportExcel excel = new Carralero.ExportExcel(root + filename);
                excel.setDataTable(1, 1, (DataTable)dgvDados.DataSource, true);
                excel.Close();

                new FormatScreen().DownloadFile("arquivos", filename, FormatScreen.ContextType.PDF);
                #endregion

                break;

            case "tbbpdf":
                #region PDF
                filename = filename.Replace("[?]", "pdf");
                Carralero.ExportPdf pdf = new Carralero.ExportPdf("arquivos\\" + filename);
                pdf.setDataTable((DataTable)dgvDados.DataSource, true);

                new FormatScreen().DownloadFile("arquivos", filename, FormatScreen.ContextType.PDF);
                #endregion

                break;

            default: break;
            }
            return;
        }
Exemplo n.º 15
0
 /// <summary>
 /// Raises the ToolBarItemClicked event
 /// </summary>
 /// <param name="e">The event arguments</param>
 protected virtual void OnToolBarItemClicked(ToolBarItemEventArgs args)
 {
     this.eventAggregator.GetEvent<ToolBarItemClickedEvent>().Publish(args);
 }
Exemplo n.º 16
0
        protected override void itemCommand(object sender, ToolBarItemEventArgs e)
        {
            base.itemCommand(sender, e);

            switch (e.Item.Value)
            {
            case "Up":
                if (IsCatalogSelected)
                {
                    DbContentCatalogManager.PeerMove(new DbContentCatalog(this.SelectedID), -1, true, false);
                }
                else
                {
                    DbContentClipManager.PeerMove(new DbContentClip(this.SelectedClipID), -1, true, false);
                }
                break;

            case "Down":
                if (IsCatalogSelected)
                {
                    DbContentCatalogManager.PeerMove(new DbContentCatalog(this.SelectedID), -1, true, false);
                }
                else
                {
                    DbContentClipManager.PeerMove(new DbContentClip(this.SelectedClipID), 1, true, false);
                }
                break;

            case "Copy":
                if (isCatalogSelected)
                {
                    copyCatalogID = selectedID;
                    copyClipID    = -1;
                }
                else
                {
                    copyCatalogID = -1;
                    copyClipID    = selectedClipID;
                }
                break;

            case "Paste":
                if (copyCatalogID != -1)
                {
                    DbContentCatalog srcCatalog;
                    DbContentCatalog destCatalog;

                    srcCatalog = new DbContentCatalog(copyCatalogID);

                    if (isCatalogSelected)
                    {
                        destCatalog = DbContentCatalog.NewPlaceHolder(selectedID);
                    }
                    else
                    {
                        destCatalog = new DbContentClip(selectedClipID).ParentCatalog;
                    }

                    pasteCatalog(srcCatalog, destCatalog, false, false);
                }
                else if (copyClipID != -1)
                {
                    DbContentClip copyClip = new DbContentClip(selectedClipID);
                    DbContentClip newClip  = new DbContentClip();
                    newClip.ArchiveDate       = copyClip.ArchiveDate;
                    newClip.Authors           = copyClip.Authors;
                    newClip.Body              = copyClip.Body;
                    newClip.CommentsEnabled   = copyClip.CommentsEnabled;
                    newClip.CreateDate        = DateTime.Now;
                    newClip.Description       = copyClip.Description;
                    newClip.Editors           = copyClip.Editors;
                    newClip.ExpirationDate    = copyClip.ExpirationDate;
                    newClip.Icon              = copyClip.Icon;
                    newClip.Keywords          = copyClip.Keywords;
                    newClip.MenuBreak         = copyClip.MenuBreak;
                    newClip.MenuEnabled       = copyClip.MenuEnabled;
                    newClip.MenuLabel         = copyClip.MenuLabel;
                    newClip.MenuLeftIcon      = copyClip.MenuLeftIcon;
                    newClip.MenuLeftIconOver  = copyClip.MenuLeftIconOver;
                    newClip.MenuRightIcon     = copyClip.MenuRightIcon;
                    newClip.MenuRightIconOver = copyClip.MenuRightIconOver;
                    newClip.MenuTooltip       = copyClip.MenuTooltip;
                    newClip.ModifyDate        = DateTime.Now;
                    newClip.NotifyOnComments  = copyClip.NotifyOnComments;
                    newClip.OverrideUrl       = copyClip.OverrideUrl;
                    if (isCatalogSelected)
                    {
                        newClip.ParentCatalog = DbContentCatalog.NewPlaceHolder(selectedID);
                    }
                    else
                    {
                        newClip.ParentCatalog = new DbContentClip(selectedClipID).ParentCatalog;
                    }
                    newClip.Priority     = copyClip.Priority;
                    newClip.PublishDate  = copyClip.PublishDate;
                    newClip.Rating       = copyClip.Rating;
                    newClip.References   = copyClip.References;
                    newClip.SortOrder    = copyClip.SortOrder;
                    newClip.Status       = copyClip.Status;
                    newClip.Title        = copyClip.Title;
                    newClip.WorkingDraft = copyClip.WorkingDraft;
                    newClip.Save();
                }
                break;

            case "rPaste":
                if (copyCatalogID != -1)
                {
                    DbContentCatalog srcCatalog;
                    DbContentCatalog destCatalog;

                    srcCatalog = new DbContentCatalog(copyCatalogID);

                    if (isCatalogSelected)
                    {
                        destCatalog = DbContentCatalog.NewPlaceHolder(selectedID);
                    }
                    else
                    {
                        destCatalog = new DbContentClip(selectedClipID).ParentCatalog;
                    }

                    pasteCatalog(srcCatalog, destCatalog, true, true);
                }
                break;
            }
        }
Exemplo n.º 17
0
 protected void ToolBar_ItemCommand(object sender, ToolBarItemEventArgs e)
 {
 }
Exemplo n.º 18
0
 private void ToolBar_ButtonClick(object sender, ToolBarItemEventArgs e) {
     try {
         if (e.Item == this.buttonItemCatalog ||
             e.Item == this.buttonItemCategorized ||
             e.Item == this.buttonItemAlphabetical) {
             ButtonItem item = (ButtonItem)e.Item;
             if (item.Checked) { return; }
             this.buttonItemCatalog.Checked = (e.Item == this.buttonItemCatalog);
             this.buttonItemCategorized.Checked = (e.Item == this.buttonItemCategorized);
             this.buttonItemAlphabetical.Checked = (e.Item == this.buttonItemAlphabetical);
             this.LoadModel();
         }
         else if (e.Item == this.buttonItemRefresh) {
             this.LoadModel();
         }
     }
     catch (Exception ex) {
         ExceptionDialog.HandleException(ex);
     }
 }
Exemplo n.º 19
0
 /// <summary>
 /// Raises the ToolBarItemClicked event
 /// </summary>
 /// <param name="e">The event arguments</param>
 protected virtual void OnToolBarItemClicked(ToolBarItemEventArgs args)
 {
     this.eventAggregator.GetEvent <ToolBarItemClickedEvent>().Publish(args);
 }
Exemplo n.º 20
0
        private void menu_Click(object objSource, ToolBarItemEventArgs objArgs)
        {
            Control        inControl = this.Parent;
            SxMakeRelatory rel;

            REPORT.ReportVo report;
            string          relname = "";

            switch (objArgs.ToolBarButton.Name.ToLower())
            {
            case "tbbadd":
                #region ADD
                this.Parent.Controls.Clear();
                rel      = new SxMakeRelatory();
                rel.Dock = DockStyle.Fill;
                FormatScreen.AddControl(inControl, rel, true, 1, true, false);
                rel.btnAddNew_Click(null, null);
                #endregion

                break;

            case "tbbver":
                #region VER
                if (dgvReports.SelectedRows.Count > 0)
                {
                    DataRow row = (DataRow)(dgvReports.DataSource as DataView).Table.Rows[dgvReports.SelectedRows[0].Index];

                    /*
                     * Report cReport = new Report();
                     * cReport.LOAD((string)row["nome"], false);
                     *
                     * gridWindow grid = new gridWindow(cReport.TABLE.QUERY.ToString(), null);
                     * grid.SetGridHeader(cReport.TABLE.FIELDS.TOGRID);
                     * grid.showWindow();
                     * //*/

                    ControlsConfig.formShow(new ViewReport(int.Parse(row["id"].ToString())), this.Form, ControlsConfig.showType.Dialog, null, true);
                }
                #endregion

                break;

            case "tbbedit":
                #region EDIT
                if (dgvReports.SelectedRows.Count > 0)
                {
                    this.Parent.Controls.Clear();

                    DataRow row = (DataRow)(dgvReports.DataSource as DataView).Table.Rows[dgvReports.SelectedRows[0].Index];

                    rel      = new SxMakeRelatory();
                    rel.Dock = DockStyle.Fill;
                    FormatScreen.AddControl(inControl, rel, true, 1, true, false);
                    relname = (string)row["nome"];
                    rel.btnAbrir_Click(new Label(relname), null);
                }
                #endregion

                break;

            case "tbbdel":
                #region DEL
                if (dgvReports.SelectedRows.Count > 0)
                {
                    DataRow row = (DataRow)(dgvReports.DataSource as DataView).Table.Rows[dgvReports.SelectedRows[0].Index];

                    report = new REPORT.ReportVo();

                    report.ID            = int.Parse(row["id"].ToString());
                    report.IDREPORTGROUP = int.Parse(row["idreportgroup"].ToString());

                    SigaObjects.Reports.Table.TableVo maintable = new SigaObjects.Reports.Table.TableVo();
                    new SigaObjects.Reports.Table.TableDao().load(maintable, report.ID, 0);

                    new SigaObjects.Reports.Report.ReportDao().DeleteRecursiveTables(maintable.ID);
                    new SigaObjects.Reports.Report.ReportDao().delete(report);
                }
                #endregion

                break;

            case "tbbexcel":
                #region EXCEL
                FormatScreen.showNotImplemented();
                #endregion

                break;

            case "tbbpdf":
                #region PDF
                FormatScreen.showNotImplemented();
                #endregion

                break;

            default:
                break;
            }
        }
Exemplo n.º 21
0
 private void OnAnyToolClientButtonClick(object sender, ToolBarItemEventArgs e)
 {
 }
Exemplo n.º 22
0
 private void ToolBar_ButtonClick(object sender, ToolBarItemEventArgs e) {
     try {
         if (e.Item == this.buttonItemErrors){
             this.RefreshErrorList();
         }else if( e.Item == this.buttonItemWarnings) {
             this.RefreshErrorList();
         }
         else if (e.Item == this.dropDownMenuItemValidator) {
             this.dropDownMenuItemValidator.Show();
         }
     }
     catch (Exception ex) {
         ExceptionDialog.HandleException(ex);
     }
 }
        /// <summary>
        /// Handles the ItemCommand event of the ToolBar control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="ComponentArt.Web.UI.ToolBarItemEventArgs"/> instance containing the event data.</param>
        /// <exception cref="ArgumentNullException">Thrown when <paramref name="e" /> is null.</exception>
        protected void tbMediaObjectActions_ItemCommand(object sender, ToolBarItemEventArgs e)
        {
            if (e == null)
                throw new ArgumentNullException("e");

            ToolBarItem tbi = e.Item;
            switch (tbi.ID)
            {
                case "tbiDownload": { DownloadMediaObjectToUser(); break; }
                case "tbiDownloadZip": { RedirectToDownloadZipPage(); break; }
                case "tbiRotate": { RedirectToRotatePage(); break; }
                case "tbiMove": { RedirectToMovePage(); break; }
                case "tbiCopy": { RedirectToCopyPage(); break; }
            }
        }
Exemplo n.º 24
0
 private void ToolBar_ButtonClick(object sender, ToolBarItemEventArgs e) {
     if (e.Item == this.buttonItemNew) {
         XmlNode root = this.m_xmlDocument.SelectSingleNode("ROOT");
         root.RemoveAll();
         this.UpdateExceptionHandler();
     }
     else if (e.Item == this.buttonItemSave) {
         this.m_webBrowser.ShowSaveAsDialog();
     }
     else if (e.Item == this.buttonItemMessage) {
         if (string.IsNullOrEmpty(this.m_feedbackAddress)) { return; }
         Process process = new Process();
         process.StartInfo.FileName = this.m_feedbackAddress;
         process.StartInfo.Verb = "Open";
         process.StartInfo.CreateNoWindow = false;
         process.Start();
     }
     else if (e.Item == this.buttonItemPrint) {
         this.m_webBrowser.ShowPrintDialog();
     }
     else if (e.Item == this.buttonItemPrintPreview) {
         this.m_webBrowser.ShowPrintPreviewDialog();
     }
     else if (e.Item == this.buttonItemPageSetup) {
         this.m_webBrowser.ShowPageSetupDialog();
     }
     else if (e.Item == this.buttonItemCopy) {
         if (this.m_webBrowser == null) { return; }
         this.m_webBrowser.Document.ExecCommand("SelectAll", false, null);
         this.m_webBrowser.Document.ExecCommand("Copy", false, null);
         this.m_webBrowser.Document.ExecCommand("Unselect", false, null);
     }
     else if (e.Item == this.buttonItemPlay) {
         this.m_enabled = true;
         this.Invoke(new EventHandler(this.Timer_Tick), new object[] { this, EventArgs.Empty });
     }
     else if (e.Item == this.buttonItemPause) {
         this.m_enabled = false;
         this.Invoke(new EventHandler(this.Timer_Tick), new object[] { this, EventArgs.Empty });
     }
 }