Exemplo n.º 1
0
 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;
 }
Exemplo n.º 2
0
 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));
 }
Exemplo n.º 3
0
 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);
 }
Exemplo n.º 4
0
 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));
 }
Exemplo n.º 5
0
 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;
 }
Exemplo n.º 6
0
 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);
 }
Exemplo n.º 7
0
 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);
     }
 }