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


C# IOConnectionInfo.GetDisplayName方法代码示例

本文整理汇总了C#中IOConnectionInfo.GetDisplayName方法的典型用法代码示例。如果您正苦于以下问题:C# IOConnectionInfo.GetDisplayName方法的具体用法?C# IOConnectionInfo.GetDisplayName怎么用?C# IOConnectionInfo.GetDisplayName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IOConnectionInfo的用法示例。


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

示例1: FileLock

        public FileLock(IOConnectionInfo iocBaseFile)
        {
            if(iocBaseFile == null) throw new ArgumentNullException("strBaseFile");

            m_iocLockFile = iocBaseFile.CloneDeep();
            m_iocLockFile.Path += LockFileExt;

            LockFileInfo lfiEx = LockFileInfo.Load(m_iocLockFile);
            if(lfiEx != null)
            {
                m_iocLockFile = null; // Otherwise Dispose deletes the existing one
                throw new FileLockException(iocBaseFile.GetDisplayName(),
                    lfiEx.GetOwner());
            }

            LockFileInfo.Create(m_iocLockFile);
        }
开发者ID:Stoom,项目名称:KeePass,代码行数:17,代码来源:FileLock.cs

示例2: CreateAuxFile

        public static bool CreateAuxFile(OtpInfo otpInfo,
			KeyProviderQueryContext ctx, IOConnectionInfo auxFileIoc)
        {
            otpInfo.Type = ProvType;
            otpInfo.Version = ProvVersion;
            otpInfo.Generator = ProductName;

            otpInfo.EncryptSecret();

            if(!OtpInfo.Save(auxFileIoc, otpInfo))
            {
                MessageService.ShowWarning("Failed to save auxiliary OTP info file:",
                    auxFileIoc.GetDisplayName());
                return false;
            }

            return true;
        }
开发者ID:pythe,项目名称:wristpass,代码行数:18,代码来源:OathHotpKeyProv.cs

示例3: OnMenuDown

 private void OnMenuDown(object sender, EventArgs e) {
     Thread uploadThread = new Thread(new ThreadStart(delegate() {
         string qiniuurl = QiniuCloud.Instance.GetQiniuUrl(KeePassQiniuConfig.Default.QiniuDataBase);
         IOConnectionInfo m_ioc = new IOConnectionInfo();
         m_ioc.Path = qiniuurl;
         string localSavePath = KeePassQiniuConfig.Default.DataDir + KeePassQiniuConfig.Default.QiniuDataBase;
         if(File.Exists(localSavePath)) {
             m_host.MainWindow.Invoke(new MethodInvoker(delegate() {
                 MessageService.ShowWarning("本地数据库存在", "数据库" + KeePassQiniuConfig.Default.QiniuDataBase + "已经存在!");
             }));
             return;
         }
         try {
             if(!IOConnection.FileExists(m_ioc, true)) {
                 throw new FileNotFoundException();
             } else {
                 byte[] bytes = IOConnection.ReadFile(m_ioc);
                 File.WriteAllBytes(localSavePath, bytes);
                 m_host.MainWindow.Invoke(new MethodInvoker(delegate() {
                     MessageService.ShowInfo("下载成功");
                     IOConnectionInfo local = new IOConnectionInfo();
                     local.Path = localSavePath;
                     m_host.MainWindow.OpenDatabase(local, null, true);
                 }));
             }
         } catch(Exception exTest) {
             string strError = exTest.Message;
             if(strError.Contains("404")) {
             } else {
                 if((exTest.InnerException != null) &&
                         !string.IsNullOrEmpty(exTest.InnerException.Message))
                     strError += MessageService.NewParagraph +
                                 exTest.InnerException.Message;
                 m_host.MainWindow.Invoke(new MethodInvoker(delegate() {
                     MessageService.ShowWarning(m_ioc.GetDisplayName(), strError);
                 }));
             }
         }
     }));
     uploadThread.Start();
 }
开发者ID:Hxs1990,项目名称:KeePassQiniu,代码行数:41,代码来源:KeePassQiniuExt.cs

