Beispiel #1
0
        // this is triggered when a property of an item that belongs to the current local resource set changes
        private void CurrentLocalResourceSet_ResourceItemChanged(object sender, ResourceItemChangedEventArgs e)
        {
            ResourceSet resourceSet = (ResourceSet)sender;

            foreach (DataGridViewRow row in CustomDataGrid1.MainDataGridView.Rows)
            {
                string rowKey = row.Cells[ColumnNames.Key].Value.ToString();

                if (rowKey == e.Item.Name)
                {
                    this.UpdateGridRowFromResourceItem(row, resourceSet);
                }
            }

            this.ProgressValueSet(resourceSet.CountTranslatedItems(this.Context.CurrentBaseResourceSet), resourceSet.CountMarkedForReviewing());
        }
Beispiel #2
0
        // this is triggered when a property of an item that belongs to the base local resource set changes
        private void CurrentBaseResourceSet_ResourceItemChanged(object sender, ResourceItemChangedEventArgs e)
        {
            var resourceSet = (ResourceSet)sender;
            this.Context.CurrentProjectIsDirty = true;

            if (resourceSet.Status == ResourceSetStatus.Unaffected)
            {
                resourceSet.Status = ResourceSetStatus.Updated;
            }

            this.RefreshButtonState();
        }