예제 #1
0
#pragma warning restore CA2213

        public MainForm()
        {
            LoadAssetTypes();
            InitializeComponent();

            Text = "VRF - Source 2 Resource Viewer v" + Application.ProductVersion;

            mainTabs.SelectedIndexChanged += (o, e) =>
            {
                if (mainTabs.SelectedTab != null)
                {
                    findToolStripButton.Enabled = mainTabs.SelectedTab.Controls["TreeViewWithSearchResults"] is TreeViewWithSearchResults;
                }
            };

            mainTabs.TabPages.Add(ConsoleTab.CreateTab());

            Console.WriteLine($"VRF v{Application.ProductVersion}");

            searchForm = new SearchForm();

            Settings.Load();

            NewLineRegex = new Regex(@"\r\n|\n\r|\n|\r", RegexOptions.Compiled | RegexOptions.CultureInvariant | RegexOptions.ExplicitCapture);

            string[] args = Environment.GetCommandLineArgs();
            for (int i = 1; i < args.Length; i++)
            {
                string file = args[i];
                if (File.Exists(file))
                {
                    OpenFile(file);
                }
            }
        }
예제 #2
0
        public ToolStripDropDownButton ExportToolStripButton => exportToolStripButton; // TODO

        public MainForm()
        {
            LoadAssetTypes();
            InitializeComponent();

            Text = "VRF - Source 2 Resource Viewer v" + Application.ProductVersion;

            mainTabs.SelectedIndexChanged += (o, e) =>
            {
                ShowHideSearch();
            };

            mainTabs.TabPages.Add(ConsoleTab.CreateTab());

            Console.WriteLine($"VRF v{Application.ProductVersion}");

            searchForm = new SearchForm();

            Settings.Load();

            string[] args = Environment.GetCommandLineArgs();
            for (int i = 1; i < args.Length; i++)
            {
                string file = args[i];
                if (File.Exists(file))
                {
                    OpenFile(file);
                }
            }
        }