• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Gtk.ResponseArgs类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: OnReLoginDialogResponse

 private void OnReLoginDialogResponse(object o, ResponseArgs args)
 {
     switch (args.ResponseId)
        {
     case Gtk.ResponseType.Ok:
      DomainInformation dom = domainController.GetDomain(LoginDialog.Domain);
      if (dom == null)
      {
       iFolderMsgDialog dialog = new iFolderMsgDialog(
        null,
        iFolderMsgDialog.DialogType.Error,
        iFolderMsgDialog.ButtonSet.None,
        Util.GS("Account Error"),
        Util.GS("This account has been removed from your computer."),
        Util.GS("If you wish to connect to this account again, please add it in the Account Settings Dialog."));
       dialog.Run();
       dialog.Hide();
       dialog.Destroy();
       dialog = null;
       LoginDialog.Hide();
       LoginDialog.Destroy();
       LoginDialog = null;
       break;
      }
      try
      {
       string DomainID = LoginDialog.Domain;
       Status status =
        domainController.AuthenticateDomain(
     LoginDialog.Domain,
     LoginDialog.Password,
     LoginDialog.ShouldSavePassword);
       if (status != null)
       {
        switch(status.statusCode)
        {
     case StatusCodes.Success:
     case StatusCodes.SuccessInGrace:
      ifdata.Refresh();
      Debug.PrintLine("Login dialog response- success");
      LoginDialog.Hide();
      LoginDialog.Destroy();
      LoginDialog = null;
       ShowClientUpgradeMessageBox();
                                         int result;
       int policy = ifws.GetSecurityPolicy(DomainID);
       if( policy % 2 == 0)
        break;
                                         bool passphraseStatus = simws.IsPassPhraseSet(DomainID);
       if(passphraseStatus == true)
       {
        bool rememberOption = simws.GetRememberOption(DomainID);
        if( rememberOption == false)
        {
     ShowVerifyDialog( DomainID, simws);
        }
        else
        {
     Debug.PrintLine(" remember Option true. Checking for passphrase existence");
     string passphrasecheck;
     passphrasecheck= simws.GetPassPhrase(DomainID);
     if(passphrasecheck == null || passphrasecheck == "")
      ShowVerifyDialog( DomainID, simws);
        }
       }
       else
       {
        iFolderWindow.ShowEnterPassPhraseDialog(DomainID, simws);
       }
      break;
     case StatusCodes.InvalidCertificate:
      if( status.UserName != null)
      {
       dom.Host = status.UserName;
      }
      byte[] byteArray = simws.GetCertificate(dom.Host);
      System.Security.Cryptography.X509Certificates.X509Certificate cert = new System.Security.Cryptography.X509Certificates.X509Certificate(byteArray);
      iFolderMsgDialog dialog = new iFolderMsgDialog(
       null,
       iFolderMsgDialog.DialogType.Question,
       iFolderMsgDialog.ButtonSet.YesNo,
       "",
       Util.GS("Accept the certificate of this server?"),
       string.Format(Util.GS("iFolder is unable to verify \"{0}\" as a trusted server.  You should examine this server's identity certificate carefully."), dom.Host),
       cert.ToString(true));
      Gdk.Pixbuf certPixbuf = Util.LoadIcon("gnome-mime-application-x-x509-ca-cert", 48);
      if (certPixbuf != null && dialog.Image != null)
       dialog.Image.Pixbuf = certPixbuf;
      int rc = dialog.Run();
      dialog.Hide();
      dialog.Destroy();
      if(rc == -8)
      {
       simws.StoreCertificate(byteArray, dom.Host);
       OnReLoginDialogResponse(o, args);
      }
      else
      {
       domainController.DisableDomainAutoLogin(LoginDialog.Domain);
       LoginDialog.Hide();
//.........这里部分代码省略.........
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:101,代码来源:iFolderApplication.cs


示例17: _OnUserResponse

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

             // Well, there's only just the Close button...
             _miscSettingsDialog.Destroy();
        }
开发者ID:BackupTheBerlios,项目名称:tamjb,代码行数:7,代码来源:MiscSettings.cs


示例18: OnResponse

        private void OnResponse (object o, ResponseArgs args)
        {
            ResponseType response = args.ResponseId;

            if (response == ResponseType.Apply) {
                Queue ();
                return;
            }

            if (response == ResponseType.Ok) {
                Play ();
            }

            Destroy ();
        }
开发者ID:gclark916,项目名称:banshee,代码行数:15,代码来源:BaseDialog.cs


示例19: OnPropertiesDialogResponse

 private void OnPropertiesDialogResponse(object o, ResponseArgs args)
 {
     iFolderPropertiesDialog propsDialog = (iFolderPropertiesDialog) o;
        switch(args.ResponseId)
        {
     case Gtk.ResponseType.Help:
      if (propsDialog != null)
      {
       if (propsDialog.CurrentPage == 0)
       {
        Util.ShowHelp("propifolders.html", this);
       }
       else if (propsDialog.CurrentPage == 1)
       {
        Util.ShowHelp("sharewith.html", this);
       }
       else
       {
        Util.ShowHelp("front.html", this);
       }
      }
      break;
     default:
     {
      if(propsDialog != null)
      {
       propsDialog.Hide();
       propsDialog.Destroy();
       if (PropDialogs.ContainsKey(propsDialog.iFolder.ID))
        PropDialogs.Remove(propsDialog.iFolder.ID);
       propsDialog = null;
      }
      break;
     }
        }
 }
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:36,代码来源:iFolderWindow.cs


示例20: OnAccountDialogResponse

 private void OnAccountDialogResponse(object o, ResponseArgs args)
 {
     this.Hide();
        this.Destroy();
 }
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:5,代码来源:EnterpriseAccountDialog.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Gtk.RowActivatedArgs类代码示例发布时间:2022-05-26
下一篇:
C# Gtk.Notebook类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap