private void EnviListView_Updated(object sender, Components.DataEventArgs e) { if (this._currentProject == null) { MessageBox.Show(this, "请选择项目", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } this._currentProject.Environments[e.Index].Name = e.Value; }
private void EnviListView_Added(object sender, Components.DataEventArgs e) { if (this._currentProject == null) { MessageBox.Show(this, "请选择项目", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } this._currentProject.Environments.Add(new Environment(e.Value)); }
private void EnviListView_Deleted(object sender, Components.DataEventArgs e) { if (this._currentProject == null) { MessageBox.Show(this, "请选择项目", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } this._currentProject.Environments.RemoveAt(e.Index); }
private void FileListView_Added(object sender, Components.DataEventArgs e) { if (this._currentEnvi == null) { MessageBox.Show(this, "请选择环境", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } this._currentEnvi.Items.Add(new Item(e.Value)); }
private void FileListView_Updated(object sender, Components.DataEventArgs e) { if (this._currentEnvi == null) { MessageBox.Show(this, "请选择环境", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } this._currentEnvi.Items[e.Index].Name = e.Value; }
private void EnviListView_SelectedDataChanged(object sender, Components.DataEventArgs e) { this._currentItem = null; this.sourcePathTextBox.Text = null; this.targetPathTextBox.Text = null; this.fileTextBox.Text = null; this._currentEnvi = this._currentProject?.Environments.ElementAtOrDefault(e.Index); this.fileListView.Data = this._currentEnvi?.Items.Select(p => p.Name); }
private void FileListView_SelectedDataChanged(object sender, Components.DataEventArgs e) { this.sourcePathTextBox.Text = null; this.targetPathTextBox.Text = null; this.fileTextBox.Text = null; this._currentItem = this._currentEnvi?.Items.ElementAtOrDefault(e.Index); this.sourcePathTextBox.Text = this._currentItem?.SourcePath; this.targetPathTextBox.Text = this._currentItem?.TargetPath; if (File.Exists(this._currentItem?.SourcePath)) { this.fileTextBox.Text = File.ReadAllText(this._currentItem.SourcePath); } }