Exemplo n.º 1
0
 private void DisplayName_Leave(object sender, EventArgs e)
 {
     if (!IsDisplayNameValid())
     {
         DisplayNameTextBox.Focus();
     }
 }
Exemplo n.º 2
0
 public void NewTool_Click(object sender, EventArgs e)
 {
     try
     {
         Tools.ExternalTool externalTool = new Tools.ExternalTool(Language.strExternalToolDefaultName);
         Runtime.ExternalTools.Add(externalTool);
         UpdateToolsListView(externalTool);
         DisplayNameTextBox.Focus();
     }
     catch (Exception ex)
     {
         Runtime.MessageCollector.AddExceptionMessage(message: "UI.Window.ExternalTools.NewTool_Click() failed.", ex: ex, logOnly: true);
     }
 }
Exemplo n.º 3
0
 private void NewTool_Click(object sender, EventArgs e)
 {
     try
     {
         var externalTool = new ExternalTool(Language.strExternalToolDefaultName);
         Runtime.ExternalToolsService.ExternalTools.Add(externalTool);
         UpdateToolsListObjView();
         ToolsListObjView.SelectedObject = externalTool;
         DisplayNameTextBox.Focus();
     }
     catch (Exception ex)
     {
         Runtime.MessageCollector.AddExceptionMessage("UI.Window.ExternalTools.NewTool_Click() failed.", ex);
     }
 }
        /// <summary>
        /// Animates the closed logo.
        /// </summary>
        private void AnimateClosedLogo()
        {
            Canvas.SetTop(Inbox2SetupClosedLogoCanvas, Canvas.GetTop(Inbox2SetupOpenedLogoCanvas));

            PennerDoubleAnimation.Equations equation = PennerDoubleAnimation.Equations.QuintEaseOut;
            int durationMS = 1000;

            // Hide Opened Logo
            Animator.AnimatePenner(Inbox2SetupOpenedLogoCanvas, OpacityProperty, equation, Inbox2SetupOpenedLogoCanvas.Opacity, 0, durationMS, delegate { Inbox2SetupOpenedLogoCanvas.Visibility = Visibility.Hidden; });

            // Show Closed Logo
            Animator.AnimatePenner(Inbox2SetupClosedLogoCanvas, OpacityProperty, equation, 0, 1, durationMS, delegate
            {
                Animator.AnimatePenner(Inbox2SetupClosedImage, WidthProperty, equation, Inbox2SetupClosedImage.Width, Inbox2SetupClosedImage.Width / 2, durationMS, delegate { });
                Animator.AnimatePenner(Inbox2SetupClosedImage, HeightProperty, equation, Inbox2SetupClosedImage.Height, Inbox2SetupClosedImage.Height / 2, durationMS,
                                       delegate
                {
                    Animator.AnimatePenner(ChannelConfigurationAddStackPanel, OpacityProperty, equation, null, 0, durationMS, delegate { ChannelConfigurationAddStackPanel.Visibility = Visibility.Hidden; });
                    Animator.AnimatePenner(Inbox2SetupClosedLogoCanvas, Canvas.LeftProperty, equation, null, 0, durationMS, delegate { ChannelSetupFinishStackPanel.Visibility = System.Windows.Visibility.Visible; });
                });
            });

            OnPropertyChanged("ChannelConfiguration");

            // Setup form to complete setup.
            ChannelsManager.Channels[0].Configuration.IsDefault = true;
            DefaultEmailAddressComboBox.SelectedIndex           = 0;
            if (ChannelsManager.Channels.Count <= 1 ||
                ChannelsManager.Channels.Select(s => s.Configuration).Where(c => c.Charasteristics.SupportsEmail).Count() == 0)
            {
                DefaultEmailAddressTextBlock.Visibility = Visibility.Collapsed;
                DefaultEmailAddressComboBox.Visibility  = Visibility.Collapsed;
            }

            var address = ChannelsManager.GetDefaultSourceAddress();

            if (address.ToString().Contains("@"))
            {
                string[] parts = address.ToString().Split('@');

                DisplayNameTextBox.Text = char.ToUpper(parts[0][0]) + parts[0].Substring(1);
            }
            else
            {
                DisplayNameTextBox.Text = address.DisplayName;
            }
            DisplayNameTextBox.Focus();
        }