当前位置: 首页>>代码示例>>C#>>正文


C# System.MainPage类代码示例

本文整理汇总了C#中System.MainPage的典型用法代码示例。如果您正苦于以下问题:C# MainPage类的具体用法?C# MainPage怎么用?C# MainPage使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


MainPage类属于System命名空间,在下文中一共展示了MainPage类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ElectricalNavigationControl

        public ElectricalNavigationControl(MainPage mainPage)
        {
            // Required to initialize variables
            InitializeComponent();
            CompositionInitializer.SatisfyImports(this);

            mMainPage = mainPage;

            Loaded += (s1, e1) =>
            {
                if (!mLoaded)
                {
                    mViewModel = new ElectricalNavigationViewModel(FilterControl);
                    DataContext = mViewModel;

                    UpdateSummaryTotals();

                    //Double click event handler
                    TelerikDataGrid.AddHandler(GridViewCellBase.CellDoubleClickEvent, new EventHandler<RadRoutedEventArgs>(OnDoubleClick), true);

                    LoadTabs();
                    mLoaded = true;
                }
                SetSplitterWidth(mMainPage);
            };
        }
开发者ID:barrett2474,项目名称:CMS2,代码行数:26,代码来源:ElectricalNavigationControl.xaml.cs

示例2: Application_Startup

        private void Application_Startup(object sender, StartupEventArgs e)
        {
            MainPage mainPage = new MainPage();
            this.RootVisual = mainPage;

            // получение параметров работы приложения
            IDictionary<string, string> initParams = e.InitParams;
            if (initParams.ContainsKey("schemeSvcURI"))
                mainPage.SchemeSvcURI = initParams["schemeSvcURI"];

            int maxMsgSize;
            if (initParams.ContainsKey("maxMsgSize") && int.TryParse(initParams["maxMsgSize"], out maxMsgSize))
                mainPage.MaxMsgSize = maxMsgSize;

            IDictionary<string, string> queryString = HtmlPage.Document.QueryString;
            int viewSetIndex;
            if (queryString.ContainsKey("viewSet") && int.TryParse(queryString["viewSet"], out viewSetIndex))
                mainPage.ViewSetIndex = viewSetIndex;

            int viewIndex;
            if (queryString.ContainsKey("view") && int.TryParse(queryString["view"], out viewIndex))
                mainPage.ViewIndex = viewIndex;

            try { mainPage.DiagDate = new DateTime(int.Parse(queryString["year"]), 
                int.Parse(queryString["month"]), int.Parse(queryString["day"])); }
            catch { }

            bool editMode;
            string editModeStr;
            if (queryString.TryGetValue("editMode", out editModeStr) && bool.TryParse(editModeStr, out editMode))
                mainPage.EditMode = editMode;
        }
开发者ID:raydtang,项目名称:scada,代码行数:32,代码来源:App.xaml.cs

示例3: PostJourneyLocationDetails

        public void PostJourneyLocationDetails(String StrDeviceId, MainPage obj)
        {
            try
            {

                ObjMainPage = obj;
                CreteXmlBodyForLocPost(StrDeviceId);

                if (Microsoft.Phone.Net.NetworkInformation.NetworkInterface.NetworkInterfaceType != Microsoft.Phone.Net.NetworkInformation.NetworkInterfaceType.None)
                {

                    Uri RequestSubmitDetailsUri = new Uri(ClsCommon.WebserviceLink);

                    HttpWebRequest req = (HttpWebRequest)WebRequest.Create(RequestSubmitDetailsUri);
                    req.Credentials = ClsCommon.cred;
                    req.ContentType = "text/xml;charset=\"utf-8\"";
                    req.Accept = "text/xml";
                    req.Method = "POST";
                    req.BeginGetRequestStream(searchOnlineRequest, req);
                    RequestSubmitDetailsUri = null;
                }

                else
                {
                    MessageBox.Show("Internet connection not available. Please try again later!");
                }
            }
            catch
            { }
        }
开发者ID:kushalSengupta,项目名称:AgeasDriver,代码行数:30,代码来源:ClsSubmitJourneyLocation.cs

