示例#1
0
        private void MenuIniItems_Click(object sender, EventArgs e)
        {
            try
            {
                this.FileNameCombo.Enabled = false;
                this.Enabled = false;

                BinaryReader f = L2EncDec.Decrypt(((ToolStripMenuItem)sender).Text, Encoding.Default);
                if (f == null)
                {
                    return;
                }
                char[] IniText = f.ReadChars((int)f.BaseStream.Length);
                f.Close();

                IniEditBox dlg = new IniEditBox(((ToolStripMenuItem)sender).Text, new String(IniText));
                dlg.ShowDialog();
            }
            catch (Exception ex)
            {
                Program.log.Add(ex, true);
            }
            finally
            {
                this.Enabled = true;
                this.FileNameCombo.Enabled = true;
            }
        }
示例#2
0
        private void MenuIniItems_Click(object sender, EventArgs e)
        {
            try
            {
                this.FileNameCombo.Enabled = false;
                this.Enabled = false;

                BinaryReader f = L2EncDec.Decrypt(((ToolStripMenuItem)sender).Text, Encoding.Default);
                if (f == null)
                    return;
                char[] IniText = f.ReadChars((int)f.BaseStream.Length);
                f.Close();

                IniEditBox dlg = new IniEditBox(((ToolStripMenuItem)sender).Text, new String(IniText));
                dlg.ShowDialog();
            }
            catch (Exception ex)
            {
                Program.log.Add(ex, true);
            }
            finally
            {
                this.Enabled = true;
                this.FileNameCombo.Enabled = true;
            }
        }