예제 #1
0
        protected override void Dispose(bool isManaged)
        {
            if (!isManaged)
                return;

            vm.StatusChanged -= OnStatusChanged;
            DataContext = null;
            vm = null;
        }
예제 #2
0
        protected override void Dispose(bool isManaged)
        {
            if (!isManaged)
            {
                return;
            }

            vm.StatusChanged -= OnStatusChanged;
            DataContext       = null;
            vm = null;
        }
예제 #3
0
        /// <summary>
        ///     Initializes a new instance of the <see cref="PmChannelView" /> class.
        /// </summary>
        /// <param name="vm">
        ///     The vm.
        /// </param>
        public PmChannelView(PmChannelViewModel vm)
        {
            try
            {
                InitializeComponent();
                this.vm = vm.ThrowIfNull("vm");

                DataContext = this.vm;

                this.vm.StatusChanged += OnStatusChanged;
            }
            catch (Exception ex)
            {
                ex.Source = "PmChannel View, init";
                Exceptions.HandleException(ex);
            }
        }
예제 #4
0
        /// <summary>
        ///     Initializes a new instance of the <see cref="PmChannelView" /> class.
        /// </summary>
        /// <param name="vm">
        ///     The vm.
        /// </param>
        public PmChannelView(PmChannelViewModel vm)
        {
            try
            {
                InitializeComponent();
                this.vm = vm.ThrowIfNull("vm");

                DataContext = this.vm;

                this.vm.StatusChanged += OnStatusChanged;
            }
            catch (Exception ex)
            {
                ex.Source = "PmChannel View, init";
                Exceptions.HandleException(ex);
            }
        }