示例4: IssuesNavigationControl

        public IssuesNavigationControl(MainPage mainPage)
        {
            // Required to initialize variables
            InitializeComponent();
            CompositionInitializer.SatisfyImports(this);

            mMainPage = mainPage;

            Loaded += (s1, e1) =>
            {
                if (!mLoaded)
                {
                    mViewModel = new IssueNavigationViewModel(FilterControl);
                    DataContext = mViewModel;

                    SetReportControlPrivileges();

                    //Double click event handler
                    TelerikDataGrid.AddHandler(GridViewCellBase.CellDoubleClickEvent, new EventHandler<RadRoutedEventArgs>(OnDoubleClick), true);

                    LoadTabs();

                    //PRISM EVENT to update Active Overrides and Overdue Actions totals on the navigation panel.
                    SetupPrismEvents();
                    UpdateOverdueActionAndOverrideCounts(null);

                    mLoaded = true;
                }
                SetSplitterWidth(mMainPage);
            };
        }
开发者ID:barrett2474,项目名称:CMS2,代码行数:31,代码来源:IssuesNavigationControl.xaml.cs

示例5: DocumentNavigationControl

        public DocumentNavigationControl(MainPage mainPage)
        {
            CompositionInitializer.SatisfyImports(this);

            // Required to initialize variables
            InitializeComponent();
            mMainPage = mainPage;

            Loaded += (s1, e1) =>
            {
                if (!mLoaded)
                {
                    LoadTabs();

                    DocumentNavigationViewModel documentNavigationViewModel = new DocumentNavigationViewModel(FilterControl);

                    DataContext = documentNavigationViewModel;

                    UpdateDocumentTotals();

                    telerikResultsGridControl.DataLoaded += telerikResultsGridControl_DataLoaded;

                    //Double click event handler
                    telerikResultsGridControl.AddHandler(GridViewCellBase.CellDoubleClickEvent, new EventHandler<RadRoutedEventArgs>(OnDoubleClick), true);
                    mLoaded = true;
                }
                SetSplitterWidth(mMainPage);
            };
        }
开发者ID:barrett2474,项目名称:CMS2,代码行数:29,代码来源:DocumentNavigationControl.xaml.cs

示例6: start

        public void start(MainPage mainPage)
        {
            mainPage.drawALineButton.Content = "Turn off drawing line mode";
            this.locationCollection = new LocationCollection();

            Debug.WriteLine("Start drawing a line");
        }
开发者ID:gdgkyoto,项目名称:kyoto-gtug,代码行数:7,代码来源:MapLineMode.cs

示例7: ProcessStopContentDialog

        public ProcessStopContentDialog(MainPage mainPage, Logic logic)
        {
            this.mainPage = mainPage;
            this.logic = logic;

            this.InitializeComponent();
        }
开发者ID:s114898,项目名称:TSS_program,代码行数:7,代码来源:ProcessStopContentDialog.xaml.cs

示例8: OnNavigatedTo

            protected override void OnNavigatedTo(NavigationEventArgs e)
            {
                rootPage = MainPage.Current;

                ResetFields();
                WiFiDirectServiceManager.Instance.Scenario1 = this;
            }
开发者ID:C-C-D-I,项目名称:Windows-universal-samples,代码行数:7,代码来源:Scenario1_AdvertiserCreate.xaml.cs

示例9: MainPageViewModel

        public MainPageViewModel(MainPage mainPage)
        {
            _mainPage = mainPage;
            var webRequester = new WebRequester();

            if (IsolatedStorageSettings.ApplicationSettings.Contains(Constants.HoogmaaheideData))
            {
                Rassen = IsolatedStorageSettings.ApplicationSettings[Constants.HoogmaaheideData] as List<Ras>;

            }
            else
            {
                Rassen = new List<Ras>();
                IsolatedStorageSettings.ApplicationSettings.Add(Constants.HoogmaaheideData, Rassen);
                IsolatedStorageSettings.ApplicationSettings.Save();
            }
            _mainPage.DoStartupAnimations();
            Animator.Wait(2000, (o, s) =>
                                    {
                                        webRequester.RetrieveNestenCompleted +=
                                            WebRequesterRetrieveNestenCompleted;
                                        webRequester.GetNestenAsync(
                                            @"http://kennel.hoogmaatheide.be/scripts/json.php");
                                    });
        }
开发者ID:nielsschroyen,项目名称:HoogmaatheidePhoneApp,代码行数:25,代码来源:MainPageViewModel.cs