示例4: FixDuplicateUuids

		private bool FixDuplicateUuids(PwDatabase pd, IOConnectionInfo ioc)
		{
			if(pd == null) { Debug.Assert(false); return false; }

			if(!pd.HasDuplicateUuids()) return false;

			string str = string.Empty;
			if(ioc != null)
			{
				string strFile = ioc.GetDisplayName();
				if(!string.IsNullOrEmpty(strFile))
					str += strFile + MessageService.NewParagraph;
			}

			str += KPRes.UuidDupInDb + MessageService.NewParagraph +
				KPRes.CorruptionByExt + MessageService.NewParagraph +
				KPRes.UuidFix;

			if(VistaTaskDialog.ShowMessageBoxEx(str, null,
				PwDefs.ShortProductName, VtdIcon.Warning, null,
				KPRes.RepairCmd, (int)DialogResult.Cancel, null, 0) < 0)
				MessageService.ShowWarning(str);

			pd.FixDuplicateUuids();
			pd.Modified = true;
			return true;
		}
开发者ID:riking,项目名称:go-keepass2,代码行数:27,代码来源:MainForm_Functions.cs

示例5: AskIfSynchronizeInstead

		private static DialogResult AskIfSynchronizeInstead(IOConnectionInfo ioc)
		{
			VistaTaskDialog dlg = new VistaTaskDialog();

			string strText = string.Empty;
			if(ioc.GetDisplayName().Length > 0)
				strText += ioc.GetDisplayName() + MessageService.NewParagraph;
			strText += KPRes.FileChanged;

			dlg.CommandLinks = true;
			dlg.WindowTitle = PwDefs.ShortProductName;
			dlg.Content = strText;
			dlg.SetIcon(VtdCustomIcon.Question);

			dlg.MainInstruction = KPRes.OverwriteExistingFileQuestion;
			dlg.AddButton((int)DialogResult.Yes, KPRes.Synchronize, KPRes.FileChangedSync);
			dlg.AddButton((int)DialogResult.No, KPRes.Overwrite, KPRes.FileChangedOverwrite);
			dlg.AddButton((int)DialogResult.Cancel, KPRes.Cancel, KPRes.FileSaveQOpCancel);

			DialogResult dr;
			if(dlg.ShowDialog()) dr = (DialogResult)dlg.Result;
			else
			{
				strText += MessageService.NewParagraph;
				strText += @"[" + KPRes.Yes + @"]: " + KPRes.Synchronize + @". " +
					KPRes.FileChangedSync + MessageService.NewParagraph;
				strText += @"[" + KPRes.No + @"]: " + KPRes.Overwrite + @". " +
					KPRes.FileChangedOverwrite + MessageService.NewParagraph;
				strText += @"[" + KPRes.Cancel + @"]: " + KPRes.FileSaveQOpCancel;

				dr = MessageService.Ask(strText, PwDefs.ShortProductName,
					MessageBoxButtons.YesNoCancel);
			}

			return dr;
		}
开发者ID:riking,项目名称:go-keepass2,代码行数:36,代码来源:MainForm_Functions.cs

示例6: PostSavingEx

		private void PostSavingEx(bool bPrimary, PwDatabase pwDatabase,
			IOConnectionInfo ioc, IStatusLogger sl)
		{
			if(ioc == null) { Debug.Assert(false); return; }

			byte[] pbIO = null;
			if(Program.Config.Application.VerifyWrittenFileAfterSaving)
			{
				pbIO = WinUtil.HashFile(ioc);
				Debug.Assert((pbIO != null) && (pwDatabase.HashOfLastIO != null));
				if(!MemUtil.ArraysEqual(pbIO, pwDatabase.HashOfLastIO))
					MessageService.ShowWarning(ioc.GetDisplayName(),
						KPRes.FileVerifyHashFail, KPRes.FileVerifyHashFailRec);
			}

			if(bPrimary)
			{
#if DEBUG
				Debug.Assert(MemUtil.ArraysEqual(pbIO, pwDatabase.HashOfFileOnDisk));

				try
				{
					PwDatabase pwCheck = new PwDatabase();
					pwCheck.Open(ioc.CloneDeep(), pwDatabase.MasterKey, null);

					Debug.Assert(MemUtil.ArraysEqual(pwDatabase.HashOfLastIO,
						pwCheck.HashOfLastIO));

					uint uGroups1, uGroups2, uEntries1, uEntries2;
					pwDatabase.RootGroup.GetCounts(true, out uGroups1, out uEntries1);
					pwCheck.RootGroup.GetCounts(true, out uGroups2, out uEntries2);
					Debug.Assert((uGroups1 == uGroups2) && (uEntries1 == uEntries2));
				}
				catch(Exception exVerify) { Debug.Assert(false, exVerify.Message); }
#endif

				m_mruList.AddItem(ioc.GetDisplayName(), ioc.CloneDeep());

				// SetLastUsedFile(ioc);

				// if(Program.Config.Application.CreateBackupFileAfterSaving && bHashValid)
				// {
				//	try { pwDatabase.CreateBackupFile(sl); }
				//	catch(Exception exBackup)
				//	{
				//		MessageService.ShowWarning(KPRes.FileBackupFailed, exBackup);
				//	}
				// }

				// ulong uTotalBinSize = 0;
				// EntryHandler ehCnt = delegate(PwEntry pe)
				// {
				//	foreach(KeyValuePair<string, ProtectedBinary> kvpCnt in pe.Binaries)
				//	{
				//		uTotalBinSize += kvpCnt.Value.Length;
				//	}
				//
				//	return true;
				// };
				// pwDatabase.RootGroup.TraverseTree(TraversalMethod.PreOrder, null, ehCnt);
			}

			RememberKeySources(pwDatabase);
			WinUtil.FlushStorageBuffers(ioc.Path, true);
		}
