CheckForUrlAndLaunchInBrowser() public static method

public static CheckForUrlAndLaunchInBrowser ( string stringWithPossibleUrl ) : void
stringWithPossibleUrl string
return void
示例#1
0
        private void Params_CellClick(object sender, CellClickEventArgs e)
        {
            // Only process the Description column
            if (e.RowIndex == -1 || startup || e.ColumnIndex != 4)
            {
                return;
            }

            try
            {
                string descStr = e.SubItem.ModelValue.ToString();
                ConfigRawParams.CheckForUrlAndLaunchInBrowser(descStr);
            }
            catch { }
        }
        private void Params_CellClick(object sender, CellClickEventArgs e)
        {
            // Only process the Description column
            if (e.RowIndex == -1 || startup)
            {
                return;
            }

            if (e.ColumnIndex == olvColumn2.Index)
            {
                var it    = ((data)e.Model);
                var check = it.Value;
                var name  = it.paramname;

                var availableBitMask =
                    ParameterMetaDataRepository.GetParameterBitMaskInt(name, MainV2.comPort.MAV.cs.firmware.ToString());
                if (availableBitMask.Count > 0)
                {
                    var mcb  = new MavlinkCheckBoxBitMask();
                    var list = new MAVLink.MAVLinkParamList();
                    list.Add(new MAVLink.MAVLinkParam(name, double.Parse(check.ToString(), CultureInfo.InvariantCulture),
                                                      MAVLink.MAV_PARAM_TYPE.INT32));
                    mcb.setup(name, list);
                    mcb.ValueChanged += (o, s, value) =>
                    {
                        paramCompareForm_dtlvcallback(s, int.Parse(value));
                        ((data)e.HitTest.RowObject).Value = value;
                        Params.RefreshItem(e.HitTest.Item);
                        e.HitTest.SubItem.Text = value;
                        Params.CancelCellEdit();
                        e.Handled = true;
                        mcb.Focus();
                    };
                    var frm = mcb.ShowUserControl();
                    frm.TopMost = true;
                }
            }


            try
            {
                string descStr = e.SubItem.ModelValue.ToString();
                ConfigRawParams.CheckForUrlAndLaunchInBrowser(descStr);
            }
            catch { }
        }