コード例 #1
0
ファイル: Notification.cs プロジェクト: ThinhVu/Mmosoft.Oops
        //
        internal Notification(NotifyType notifyType, NotifyOut notifyOutType, int initialWidth)
        {
            SetStyle(ControlStyles.SupportsTransparentBackColor, true);
            DoubleBuffered = true;


            this.Width = initialWidth;
            //
            _notifyType = notifyType;
            _outType    = notifyOutType;

            InitAnimation();
        }
コード例 #2
0
ファイル: TabView.cs プロジェクト: leumaskabiena/TradeApp
        public TabView()
        {
            Page NotifyInPage, NotifyOutPage = null;

            switch (Device.RuntimePlatform)
            {
            case Device.iOS:
                NotifyInPage = new NavigationPage(new NotifyIn())
                {
                    Title = "Demand"
                };

                NotifyOutPage = new NavigationPage(new NotifyOut())
                {
                    Title = "Reply"
                };
                //itemsPage.Icon = "tab_feed.png";
                //aboutPage.Icon = "tab_about.png";
                break;

            default:
                NotifyInPage = new NotifyIn()
                {
                    Title = "Demand"
                };

                NotifyOutPage = new NotifyOut()
                {
                    Title = "Reply"
                };
                break;
            }

            Children.Add(NotifyInPage);
            Children.Add(NotifyOutPage);

            Title = Children[0].Title;
        }
コード例 #3
0
ファイル: NotifyMgr.cs プロジェクト: ThinhVu/Mmosoft.Oops
        public static void Notify(Form host, string title, string message, NotifyType notifyType, NotifyOut outType = NotifyOut.Automatically, int initialWidth = 300)
        {
            var notify = new Notification(notifyType, outType, initialWidth)
            {
                Title = title,
                Text  = message,
                Top   = 10,
                Left  = host.Width
            };

            host.Controls.Add(notify);
            notify.BringToFront();
            notify.OnCompeleted = () =>
            {
                host.Controls.Remove(notify);
            };
            notify.Start();
        }