Пример #1
0
 private void ChangeLayerOpacity()
 {
     if (((BitmapLayer)Layer).Opacity != (byte)opacityUpDown.Value)
     {
         Layer.PushSuppressPropertyChanged();
         ((BitmapLayer)Layer).Opacity = (byte)opacityTrackBar.Value;
         Layer.PopSuppressPropertyChanged();
     }
 }
        private void OkButton_Click(object sender, System.EventArgs e)
        {
            DialogResult = DialogResult.OK;

            using (new WaitCursorChanger(this))
            {
                layer.PushSuppressPropertyChanged();
                InitLayerFromDialog();
                object currentProperties = layer.SaveProperties();
                layer.LoadProperties(this.originalProperties);
                layer.PopSuppressPropertyChanged();

                layer.LoadProperties(currentProperties);
                originalProperties = layer.SaveProperties();
                layer.Invalidate();
            }

            Close();
        }
Пример #3
0
        private void blendOpComboBox_SelectedIndexChanged(object sender, System.EventArgs e)
        {
            using (new WaitCursorChanger(this))
            {
                Layer.PushSuppressPropertyChanged();

                if (blendOpComboBox.SelectedItem != null)
                {
                    ((BitmapLayer)Layer).SetBlendOp((UserBlendOp)blendOpComboBox.SelectedItem);
                }

                Layer.PopSuppressPropertyChanged();
            }
        }