当前位置: 首页>>代码示例>>C#>>正文


C# Gtk.ResponseArgs类代码示例

本文整理汇总了C#中Gtk.ResponseArgs的典型用法代码示例。如果您正苦于以下问题:C# ResponseArgs类的具体用法?C# ResponseArgs怎么用?C# ResponseArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ResponseArgs类属于Gtk命名空间,在下文中一共展示了ResponseArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ContactDialogResponseHandler

 void ContactDialogResponseHandler(object o, ResponseArgs args, ContactHandler contactHandler)
 {
     var dialog = (ContactDialog)o;
     if (args.ResponseId.Equals(ResponseType.Ok)) {
         contactHandler(dialog.GetContact());
     }
     dialog.Hide();
 }
开发者ID:ncjones,项目名称:AddressBookDemo,代码行数:8,代码来源:MainWindow.cs

示例2: HandleResponse

		void HandleResponse (object obj, ResponseArgs args)
	        {
			switch(args.ResponseId)
			{
				case ResponseType.Close:
					this.Destroy ();
					break;
			}
	        }
开发者ID:guadalinex-archive,项目名称:guadalinex-v6,代码行数:9,代码来源:HashJob.cs

示例3: OnWindowResponse

 public void OnWindowResponse(object o, ResponseArgs args)
 {
     switch ((int) args.ResponseId) {
         case (int) ResponseType.DeleteEvent:
         case (int) ResponseType.Cancel:
         case (int) ResponseType.Close:
            	window.Visible = false;
            	break;
         default:
             break;
     }
 }
开发者ID:BackupTheBerlios,项目名称:monopod-svn,代码行数:12,代码来源:IPodChoose.cs

示例4: on_dialog_response

		private void on_dialog_response (object sender, ResponseArgs args) {
			if (args.ResponseId != Gtk.ResponseType.Ok) {
				// FIXME this is to work around a bug in gtk+ where
				// the filesystem events are still listened to when
				// a FileChooserButton is destroyed but not finalized
				// and an event comes in that wants to update the child widgets.
				uri_chooser.Dispose ();
				uri_chooser = null;
			} else if (args.ResponseId == Gtk.ResponseType.Ok) {
				zip ();
			}
			zipdiag.Destroy ();
		}
开发者ID:guadalinex-archive,项目名称:guadalinex-v6,代码行数:13,代码来源:ZipExport.cs

示例5: OnRespond

		protected void OnRespond (object o, ResponseArgs args)
		{
			if (args.ResponseId != Gtk.ResponseType.Ok)
				return;
				
			TreeIter iter;
			var list = new List<int> ();
			if (storeSelected.GetIterFirst (out iter)) {
				do {
					var enc = (int)storeSelected.GetValue (iter, 2);
					list.Add (enc);
				} while (storeSelected.IterNext (ref iter));
			}
			TextEncoding.ConversionEncodings = list.Select (TextEncoding.GetEncoding).ToArray ();
		}
开发者ID:kdubau,项目名称:monodevelop,代码行数:15,代码来源:SelectEncodingsDialog.cs

示例6: OnRespond

		protected void OnRespond (object o, ResponseArgs args)
		{
			if (args.ResponseId != Gtk.ResponseType.Ok)
				return;
				
			TreeIter iter;
			ArrayList list = new ArrayList ();
			if (storeSelected.GetIterFirst (out iter)) {
				do {
					string id = (string) storeSelected.GetValue (iter, 1);
					TextEncoding enc = TextEncoding.GetEncoding (id);
					list.Add (enc);
				}
				while (storeSelected.IterNext (ref iter));
			}
			TextEncoding.ConversionEncodings = (TextEncoding[]) list.ToArray (typeof(TextEncoding));
		}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:17,代码来源:SelectEncodingsDialog.cs

