Exemplo n.º 1
0
        private void OnRadioButtonClick(object obj)
        {
            var type = Enum.Parse <MyPinType>(obj.ToString());

            switch (type)
            {
            case MyPinType.Start:
                Pin.IconPath = IconsPath.StartEndPin;
                Pin.Label    = MyPinType.Start.ToString();
                Pin.MyType   = MyPinType.Start;
                break;

            case MyPinType.Waypoint:
                Pin.IconPath = IconsPath.WaypointPin;
                Pin.MyType   = MyPinType.Waypoint;
                Pin.Label    = "";
                break;

            case MyPinType.End:
                Pin.IconPath = IconsPath.StartEndPin;
                Pin.MyType   = MyPinType.End;
                Pin.Label    = MyPinType.End.ToString();
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }
            TypeSelected?.Invoke(Pin);
        }
Exemplo n.º 2
0
        private void btn_Click(object sender, EventArgs e)
        {
            if (sender == btnStandard)
            {
                Type = ConnectionType.Wizard;
            }
            else if (sender == btnSdkLoginControl)
            {
                Type = ConnectionType.Sdk;
            }
            else if (sender == btnCertificate)
            {
                Type = ConnectionType.Certificate;
            }
            else if (sender == btnClientSecret)
            {
                Type = ConnectionType.ClientSecret;
            }
            else if (sender == btnMfa)
            {
                Type = ConnectionType.Mfa;
            }
            else
            {
                Type = ConnectionType.ConnectionString;
            }

            TypeSelected?.Invoke(this, new EventArgs());
        }
Exemplo n.º 3
0
 private void btn_Click(object sender, EventArgs e)
 {
     if (sender == btnStandard)
     {
         Type = ConnectionType.Wizard;
     }
     else if (sender == btnSdkLoginControl)
     {
         Type = ConnectionType.Sdk;
     }
     else if (sender == btnConnectionString)
     {
         Type = ConnectionType.ConnectionString;
     }
     else
     {
         Type = ConnectionType.ServicePrincipal;
     }
     TypeSelected?.Invoke(this, new EventArgs());
 }