當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。