示例10: ButtonBase_OnClick

        private void ButtonBase_OnClick(object sender, RoutedEventArgs e)
        {
            this.SetTheme();

            var rootVisual = Cebos.Common.Utility.VisualTreeExtensions.GetRootVisual(this) as MainPage;
            var grid = rootVisual.Content as Grid;
            var children = new List<UIElement>();
            foreach (var c in grid.Children)
            {
                children.Add(c);
            }
            grid.Children.Clear();

            rootVisual = new MainPage();
            Application.Current.RootVisual = rootVisual;

            rootVisual.Content = grid;

            foreach (var c in children)
            {
                grid.Children.Add(c);
            }

            rootVisual.Content.UpdateLayout();
        }
开发者ID:mparsin,项目名称:Elements,代码行数:25,代码来源:SearchToolBarView.xaml.cs

示例11: MainOptionTile

 public MainOptionTile(MainPage floorInstance)
 {
     InitializeComponent();
     this.MainOptionGrid.Visibility = System.Windows.Visibility.Collapsed;
     floorInstance.RegisterName(this.MainOptionGrid.Name, this.MainOptionGrid);
     floorInstance.RegisterName(this.MainOptionGridLabel.Name, this.MainOptionGridLabel);
 }
开发者ID:guozanhua,项目名称:kinect-ripple,代码行数:7,代码来源:MainOptionTile.xaml.cs

示例12: ParseJourneylistlJSonData

        private void ParseJourneylistlJSonData(string AllJourneyData)
        {
            try
            {
                JObject jObj = JObject.Parse(AllJourneyData);
                RootObjectJourneydetail objRootHistoryDetails = JsonConvert.DeserializeObject<RootObjectJourneydetail>(AllJourneyData);

                if (ObjFrmRegistration==null)
                {

                ObjMainPage.IsDeviceRegistered(objRootHistoryDetails);
                ObjMainPage = null;
                 jObj = null;
                }
                else
                {

                    ObjFrmRegistration.IsSkip(objRootHistoryDetails);
                    ObjFrmRegistration = null;
                    jObj = null;
                }
            }
            catch
            { }
        }
开发者ID:kushalSengupta,项目名称:AgeasDriver,代码行数:25,代码来源:ClsJourneyDetails.cs

示例13: GetJourneylist

        public void GetJourneylist(String StrDeviceId, MainPage obj)
        {
            try
            {
                ObjMainPage = obj;
                if (Microsoft.Phone.Net.NetworkInformation.NetworkInterface.NetworkInterfaceType != Microsoft.Phone.Net.NetworkInformation.NetworkInterfaceType.None)
                {
                    envelope = "<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
                    "<device><deviceid>" + StrDeviceId.ToString() + "</deviceid></device>";

                    Uri RequestJourneylistlUri = new Uri(ClsCommon.WebserviceLink + "?action=check_registered_device");

                    HttpWebRequest req = (HttpWebRequest)WebRequest.Create(RequestJourneylistlUri);
                     req.Credentials = ClsCommon.cred;
                     req.ContentType = "text/xml;charset=\"utf-8\"";
                     req.Accept = "text/xml";
                     req.Method = "POST";
                     req.BeginGetRequestStream(searchOnlineRequest, req);
                     RequestJourneylistlUri = null;
                }

                else
                {
                    MessageBox.Show("Internet connection not available. Please try again later!");
                }
            }
            catch
            {}
        }
开发者ID:kushalSengupta,项目名称:AgeasDriver,代码行数:29,代码来源:ClsJourneyDetails.cs

示例14: CalendarsListViewModel

        /// <summary>
        /// Constructeur
        /// </summary>
        /// <param name="pan"> Le stackpanel auquel les éléments doivent être ajoutés</param>
        /// <param name="listecal"> Le usercontrol ListeCalendriers</param>
        /// <param name="parent">La main page permettant de naviguer vers une autre page</param>
        public CalendarsListViewModel(StackPanel pan, CalendarsList listecal, MainPage parent)
        {
            this.listecal = listecal;
            this.parent = parent;
            monpan = pan;

            initCalendar();
        }
开发者ID:Delvius,项目名称:KIEPresentationV2,代码行数:14,代码来源:CalendarsListViewModel.cs

示例15: OnNavigatedTo

        /// <summary>
        /// Invoked when this page is about to be displayed in a Frame.
        /// </summary>
        /// <param name="e">Event data that describes how this page was reached.  The Parameter
        /// property is typically used to configure the page.</param>
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            this.rootPage = e.Parameter as MainPage;

            // display leaderboard
            this.RefreshLeaderboard();

        }
开发者ID:farukc,项目名称:azure-mobile-services-recipes,代码行数:13,代码来源:LeaderboardPage.xaml.cs


注:本文中的System.MainPage类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。