Esempio n. 1
0
        protected override void OnDestroyed()
        {
            base.OnDestroyed();

            if (btnNormal != null)
            {
                btnNormal.Dispose();
                btnNormal = null;
            }

            if (iconRunNormal != null)
            {
                iconRunNormal.Dispose();
                iconRunNormal = null;
            }

            if (iconRunDisabled != null)
            {
                iconRunDisabled.Dispose();
                iconRunDisabled = null;
            }

            if (iconStopNormal != null)
            {
                iconStopNormal.Dispose();
                iconStopNormal = null;
            }

            if (iconStopDisabled != null)
            {
                iconStopDisabled.Dispose();
                iconStopDisabled = null;
            }

            if (iconBuildNormal != null)
            {
                iconBuildNormal.Dispose();
                iconBuildNormal = null;
            }

            if (iconBuildDisabled != null)
            {
                iconBuildDisabled.Dispose();
                iconBuildDisabled = null;
            }
        }
        public RoundButton()
        {
            WidgetFlags  |= Gtk.WidgetFlags.AppPaintable;
            Events       |= EventMask.ButtonPressMask | EventMask.ButtonReleaseMask | EventMask.LeaveNotifyMask | EventMask.PointerMotionMask;
            VisibleWindow = false;
            SetSizeRequest(height, height);

            btnNormal   = new LazyImage("btExecuteBase-Normal.png");
            btnInactive = new LazyImage("btExecuteBase-Disabled.png");
            btnPressed  = new LazyImage("btExecuteBase-Pressed.png");
            btnHover    = new LazyImage("btExecuteBase-Hover.png");

            iconRunNormal   = new LazyImage("icoExecute-Normal.png");
            iconRunDisabled = new LazyImage("icoExecute-Disabled.png");

            iconStopNormal   = new LazyImage("icoStop-Normal.png");
            iconStopDisabled = new LazyImage("icoStop-Disabled.png");

            iconBuildNormal   = new LazyImage("icoBuild-Normal.png");
            iconBuildDisabled = new LazyImage("icoBuild-Disabled.png");
        }
		public RoundButton ()
		{
			WidgetFlags |= Gtk.WidgetFlags.AppPaintable;
			Events |= EventMask.ButtonPressMask | EventMask.ButtonReleaseMask | EventMask.LeaveNotifyMask | EventMask.PointerMotionMask;
			VisibleWindow = false;
			SetSizeRequest (height, height);

			btnNormal = new LazyImage ("btExecuteBase-Normal.png");
			btnInactive = new LazyImage ("btExecuteBase-Disabled.png");
			btnPressed = new LazyImage ("btExecuteBase-Pressed.png");
			btnHover = new LazyImage ("btExecuteBase-Hover.png");

			iconRunNormal = new LazyImage ("icoExecute-Normal.png");
			iconRunDisabled = new LazyImage ("icoExecute-Disabled.png");

			iconStopNormal = new LazyImage ("icoStop-Normal.png");
			iconStopDisabled = new LazyImage ("icoStop-Disabled.png");

			iconBuildNormal = new LazyImage ("icoBuild-Normal.png");
			iconBuildDisabled = new LazyImage ("icoBuild-Disabled.png");
		}
Esempio n. 4
0
		protected override void OnDestroyed ()
		{
			base.OnDestroyed ();

			if (btnNormal != null) {
				btnNormal.Dispose ();
				btnNormal = null;
			}

			if (iconRunNormal != null) {
				iconRunNormal.Dispose ();
				iconRunNormal = null;
			}

			if (iconRunDisabled != null) {
				iconRunDisabled.Dispose ();
				iconRunDisabled = null;
			}

			if (iconStopNormal != null) {
				iconStopNormal.Dispose ();
				iconStopNormal = null;
			}

			if (iconStopDisabled != null) {
				iconStopDisabled.Dispose ();
				iconStopDisabled = null;
			}

			if (iconBuildNormal != null) {
				iconBuildNormal.Dispose ();
				iconBuildNormal = null;
			}

			if (iconBuildDisabled != null) {
				iconBuildDisabled.Dispose ();
				iconBuildDisabled = null;
			}
		}