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); }; }
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; }
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 { } }
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); }; }
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); }; }
public void start(MainPage mainPage) { mainPage.drawALineButton.Content = "Turn off drawing line mode"; this.locationCollection = new LocationCollection(); Debug.WriteLine("Start drawing a line"); }
public ProcessStopContentDialog(MainPage mainPage, Logic logic) { this.mainPage = mainPage; this.logic = logic; this.InitializeComponent(); }
protected override void OnNavigatedTo(NavigationEventArgs e) { rootPage = MainPage.Current; ResetFields(); WiFiDirectServiceManager.Instance.Scenario1 = this; }
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"); }); }
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(); }
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); }
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 { } }
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 {} }
/// <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(); }
/// <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(); }
public void ShowMainPage(Usuario usuario, int opc) { if (opc == 0) { MainPage = new MainPage (usuario); } else { MainPage = new MainPage (usuario,1); } }
public UpperVideoControl(MainPage floorInstance) { InitializeComponent(); //Register the names floorInstance.RegisterName(this.UpperTile.Name, this.UpperTile); floorInstance.RegisterName(this.FloorVideoControl.Name, this.FloorVideoControl); }
public BaseFloatable() { Grid grid = Application.Current.RootVisual as Grid; if (grid != null && grid.Children.Count > 0) { currentMain = grid.Children[0] as MainPage; } }
public GerenciadorSuperficieDefault(MainPage view) { this.view = view; this.Path = "/FallingBall;component/Images/madeira.png"; this.Superficies = new List<ISuperficieEstagio>(); this.IntervalToAppear = 1; this.CountSinceLastCreation = 0; this.ApartirDeQuePontuacaoComecaAparecer = 0; }
/// <summary> /// Constructor with login credentials /// </summary> /// <param name="jabberID">The JID-Object of the JabberID</param> /// <param name="password">The password to login to this account</param> /// <param name="mainPage">The MainPage-Control. I think you can give me 'this'</param> public XMPPManager(JID jabberID, String password, MainPage mainPage) { this.client = new XMPPClient(); this.client.JID = jabberID; this.client.Password = password; this.client.Resource = "battleshipme"; this.mainPage = mainPage; InitializeClient(); }
public App() { var feeder = new ImpFeeder (@"https://agent.electricimp.com/tKsHHkg3DT0Y"); var viewModel = new ViewModel (feeder); var mainPage = new MainPage (); mainPage.BindingContext = viewModel; MainPage = mainPage; }
public void TextCanContain8000Symbols() { MainPage mainPage = new MainPage(); string bigString = this.Get8000SymbolString(); mainPage.SaveContent(bigString); string newText = mainPage.GetPlainContent(); Assert.AreEqual(bigString, newText); }
/// <summary> /// Constructor provides an anonymous login using our own XMPP server /// </summary> /// <param name="mainPage">The MainPage-Control. I think you can give me 'this'</param> public XMPPManager(MainPage mainPage) { this.client = new XMPPClient(); this.client.JID = new JID("*****@*****.**"); this.client.Password = String.Empty; // To be filled in! this.client.Resource = String.Empty; this.mainPage = mainPage; InitializeClient(); }
public MainToolbar(MainPage mainPage) { InitializeComponent(); CompositionInitializer.SatisfyImports(this); mMainPage = mainPage; HookUpCommands(); DataContext = this; CMS.UserChanged += () => RaisePropertyChanged("UserName"); SetSiteName(); }
public Puzzle(MainPage callback) { InitializeComponent(); this.callback = callback; SetImageList(); fullPuzzleImages = Directory.GetFiles(@".\..\..\Resources\Intreg"); awards = Directory.GetFiles(@".\..\..\Resources\Premii"); imageList[0].Image = Image.FromFile(awards[0]); questionHandler = new QuestionHandler(20, 55, 44, txtAnswer, btnCheckSolution, lblQuestionTop, lblQuestionBottom); }
public void CheckMainPage() { var page = new MainPage(); const string TEST_TEXT = "Text which rewrote"; page.SaveContent("Some text.."); page.SaveContent(TEST_TEXT); var sameAboutPage = new MainPage(); string actual = sameAboutPage.GetPlainContent(); Assert.AreEqual(TEST_TEXT, actual); }
//constructors public ClientManager(MainPage mainPage) { intermidiate = new IntermidiateLayer(mainPage); clientThread = new ClientThread(eventRiser); clientThread.Protocol = protocol; eventRiser.ConfirmEvent += new ClientEventRiser.Confirm(Confirm); eventRiser.GetPlayersEvent += new ClientEventRiser.GetPlayers(GetPlayers); eventRiser.InviteEvent += new ClientEventRiser.Invite(Invite); eventRiser.RejectEvent += new ClientEventRiser.Reject(Reject); eventRiser.StartGameEvent += new ClientEventRiser.StartGame(StartGame); }
public IOConnector(MainPage mainPage, Machine machine) { Debug.WriteLine("IOConnector"); this.mainPage = mainPage; this.machine = machine; // Init arduinoAlive Timer arduinoSignalTimer = new Timer(arduinoSignal_Tick, null, Timeout.Infinite, Timeout.Infinite); openArduinoConnection(); }
public MapData end(MainPage mainPage) { /* Turn off drawing line mode */ mainPage.drawALineButton.Content = "Draw a line"; /* Create a layer and add to the map */ MapLine mapLine = new MapLine(); mapLine.setLocationCollection(this.locationCollection); //mapLine.draw(mainPage.mainMap); Debug.WriteLine("Stopped drawing a line"); return mapLine; }
public async void SetView(string title, ViewType type, object context, IEnumerable<object> items, object selectedItem) { switch (type) { case ViewType.Collection: { this.Breadcrumb = title; var page = new GroupedItemsPage(this); page.DataContext = this.DataSource; Window.Current.Content = page; Window.Current.Activate(); await this.DataSource.LoadAsync(page.Dispatcher); _UpdateTile(); page.Items = this.DataSource.ImageSets; break; } case ViewType.Home: { var page = new MainPage(); page.DataContext = context; Window.Current.Content = page; Window.Current.Activate(); break; } case ViewType.Detail: { this.Breadcrumb = string.Format("{0} -> {1}", "MetroFlickr", title); var page = new ItemDetailPage(this); page.DataContext = context; page.Items = items; page.Item = selectedItem; Window.Current.Content = page; Window.Current.Activate(); break; } } this.CurrentViewType = type; }