예제 #1
0
        DataTransferManager dataTransferManager = DataTransferManager.GetForCurrentView();  //<-- share manager

        public ShootPage()
        {
            this.InitializeComponent();

            setupDefaultShots();

            showView(ViewSelect.Waiting);

            CommsHelper.offlineMode = offlineMode;

            CommsHelper.commsReady   += client_commsReady;
            CommsHelper.snapTake     += client_snapAction;
            CommsHelper.goHome       += CommsHelper_goHome;
            CommsHelper.stopReturn   += CommsHelper_stopReturn;
            CommsHelper.debugMessage += CommsHelper_logDebugMessage;

            CommsHelper.Initialize();

            EnumerateWebcamsAsync();

            Application.Current.Suspending += Current_Suspending;
            Application.Current.Resuming   += Current_Resuming;

            addMessage("Snap Array launched");

            // temporary whilst I'm trying to generate the f'ing gif
            //   this.generateGif();
        }
예제 #2
0
        private void ClickThroughButton_Click_1(object sender, RoutedEventArgs e)
        {
            if (waitingRing.IsActive)
            {
                return;
            }

            waitingRing.IsActive = true;

            CommsHelper.sendMessage(CommandMessage.StartSnap, null);
        }
예제 #3
0
 void Current_Resuming(object sender, object e)
 {
     //We need to tell the server that this APP instance on this machine is now available
     if (CommsHelper.saclient == null)
     {
         CommsHelper.offlineMode = this.offlineMode;
         CommsHelper.Initialize();
         //   CommsHelper.saclient.ShareDataRequested += component_ShareDataRequested;
         addMessage("app resuming - initializing saclient");
     }
     dataTransferManager.DataRequested += ShareTextHandler;
 }
예제 #4
0
 private void goHome(object sender, RoutedEventArgs e)
 {
     CommsHelper.sendMessage(CommandMessage.GoHome, null);
 }
예제 #5
0
 private void CancelButton_Click(object sender, RoutedEventArgs e)
 {
     // broadcast stop command
     CommsHelper.sendMessage(CommandMessage.StopReturn, null);
 }