コード例 #1
0
        /// <summary>
        /// Function to initialize the view from the data context.
        /// </summary>
        /// <param name="dataContext">The data context to use.</param>
        private void InitializeFromDataContext(IImageContent dataContext)
        {
            if (dataContext == null)
            {
                ResetDataContext();
                return;
            }

            _ribbonForm.SetDataContext(dataContext);
            CropResizeSettings.SetDataContext(dataContext.CropOrResizeSettings);
            DimensionSettings.SetDataContext(dataContext.DimensionSettings);
            GenMipMapSettings.SetDataContext(dataContext.MipMapSettings);
        }
コード例 #2
0
ファイル: ImageEditorView.cs プロジェクト: ishkang/Gorgon
        /// <summary>Function called when the view should be reset by a <b>null</b> data context.</summary>
        protected override void ResetDataContext()
        {
            base.ResetDataContext();

            if (DataContext == null)
            {
                return;
            }

            _ribbonForm.SetDataContext(null);
            CropResizeSettings.SetDataContext(null);
            DimensionSettings.SetDataContext(null);
            GenMipMapSettings.SetDataContext(null);
        }