コード例 #1
0
ファイル: Main.cs プロジェクト: kasthack/PhotoSorter
 private void btnAddMap_Click( object sender, EventArgs e )
 {
     if ( _dlgAdd.ShowDialog() != DialogResult.OK ) return;
     var k = new Map {
         Key = (Keys) _dlgAdd.cmbKey.SelectedItem,
         Path = _dlgAdd.txtPath.Text
     };
     if ( !_core.AddMap( k ) ) {
         MessageBox.Show( "Failed to add map", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error );
         return;
     }
     RefreshKeymaps();
 }
コード例 #2
0
ファイル: SortInfo.cs プロジェクト: kasthack/PhotoSorter
 public bool AddMap( Map map )
 {
     if (!_maps.ContainsKey( map.Key ))
         _maps.Add( map.Key, map );
     return true;
 }