Exemplo n.º 1
0
 public DgvEditCommand(DgvHandler dgvHandler, DataGridViewRow row)
     : base(dgvHandler)
 {
     name = "Edit Value";
     currentRow = CloneRow(row);
     curRowIndex = row.Index;
 }
Exemplo n.º 2
0
 public DgvBrowseFolderCommand(DgvHandler dgvHandler, DataGridViewRow row)
     : base(dgvHandler)
 {
     Init();
     currentRow = CloneRow(row);
     curRowIndex = row.Index;
 }
Exemplo n.º 3
0
 public DgvDeleteCommand( DgvHandler dgvHandler, DataGridViewRow row )
     : base(dgvHandler)
 {
     Init();
     this.row = row;
     this.curRowIndex = row.Index;
 }
Exemplo n.º 4
0
 public DgvEditCommand(DgvHandler dgvHandler, DataGridViewRow row)
     : base(dgvHandler)
 {
     name        = "Edit Value";
     currentRow  = CloneRow(row);
     curRowIndex = row.Index;
 }
Exemplo n.º 5
0
 public DgvDeleteDupesCommand(DgvHandler dgvHandler, List <int> _indexes)
     : base(dgvHandler)
 {
     Init();
     this.indexes = _indexes;
     this.rows    = new List <DataGridViewRow>();
 }
Exemplo n.º 6
0
 public DgvDeleteCommand(DgvHandler dgvHandler, DataGridViewRow row)
     : base(dgvHandler)
 {
     Init();
     this.row         = row;
     this.curRowIndex = row.Index;
 }
Exemplo n.º 7
0
 public DgvBrowseFolderCommand(DgvHandler dgvHandler, DataGridViewRow row)
     : base(dgvHandler)
 {
     Init();
     currentRow  = CloneRow(row);
     curRowIndex = row.Index;
 }
Exemplo n.º 8
0
 public DgvSortCommand(DgvHandler dgvHandler, int _count)
     : base(dgvHandler)
 {
     Init();
     this.rows     = new List <DataGridViewRow>();
     this.new_rows = new List <DataGridViewRow>();
     this.count    = _count;
 }
Exemplo n.º 9
0
        public VarImportCommand(TextBox txtVarName, string currentVarValues, string fileName, DgvHandler dgvHandler)
        {
            this.txtVarName   = txtVarName;
            this.curVarValues = currentVarValues;
            this.variable     = new EnvironmentVariable();
            EnvironmentSnapshotManager.LoadVariable(fileName, ref variable);
            this.dgvHandler = dgvHandler;

            GetValuesToImport();
        }
Exemplo n.º 10
0
        public VarImportCommand(TextBox txtVarName, string currentVarValues, string fileName, DgvHandler dgvHandler)
        {
            this.txtVarName = txtVarName;
            this.curVarValues = currentVarValues;
            this.variable = new EnvironmentVariable();
            EnvironmentSnapshotManager.LoadVariable(fileName, ref variable);
            this.dgvHandler = dgvHandler;

            GetValuesToImport();
        }
Exemplo n.º 11
0
        public VarImportCommand(TextBox txtVarName, string currentVarValues,
                                string fileName, DgvHandler dgvHandler)
        {
            this.txtVarName                 = txtVarName;
            this.currentVarValues           = currentVarValues;
            importExportManager             = new ImportExportManager();
            importExportManager.EnvVariable = new EnvironmentVariable();
            importExportManager.Load(fileName);
            this.dgvHandler = dgvHandler;

            GetValuesToImport();
        }
