示例#1
0
        private void CreatePatch_Patch_Browse_Click(object sender, EventArgs e)
        {
            SaveFileDialog fd = new SaveFileDialog();

            fd.Filter = "Patch (*.ptp)|*.ptp";
            fd.ShowDialog();
            if (fd.FileName != "")
            {
                CreatePatch_Patch.Text            = fd.FileName;
                CreatePatch_Patch.SelectionLength = 0;
                CreatePatch_Patch.SelectionStart  = CreatePatch_Patch.Text.Length;
                CreatePatch_Patch.ScrollToCaret();
            }
        }
示例#2
0
        private void CreatePatch_Unpatched_Browse_Click(object sender, EventArgs e)
        {
            OpenFileDialog fd = new OpenFileDialog();

            fd.Filter = "All files (*.*)|*.*";
            fd.ShowDialog();
            if (fd.FileName != "")
            {
                CreatePatch_Unpatched.Text            = fd.FileName;
                CreatePatch_Unpatched.SelectionLength = 0;
                CreatePatch_Unpatched.SelectionStart  = CreatePatch_Unpatched.Text.Length;
                CreatePatch_Unpatched.ScrollToCaret();

                string ptn = fd.FileName;
                ptn = ptn.Substring(0, ptn.LastIndexOf("."));
                CreatePatch_Patch.Text            = ptn + ".ptp";
                CreatePatch_Patch.SelectionLength = 0;
                CreatePatch_Patch.SelectionStart  = CreatePatch_Patch.Text.Length;
                CreatePatch_Patch.ScrollToCaret();
            }
        }