本文整理汇总了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);
};
}
示例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;
}
示例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
{ }
}
示例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);
};
}
示例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);
};
}
示例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");
}
示例7: ProcessStopContentDialog
public ProcessStopContentDialog(MainPage mainPage, Logic logic)
{
this.mainPage = mainPage;
this.logic = logic;
this.InitializeComponent();
}
示例8: OnNavigatedTo
protected override void OnNavigatedTo(NavigationEventArgs e)
{
rootPage = MainPage.Current;
ResetFields();
WiFiDirectServiceManager.Instance.Scenario1 = this;
}
示例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");
});
}
示例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();
}
示例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);
}
示例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
{ }
}
示例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
{}
}
示例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();
}
示例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();
}