Пример #1
0
        private void MenuMember_ColumnFilter_Click( object sender, EventArgs e )
        {
            ShipGroupData group = SelectedTab != null ? KCDatabase.Instance.ShipGroup[(int)SelectedTab.Tag] : null;

            if ( group == null ) {
                MessageBox.Show( GeneralRes.CannotChangeGroup, Properties.Resources.Error, MessageBoxButtons.OK, MessageBoxIcon.Asterisk );
                return;
            }

            using ( var dialog = new DialogShipGroupColumnFilter( ShipView ) ) {

                if ( dialog.ShowDialog( this ) == System.Windows.Forms.DialogResult.OK ) {

                    bool[] checkedList = dialog.CheckedList;

                    group.ColumnFilter = checkedList.ToList();
                    for ( int i = 0; i < checkedList.Length; i++ ) {
                        ShipView.Columns[i].Visible = checkedList[i];
                    }

                }
            }
        }
Пример #2
0
        private void MenuMember_ColumnFilter_Click( object sender, EventArgs e )
        {
            ShipGroupData group = CurrentGroup;

            if ( group == null ) {
                MessageBox.Show( "このグループは変更できません。", "エラー", MessageBoxButtons.OK, MessageBoxIcon.Asterisk );
                return;
            }

            try {
                using ( var dialog = new DialogShipGroupColumnFilter( ShipView, group ) ) {

                    if ( dialog.ShowDialog( this ) == System.Windows.Forms.DialogResult.OK ) {

                        group.ViewColumns = dialog.Result.ToDictionary( r => r.Name );
                        group.ScrollLockColumnCount = dialog.ScrollLockColumnCount;

                        ApplyViewData( group );
                    }

                }
            } catch ( Exception ex ) {

                Utility.ErrorReporter.SendErrorReport( ex, "ShipGroup: 列の設定ダイアログでエラーが発生しました。" );
            }
        }
Пример #3
0
		private void MenuMember_ColumnFilter_Click( object sender, EventArgs e ) {

			ShipGroupData group = CurrentGroup;

			if ( group == null ) {
				MessageBox.Show( GeneralRes.CannotChangeGroup, Properties.Resources.Error, MessageBoxButtons.OK, MessageBoxIcon.Asterisk );
				return;
			}


			try {
				using ( var dialog = new DialogShipGroupColumnFilter( ShipView, group ) ) {

					if ( dialog.ShowDialog( this ) == System.Windows.Forms.DialogResult.OK ) {

						group.ViewColumns = dialog.Result.ToDictionary( r => r.Name );
						group.ScrollLockColumnCount = dialog.ScrollLockColumnCount;

						ApplyViewData( group );
					}



				}
			} catch ( Exception ex ) {

				Utility.ErrorReporter.SendErrorReport( ex, GeneralRes.ColumnDialogError );
			}
		}