Exemplo n.º 12
0
        public FrmEditEnvVar(ref EnvironmentSnapshot snapshot, EnvironmentVariable variable)
        {
            InitializeComponent();
            this.snapshot = snapshot;
            this.variable = variable;
            this.MinimumSize = new Size(327, 439);
            dgvValuesList.TabIndex = 0;
            LoadSettings();
            txtVariableName.CausesValidation = false;
            dgvHandler = new DgvHandler(ref dgvValuesList);

            // set default icon
            dgvValuesList_UserAddedRow(null, null);

            this.txtVariableName.Text = variable.Name;
            this.validator = new EnvironmentValueValidator();

            if (txtVariableName.Text.Length != 0)
            {
                // Check if we are editing variable
                LoadEnvironmentVariableValues();
            }

            // Set form title
            this.Text = (txtVariableName.Text.Length != 0
                ? "Edit" : "New") + " "
                + (this.snapshot.Target == EnvironmentVariableTarget.Machine
                ? "System" : "User") + " Variable";

            #region Create DgvHandler Commands
            commandsList = new CommandStack();
            dgvHandler.SetCurrentCell(0);
            editVarNameCommand = new EditVarNameCommand( txtVariableName );
            #endregion DgvHandler Commands

            // disable buttons
            SetBtnState();
            txtVariableName.CausesValidation = true;
            isVarNameChanged = false;

            // Open/Save File dialogs
            openFileDialog.Filter = FILE_FILTER;
            openFileDialog.DefaultExt = DEFAULT_FILTER_EXTENSION;
            saveFileDialog.Filter = FILE_FILTER;
            saveFileDialog.DefaultExt = DEFAULT_FILTER_EXTENSION;
        }
Exemplo n.º 13
0
 public DgvCommand(DgvHandler dgvHandler)
 {
     this.dgvHandler = dgvHandler;
 }
Exemplo n.º 14
0
 public DgvMoveToTopCommand(DgvHandler dgvHandler)
     : base(dgvHandler)
 {
     name = "Move Value to Top";
 }
Exemplo n.º 15
0
 public DgvCommand(DgvHandler dgvHandler)
 {
     this.dgvHandler = dgvHandler;
 }
Exemplo n.º 16
0
 public DgvMoveUpCommand(DgvHandler dgvHandler)
     : base(dgvHandler)
 {
     commandName = "Move Value Up";
 }
Exemplo n.º 17
0
 public DgvEditCommand(DgvHandler dgvHandler)
     : base(dgvHandler)
 {
     name = "New Value";
 }
Exemplo n.º 18
0
 public DgvMoveToBottomCommand(DgvHandler dgvHandler) : base(dgvHandler)
 {
     name = "Move Value to Bottom";
 }
Exemplo n.º 19
0
 public DgvMoveUpCommand(DgvHandler dgvHandler)
     : base(dgvHandler)
 {
     name = "Move Value Up";
 }
Exemplo n.º 20
0
 public DgvBrowseFolderCommand(DgvHandler dgvHandler)
     : base(dgvHandler)
 {
     Init();
 }
Exemplo n.º 21
0
 public DgvMoveDownCommand(DgvHandler dgvHandler)
     : base(dgvHandler)
 {
     commandName = "Move Value Down";
 }
Exemplo n.º 22
0
 public DgvMoveToBottomCommand(DgvHandler dgvHandler)
     : base(dgvHandler)
 {
     name = "Move Value to Bottom";
 }
Exemplo n.º 23
0
 public DgvEditCommand(DgvHandler dgvHandler)
     : base(dgvHandler)
 {
     name = "New Value";
 }
Exemplo n.º 24
0
 public DgvModifyValueCommand(DgvHandler dgvHandler)
     : base(dgvHandler)
 {
 }
Exemplo n.º 25
0
 public DgvModifyValueCommand(DgvHandler dgvHandler)
     : base(dgvHandler)
 {
 }
Exemplo n.º 26
0
 public DgvDeleteCommand(DgvHandler dgvHandler)
     : base(dgvHandler)
 {
     Init();
 }
Exemplo n.º 27
0
 public DgvDeleteCommand(DgvHandler dgvHandler)
     : base(dgvHandler)
 {
     Init();
 }
Exemplo n.º 28
0
 public DgvBrowseFolderCommand(DgvHandler dgvHandler)
     : base(dgvHandler)
 {
     Init();
 }
Exemplo n.º 29
0
 public DgvMoveDownCommand(DgvHandler dgvHandler)
     : base(dgvHandler)
 {
     name = "Move Value Down";
 }
Exemplo n.º 30
0
 public DgvMoveToTopCommand(DgvHandler dgvHandler)
     : base(dgvHandler)
 {
     name = "Move Value to Top";
 }