示例7: _OnResponse

      void _OnResponse( object o, ResponseArgs args )
      {
         switch (args.ResponseId)
         {
         case ResponseType.Ok:         // save
            Trace.WriteLine( "ConfigDlg: Ok" );
            bool convertOk = false;
            int port = 0;
            try
            {
               port = Convert.ToInt32( _serverPort.Text );
               convertOk = true;
            }
            catch (Exception e)
            {
               // I think we should prevent all invalid entry rather
               // than catching it here after the fact.
               Trace.WriteLine( "Invalid port - " + e.ToString() );
            }
            
            if (convertOk)
            {
               _settings.serverName = _serverName.Text;
               _settings.serverPort = port;
               Hide();
            }

            break;
            
         case ResponseType.Cancel:
            // Restore previous values to controls
            _serverName.Text = _settings.serverName;
            _serverPort.Text = _settings.serverPort.ToString();
            Hide();
            break;
            
         default:
            Trace.WriteLine( "ConfigDlg: Unexpected Response" );
            break;
         }
      }
开发者ID:BackupTheBerlios,项目名称:tamjb,代码行数:41,代码来源:ConfigDlg.cs

示例8: OnDialogResponse

		//Disabling warning 0169 because this code will be called at
		//runtime with glade.
		#pragma warning disable 0169
		private void OnDialogResponse (object sender, ResponseArgs args) 
		{
			if (args.ResponseId == ResponseType.Ok) {
				MeasureFinder measureFinder = new MeasureFinder ();
				int minimumValue = Int32.Parse (minimumValueEntry.Text);
				if (linesPerMethodRadioButton.Active) {
					results = measureFinder.FindByLinesPerMethod (measures, minimumValue);
				}
				else if (parametersPerMethodRadioButton.Active) {
					results = measureFinder.FindByParametersPerMethod (measures, minimumValue);
				}
				else if (numberOfLinesRadioButton.Active) {
					results = measureFinder.FindByNumberOfLines (measures, minimumValue);
				}
				else if (numberOfParametersRadioButton.Active) {
					results = measureFinder.FindByNumberOfParameters (measures, minimumValue);
				}
				else if (numberOfFieldsRadioButton.Active) {
					results = measureFinder.FindByNumberOfFields (measures, minimumValue);
				}
			}
			findDialog.Destroy ();
		}
开发者ID:JianwenSun,项目名称:mono-soc-2007,代码行数:26,代码来源:FindDialog.cs

示例9: OnAboutResponse

    private void OnAboutResponse(object o, ResponseArgs args)
    {
        AboutDialog dialog = (AboutDialog) o;

        dialog.Destroy ();
    }
开发者ID:BackupTheBerlios,项目名称:monopod-svn,代码行数:6,代码来源:Main.cs

示例10: HandleResponse

		void HandleResponse (object obj, ResponseArgs args) {
			if (args.ResponseId == ResponseType.Accept) {
				PhotoQuery query = new PhotoQuery (from_db.Photos);
				query.RollSet = mdd.ActiveRolls == null ? null : new RollSet (mdd.ActiveRolls);
				DoMerge (query, mdd.ActiveRolls, mdd.Copy);
			}
			mdd.Dialog.Destroy ();
		}
开发者ID:guadalinex-archive,项目名称:guadalinex-v6,代码行数:8,代码来源:MergeDb.cs

示例11: OnUserSelectorResponse

 private void OnUserSelectorResponse(object o, ResponseArgs args)
 {
     if(UserSelector != null)
        {
     switch(args.ResponseId)
     {
      case Gtk.ResponseType.Ok:
      {
       foreach(MemberInfo member in UserSelector.SelectedUsers)
       {
        if(!curUsers.ContainsKey(member.UserID))
        {
     try
     {
     iFolderUser newUser =
      ifws.AddAndInviteUser(
       ifolder.ID,
       member.Name,
       member.GivenName,
       member.FamilyName,
       member.UserID,
       null,
       "ReadWrite" );
      TreeIter iter =
       UserTreeStore.AppendValues(newUser);
      if (memberFullNames.Contains(newUser.FN))
      {
       duplicateMembers[newUser.FN] = 0;
      }
      else
       memberFullNames[newUser.FN] = 0;
      curUsers.Add(newUser.UserID, iter);
     }
     catch(Exception e)
     {
      iFolderExceptionDialog ied =
        new iFolderExceptionDialog(
      topLevelWindow, e);
      ied.Run();
      ied.Hide();
      ied.Destroy();
      ied = null;
      break;
     }
        }
       }
       UserSelector.Hide();
       UserSelector.Destroy();
       UserSelector = null;
       break;
      }
      case Gtk.ResponseType.Help:
      {
       Util.ShowHelp("sharewith.html#bq6lwm0", topLevelWindow);
       break;
      }
      case Gtk.ResponseType.Cancel:
      {
       UserSelector.Hide();
       UserSelector.Destroy();
       UserSelector = null;
       break;
      }
     }
        }
 }
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:66,代码来源:iFolderPropSharingPage.cs

