/// <summary> /// 登録履歴ボタンクリック /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void buttonHistory_Click(object sender, EventArgs e) { // 履歴画面設定 HistoryForm frmHistory = new HistoryForm(); frmHistory.strClassSettingFilePath = clsCommonSettting.strClassSettingFilePath; frmHistory.StartPosition = FormStartPosition.CenterScreen; // 履歴を渡す frmHistory.strHistoryLargeClassName = clsUserSettting.strHistoryLargeClassName; frmHistory.strHistoryMiddleClassName = clsUserSettting.strHistoryMiddleClassName; frmHistory.strHistorySmallClassName = clsUserSettting.strHistorySmallClassName; frmHistory.strHistoryDocumentExample = clsUserSettting.strHistoryDocumentExample; // 画面表示 if (frmHistory.ShowDialog() == DialogResult.OK) { // 項目が選択された場合はコンボボックスを更新 ComboBoxClassSetting(frmHistory.strSelectLargeClassName, frmHistory.strSelectMiddleClassName, frmHistory.strSelectSmallClassName); // 文書例選択 for (int iCnt = 0; iCnt < listBoxDocumentExample.Items.Count; iCnt++) { if (listBoxDocumentExample.Items[iCnt].ToString() == frmHistory.strSelectDocumentExample) { listBoxDocumentExample.SelectedIndex = iCnt; } } } }
public static void OpenHistory() { HistoryForm historyForm = new HistoryForm(Program.HistoryFilePath); Program.Settings.HistoryWindowState.AutoHandleFormState(historyForm); historyForm.Show(); }
public static void OpenHistory() { HistoryForm historyForm = new HistoryForm(Program.HistoryFilePath, Program.Settings.HistoryMaxItemCount, Program.Settings.HistorySplitterDistance); historyForm.SplitterDistanceChanged += splitterDistance => Program.Settings.HistorySplitterDistance = splitterDistance; Program.Settings.HistoryWindowState.AutoHandleFormState(historyForm); historyForm.Show(); }
private void tsbHistory_Click(object sender, EventArgs e) { HistoryForm historyForm = new HistoryForm(Program.HistoryFilePath); Program.Settings.HistoryWindowState.AutoHandleFormState(historyForm); historyForm.Text = "ShareX - History: " + Program.HistoryFilePath; historyForm.Show(); }
private void btnTrade_Click(object sender, EventArgs e) { if (!FrmHistory.IsHandleCreated) { FrmHistory = new HistoryForm(); } FrmHistory.Show(dockPanel, DockState.DockBottom); }
private void OnAddClick(object sender, EventArgs e) { History obj = new History(); if (HistoryForm.ShowForm(obj)) { this.LoadListData(obj); } }
private void btnGameHistory_Click(object sender, EventArgs e) { this.Hide(); HistoryForm form = new HistoryForm(); form.Closed += (s, args) => this.Close(); form.Show(); }
private void OnOpenClick(object sender, EventArgs e) { History obj = this.GetSelected(); if (obj != null) { obj.RefershData(); } if (HistoryForm.ShowForm(obj)) { this.LoadListData(obj); } }
private void ucBtnExt1_BtnClick(object sender, EventArgs e) { if (m_object != null) { if (historyForm == null) { historyForm = new HistoryForm(model, m_object); historyForm.Show(); } else { if (historyForm.IsDisposed == true) { historyForm = new HistoryForm(model, m_object); historyForm.Show(); } else { historyForm.Visible = true; } } this.UserSelectFormTemp.Visible = false; } }
// this method is a performance sucking machine private void BindChannelPlaylistPanel() { // if (PlaylistPanel.Controls.Count == 0 || !_channelView.IsViewSet) if (PlaylistPanel.Controls.Count == PlaylistPanel.Channels.Count) { return; } PlaylistPanel.Controls.Clear(); PlaylistPanel.Controls.AddRange(PlaylistPanel.Channels.ToArray()); // subscribe to the TrackChanged events here: // this will run EVERY TIME PLAYLIST IS REFRESHED...very expensive, so move elsewhere // PlaylistPanel.Channels.ForEach(delegate(TChannel channel) Parallel.ForEach <IChannel>(PlaylistPanel.Channels, channel => { channel.TrackChanged -= (s, ee) => { GC.Collect(); GC.WaitForPendingFinalizers(); }; channel.TrackChanged += (s, ee) => Invoke((Action)(() => { // first change the title of the window if ( ee.RefreshedContent.TrackTitle.Equals(_channel.CurrentTrack.TrackTitle, StringComparison. CurrentCultureIgnoreCase) && _channel.IsSelected) { SetTrackText(ee.RefreshedContent); } // show some toast to the user if (!Settings.Default.ShowUserToast) { return; } var toast = new ChannelToastForm <IChannel>(ee.RefreshedContent.ParentChannel) { TitleText = ee.RefreshedContent.ParentChannel.ChannelName, BodyText = string.Format("Track changed to {0}", ee.RefreshedContent.TrackTitle), ForeColor = Color.Black }; toast.Notify(); })); channel.Tracks[0].ee -= (s, ee) => { GC.Collect(); GC.WaitForPendingFinalizers(); }; channel.Tracks[0].ee += (s, ee) => Invoke((Action)(() => { var toast = new CommentToastForm <IChannel>(ee.RefreshedContent.ParentChannel) { TitleText = ee.RefreshedContent.ParentChannel.ChannelName, BodyText = string.Format("{0} new comments for track {1}", ee.NewComments, ee.RefreshedContent.TrackTitle), ForeColor = Color.Black }; toast.Notify(); })); }); foreach (var control in PlaylistPanel.Controls) { if (!(control is TChannel)) { continue; } ((Channel)control).PlaylistHistoryClicked -= (sender, e) => { }; ((Channel)control).PlaylistHistoryClicked += (sender, e) => { var channel = sender as TChannel; if (channel == null) { return; } if (_trackHistory == null) { _trackHistory = new HistoryForm(channel); _trackHistory.Show(); } else { _trackHistory.Channel = channel; _trackHistory.Show(); } _trackHistory.Activate(); // _trackHistory.Location = this.PointToScreen(this.PlaylistPanel.Controls[((Control)c).Name].Location); }; } }