开发者ID:riking,项目名称:go-keepass2,代码行数:65,代码来源:MainForm_Functions.cs

示例7: OpenDatabaseInternal

		private PwDatabase OpenDatabaseInternal(IOConnectionInfo ioc,
			CompositeKey cmpKey, out bool bAbort)
		{
			bAbort = false;

			PerformSelfTest();

			ShowWarningsLogger swLogger = CreateShowWarningsLogger();
			swLogger.StartLogging(KPRes.OpeningDatabase, true);

			PwDocument ds = null;
			string strPathNrm = ioc.Path.Trim().ToLower();
			for(int iScan = 0; iScan < m_docMgr.Documents.Count; ++iScan)
			{
				if(m_docMgr.Documents[iScan].LockedIoc.Path.Trim().ToLower() == strPathNrm)
					ds = m_docMgr.Documents[iScan];
				else if(m_docMgr.Documents[iScan].Database.IOConnectionInfo.Path == strPathNrm)
					ds = m_docMgr.Documents[iScan];
			}

			PwDatabase pwDb;
			if(ds == null) pwDb = m_docMgr.CreateNewDocument(true).Database;
			else pwDb = ds.Database;

			Exception ex = null;
			try
			{
				pwDb.Open(ioc, cmpKey, swLogger);

#if DEBUG
				byte[] pbDiskDirect = WinUtil.HashFile(ioc);
				Debug.Assert(MemUtil.ArraysEqual(pbDiskDirect, pwDb.HashOfFileOnDisk));
#endif
			}
			catch(Exception exLoad)
			{
				ex = exLoad;
				pwDb = null;
			}

			swLogger.EndLogging();

			if(pwDb == null)
			{
				if(ds == null) m_docMgr.CloseDatabase(m_docMgr.ActiveDatabase);
			}

			if(ex != null)
			{
				string strMsg = MessageService.GetLoadWarningMessage(
					ioc.GetDisplayName(), ex,
					(Program.CommandLineArgs[AppDefs.CommandLineOptions.Debug] != null));

				bool bShowStd = true;
				if(!ioc.IsLocalFile())
				{
					VistaTaskDialog vtd = new VistaTaskDialog();
					vtd.CommandLinks = false;
					vtd.Content = strMsg;
					vtd.DefaultButtonID = (int)DialogResult.Cancel;
					// vtd.VerificationText = KPRes.CredSpecifyDifferent;
					vtd.WindowTitle = PwDefs.ShortProductName;

					vtd.SetIcon(VtdIcon.Warning);
					vtd.AddButton((int)DialogResult.Cancel, KPRes.Ok, null);
					vtd.AddButton((int)DialogResult.Retry,
						KPRes.CredSpecifyDifferent, null);

					if(vtd.ShowDialog(this))
					{
						bShowStd = false;

						// if(vtd.ResultVerificationChecked)
						if(vtd.Result == (int)DialogResult.Retry)
						{
							IOConnectionInfo iocNew = ioc.CloneDeep();
							// iocNew.ClearCredentials(false);
							iocNew.CredSaveMode = IOCredSaveMode.NoSave;
							iocNew.IsComplete = false;
							// iocNew.Password = string.Empty;

							OpenDatabase(iocNew, null, false);

							bAbort = true;
						}
					}
				}

				if(bShowStd) MessageService.ShowWarning(strMsg);
				// MessageService.ShowLoadWarning(ioc.GetDisplayName(), ex,
				//	(Program.CommandLineArgs[AppDefs.CommandLineOptions.Debug] != null));
			}

			return pwDb;
		}
