Exemple #1
0
        private void buttonDetails_Click(object sender, EventArgs e)
        {
            var detailsFor = bindingSource1.Current as CarPartsViewHelper;

            if (detailsFor == null)
            {
                MessageBox.Show("Няма избрана част за редакция. Моля изберете част и опитайте отново.", "Няма избрана част за редакция.", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }

            var viewControl = new DetailsControl();

            viewControl.Dock = DockStyle.Fill;
            var schemes = CarPartsSchemeService.GetCarPartsSchemesByPartId(detailsFor.PartId);

            viewControl.Images      = new LinkedList <Image>(ConvertCarPartsSchemeHelperHelpersToImages(schemes));
            viewControl.CarPartInfo = detailsFor;

            var dialog = new GeneralForm();

            dialog.Text = "Информация за " + detailsFor.PartName;
            dialog.Size = viewControl.Size;

            dialog.Controls.Add(viewControl);
            viewControl.BringToFront();
            dialog.ShowDialog();
        }
        /// <summary>
        /// Displays the details pane
        /// </summary>
        private void ShowDetailsPane()
        {
            // Add the cloned column to layer 0:
            if (!DiagramPane.ColumnDefinitions.Contains(column1CloneForLayer0))
            {
                DiagramPane.ColumnDefinitions.Add(column1CloneForLayer0);
            }

            if (family.Current != null)
            {
                DetailsControl.DataContext = family.Current;
            }

            DetailsPane.Visibility = Visibility.Visible;
            DetailsControl.SetDefaultFocus();

            HideNewUserControl();
            HideWelcomeScreen();

            NewMenu.IsEnabled    = true;
            OpenMenu.IsEnabled   = true;
            SaveMenu.IsEnabled   = true;
            GedcomMenu.IsEnabled = true;
            SkinsMenu.IsEnabled  = true;
        }
Exemple #3
0
        private void OnPropertiesButtonClicked(Object sender, RoutedEventArgs e)
        {
            CommandBar.Visibility  = Visibility.Collapsed;
            DetailsControl.Opacity = 1;
            DetailsControl.SetValue(Canvas.ZIndexProperty, 1);
            Venz.UI.Xaml.Page.Active.AddBackKeyAction(PropertiesBackKeyAction);
            var storyboard = CreateDetailsShowingTransition(DetailsControl);

            storyboard.Begin();
        }
Exemple #4
0
        private void OnCloseDetailsButtonClicked(Object sender, RoutedEventArgs args)
        {
            Venz.UI.Xaml.Page.Active.RemoveBackKeyAction(PropertiesBackKeyAction);
            var storyboard = CreateDetailsHidingTransition(DetailsControl);

            storyboard.Begin();
            storyboard.Completed += (storyboardSender, storyboardArgs) =>
            {
                CommandBar.Visibility = Visibility.Visible;
                DetailsControl.SetValue(Canvas.ZIndexProperty, 0);
                DetailsControl.Opacity = 0;
                storyboard.Stop();
            };
        }
        public void ShowDetails(int i)
        {
            currentSelection = i;
            var p = packages[i];

            _details                = new DetailsControl();
            _details.Title.Text     = p.Name;
            _details.Author.Text    = p.Author;
            _details.Downloads.Text = p.Downloads.ToString();

            _details.Image.Source = GetImage(p.ImageURL);
            SetText(_details.Description, p.Description);
            if (p.PackageURL != null)
            {
                try
                {
                    Uri    uri      = new Uri(p.PackageURL);
                    string filename = System.IO.Path.GetFileName(uri.LocalPath);

                    if (PackageManager.FileExists(filename))
                    {
                        _details.ActionButton.Content = "Remove";
                    }

                    _details.ActionButton.Tag    = i;
                    _details.ActionButton.Click += ActionButton_Click;
                }
                catch (Exception ex)
                {
                    App.Log.Error(ex);
                    _details.ActionButton.Visibility = Visibility.Collapsed;
                }
            }
            else
            {
                _details.ActionButton.Visibility = Visibility.Collapsed;
            }
            _details.Version.Text = p.Version;
            //HideRows(p);
            DetailsView.Children.Clear();
            DetailsView.Children.Add(_details);
        }
 /// <summary>
 /// The focus can be set only after the animation has stopped playing.
 /// </summary>
 private void HideFamilyData_StoryboardCompleted(object sender, EventArgs e)
 {
     DetailsControl.SetDefaultFocus();
 }
 /// <summary>
 /// The focus can be set only after the animation has stopped playing.
 /// </summary>
 private void HidePersonInfo_StoryboardCompleted(object sender, EventArgs e)
 {
     DetailsControl.SetDefaultFocus();
 }
Exemple #8
0
 public bool ValidateControl()
 {
     return(DetailsControl == null || DetailsControl.ValidateControl(Entry));
 }
        /*public IGridHtmlOptions<T> WithDetailsGrid(System.Func<object, IEnumerable<object>> sourceFunc)
         * {
         *  _source.DetailsDataSource = sourceFunc;
         *  return this;
         * }*/

        public IHtmlContent RenderDetailsGrid(object parent)
        {
            //System.Diagnostics.Debugger.Launch();
            return(DetailsControl.RenderDetailsControl((T)parent));
        }