internal SingleMacroControl( MainWindow parentWindow, MacroRecording record, MacroRecorderWindow recorderWindow) { this.InitializeComponent(); this.mRecording = record; this.ParentWindow = parentWindow; this.mMacroRecorderWindow = recorderWindow; InputMethod.SetIsInputMethodEnabled((DependencyObject)this.mMacroShortcutTextBox, false); this.mTimestamp.Text = DateTime.ParseExact(this.mRecording.TimeCreated, "yyyyMMddTHHmmss", (IFormatProvider)CultureInfo.InvariantCulture, DateTimeStyles.AssumeLocal).ToString("yyyy.MM.dd HH.mm.ss", (IFormatProvider)CultureInfo.InvariantCulture); this.mScriptName.Text = this.mRecording.Name; this.mMacroShortcutTextBox.Text = IMAPKeys.GetStringForUI(this.mRecording.Shortcut); this.mScriptName.ToolTip = (object)this.mScriptName.Text; if (record.RecordingType == RecordingTypes.MultiRecording) { this.mScriptSettingsImg.Visibility = Visibility.Collapsed; this.mMergeScriptSettingsImg.Visibility = Visibility.Visible; } if (!string.IsNullOrEmpty(this.mRecording.Shortcut)) { this.mMacroShortcutTextBox.Tag = (object)IMAPKeys.GetStringForFile(IMAPKeys.mDictKeys.FirstOrDefault <KeyValuePair <Key, string> >((Func <KeyValuePair <Key, string>, bool>)(x => x.Value == this.mRecording.Shortcut)).Key); MainWindow.sMacroMapping[this.mMacroShortcutTextBox.Tag.ToString()] = this.mScriptName.Text; } else { this.mMacroShortcutTextBox.Tag = (object)""; } this.IsBookmarked = BlueStacksUIUtils.CheckIfMacroScriptBookmarked(this.mRecording.Name); if (record.PlayOnStart) { this.mAutorunImage.Visibility = Visibility.Visible; } if (this.ParentWindow.mIsMacroPlaying && string.Equals(this.mRecording.Name, this.ParentWindow.mMacroPlaying, StringComparison.InvariantCulture)) { this.ToggleScriptPlayPauseUi(true); } else { this.ToggleScriptPlayPauseUi(false); } }