/// <summary> /// マイク設定ダイアログ表示 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Button_deviceSetting_Click(object sender, RoutedEventArgs e) { MicrophoneDeviceSetingWindow mdsw = new MicrophoneDeviceSetingWindow(); if (setting.Device != null) { mdsw.Device = setting.Device; } logger.Debug("------------- Microphone device setting window show dialog -------------"); LightBox.ShowDialog(this, mdsw); if (mdsw.DialogResult) { setting.SubscriptionKey = setting.SubscriptionKey; setting.Region = setting.Region; setting.Location = setting.Location; setting.PROXY_Host = setting.PROXY_Host; setting.PROXY_Port = setting.PROXY_Port; setting.Device = mdsw.Device; setting2xml(); logger.Info("Save Microphone Device settings."); } else { logger.Debug("------------- Cancel Save Microphone Device settings -------------"); } }
/// <summary> /// メディアの表示 /// </summary> /// <param name="suffix">メディア番号</param> private void SelectMedia(int suffix) { if (this.Media.Count <= suffix) { return; } var mainWindow = CommonMethods.MainWindow; if (mainWindow != null) { //動画を表示 if (this.Media[suffix].Type == StatusMediaType.Video) { using (var showMovie = new Views.ShowDialogs.ShowMovie(this.Media[suffix].Url, false)) { LightBox.ShowDialog(mainWindow, showMovie); } } //画像を表示 else { using (var showImage = new Views.ShowDialogs.ShowImage(this.Media.Select(x => x.Image).ToList(), suffix)) { LightBox.ShowDialog(mainWindow, showImage); } } } }
private void Button_versionInformation_Click(object sender, RoutedEventArgs e) { System.Diagnostics.FileVersionInfo ver = System.Diagnostics.FileVersionInfo.GetVersionInfo(System.Reflection.Assembly.GetExecutingAssembly().Location); VersionInfomationWindow VersionWindow = new VersionInfomationWindow("Recode_To_Text_Ver:" + ver.FileVersion, "Speech_To_Text_DLL_Ver:" + stt.Version); logger.Debug("------------- VersionWindow show dialog -------------"); LightBox.ShowDialog(this, VersionWindow); }
/// <summary> /// リプライ先ツイートをクリックしたとき /// </summary> public void Select() { var mainWindow = CommonMethods.MainWindow; if (mainWindow != null && this.Id != null) { using (var status = new Views.ShowDialogs.ShowStatus(this.TimelineModel, (long)this.Id)) { LightBox.ShowDialog(mainWindow, status); } } }
/// <summary> /// ユーザーをリストに追加する /// </summary> private void AddToList() { var mainWindow = CommonMethods.MainWindow; if (mainWindow != null) { using (var showAddToList = new Views.ShowDialogs.ShowAddToList(this.TimelineModel.TokenSuffix, this)) { LightBox.ShowDialog(mainWindow, showAddToList); } } }
/// <summary> /// コピーボタンを押したとき /// </summary> public void Copy() { var mainWindow = CommonMethods.MainWindow; if (mainWindow != null) { using (var showCopiableText = new Views.ShowDialogs.ShowCopiableText(this.FullText)) { LightBox.ShowDialog(mainWindow, showCopiableText); } } }
/// <summary> /// 共有ボタンを押したとき /// </summary> public void Share() { var mainWindow = CommonMethods.MainWindow; if (mainWindow != null) { string link = "https://twitter.com/" + this.User.ScreenName + "/status/" + this.Id; using (var showCopiableText = new Views.ShowDialogs.ShowCopiableText(link)) { LightBox.ShowDialog(mainWindow, showCopiableText); } } }
/// <summary> /// 引用ツイートをクリックしたとき /// </summary> public void SelectQuotationStatus() { var suffix = 0; if (suffix > this.QuotationIds.Count - 1) { return; } var mainWindow = CommonMethods.MainWindow; if (mainWindow != null) { using (var status = new Views.ShowDialogs.ShowStatus(this.TimelineModel, this.QuotationIds[suffix])) { LightBox.ShowDialog(mainWindow, status); } } }
/// <summary> /// Azure設定ダイアログ表示 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Button_azureSetting_Click(object sender, RoutedEventArgs e) { AzureSettingWindow asw = new AzureSettingWindow(); if (setting.SubscriptionKey != null) { asw.SubscriptionKey = setting.SubscriptionKey; } if (setting.Region != null) { asw.Region = setting.Region; } if (setting.Location != null) { asw.Location = setting.Location; } if (setting.PROXY_Host != null) { asw.PROXY_Host = setting.PROXY_Host; } if (setting.PROXY_Port != null) { asw.PROXY_Port = setting.PROXY_Port; } LightBox.ShowDialog(this, asw); if (asw.DialogResult) { setting.SubscriptionKey = asw.SubscriptionKey; setting.Region = asw.Region; setting.Location = asw.Location; setting.PROXY_Host = asw.PROXY_Host; setting.PROXY_Port = asw.PROXY_Port; setting.Device = setting.Device; logger.Info("Save Azure settings."); setting2xml(); } else { logger.Debug("------------- Cancel save Azure settings -------------"); } }
private void OnClickShowDialogButton(object sender, RoutedEventArgs e) { LightBox.ShowDialog(this, new SampleDialog()); MessageBox.Show("Hello."); }