예제 #1
0
        public App()
        {
            InitializeComponent();

            TodoManager = new ServiceManager(new CustomerService());


            //MainPage = new NavigationPage(new Views.TestDemoPage());

            if (Device.RuntimePlatform == Device.iOS)
            {
                MainPage = new Views.LoginPage();
            }
            else
            {
                MainPage = new Views.LoginPage();
            }


            GetCountryList();

            //MainPage = new Views.LongRunningPage();
            timer = new GeneralTimer(TimeSpan.FromSeconds(7867868), StartService);
            timer.Start();

            HandleReceivedMessages();
        }
예제 #2
0
        public Form1()
        {
            InitializeComponent();
            FormBorderStyle = FormBorderStyle.FixedDialog;

            // Set the MaximizeBox to false to remove the maximize box.
            MaximizeBox = false;


            // Set the MinimizeBox to false to remove the minimize box.
            //MinimizeBox = false;

            // Set the start position of the form to the center of the screen.
            StartPosition = FormStartPosition.CenterScreen;

            try
            {
                sqlControl = new SQLDataControl();
                MessageBox.Show("Connection successful");
            }
            catch (MySqlException ex)
            {
                MessageBox.Show(ex.Message);
            }

            GeneralTimer.Start();
        }
예제 #3
0
 private void Contbutton_Click(object sender, EventArgs e)
 {
     GeneralTimer.Enabled = false;
     GeneralTimer.Start();
     RoadTimer.Start();
     WaitTimer.Enabled  = false;
     Contbutton.Enabled = false;
     Waitbutton.Enabled = true;
 }
예제 #4
0
        public MainWindow()
        {
            DataContext = this;
            InitializeComponent();
            ToolTipService.ShowDurationProperty.OverrideMetadata(typeof(DependencyObject), new FrameworkPropertyMetadata(Int32.MaxValue));
            ToolTipService.InitialShowDelayProperty.OverrideMetadata(typeof(DependencyObject), new FrameworkPropertyMetadata(0));

            GeneralTimer.Tick += GeneralTimer_Tick;
            GeneralTimer.Start();
            dataGridView1.ItemsSource = MyGrid;
            Open(Path.Combine(Paths.GetAppDirectoryPath(), "IP.txt"));
            listView1.ItemsSource = MyView;
        }
예제 #5
0
 /// <summary>
 /// Starts the service.
 /// </summary>
 public virtual bool Start()
 {
     App.Current.EventsBroker.Subscribe <NewPlaylistEvent> (HandleNewPlaylistEvent);
     App.Current.EventsBroker.Subscribe <JobRenderedEvent> (HandleCreateJob);
     App.Current.EventsBroker.Subscribe <NewDashboardEvent> (HandleDashboardEvent);
     App.Current.EventsBroker.Subscribe <DrawingSavedToProjectEvent> (HandleDrawingSavedToProject);
     App.Current.EventsBroker.Subscribe <ProjectCreatedEvent> (HandleNewProject);
     App.Current.EventsBroker.Subscribe <OpenedProjectEvent> (HandleOpenProject);
     App.Current.EventsBroker.Subscribe <NavigationEvent> (HandleNavigationEvent);
     App.Current.EventsBroker.Subscribe <LicenseChangeEvent> (HandleLicenseChangeEvent);
     App.Current.EventsBroker.Subscribe <LimitationDialogShownEvent>(HandleLimitationDialogShown);
     App.Current.EventsBroker.Subscribe <UpgradeLinkClickedEvent> (HandleUpgradeLinkClicked);
     GeneralTimer.Start();
     GeneralProperties ["Plan"] = App.Current.LicenseManager.LicenseStatus.PlanName;
     return(true);
 }
예제 #6
0
        void HandleReceivedMessages()
        {
            MessagingCenter.Subscribe <TickedMessage>(this, "TickedMessage", message => {
                Device.BeginInvokeOnMainThread(() => {
                    //ticker.Text = "Synch";

                    //await Task.Delay(TimeSpan.FromMilliseconds(2));

                    //if (!pg.IsShowing)
                    //    pg.Show();


                    //await Task.Delay(TimeSpan.FromMilliseconds(5));
                    //pg.PercentComplete += 1;



                    //if (message.Message == "1")
                    //{
                    //    pg.Show();
                    //}


                    //if (pg.PercentComplete == 100)
                    //    {

                    //    pg.Hide();
                    //    pg.PercentComplete = 0;
                    //    }
                });
            });

            MessagingCenter.Subscribe <CancelledMessage>(this, "CancelledMessage", message => {
                Device.BeginInvokeOnMainThread(() => {
                    timer.Start();
                });
            });
        }
예제 #7
0
 private void Ride_Load(object sender, EventArgs e)
 {
     GeneralTimer.Start();
     RoadTimer.Start();
 }