FillDependencyListItems() public method

public FillDependencyListItems ( ListBox listView ) : void
listView System.Windows.Forms.ListBox
return void
Esempio n. 1
0
        public void SetSelectedFileData(FileData file)
        {
            if (file != null)
            {
                if (file == mSelectedFileData)
                {
                    return;
                }

                filePreviewTabs.TabPages.Clear();
                openFileButtonPanel.Controls.Clear();
                iconView.ImageLocation       = "";
                selectedFilePathTextBox.Text = file.Path;
                file.FillDependencyListItems(dependenciesListBox);
                file.FillReferencesListItems(referencesListBox);
                mSelectedFileData = file;
                if (mSelectedFileData is JsonFileData)
                {
                    OnJsonFileDataSelected();
                }
                else if (mSelectedFileData is LuaFileData)
                {
                    OnLuaFileDataSelected();
                }
            }
            else
            {
                mSelectedFileData = null;
                filePreviewTabs.TabPages.Clear();
                selectedFilePathTextBox.Text = "";
                dependenciesListBox.Items.Clear();
                referencesListBox.Items.Clear();
                openFileButtonPanel.Controls.Clear();
                iconView.ImageLocation = "";
            }
        }
        public void SetSelectedFileData(FileData file)
        {
            if (file != null)
            {
                if (file == mSelectedFileData)
                {
                    return;
                }

                filePreviewTabs.TabPages.Clear();
                openFileButtonPanel.Controls.Clear();
                iconView.ImageLocation = "";
                selectedFilePathTextBox.Text = file.Path;
                file.FillDependencyListItems(dependenciesListBox);
                file.FillReferencesListItems(referencesListBox);
                mSelectedFileData = file;
                if (mSelectedFileData is JsonFileData)
                {
                    OnJsonFileDataSelected();
                }
                else if (mSelectedFileData is LuaFileData)
                {
                    OnLuaFileDataSelected();
                }
            }
            else
            {
                mSelectedFileData = null;
                filePreviewTabs.TabPages.Clear();
                selectedFilePathTextBox.Text = "";
                dependenciesListBox.Items.Clear();
                referencesListBox.Items.Clear();
                openFileButtonPanel.Controls.Clear();
                iconView.ImageLocation = "";
            }
        }