开发者ID:riking,项目名称:go-keepass2,代码行数:95,代码来源:MainForm_Functions.cs

示例8: Create

            // Throws on error
            public static LockFileInfo Create(IOConnectionInfo iocLockFile)
            {
                LockFileInfo lfi;
                Stream s = null;
                try
                {
                    byte[] pbID = CryptoRandom.Instance.GetRandomBytes(16);
                    string strTime = TimeUtil.SerializeUtc(DateTime.Now);

                    lfi = new LockFileInfo(Convert.ToBase64String(pbID), strTime,
                #if KeePassUAP
                        EnvironmentExt.UserName, EnvironmentExt.MachineName,
                        EnvironmentExt.UserDomainName);
                #elif KeePassLibSD
                        string.Empty, string.Empty, string.Empty);
                #else
                        Environment.UserName, Environment.MachineName,
                        Environment.UserDomainName);
                #endif

                    StringBuilder sb = new StringBuilder();
                #if !KeePassLibSD
                    sb.AppendLine(LockFileHeader);
                    sb.AppendLine(lfi.ID);
                    sb.AppendLine(strTime);
                    sb.AppendLine(lfi.UserName);
                    sb.AppendLine(lfi.Machine);
                    sb.AppendLine(lfi.Domain);
                #else
                    sb.Append(LockFileHeader + MessageService.NewLine);
                    sb.Append(lfi.ID + MessageService.NewLine);
                    sb.Append(strTime + MessageService.NewLine);
                    sb.Append(lfi.UserName + MessageService.NewLine);
                    sb.Append(lfi.Machine + MessageService.NewLine);
                    sb.Append(lfi.Domain + MessageService.NewLine);
                #endif

                    byte[] pbFile = StrUtil.Utf8.GetBytes(sb.ToString());

                    s = IOConnection.OpenWrite(iocLockFile);
                    if(s == null) throw new IOException(iocLockFile.GetDisplayName());
                    s.Write(pbFile, 0, pbFile.Length);
                }
                finally { if(s != null) s.Close(); }

                return lfi;
            }
开发者ID:Stoom,项目名称:KeePass,代码行数:48,代码来源:FileLock.cs

示例9: Import

		public static bool? Import(PwDatabase pd, FileFormatProvider fmtImp,
			IOConnectionInfo iocImp, PwMergeMethod mm, CompositeKey cmpKey)
		{
			if(pd == null) { Debug.Assert(false); return false; }
			if(fmtImp == null) { Debug.Assert(false); return false; }
			if(iocImp == null) { Debug.Assert(false); return false; }
			if(cmpKey == null) cmpKey = new CompositeKey();

			if(!AppPolicy.Try(AppPolicyId.Import)) return false;
			if(!fmtImp.TryBeginImport()) return false;

			PwDatabase pdImp = new PwDatabase();
			pdImp.New(new IOConnectionInfo(), cmpKey);
			pdImp.MemoryProtection = pd.MemoryProtection.CloneDeep();

			Stream s = IOConnection.OpenRead(iocImp);
			if(s == null)
				throw new FileNotFoundException(iocImp.GetDisplayName() +
					MessageService.NewLine + KPRes.FileNotFoundError);

			try { fmtImp.Import(pdImp, s, null); }
			finally { s.Close(); }

			pd.MergeIn(pdImp, mm);
			return true;
		}
开发者ID:riking,项目名称:go-keepass2,代码行数:26,代码来源:ImportUtil.cs

示例10: GetFilePath

 public IOConnectionInfo GetFilePath(IOConnectionInfo folderPath, string filename)
 {
     try
     {
         return IOConnectionInfo.FromPath(
         ListContents(folderPath).Where(desc => { return desc.DisplayName == filename; })
             .Single()
             .Path);
     }
     catch (Exception e)
     {
         throw new Exception("Error finding " + filename + " in " + folderPath.GetDisplayName(), e);
     }
 }
