public ConfigBoardForm(AudioAnalyzerForm audioAnalyzerForm) { InitializeComponent(); this._globalInfo = GlobalInfo.GetInstance(); this.StartPosition = FormStartPosition.CenterScreen; this._parentForm = audioAnalyzerForm; }
public static void CreateInstance(AudioAnalyzerForm audioAnalyzerForm) { if (null == _instance) { _instance = new GlobalInfo(audioAnalyzerForm); } }
public TriggerConfigForm() { InitializeComponent(); GlobalInfo globalInfo = GlobalInfo.GetInstance(); InitComboBoxItem(comboBox_trigType, Enum.GetNames(typeof(TriggerType)), globalInfo.AITask.TrigType.ToString()); InitComboBoxItem(comboBox_trigCondition, Enum.GetNames((typeof(TriggerCondition))), globalInfo.AITask.TrigCondition.ToString()); }
private void button_confirm_Click(object sender, EventArgs e) { GlobalInfo globalInfo = GlobalInfo.GetInstance(); globalInfo.AITask.TrigType = (TriggerType)Enum.Parse(typeof(TriggerType), comboBox_trigType.Text); globalInfo.AITask.TrigCondition = (TriggerCondition)Enum.Parse(typeof(TriggerCondition), comboBox_trigCondition.Text); globalInfo.AOTask.TrigType = (TriggerType)Enum.Parse(typeof(TriggerType), comboBox_trigType.Text); globalInfo.AOTask.TrigCondition = (TriggerCondition)Enum.Parse(typeof(TriggerCondition), comboBox_trigCondition.Text); this.Dispose(); }
private void AudioAnalyzerForm_Load(object sender, EventArgs e) { GlobalInfo.CreateInstance(this); _globalInfo = GlobalInfo.GetInstance(); _globalInfo.AppStateMachine.RefreshAudioForm(); Dictionary <string, string> analyzerInfo = AnalyzerPanelFactory.GetAllAnalyzerNameAndLabel(); ToolStripItemCollection analyzerItemCollection = toolStripDropDownButton_selectAnalyzer.DropDownItems; foreach (string analyzerClass in analyzerInfo.Keys) { ToolStripMenuItem analyzerItem = new ToolStripMenuItem(analyzerInfo[analyzerClass]); analyzerItem.Tag = analyzerClass; analyzerItem.Click += Analyzer_ToolStripMenuItem_Click; analyzerItemCollection.Add(analyzerItem); } Control.CheckForIllegalCrossThreadCalls = false; }