Esempio n. 1
0
            void OnItemDoubleClicked(ItemDoubleClickedEventArgs args)
            {
                var entry = cDirEntries.Find((pair) => pair.Text == args.Item);

                if (entry.IsDirectory)
                {
                    //Calls pathChanged, which does the loading logic
                    string nextDirectory;
                    if (entry.Name == "..")
                    {
                        nextDirectory = Path.GetDirectoryName(currentDirectory);
                        if (nextDirectory != "")
                        {
                            nextDirectory += Path.DirectorySeparatorChar;
                        }
                    }
                    else
                    {
                        nextDirectory = Path.Combine(currentDirectory, entry.Name) + Path.DirectorySeparatorChar;
                    }
                    //Calls PathChanged
                    pathEdit.Text = nextDirectory;
                }
                else
                {
                    Selected(entry.Name, false);
                }
            }
Esempio n. 2
0
 private void SceneListView1_ItemDoubleClicked(object sender, ItemDoubleClickedEventArgs e)
 {
     if (e.Item is IEditableObject obj)
     {
         gL_Control.CameraTarget = obj.GetFocusPoint();
     }
 }
Esempio n. 3
0
        private void audioListBox_ItemDoubleClicked(object sender, ItemDoubleClickedEventArgs e)
        {
            int index = audioListBox.IndexFromPoint(e.X, e.Y);

            if (index != -1)
            {
                this.PlaySelectedMedia();
            }
        }
        private void IconView_ItemDoubleClicked(object sender, ItemDoubleClickedEventArgs <ItemModelBase> e)
        {
            details.Reset();

            if (level == 2)
            {
                return;
            }

            details.Level = 2;
            level++;

            DisplayFullView(e.Child.Id, true);
        }
Esempio n. 5
0
        private void IconView_ItemDoubleClicked(object sender, ItemDoubleClickedEventArgs <ItemModelBase> e)
        {
            ItemModelBase model = null;

            if (e.Child is VariationModel)
            {
                model = new VariationModel(e.Child.Id);
            }
            else if (e.Child is ComponentModel)
            {
                details.Reset();
                return;
            }

            if (model.HasChildren && model.Children[0] is VariationModel)
            {
                details.ShowPointPrice();
                details.HidePortions();
                details.HideGroup();

                Populate(model);
                title.Text           = e.Child.Description;
                currentLocation.Text = currentLocation.Text + "/" + e.Child.Description;
            }
            else if (model.HasChildren)
            {
                details.HidePointPrice();
                details.ShowPortions();
                details.ShowGroup();

                subViewPanel.Visibility = Visibility.Visible;

                Populate(new ComponentsModel(e.Child.Id, e.Child.ParentId), new ComponentsModel(e.Child.Id));
                title.Text           = e.Child.Description;
                currentLocation.Text = currentLocation.Text + "/" + e.Child.Description;
            }

            if (currentVariation != 0)
            {
                upOne.Visibility = Visibility.Visible;
            }

            details.Reset();
        }
Esempio n. 6
0
 private void Item_ItemDoubleClicked(object sender, ItemDoubleClickedEventArgs <T> e)
 {
     ItemDoubleClicked(sender, e);
 }