public void SetDragArea(MonoDroid.DragArea.DragArea dragArea, TextView reportView)
        {
            this.Touch += (sender, e) => {
                if (e.E.Action == MotionEventActions.Down)
                {
                    Bundle data = new Bundle();
                    data.PutCharSequence("number", Text);
                    dragArea.StartDrag(data, new DrawableDragShadowBuilder(
                        this,
                        mTranslucentDot,
                        new Point(
                            (int)e.E.GetX() - PaddingLeft,
                            (int)e.E.GetY() - PaddingTop
                            )
                        )
                    );         
                }
            };

            dragArea.AddDragListener(this, new MyDragListener(this, reportView));
        }
Esempio n. 2
0
		private static bool CheckRegistryKeyForExecutable (UIntPtr key, string subkey, string valueName, MonoDroid.RegistryEx.Wow64 wow64, string subdir, string exe, TaskLoggingHelper log)
		{
			string key_name = string.Format (@"{0}\{1}\{2}", key == RegistryEx.CurrentUser ? "HKCU" : "HKLM", subkey, valueName);

			var path = NullIfEmpty (RegistryEx.GetValueString (key, subkey, valueName, wow64));

			if (path == null) {
				log.LogMessage ("  Key {0} not found.", key_name);
				return false;
			}

			if (!File.Exists (Path.Combine (path, subdir, exe))) {
				log.LogMessage ("  Key {0} found:\n    Path does not contain {1} in \\{2} ({3}).", key_name, exe, subdir, path);
				return false;
			}

			log.LogMessage ("  Key {0} found:\n    Path contains {1} in \\{2} ({3}).", key_name, exe, subdir, path);

			return true;
		}