private void BtnOpenClick(object sender, EventArgs e) { OpenFileDialog dialog = new OpenFileDialog(); dialog.Filter = "String File|String.i3pack"; dialog.FileName = "String.i3pack"; if (dialog.ShowDialog() == DialogResult.OK) { tbxFile.Text = dialog.FileName; tbxFile.Enabled = true; lbxList.Enabled = true; btnSave.Enabled = true; btnApply.Enabled = true; _file = dialog.FileName; lbxList.Items.Clear(); //if (File.Exists(_file)) //File.Copy(_file, string.Format("backup\\backup-{0:yyyy-MM-dd-HH-mm-ss}-String.i3Pack", DateTime.Now)); WORKER.RunWorkerAsync(); } }
private void BtnOpenClick(object sender, EventArgs e) { OpenFileDialog opDialog = new OpenFileDialog(); opDialog.Filter = "Point Blank Pack file|*.i3Pack"; if (opDialog.ShowDialog() == DialogResult.OK) { _packFile = opDialog.FileName; FileInfo packInfo = new FileInfo(_packFile); tbxFileName.Text = packInfo.Name; tbxFileName.Focus(); lsView.Enabled = false; lsView.ForeColor = SystemColors.ControlDarkDark; lbxList.Items.Clear(); lbxList.Enabled = true; lsView.Items.Clear(); trView.Nodes.Clear(); trView.Enabled = false; _anu.Clear(); _nodes.Clear(); _breakPoint.Clear(); _trn.Clear(); _bodyPack.Clear(); //_contentStarted = false; _QA = false; lblInfos.Visible = true; lblInfos.Text = "Open i3Pack file to start."; pnlIfno.Enabled = false; Info.Text = "Info"; btnUnpack.Enabled = false; btnUnpack.BackColor = btnUnpack.Enabled ? SystemColors.Window : SystemColors.Control; btnRepack.Enabled = false; btnRepack.BackColor = btnRepack.Enabled ? SystemColors.Window : SystemColors.Control; // Run Worker WORKER.RunWorkerAsync(); } }