开发者ID:pythe,项目名称:wristpass,代码行数:14,代码来源:JavaFileStorage.cs

示例11: OpenDatabaseInternal

        private PwDatabase OpenDatabaseInternal(IOConnectionInfo ioc, CompositeKey cmpKey)
        {
            PerformSelfTest();

            ShowWarningsLogger swLogger = CreateShowWarningsLogger();
            swLogger.StartLogging(KPRes.OpeningDatabase, true);

            PwDocument ds = null;
            string strPathNrm = ioc.Path.Trim().ToLower();
            for(int iScan = 0; iScan < m_docMgr.Documents.Count; ++iScan)
            {
                if(m_docMgr.Documents[iScan].LockedIoc.Path.Trim().ToLower() == strPathNrm)
                    ds = m_docMgr.Documents[iScan];
                else if(m_docMgr.Documents[iScan].Database.IOConnectionInfo.Path == strPathNrm)
                    ds = m_docMgr.Documents[iScan];
            }

            PwDatabase pwDb;
            if(ds == null) pwDb = m_docMgr.CreateNewDocument(true).Database;
            else pwDb = ds.Database;

            try
            {
                pwDb.Open(ioc, cmpKey, swLogger);

            #if DEBUG
                byte[] pbDiskDirect = WinUtil.HashFile(ioc);
                Debug.Assert(MemUtil.ArraysEqual(pbDiskDirect, pwDb.HashOfFileOnDisk));
            #endif
            }
            catch(Exception ex)
            {
                MessageService.ShowLoadWarning(ioc.GetDisplayName(), ex);
                pwDb = null;
            }

            swLogger.EndLogging();

            if(pwDb == null)
            {
                if(ds == null) m_docMgr.CloseDatabase(m_docMgr.ActiveDatabase);
            }

            return pwDb;
        }
开发者ID:elitak,项目名称:keepass,代码行数:45,代码来源:MainForm_Functions.cs

示例12: PostSavingEx

        private void PostSavingEx(bool bPrimary, PwDatabase pwDatabase, IOConnectionInfo ioc)
        {
            if(ioc == null) { Debug.Assert(false); return; }

            byte[] pbIO = WinUtil.HashFile(ioc);
            Debug.Assert((pbIO != null) && (pwDatabase.HashOfLastIO != null));
            if(pwDatabase.HashOfLastIO != null)
            {
                if(!MemUtil.ArraysEqual(pbIO, pwDatabase.HashOfLastIO))
                {
                    MessageService.ShowWarning(ioc.GetDisplayName(), KPRes.FileVerifyHashFail,
                        KPRes.FileVerifyHashFailRec);
                }
            }

            if(bPrimary)
            {
            #if DEBUG
                Debug.Assert(MemUtil.ArraysEqual(pbIO, pwDatabase.HashOfFileOnDisk));

                try
                {
                    PwDatabase pwCheck = new PwDatabase();
                    pwCheck.Open(ioc.CloneDeep(), pwDatabase.MasterKey, null);

                    Debug.Assert(MemUtil.ArraysEqual(pwDatabase.HashOfLastIO,
                        pwCheck.HashOfLastIO));

                    uint uGroups1, uGroups2, uEntries1, uEntries2;
                    pwDatabase.RootGroup.GetCounts(true, out uGroups1, out uEntries1);
                    pwCheck.RootGroup.GetCounts(true, out uGroups2, out uEntries2);
                    Debug.Assert((uGroups1 == uGroups2) && (uEntries1 == uEntries2));
                }
                catch(Exception exVerify) { Debug.Assert(false, exVerify.Message); }
            #endif

                m_mruList.AddItem(ioc.GetDisplayName(), ioc.CloneDeep());

                Program.Config.Application.LastUsedFile = ioc.CloneDeep();
            }

            WinUtil.FlushStorageBuffers(ioc.Path, true);
        }
开发者ID:jonbws,项目名称:strengthreport,代码行数:43,代码来源:MainForm_Functions.cs

示例13: GetDisplayName

 public string GetDisplayName(IOConnectionInfo ioc)
 {
     return ioc.GetDisplayName();
 }
开发者ID:pythe,项目名称:wristpass,代码行数:4,代码来源:BuiltInFileStorage.cs

