コード例 #1
0
ファイル: Form1.cs プロジェクト: diehard3303/ModManagerUlt
        private void editModToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var reg = new AtsRegWork(true);
            var gam = reg.Read(RegKeys.CURRENT_GAME);
            Dictionary <string, string> dic = null;
            const string sortedList         = "sortedFileListComplete.xml";
            var          key = lstAvailableMods.SelectedItem.ToString();
            var          pth = string.Empty;

            switch (gam)
            {
            case "ATS":
                dic = Serializer.DeserializeDictionary(reg.Read(AtsRegKeys.ATS_XML) + sortedList);
                break;

            case "ETS":
                dic = Serializer.DeserializeDictionary(reg.Read(EtsRegKeys.ETS_XML) + sortedList);
                break;

            case "FS15":
                dic = Serializer.DeserializeDictionary(reg.Read(Fs15RegKeys.FS15_XML) + sortedList);
                break;

            case "FS17":
                dic = Serializer.DeserializeDictionary(reg.Read(Fs17RegKeys.FS17_XML) + sortedList);
                break;
            }

            if (dic != null && dic.Any(v => string.Equals(v.Key, key, StringComparison.OrdinalIgnoreCase)))
            {
                dic.TryGetValue(key, out pth);
            }

            reg.Write(RegKeys.CURRENT_ORIGINAL_FILE_EDIT_PATH, pth + "\\" + key);
            var mt = new ModEdit();

            reg.Write(RegKeys.CURRENT_FILE_EDIT, mt.EditMod(lstAvailableMods.SelectedItem.ToString()));
            var frm = new EditMod();

            frm.LoadTree();
            frm.ShowDialog();
        }
コード例 #2
0
ファイル: Form1.cs プロジェクト: diehard3303/ModManagerUlt
        private void loadDataBrowserToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var th = new EditMod();

            th.ShowDialog();
        }