示例12: _OnUserResponse

        void _OnUserResponse( object sender, ResponseArgs args )
        {
            _Trace( "[_OnUserResponse]" );

             switch (args.ResponseId)
             {
             case ResponseType.Ok:
            try
            {
               _database = _databaseEntry.Text;
               _mp3RootDir = _mp3RootDirEntry.Text;

               // Complain if the mp3 root dir doesn't exist.
               DirectoryInfo mp3DirInfo = new DirectoryInfo( _mp3RootDir );
               if (!mp3DirInfo.Exists)
               {
                  MessageDialog md =
                     new MessageDialog( _localConfigDialog,
                                        DialogFlags.Modal,
                                        MessageType.Error,
                                        ButtonsType.Ok,
                                        ("Directory '" + _mp3RootDir
                                         + "' does not exist") );
                  md.Run();
                  md.Destroy();
                  return;
               }

               // If the db file does not exist, create it. If necessary.
               FileInfo dbInfo = new FileInfo( _database );
               if (!dbInfo.Exists)
               {
                  // If we don't reate the file, quick exit here (keep
                  // the dialog going)
                  if (!_CreateDatabasePrompt( _database ))
                     return;
               }

               // If we got here, the controls validated
               _localConfigDialog.Destroy();
               _isOk = true;
            }
            catch (Exception exception)
            {
               _Trace( exception.ToString() );
            }
            break;

             case ResponseType.Cancel:
             default:
            _localConfigDialog.Destroy();
            break;              // er
             }
        }
开发者ID:BackupTheBerlios,项目名称:tamjb,代码行数:54,代码来源:LocalConfigWindow.cs

示例13: OnStationEditorResponse

        private void OnStationEditorResponse (object o, ResponseArgs args)
        {
            StationEditor editor = (StationEditor)o;
            bool destroy = true;

            try {
                if (args.ResponseId == ResponseType.Ok) {
                    DatabaseTrackInfo track = editor.Track ?? new DatabaseTrackInfo ();
                    track.PrimarySource = this;
                    track.IsLive = true;

                    try {
                        track.Uri = new SafeUri (editor.StreamUri);
                    } catch {
                        destroy = false;
                        editor.ErrorMessage = Catalog.GetString ("Please provide a valid station URI");
                    }

                    if (!String.IsNullOrEmpty (editor.StationCreator)) {
                        track.ArtistName = editor.StationCreator;
                    }

                    track.Comment = editor.Description;

                    if (!String.IsNullOrEmpty (editor.Genre)) {
                        track.Genre = editor.Genre;
                    } else {
                        destroy = false;
                        editor.ErrorMessage = Catalog.GetString ("Please provide a station genre");
                    }

                    if (!String.IsNullOrEmpty (editor.StationTitle)) {
                        track.TrackTitle = editor.StationTitle;
                        track.AlbumTitle = editor.StationTitle;
                    } else {
                        destroy = false;
                        editor.ErrorMessage = Catalog.GetString ("Please provide a station title");
                    }

                    track.Rating = editor.Rating;

                    if (destroy) {
                        track.Save ();
                    }
                }
            } finally {
                if (destroy) {
                    editor.Response -= OnStationEditorResponse;
                    editor.Destroy ();
                }
            }
        }
开发者ID:gclark916,项目名称:banshee,代码行数:52,代码来源:InternetRadioSource.cs

示例14: HandleResponse

 void HandleResponse(object obj, ResponseArgs args)
 {
     dialog.Destroy ();
 }
开发者ID:Yetangitu,项目名称:f-spot,代码行数:4,代码来源:LiveWebGallery.cs

示例15: on_dialog_response

 void on_dialog_response(object obj, ResponseArgs args)
 {
     if (args.ResponseId == ResponseType.Ok) {
         create_mosaics ();
     }
     metapixel_dialog.Destroy ();
 }
开发者ID:Yetangitu,项目名称:f-spot,代码行数:7,代码来源:MetaPixel.cs


注:本文中的Gtk.ResponseArgs类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。