public static WiimoteRecordingHandler getWiimoteRecordingHandler(Wiimotes p_Wiimotes, Form1 form) { if (m_WiimoteRecordingHandler == null) { m_WiimoteRecordingHandler = new WiimoteRecordingHandler(p_Wiimotes, form); } return(m_WiimoteRecordingHandler); }
public static WiimoteRecordingHandler getWiimoteRecordingHandler(Wiimotes p_Wiimotes,Form1 form) { if (m_WiimoteRecordingHandler == null) m_WiimoteRecordingHandler = new WiimoteRecordingHandler(p_Wiimotes,form); return m_WiimoteRecordingHandler; }
public Form1() { cleanup(); InitializeComponent(); string workingDirectory = MainGUI.Properties.Settings.Default.WorkingDirectory; string wiimoteApplicationPath = MainGUI.Properties.Settings.Default.WiimoteApplicationPath; string matlabApplicationPath = MainGUI.Properties.Settings.Default.MatlapApplicationPath; string mediaDirectory = MainGUI.Properties.Settings.Default.MediaDirectory; ProjectConstants.initialize(workingDirectory, wiimoteApplicationPath, matlabApplicationPath, mediaDirectory); Environment.CurrentDirectory = ProjectConstants.PROJECT_PATH; this.openVideoDialog = new System.Windows.Forms.OpenFileDialog(); this.openMP3FileDialog = new System.Windows.Forms.OpenFileDialog(); this.openWiimoteSimulationFileDialog = new System.Windows.Forms.OpenFileDialog(); // openVideoDialog // this.openVideoDialog.DefaultExt = "avi"; this.openVideoDialog.FileName = "kangaroo.avi"; this.openVideoDialog.Filter = "movie files|*.avi||"; this.openVideoDialog.Title = "Choose a movie to play"; // openMP3Dialog // this.openMP3FileDialog.DefaultExt = "mpw"; this.openMP3FileDialog.Filter = "mp3 files|*.mp3||"; this.openMP3FileDialog.Title = "Choose a mp3 file to play"; // openWiimoteSimulationDialog // this.openWiimoteSimulationFileDialog.DefaultExt = "csv"; this.openWiimoteSimulationFileDialog.Filter = "csv files|*.csv||"; this.openWiimoteSimulationFileDialog.Title = "Choose a wiimote data file for simulation"; //open Wiimote Dialog this.openWiimoteDataDialog = new System.Windows.Forms.OpenFileDialog(); this.openWiimoteDataDialog.DefaultExt = "csv"; this.openWiimoteDataDialog.Filter = "csv files|*.csv||"; this.openWiimoteDataDialog.Title = "Choose Wiimote Data File to upload"; this.saveFileDialog = new System.Windows.Forms.SaveFileDialog(); this.saveFileDialog.DefaultExt = "csv"; this.saveFileDialog.Filter = "csv files|*.csv||"; saveFileDialog.InitialDirectory = ProjectConstants.WIIMOTE_REFERENCE_DATA_PATH; this.wiimoteDisconnect.Enabled = false; Configuration config = Configuration.getConfiguration(); config.initialize(); this.configurationBindingSource.DataSource = config; WiimoteDataStore.getWiimoteDataStore().initialize(); Wiimotes l_Wiimotes = Wiimotes.getWiimotesObject(); m_WiimoteRecordingHandler = new WiimoteRecordingHandler(l_Wiimotes, this); m_WiimoteRecordingHandler.Initialize(); m_WiimoteCalibrationHandler = new WiimoteCalibrationHandler(l_Wiimotes, this); m_WiimoteCalibrationHandler.Initialize(); this.trainingSegmentInfoBindingSource.DataSource = WiimoteDataStore.getWiimoteDataStore().TrainingSegmentInfoRecords; InitializeBluetoothSetupTab(); initializeTraining(l_Wiimotes); applicationStartSpeech(); InitializeMogreComponent(); mSpeechRecognition = SpeechRecognition.getSpeechRecognition(); mSpeechRecognition.VoiceCommandReceivedEvent += new SpeechRecognition.OnVoiceCommandReceivedEvent(OnVoiceCommandReceivedEvent); setButtonVoiceCommandOff(false); this.quartenionViewerControl.SetWiimotes(l_Wiimotes); //OSCCommunication oscCommunication = new OSCCommunication(); //oscCommunication.Initialize(l_Wiimotes); /* * try * { * m_OgreControl = new OgreControl(this.ogrePanel.Handle); * m_OgreControl.Init(); * * } * catch (MogreWrapperException e) * { * MessageBox.Show(e.Message, * "An Ogre exception has occurred!"); * } * * Disposed += new EventHandler(Form1_Disposed); * Resize += new EventHandler(Form1_Resize); * Paint += new PaintEventHandler(Form1_Paint); */ }
public Form1() { cleanup(); InitializeComponent(); string workingDirectory = MainGUI.Properties.Settings.Default.WorkingDirectory; string wiimoteApplicationPath = MainGUI.Properties.Settings.Default.WiimoteApplicationPath; string matlabApplicationPath = MainGUI.Properties.Settings.Default.MatlapApplicationPath; string mediaDirectory = MainGUI.Properties.Settings.Default.MediaDirectory; ProjectConstants.initialize(workingDirectory, wiimoteApplicationPath, matlabApplicationPath, mediaDirectory); Environment.CurrentDirectory = ProjectConstants.PROJECT_PATH; this.openVideoDialog = new System.Windows.Forms.OpenFileDialog(); this.openMP3FileDialog = new System.Windows.Forms.OpenFileDialog(); this.openWiimoteSimulationFileDialog = new System.Windows.Forms.OpenFileDialog(); // openVideoDialog // this.openVideoDialog.DefaultExt = "avi"; this.openVideoDialog.FileName = "kangaroo.avi"; this.openVideoDialog.Filter = "movie files|*.avi||"; this.openVideoDialog.Title = "Choose a movie to play"; // openMP3Dialog // this.openMP3FileDialog.DefaultExt = "mpw"; this.openMP3FileDialog.Filter = "mp3 files|*.mp3||"; this.openMP3FileDialog.Title = "Choose a mp3 file to play"; // openWiimoteSimulationDialog // this.openWiimoteSimulationFileDialog.DefaultExt = "csv"; this.openWiimoteSimulationFileDialog.Filter = "csv files|*.csv||"; this.openWiimoteSimulationFileDialog.Title = "Choose a wiimote data file for simulation"; //open Wiimote Dialog this.openWiimoteDataDialog = new System.Windows.Forms.OpenFileDialog(); this.openWiimoteDataDialog.DefaultExt = "csv"; this.openWiimoteDataDialog.Filter = "csv files|*.csv||"; this.openWiimoteDataDialog.Title = "Choose Wiimote Data File to upload"; this.saveFileDialog = new System.Windows.Forms.SaveFileDialog(); this.saveFileDialog.DefaultExt = "csv"; this.saveFileDialog.Filter = "csv files|*.csv||"; saveFileDialog.InitialDirectory = ProjectConstants.WIIMOTE_REFERENCE_DATA_PATH; this.wiimoteDisconnect.Enabled = false; Configuration config = Configuration.getConfiguration(); config.initialize(); this.configurationBindingSource.DataSource = config; WiimoteDataStore.getWiimoteDataStore().initialize(); Wiimotes l_Wiimotes = Wiimotes.getWiimotesObject(); m_WiimoteRecordingHandler = new WiimoteRecordingHandler(l_Wiimotes,this); m_WiimoteRecordingHandler.Initialize(); m_WiimoteCalibrationHandler = new WiimoteCalibrationHandler(l_Wiimotes, this); m_WiimoteCalibrationHandler.Initialize(); this.trainingSegmentInfoBindingSource.DataSource = WiimoteDataStore.getWiimoteDataStore().TrainingSegmentInfoRecords; InitializeBluetoothSetupTab(); initializeTraining(l_Wiimotes); applicationStartSpeech(); InitializeMogreComponent(); mSpeechRecognition = SpeechRecognition.getSpeechRecognition(); mSpeechRecognition.VoiceCommandReceivedEvent += new SpeechRecognition.OnVoiceCommandReceivedEvent(OnVoiceCommandReceivedEvent); setButtonVoiceCommandOff(false); this.quartenionViewerControl.SetWiimotes(l_Wiimotes); //OSCCommunication oscCommunication = new OSCCommunication(); //oscCommunication.Initialize(l_Wiimotes); /* try { m_OgreControl = new OgreControl(this.ogrePanel.Handle); m_OgreControl.Init(); } catch (MogreWrapperException e) { MessageBox.Show(e.Message, "An Ogre exception has occurred!"); } Disposed += new EventHandler(Form1_Disposed); Resize += new EventHandler(Form1_Resize); Paint += new PaintEventHandler(Form1_Paint); */ }