示例14: OnCreate

        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            _design.ApplyTheme();

            //use FlagSecure to make sure the last (revealed) character of the master password is not visible in recent apps
            if (PreferenceManager.GetDefaultSharedPreferences(this).GetBoolean(
                GetString(Resource.String.ViewDatabaseSecure_key), true))
            {
                Window.SetFlags(WindowManagerFlags.Secure, WindowManagerFlags.Secure);
            }

            Intent i = Intent;

            //only load the AppTask if this is the "first" OnCreate (not because of kill/resume, i.e. savedInstanceState==null)
            // and if the activity is not launched from history (i.e. recent tasks) because this would mean that
            // the Activity was closed already (user cancelling the task or task complete) but is restarted due recent tasks.
            // Don't re-start the task (especially bad if tak was complete already)
            if (Intent.Flags.HasFlag(ActivityFlags.LaunchedFromHistory))
            {
                AppTask = new NullTask();
            }
            else
            {
                AppTask = AppTask.GetTaskInOnCreate(savedInstanceState, Intent);
            }

            String action = i.Action;

            _prefs = PreferenceManager.GetDefaultSharedPreferences(this);
            _rememberKeyfile = _prefs.GetBoolean(GetString(Resource.String.keyfile_key), Resources.GetBoolean(Resource.Boolean.keyfile_default));

            _ioConnection = new IOConnectionInfo();

            if (action != null && action.Equals(ViewIntent))
            {
                if (!GetIocFromViewIntent(i)) return;
            }
            else if ((action != null) && (action.Equals(Intents.StartWithOtp)))
            {
                if (!GetIocFromOtpIntent(savedInstanceState, i)) return;
                _keepPasswordInOnResume = true;
            }
            else
            {
                SetIoConnectionFromIntent(_ioConnection, i);
                var keyFileFromIntent = i.GetStringExtra(KeyKeyfile);
                if (keyFileFromIntent != null)
                {
                    Kp2aLog.Log("try get keyfile from intent");
                    _keyFileOrProvider = IOConnectionInfo.SerializeToString(IOConnectionInfo.FromPath(keyFileFromIntent));
                    Kp2aLog.Log("try get keyfile from intent ok");
                }
                else
                {
                    _keyFileOrProvider = null;
                }
                _password = i.GetStringExtra(KeyPassword) ?? "";
                if (string.IsNullOrEmpty(_keyFileOrProvider))
                {
                    _keyFileOrProvider = GetKeyFile(_ioConnection.Path);
                }
                if ((!string.IsNullOrEmpty(_keyFileOrProvider)) || (_password != ""))
                {
                    _keepPasswordInOnResume = true;
                }
            }

            if (App.Kp2a.GetDb().Loaded && App.Kp2a.GetDb().Ioc != null &&
                App.Kp2a.GetDb().Ioc.GetDisplayName() != _ioConnection.GetDisplayName())
            {
                // A different database is currently loaded, unload it before loading the new one requested
                App.Kp2a.LockDatabase(false);
            }

            SetContentView(Resource.Layout.password);
            InitializeFilenameView();

            if (KeyProviderType == KeyProviders.KeyFile)
            {
                UpdateKeyfileIocView();
            }

            FindViewById<EditText>(Resource.Id.password).TextChanged +=
                (sender, args) =>
                {
                    _password = FindViewById<EditText>(Resource.Id.password).Text;
                    UpdateOkButtonState();
                };
            FindViewById<EditText>(Resource.Id.password).EditorAction += (sender, args) =>
                {
                    if ((args.ActionId == ImeAction.Done) || ((args.ActionId == ImeAction.ImeNull) && (args.Event.Action == KeyEventActions.Down)))
                        OnOk();
                };

            FindViewById<EditText>(Resource.Id.pass_otpsecret).TextChanged += (sender, args) => UpdateOkButtonState();

            EditText passwordEdit = FindViewById<EditText>(Resource.Id.password);
            passwordEdit.Text = _password;
            passwordEdit.RequestFocus();
//.........这里部分代码省略.........
开发者ID:pythe,项目名称:wristpass,代码行数:101,代码来源:PasswordActivity.cs

示例15: IocChanged

 static bool IocChanged(IOConnectionInfo ioc, IOConnectionInfo other)
 {
     if ((ioc == null) || (other == null)) return false;
     return ioc.GetDisplayName() != other.GetDisplayName();
 }
开发者ID:pythe,项目名称:wristpass,代码行数:5,代码来源:TimeoutHelper.cs


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