/// <summary>
 /// Initializes the phone application page for CnetNEWS_Detail and all its components.
 /// </summary>
 public CnetNEWS_Detail()
 {
     InitializeComponent();
     if (Resources.Contains("PanoramaCnetNEWS_Detail0AppBar"))
     {
         PhonePage.SetApplicationBar(this, Resources["PanoramaCnetNEWS_Detail0AppBar"] as BindableApplicationBar);
     }
 }
示例#2
0
 /// <summary>
 /// Initializes the phone application page for Connection_List and all its components.
 /// </summary>
 public Connection_List()
 {
     InitializeComponent();
     if (Resources.Contains("PanoramaConnection_List0AppBar"))
     {
         PhonePage.SetApplicationBar(this, Resources["PanoramaConnection_List0AppBar"] as BindableApplicationBar);
     }
 }
示例#3
0
 /// <summary>
 /// Initializes the phone application page for info_Info and all its components.
 /// </summary>
 public info_Info()
 {
     InitializeComponent();
     if (Resources.Contains("Panoramainfo_Info0AppBar"))
     {
         PhonePage.SetApplicationBar(this, Resources["Panoramainfo_Info0AppBar"] as BindableApplicationBar);
     }
 }
 /// <summary>
 /// Initializes the phone application page for NDTVGadgets_News and all its components.
 /// </summary>
 public NDTVGadgets_News()
 {
     InitializeComponent();
     if (Resources.Contains("PanoramaNDTVGadgets_News0AppBar"))
     {
         PhonePage.SetApplicationBar(this, Resources["PanoramaNDTVGadgets_News0AppBar"] as BindableApplicationBar);
     }
 }
示例#5
0
 /// <summary>
 /// Initializes the phone application page for Videos_DetailVideos and all its components.
 /// </summary>
 public Videos_DetailVideos()
 {
     InitializeComponent();
     if (Resources.Contains("PanoramaVideos_DetailVideos0AppBar"))
     {
         PhonePage.SetApplicationBar(this, Resources["PanoramaVideos_DetailVideos0AppBar"] as BindableApplicationBar);
     }
 }
 private void InitializeAppBarpanoramaCnetNEWS_Detail(PanoramaItem panoramaItem)
 {
     if (Resources.Contains(panoramaItem.Name + "AppBar"))
     {
         PhonePage.SetApplicationBar(this, Resources[panoramaItem.Name + "AppBar"] as BindableApplicationBar);
         ApplicationBar.IsVisible = true;
     }
     else if (ApplicationBar != null)
     {
         ApplicationBar.IsVisible = false;
     }
 }
示例#7
0
        private MainWindow(Builder builder) : base(builder.GetObject("_mainWindow").Handle)
        {
            builder.Autoconnect(this);
            _titlebar.Destroyed += _titleBar_Destroyed;

            Program.Client.AuthStateChanged += Client_StateChanged1;

            InfoBarMessage             = new Label("");
            InfoBarMessage.Halign      = Align.Center;
            InfoBar.ContentArea.Expand = false;
            InfoBar.PackStart(InfoBarMessage, true, true, 0);
            var button = new Button(Gtk.Stock.Close);

            button.Clicked += InfoBarCloseButtonClicked;
            InfoBar.PackStart(button, false, false, 0);

            this.InfoBar.Hide();
            this.InfoBar.Respond += (o, args) =>
            {
                InfoBar.Hide();
            };

            _codePage = new CodePage(this);
            _stackWidget.AddNamed(_codePage, "CodePage");
            _chatPage = new ChatPage();
            _stackWidget.AddNamed(_chatPage, "ChatPage");
            _chatsBar.SizeAllocated += _titlebar_SizeAllocated;
            _phonePage = new PhonePage(this);
            _stackWidget.AddNamed(_phonePage, "PhonePage");
            _chatsBar.SizeAllocated += _titlebar_SizeAllocated;

            /*for (int i = 0; i < 5; i++)
             * {
             *  _listBox.Add(new ChatBoxEntry() {
             *      Channel = "Channel name",
             *      LastMessage = "Last message",
             *      UnreadCount = i,
             *      Date = DateTime.Now,
             *      Icon = "TelegramApp.Data.TelegramIcon.png"
             *  });
             * }
             * _listBox.ShowAll();*/

            NavigateToAsync(PageType.Chat);
            Program.Client.Start();
        }
示例#8
0
文件: App.cs 项目: ykoshimizu/Demo
 public App()
 {
     // The root page of your application
     MainPage = new PhonePage();
 }
示例#9
0
        private void changePage(string page)
        {
            if (object.Equals(FrameSource, null).Equals(false))
            {
                if (FrameSource.GetType().Equals(typeof(LteInfoPage)))
                {
                    LteInfoModel lte = Application.Current.FindResource("LteInfoModel") as LteInfoModel;
                    lte.StopTimer();
                }

                if (FrameSource.GetType().Equals(typeof(DslPage)))
                {
                    DslPageModel dsl = Application.Current.FindResource("DslPageModel") as DslPageModel;
                    dsl.StopTimer();
                }
            }

            if (page.Equals("login"))
            {
                FrameSource = new LoginPage();
            }
            else if (page.Equals("status"))
            {
                FrameSource = new StatusPage();
            }
            else if (page.Equals("overview"))
            {
                FrameSource = new OverviewPage();
            }
            else if (page.Equals("dsl"))
            {
                FrameSource = new DslPage();
            }
            else if (page.Equals("lte"))
            {
                FrameSource = new LteInfoPage();
            }
            else if (page.Equals("syslog"))
            {
                FrameSource = new SyslogPage();
            }
            else if (page.Equals("tr181"))
            {
                FrameSource = new TR181Page();
            }
            else if (page.Equals("phone"))
            {
                FrameSource = new PhonePage();
            }
            else if (page.Equals("lan"))
            {
                FrameSource = new LanPage();
            }
            else if (page.Equals("interface"))
            {
                FrameSource = new InterfacePage();
            }
            else if (page.Equals("controls"))
            {
                FrameSource = new ControlsPage();
            }
            else if (page.Equals("about"))
            {
                FrameSource = new AboutPage();
            }

            changeColor(page);
        }