예제 #1
0
        void LabelX_MarkupLinkClick(object sender, MarkupLinkClickEventArgs e)
        {
            SelectedElementCollection collection = this.usgSource.GetSelectedCells();

            if (collection.Count > 0)
            {
                GridCell gridCell = collection[0] as GridCell;
                if (gridCell != null)
                {
                    GridRow gridRow = gridCell.Parent as GridRow;
                    if (gridRow != null)
                    {
                        frmReserveOperate frmReserveOperate = new frmReserveOperate();
                        frmReserveOperate.BringToFront();
                        frmReserveOperate.StartPosition      = FormStartPosition.CenterScreen;
                        frmReserveOperate.SourceBillGuid     = gridRow.Cells["colSourceBillGuid"].Value.ToGuid();
                        frmReserveOperate.SourceBillLineGuid = gridRow.Cells["colSourceBillLineGuid"].Value.ToGuid();
                        frmReserveOperate.SourceBillNo       = gridRow.Cells["colSourceBillNo"].Value.ToStringHasNull();
                        frmReserveOperate.SourceBillType     = gridRow.Cells["colSourceBillType"].Value.ToStringHasNull();

                        frmReserveOperate.RefreshParentForm += delegate { BindSuperGrid(1); };
                        frmReserveOperate.ShowDialog();
                    }
                }
            }
        }
예제 #2
0
        void lxc_MarkupLinkClick(object sender, MarkupLinkClickEventArgs e)
        {
            SelectedElementCollection collection = this.noticedPanel.GetSelectedCells();

            if (collection.Count > 0)
            {
                GridCell gridCell = collection[0] as GridCell;
                if (gridCell != null)
                {
                    GridRow gridRow = gridCell.Parent as GridRow;
                    if (gridRow != null)
                    {
                        if (MessageBox.Show("请确认是否通知采购员取消采购?", "操作提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK)
                        {
                            Guid?noticeGuid = gridRow.Cells["colNoticeGuid"].Value.ToGuid();
                            bool flag       = noticeLogic.CancelPurchaseNotice(new ORD_PurchaseNoticeParam()
                            {
                                NoticeGuid = noticeGuid
                            });
                            if (flag)
                            {
                                BindSuperGrid();
                                if (RefreshParentForm != null)
                                {
                                    RefreshParentForm();
                                }
                            }
                        }
                    }
                }
            }
            //MessageBox.Show(noticeGuid.ToStringHasNull());
            // //SelectedElementCollection col = this.noticedPanel.GetSelectedRows();
            // //GridRow row= col[0] as GridRow;
        }
예제 #3
0
            void MyGridLabelXEditControlMarkupLinkClick(
                object sender, MarkupLinkClickEventArgs e)
            {
                ProcessStartInfo sInfo = new ProcessStartInfo(e.HRef);

                Process.Start(sInfo);
            }
예제 #4
0
        /// <summary>
        /// Open browser on click
        /// </summary>
        private void OnMarkupLinkClick(object sender, MarkupLinkClickEventArgs e)
        {
            var href = e.HRef;

            if (href.StartsWith("http:") || href.StartsWith("https:") || href.StartsWith("ftp:"))
            {
                try
                {
                    Process.Start(href);
                }
                catch
                {
                    // Ignore
                }
            }
        }
예제 #5
0
        private void _description_MarkupLinkClick(object sender, MarkupLinkClickEventArgs e)
        {
            try
            {
                if (Regex.IsMatch(e.HRef,
                                  @"\b(https?|ftp|file)://[-A-Z0-9+&@#/%?=~_|$!:,.;]*[A-Z0-9+&@#/%=~_|$]",
                                  RegexOptions.IgnoreCase))
                {
#pragma warning disable SCS0001 // Command injection possible in {1} argument passed to '{0}'
                    Process.Start(e.HRef);
#pragma warning restore SCS0001 // Command injection possible in {1} argument passed to '{0}'
                }
            }
            catch
            {
                // Ignore the error because the link is simply not trusted.
            }
        }
예제 #6
0
 protected virtual void OnMarkupLinkClick(MarkupLinkClickEventArgs e)
 {
     if (this.MarkupLinkClick != null)
         MarkupLinkClick(this, e);
 }
예제 #7
0
 private void labelX3_MarkupLinkClick(object sender, MarkupLinkClickEventArgs e)
 {
     System.Diagnostics.Process.Start("http://www.devcomponents.com/kb/questions.php?questionid=5");
 }
예제 #8
0
 private void TextPanelMarkupLinkClick(object sender, MarkupLinkClickEventArgs e)
 {
     MessageBoxEx.InvokeMarkupLinkClick(sender, e);
 }
예제 #9
0
 private void labelX2_MarkupLinkClick(object sender, MarkupLinkClickEventArgs e)
 {
     System.Diagnostics.Process.Start(e.HRef);
 }
예제 #10
0
 /// <summary>
 /// Occurs when text markup link is clicked.
 /// </summary>
 private void TabStripTitleTextMarkupLinkClick(object sender, MarkupLinkClickEventArgs e)
 {
     if (TitleTextMarkupLinkClick != null)
         TitleTextMarkupLinkClick(this, new MarkupLinkClickEventArgs(e.Name, e.HRef));
 }
예제 #11
0
 private void MarkupLinkClick(object sender, MarkupLinkClickEventArgs e)
 {
     OnTitleTextMarkupLinkClick(e);
 }
예제 #12
0
 /// <summary>
 /// Raises MarkupLinkClick event.
 /// </summary>
 /// <param name="e">Provides event arguments.</param>
 protected virtual void OnMarkupLinkClick(MarkupLinkClickEventArgs e)
 {
     MarkupLinkClickEventHandler handler = MarkupLinkClick;
     if (handler != null)
         handler(this, e);
 }