コード例 #1
0
ファイル: Editor.cs プロジェクト: thomasvt/pose
 private void OnMetaDataChanged(MetaDataChanged msg)
 {
     if (msg.Key == "mode")
     {
         DoChangeEditorMode((EditorMode)msg.Value);
     }
 }
コード例 #2
0
 /// <summary>
 /// Method raising OnCopyMetaDataOnTable event if the click on the copy button of the table meta data control.
 /// </summary>
 private void onCopyMetaDataTableControl(object sender, EventArgs e)
 {
     MetaDataChanged?.Invoke(this, new EventArgs());
     OnCopyMetaDataOnTable?.Invoke(this, new CopyMetaDataOnTableEventArgs {
         MetaData = _gridPresenter.GetMetaDataTable()
     });
 }
コード例 #3
0
 /// <summary>
 /// Raises event 'MetaDataChanged'
 /// </summary>
 protected virtual void OnMetaDataChanged()
 {
     if (MetaDataChanged != null)
     {
         MetaDataChanged.Invoke(this, System.EventArgs.Empty);
     }
 }
コード例 #4
0
 protected override void Context()
 {
     _metaDataChanged = new MetaDataChanged {
         NewName = "NewName", OldName = "OldName", NewValue = "NewValue", OldValue = "OldValue"
     };
     base.Context();
 }
コード例 #5
0
 protected override void Context()
 {
     _metaDataChanged = new MetaDataChanged {
         NewName = "NewName", OldName = "OldName", NewValue = "NewValue", OldValue = "OldValue"
     };
     base.Context();
     _dataRepository.ExtendedProperties.Add(new ExtendedProperty <string> {
         Name = "OldName", Value = "OldValue"
     });
 }
コード例 #6
0
        /// <summary>
        /// Method reacting on data validity changes of the meta data of the table.
        /// </summary>
        void metaDataControlOnIsDataValidChanged(object sender, EventArgs e)
        {
            var metaDataControl = sender as MetaDataEditControl;

            if (metaDataControl == null)
            {
                return;
            }
            metaDataControl.AcceptDataChanges();
            MetaDataChanged?.Invoke(this, new EventArgs());
        }
コード例 #7
0
        internal void SetMetaDataForTable(MetaDataTable metaData)
        {
            if (_metaDataControl == null)
            {
                return;
            }

            _gridPresenter.SetMetaDataForTable(metaData);
            MetaDataChanged?.Invoke(this, new EventArgs());

            _metaDataControl.RefreshData(0);
        }
コード例 #8
0
        public ICommand ChangeMetaData(IEnumerable <DataRepository> observedData, MetaDataChanged metaDataChanged)
        {
            var macroCommand = new OSPSuiteMacroCommand <IOSPSuiteExecutionContext>
            {
                CommandType = Command.CommandTypeEdit,
                ObjectType  = ObjectTypes.ObservedData,
                Description = Command.MetaDataModifiedInDataRepositories
            };

            observedData.Each(x => macroCommand.Add(new ChangeObservedDataMetaDataCommand(x, metaDataChanged).Run(_executionContext)));
            return(macroCommand);
        }
コード例 #9
0
        private void onIsValidChangedColumnControlPanel(object sender, EventArgs e)
        {
            var control = sender as MetaDataEditControl;

            if (control == null)
            {
                return;
            }
            control.AcceptDataChanges();
            MetaDataChanged?.Invoke(this, new EventArgs());

            var column = control.Tag as ImportDataColumn;

            if (column == null)
            {
                return;
            }

            _gridPresenter.SetColumnImage(column.ColumnName);
        }