public DocumentationPage(BaseWrapper Wrapper)
     : base(Wrapper)
 {
     InitializeComponent();
     this.NodeName = Strings.Documentation;
     HeaderLbl.Text = this.NodeName;
 }
Esempio n. 2
0
 public DescriptionPage(BaseWrapper wrapper)
     : base(wrapper)
 {
     InitializeComponent();
     this.NodeName = Strings.Description;
     HeaderLbl.Text = this.NodeName;
 }
Esempio n. 3
0
        public LogWindow(BindingList <LogLine> logLines, BaseWrapper wrapper)
        {
            InitializeComponent();

            LogLines = logLines;
            Wrapper  = wrapper;

            UpdateLog();

            LogLines.ListChanged += LogChanged;
        }
Esempio n. 4
0
        public void NewEntry()
        {
            BGMGEntryNode node = new BGMGEntryNode {
                _name = $"Song [{Resource.Children.Count}]", InfoIndex = -1, Volume = 100
            };

            _resource.AddChild(node);

            BaseWrapper w = FindResource(node, false);

            w.EnsureVisible();
            w.TreeView.SelectedNode = w;
        }
Esempio n. 5
0
 private void Build(BaseWrapper wrapper, string target)
 {
     if (wrapper is SolutionWrapper)
     {
         this.Build(wrapper as SolutionWrapper, target);
     }
     else if (wrapper is ProjectWrapper)
     {
         this.Build(wrapper as ProjectWrapper, target);
     }
     else
     {
         Debug.Assert(false);
     }
 }
Esempio n. 6
0
        private void AddItem(BaseWrapper component)
        {
            ListViewItem it = listView1.Items.Add(component.InnerName);

            it.SubItems.Add(component.InnerProjectPath);
        }
Esempio n. 7
0
 public DialogResult ShowDialog(IWin32Window owner, BaseWrapper component)
 {
     this.AddItem(component);
     listView1.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent);
     return(this.ShowDialog(owner));
 }
Esempio n. 8
0
        private void OnContextMenuClick(object sender, EventArgs e)
        {
            NodeEventArgs arg = e as NodeEventArgs;

            if (arg != null)
            {
                switch (arg.Action)
                {
                case NodeAction.Properties:
                    OnShowPropertiesEvent(this.SelectedObject);
                    break;

                case NodeAction.Edit:
                    OnEditEvent(this.SelectedObject);
                    break;

                case NodeAction.References:
                    OnShowReferencesDiagramEvent(this.SelectedObject);
                    break;

                case NodeAction.Remove:
                    if (this.SelectedNode != null)
                    {
                        if (AskConfirmDelete(this.SelectedNode.Name))
                        {
                            OnAction(this.SelectedNode, arg.Action);
                        }
                    }
                    break;

                case NodeAction.Exclude:
                case NodeAction.New:
                case NodeAction.Manage:
                case NodeAction.Build:
                case NodeAction.Rebuild:
                    if (this.SelectedNode != null)
                    {
                        OnAction(this.SelectedNode, arg.Action);
                    }
                    break;

                case NodeAction.OpenFolder:
                    if (this.SelectedWrapper != null)
                    {
                        string      path    = string.Empty;
                        BaseWrapper wrapper = this.SelectedWrapper;
                        if (wrapper is BuildFileWrapper)
                        {
                            path = (wrapper as BuildFileWrapper).FullPath;
                        }
                        if (wrapper is IProjectPath)
                        {
                            path = PK.Wrapper.ExpandPath((wrapper as IProjectPath).ProjectPath);
                        }
                        if (string.IsNullOrEmpty(path) != true)
                        {
                            OnOpenContainingFolderEvent(path);
                        }
                    }
                    break;

                default:
                    break;
                }
            }
        }
 private void AddItem(BaseWrapper component)
 {
     ListViewItem it = listView1.Items.Add(component.InnerName);
     it.SubItems.Add(component.InnerProjectPath);
 }
Esempio n. 10
0
 protected BaseContentInventoryNode(BaseWrapper content)
 {
     this.Content = content;
     this.Content.PropertyChanged += new PropertyChangedEventHandler(OnPropertyChanged);
 }
 public WrapperActionArgs(BaseWrapper Wrapper, NodeAction Action)
 {
     this.Wrapper = Wrapper;
     this.Action = Action;
 }
 public void OnWrapperActionEvent(BaseWrapper Wrapper, NodeAction Action)
 {
     if (this.WrapperActionEvent != null)
     {
         this.WrapperActionEvent(this, new WrapperActionArgs(Wrapper, Action));
     }
 }
Esempio n. 13
0
 protected void EditNode(BaseWrapper content)
 {
     OnEditEvent(content);
 }
Esempio n. 14
0
 public void AppendValueShouldErrorWhenExpressionBuilderIsNull()
 {
     Assert.Throws <ArgumentNullException>(() => BaseWrapper.AppendValueWrapper(null, 1, false));
 }
Esempio n. 15
0
 protected void EditNode(BaseWrapper content)
 {
     OnEditEvent(content);
 }
Esempio n. 16
0
        public void Reset()
        {
            _root = null;
            resourceTree.SelectedNode = null;
            resourceTree.Clear();

            if (Program.RootNode != null)
            {
                _root = BaseWrapper.Wrap(this, Program.RootNode);
                resourceTree.BeginUpdate();
                resourceTree.Nodes.Add(_root);
                resourceTree.SelectedNode = _root;
                _root.Expand();
                resourceTree.EndUpdate();

                closeToolStripMenuItem.Enabled = true;
                saveAsToolStripMenuItem.Enabled = true;
                saveToolStripMenuItem.Enabled = true;

                Program.RootNode._mainForm = this;
            }
            else
            {
                closeToolStripMenuItem.Enabled = false;
                saveAsToolStripMenuItem.Enabled = false;
                saveToolStripMenuItem.Enabled = false;
            }

            UpdateName();
        }
Esempio n. 17
0
 private void Build(BaseWrapper wrapper, string target)
 {
     if (wrapper is SolutionWrapper)
     {
         this.Build(wrapper as SolutionWrapper, target);
     }
     else if (wrapper is ProjectWrapper)
     {
         this.Build(wrapper as ProjectWrapper, target);
     }
     else
         Debug.Assert(false);
 }
Esempio n. 18
0
 public WrapperActionArgs(BaseWrapper Wrapper, NodeAction Action)
 {
     this.Wrapper = Wrapper;
     this.Action  = Action;
 }
Esempio n. 19
0
 public DialogResult ShowDialog(IWin32Window owner, BaseWrapper component)
 {
     this.AddItem(component);
     listView1.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent);
     return this.ShowDialog(owner);
 }