예제 #1
0
        private void ShowMordhauPathDialog()
        {
            var          browseForm = new BrowseForm();
            DialogResult result     = browseForm.ShowDialog();

            if (result == DialogResult.OK)
            {
                if (!browseForm.getResultText().ToLower().Contains("mordhau") || !Directory.Exists(browseForm.getResultText()))
                {
                    m_MordhauPath = string.Empty;
                    Log("Invalid Mordhau Path!  Re-set through Settings");
                }
                else
                {
                    m_MordhauPath = $@"{browseForm.getResultText()}\mordhau\content\mordhau\maps\";
                    Log($"New Mordhau Path: {m_MordhauPath}");
                }
            }
            browseForm.Dispose();
        }
예제 #2
0
        private void ShowMordhauPathDialog()
        {
            var          browseForm = new BrowseForm(m_MordhauPath);
            DialogResult result     = browseForm.ShowDialog();

            if (result == DialogResult.OK)
            {
                if (!browseForm.getResultText().ToLower().Contains("mordhau") || !Directory.Exists(browseForm.getResultText()) || !File.Exists($@"{browseForm.getResultText()}\Mordhau.exe"))
                {
                    m_MordhauPath = string.Empty;
                    Log(Properties.Resources.str_Invalid_Mordhau_Path_Re_set_through);
                }
                else
                {
                    m_MordhauPath = $@"{browseForm.getResultText()}\mordhau\content\mordhau\maps\";
                    Log($"New Mordhau Path: {m_MordhauPath}");
                    UpdateEverything();
                }
            }
            browseForm.Dispose();
        }