Ejemplo n.º 1
0
    // Update is called once per frame
    void Update()
    {
        Vector3    point = new Vector3(_camera.pixelWidth / 2, _camera.pixelHeight / 2, 0);
        Ray        ray   = _camera.ScreenPointToRay(point);
        RaycastHit hit;

        Physics.Raycast(ray, out hit, rayDistance);

        if (hit.collider)
        {
            GameObject      ob = hit.collider.gameObject;
            IInteractivable interactiveObject = ob.GetComponent <IInteractivable>();
            if (interactiveObject is IInteractivable)
            {
                interactiveObject.showText();
                if (interactiveObject is IActionable)
                {
                    IActionable actionObject = interactiveObject as IActionable;
                    MainIcon.GetComponent <UICursorIcon>().showAction();
                    if (Input.GetKeyDown(KeyCode.F))
                    {
                        actionObject.doAction();
                    }
                }
            }
        }
        else
        {
            _controller.changeText("");
            MainIcon.GetComponent <UICursorIcon>().showDefault();
        }
    }
Ejemplo n.º 2
0
        public DirectoryListItem(IActionable a)
            : base(a)
        {
            // Set up appearance
            verticalRightPanel = new StackPanel();
            displayNameTextBlock = new TextBlock();
            fullPathTextBlock = new TextBlock();
            image = new Image();

            this.Margin = this_Margin;
            this.Children.Add(image);
            this.Children.Add(verticalRightPanel);

            image.Source = new BitmapImage(getImageUri());
            image.Margin = image_Margin;
            image.Height = 45;
            image.Width = 41;
            image.Stretch = Stretch.Fill;

            verticalRightPanel.Orientation = Orientation.Vertical;
            verticalRightPanel.Children.Add(displayNameTextBlock);
            verticalRightPanel.Children.Add(fullPathTextBlock);

            displayNameTextBlock.Text = a.Name;
            displayNameTextBlock.FontSize = 45;
            displayNameTextBlock.Margin = displayNameTextBox_Margin;
            displayNameTextBlock.FontFamily = displayNameTextBox_FontFamily;
            displayNameTextBlock.TextWrapping = TextWrapping.NoWrap;

            fullPathTextBlock.Text = a.Path.PathString;
            fullPathTextBlock.Foreground = (Brush)App.Current.Resources["PhoneSubtleBrush"];
            fullPathTextBlock.Margin = fullPathTextBox_Margin;
            displayNameTextBlock.TextWrapping = TextWrapping.NoWrap;
        }
Ejemplo n.º 3
0
    private void OnTriggerStay(Collider other)
    {
        if (other.tag == "Ground" || other.tag == "Player" || _grabing != null)
        {
            return;
        }

        // Debug.Log("Colidded with: " + other.ToString());
        if (other.tag == "Pickable")
        {
            if (Input.GetKeyDown(KeyCode.E))
            {
                Take(other.gameObject);
            }
        }

        if (other.tag == "Shelf")
        {
            if (Input.GetKeyDown(KeyCode.Q))
            {
                IActionable actionable = other.GetComponent(typeof(IActionable)) as IActionable;
                actionable.Action();
            }
        }
    }
Ejemplo n.º 4
0
 public virtual void Action(IActionable target)
 {
     if (target != null)
     {
         target.AcceptAction(this.actionRequest);
     }
 }
Ejemplo n.º 5
0
        private void ActionEndUpdate()
        {
            if (!target.IsIdle)
            {
                return;
            }

            this.targetIndex++;

            if (targets.Count <= this.targetIndex)
            {
                if (!target.IsReaction)
                {
                    this.state.SetState(Phase.Idle);
                }

                else
                {
                    this.state.SetState(Phase.ReactionStart);
                }
            }
            else
            {
                target = targets[this.targetIndex];
                this.state.SetState(Phase.Action);
            }
        }
Ejemplo n.º 6
0
        //-------------------------------------------------------------------------
        // State:Attack Idle

        private void IdleEnter()
        {
            this.actor       = null;
            this.target      = null;
            this.targetIndex = 0;
            this.targets.Clear();
        }
Ejemplo n.º 7
0
 public ListActionEventArgs(IActionable component, ConsoleKeyInfo?sourceKeys, T item, GraphicsContext g)
 {
     Component = component;
     KeySource = sourceKeys;
     Item      = item;
     Graphics  = g;
 }
Ejemplo n.º 8
0
 /// <summary>
 /// アクションをする
 /// </summary>
 public override void Action(IActionable target)
 {
     if (target == null)
     {
         return;
     }
     target.AcceptAction(actionRequest);
 }
Ejemplo n.º 9
0
 public void OnAction()
 {
     if (closestInteractableObject != null)
     {
         IActionable actionableComponent = closestInteractableObject.GetComponent <IActionable>();
         actionableComponent.Action();
     }
 }
Ejemplo n.º 10
0
 private static List <InputAction> GetInputActions(this IActionable actionable)
 {
     if (actionable.UserConfig.InputGroups.TryGetValue(actionable.InputGroupName, out List <InputAction> inacs))
     {
         return(inacs);
     }
     return(new List <InputAction>());
 }
Ejemplo n.º 11
0
        public override void OnActionExitWhenActor(IActionable target)
        {
            switch (this.behavior)
            {
            case BehaviorType.Throw: OnThrowActionExit(target); break;

            default: break;
            }
        }
Ejemplo n.º 12
0
 public static ListingsListItem CreateListItem(IActionable a)
 {
     if (a is Document)
         return new DocumentListItem(a);
     else if (a is Directory)
         return new DirectoryListItem(a);
     else
         throw new Exception("Unexpected type");
 }
Ejemplo n.º 13
0
        public static Action GetAction(IActionable actionable, DbContext db, IAuthentication auth, string actionName, Framework.Core.Entities.User user)
        {
            var actionType = GetActionType(actionable.ActualType(), actionName);
            var action     = (Action)Activator.CreateInstance(actionType, actionable);

            action.Setup(db, user, auth);

            return(action);
        }
Ejemplo n.º 14
0
        private string InjectModuleActions(ModuleInfo ModuleInfo)
        {
            try
            {
                if (LoadControl(Page.ResolveUrl("~/" + ModuleInfo.ModuleControl.ControlSrc)) is IActionable)
                {
                    IActionable ctl = LoadControl(Page.ResolveUrl("~/" + ModuleInfo.ModuleControl.ControlSrc)) as IActionable;
                    if (ctl != null && ctl.ModuleActions != null)
                    {
                        foreach (ModuleAction rootAction in ctl.ModuleActions)
                        {
                            //Process Children
                            List <ModuleAction> actions = new List <ModuleAction>();
                            foreach (ModuleAction action in rootAction.Actions)
                            {
                                if (action.Visible)
                                {
                                    if ((Globals.IsAdminControl() == false) ||
                                        (action.Secure != SecurityAccessLevel.Anonymous && action.Secure != SecurityAccessLevel.View))
                                    {
                                        if (!action.Icon.Contains("://") &&
                                            !action.Icon.StartsWith("/") &&
                                            !action.Icon.StartsWith("~/"))
                                        {
                                            action.Icon = "~/images/" + action.Icon;
                                        }
                                        if (action.Icon.StartsWith("~/"))
                                        {
                                            action.Icon = Globals.ResolveUrl(action.Icon);
                                        }

                                        actions.Add(action);
                                    }
                                }
                            }

                            //var oSerializer = new JavaScriptSerializer();
                            //if (rootAction.Title == Localization.GetString("ModuleGenericActions.Action", Localization.GlobalResourceFile))
                            //{
                            //    AdminActionsJSON = oSerializer.Serialize(actions);
                            //}
                            //else
                            //{
                            //    if (rootAction.Title == Localization.GetString("ModuleSpecificActions.Action", Localization.GlobalResourceFile))
                            //    {
                            //        CustomActionsJSON = oSerializer.Serialize(actions);
                            //    }
                            //}
                        }
                    }
                }
            }
            catch { }

            return(string.Empty);
        }
Ejemplo n.º 15
0
    private static List <InputAction> GetInputActions(this IActionable @for)
    {
        List <InputAction> inacs;

        if (@for.UserConfig.InputGroups.TryGetValue(@for.InputGroupName, out inacs))
        {
            return(inacs);
        }
        return(new List <InputAction>());
    }
Ejemplo n.º 16
0
        public void LoadKinectDepthTrackingPlugin()
        {
            trackerKinectDepth = LoadTrackingPlugin("Tracking.KinectV1Depth");

            actionableKinectGestures = trackerKinectDepth as IActionable;
            if (actionableKinectGestures != null)
            {
                actionableKinectGestures.ActionOccured += ActionableKinectGestures_ActionOccured;
            }
        }
Ejemplo n.º 17
0
        //-------------------------------------------------------------------------
        // 攻撃関連

        /// <summary>
        /// 攻撃する
        /// </summary>
        public void Attack(IActionable target)
        {
            var attacker = FindAttacker();

            if (attacker != null)
            {
                //attacker.Attack(target);
                attacker.DoAttackMotion();
            }
        }
Ejemplo n.º 18
0
        public void LoadUbisenseTrackingPlugin()
        {
            trackerUbisense = LoadTrackingPlugin("Tracking.Ubisense");

            actionableUbisense = trackerUbisense as IActionable;
            if (actionableUbisense != null)
            {
                actionableUbisense.ActionOccured += ActionableUbisense_ActionOccured;
            }
        }
Ejemplo n.º 19
0
        //-------------------------------------------------------------------------
        // State:Attack Start

        private void ActionStartEnter()
        {
            actor.OnActionStartWhenActor();
            target = targets.TryGet(targetIndex);

            if (target != null)
            {
                target.OnActionStartWhenTarget();
            }
        }
Ejemplo n.º 20
0
        protected IListingsListItem(IActionable a)
        {
            ActionableItem = a;
            this.Orientation = Orientation.Horizontal;
            this.RenderTransform = new CompositeTransform();

            _contentPanel = new StackPanel();
            _contentPanel.Orientation = Orientation.Horizontal;
            this.Children.Add(_contentPanel);
        }
    private void UseAction()
    {
        IActionable actionable = itemInstance.GetComponent <IActionable>() as IActionable;

        if (actionable != null)
        {
            if (actionable.Action())
            {
                anim.Play("shoot");
            }
        }
    }
Ejemplo n.º 22
0
        private static void ResolveAction(JObject jObject, [NotNull] IActionable hotkey)
        {
            var actionToken = jObject[nameof(Hotkey.Action)];

            if (actionToken?.Type == JTokenType.String)
            {
                string actionString = actionToken.Value <string>();
                if (Enum.TryParse(actionString, out ToastifyActionEnum _))
                {
                    hotkey.Action = JsonConvert.DeserializeObject <ToastifyAction>($"\"{actionString}\"", new ToastifyActionAsEnumJsonConverter());
                }
            }
        }
Ejemplo n.º 23
0
    private static void Validate(this IActionable @for, Func <List <InputAction>, InputAction, bool> match,
                                 string message, Func <HashSet <string>, Func <string>, string[]> args)
    {
        List <InputAction> inacs   = @for.GetInputActions();
        HashSet <string>   removed = new HashSet <string>();

        inacs.RemoveAll(i => match(inacs, i) && (removed.Add(i.ActionName) || true));

        if (removed.Any())
        {
            @for.Console.Warning(message, args(removed, () => string.Join(" ", removed.Select(s => "\"" + s + "\"").ToArray())));
        }
    }
Ejemplo n.º 24
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Literal     lit        = new Literal();
            IActionable actionable = ModuleControl as IActionable;

            if (actionable != null)
            {
                string JsonAction = "";

                JsonAction = "[";
                foreach (ModuleAction action in actionable.ModuleActions)
                {
                    if (ModulePermissionController.HasModuleAccess(action.Secure, "CONTENT", ModuleConfiguration))
                    {
                        string url = string.Empty;
                        if (!string.IsNullOrEmpty(action.Url) && action.Url.Length > 0)
                        {
                            var splitarray = action.Url.Split('#');
                            url = splitarray[0];
                            if (url.Contains("?"))
                            {
                                url += "&skinsrc=" + "[g]skins/vanjaro/base";
                            }
                            else
                            {
                                url += "?skinsrc=" + "[g]skins/vanjaro/base";
                            }
                            if (splitarray.Length > 1)
                            {
                                url += "#" + splitarray[1];
                            }
                        }
                        JsonAction += "{\"Title\":\"" + action.Title + "\", \"Icon\":\"" + action.Icon + "\",\"Url\":\"" + url + "\",\"NewWindow\":\"" + action.NewWindow + "\",\"ModuleId\":\"" + ModuleConfiguration.ModuleID + "\"},";
                    }
                }

                JsonAction  = JsonAction.TrimEnd(',');
                JsonAction += "]";

                if (JsonAction != "[]")
                {
                    lit.Text = "<script type=\"text/javascript\" data-actionmid=\"" + ModuleConfiguration.ModuleID + "\">" + JsonAction + "</script>";
                }
            }
            if (HasSettings(Page, ModuleConfiguration))
            {
                lit.Text += "<script type=\"text/javascript\" data-settingsmid=\"" + ModuleConfiguration.ModuleID + "\"></script>";
            }

            Page.Header.Controls.Add(lit);
        }
Ejemplo n.º 25
0
        public DocumentListItem(IActionable a)
            : base(a)
        {
            // Set up appearance
            displayNameTextBlock = new TextBlock();

            this.Children.Add(displayNameTextBlock);

            displayNameTextBlock.Text = a.DisplayName;
            displayNameTextBlock.Margin = displayNameTextBox_Margin;
            displayNameTextBlock.FontFamily = displayNameTextBox_FontFamily;
            displayNameTextBlock.TextWrapping = TextWrapping.Wrap;
            displayNameTextBlock.FontSize = (Double)App.Current.Resources["PhoneFontSizeExtraLarge"];
        }
Ejemplo n.º 26
0
        //-------------------------------------------------------------------------
        // State:ReactionStart

        private void ReactionStartEnter()
        {
            // actorとtargetを入れ替える
            var target = this.targets[0];

            this.targets.Clear();
            targets.Add(this.actor);
            this.actor = target;

            // Reactionモードにして、targetIndexも0に戻す
            this.targetIndex = 0;

            // 各種コールバックを呼ぶ
            actor.OnReactionStartWhenActor();
            target.OnReactionStartWhenTarget();
        }
Ejemplo n.º 27
0
    public static void SetUp(this IActionable @this)
    {
        @this.Validate((all, i) => [email protected](i.ActionName),
                       "Ignoring unknown input action{0} configured for {1}: {2}.", (r, rs) => new string[]
        {
            r.Skip(1).Any() ? "s" : "", @this.InputGroupName, rs()
        });

        @this.Validate((all, i) => all.Any(i.Duplicate),
                       "Ignoring duplicate {0} keybindings for: {1}.", (r, rs) => new string[]
        {
            @this.InputGroupName, rs()
        });

        KeyEventHandler callback = null;

        callback = (sender, ev) =>
        {
            try
            {
                if (@this.Holder == null)
                {
                    hook.KeyDown -= callback;
                }
                else if (CameraVisibility.Focused && @this.Holder.isActiveAndEnabled)
                {
                    Action action;
                    foreach (string actionName in @this.GetInputActions().Where(i => i.Activated(ev)).Select(i => i.ActionName))
                    {
                        if (@this.Actions.TryGetValue(actionName, out action))
                        {
                            action();
                        }
                        else
                        {
                            @this.Console.Warning("Ignoring unknown action name for {0}: \"{1}\".", @this.InputGroupName, actionName);
                        }
                    }
                }
            }
            catch (Exception e)
            {
                Debug.LogException(e, @this.Holder);
            }
        };
        hook.KeyDown += callback;
    }
Ejemplo n.º 28
0
        public Entity(Configuration.Dimmer dimmer, WifiLink.IBridge bridge, With.Messaging.Client.IEndpoint clientEndpoint)
        {
            _dimmer         = dimmer;
            _bridge         = bridge;
            _clientEndpoint = clientEndpoint;

            _on    = new On(dimmer, bridge);
            _off   = new Off(dimmer, bridge);
            _level = new Level(dimmer, bridge);

            _messages = new Subject <Message.IMessage>();

            Identity    = _dimmer.ToEntityIdentity();
            Description = _dimmer.ToEntityDescription();
            Observables = Enumerable.Empty <IObservable>();
            Actionables = new IActionable[] { _off, _on, _level };
        }
Ejemplo n.º 29
0
    public static void SetUp(this IActionable actionable)
    {
        actionable.Validate((all, i) => !actionable.Actions.ContainsKey(i.ActionName),
                            "Ignoring unknown input action{0} configured for {1}: {2}.", (r, rs) => new string[]
        {
            r.Skip(1).Any() ? "s" : "", actionable.InputGroupName, rs(),
        });

        actionable.Validate((all, i) => all.Any(i.Duplicate),
                            "Ignoring duplicate {0} keybindings for: {1}.", (r, rs) => new string[]
        {
            actionable.InputGroupName, rs()
        });

        void callback(object sender, KeyEventArgs ev)
        {
            try
            {
                if (actionable.Holder == null)
                {
                    GlobalHook.KeyDown -= callback;
                }
                else if (CameraVisibility.Focused && actionable.Holder.isActiveAndEnabled)
                {
                    foreach (string actionName in actionable.GetInputActions().Where(i => i.Activated(ev)).Select(i => i.ActionName))
                    {
                        if (actionable.Actions.TryGetValue(actionName, out Action action))
                        {
                            action();
                        }
                        else
                        {
                            actionable.Console.Warning("Ignoring unknown action name for {0}: \"{1}\".", actionable.InputGroupName, actionName);
                        }
                    }
                }
            }
            catch (Exception e)
            {
                Debug.LogException(e, actionable.Holder);
            }
        }

        GlobalHook.KeyDown += callback;
    }
Ejemplo n.º 30
0
        /// <summary>
        /// Checks the target object to analyze if it is a interactive object.
        /// </summary>
        private void SearchInteractiveObjects()
        {
            if (!m_ItemCoolDown)
            {
                if (Target)
                {
                    IActionable target = Target.GetComponent <IActionable>();

                    if (target != null)
                    {
                        if (InputManager.GetButtonDown(m_UseButton))
                        {
                            StartCoroutine(Interact(target));
                        }
                    }
                }
            }
        }
Ejemplo n.º 31
0
        private void OnThrowActionExit(IActionable target)
        {
            // ターゲットがいなければ床に落ちる
            if (target == null)
            {
                ItemManager.Instance.AddItem(this);
                return;
            }

            // ターゲットがいれば当たったかどうかで判断
            if (target.ActionResponse.IsHit)
            {
                Destory();
            }
            else
            {
                ItemManager.Instance.AddItem(this);
            }
        }
Ejemplo n.º 32
0
 public void MainShow(IActionable a)
 {
     act = a;
     try
     {
         a.MainFunction();
         PrintWin(a);
     }
     catch (NullReferenceException nfe)
     {
         Console.WriteLine(nfe.Message);
     }
     catch (ArgumentOutOfRangeException ae)
     {
         Console.WriteLine(ae.Message);
     }
     catch (Exception e)
     {
         Console.WriteLine(e.Message);
     }
 }
Ejemplo n.º 33
0
        static void Main(string[] args)
        {
            //var type = "dog";

            //if (type == "dog")
            //{
            //    Console.WriteLine("bark");
            //} else if (type == "cat")
            //{
            //    Console.Write("Meow");
            //} else if (type == "bird")
            //{
            //    Console.Write("Cheep Cheep");
            //}


            //refactor
            IActionable mysound = AnimalCreator.Create("dog");

            Console.WriteLine(mysound.MakeSound());

            Console.ReadKey();
        }
Ejemplo n.º 34
0
    void Update()
    {
        float moveX = Input.GetAxis("Horizontal");

        PlayerOrientation(moveX);
        rb.MovePosition(rb.position + Vector2.right * moveX * speed * Time.deltaTime);

        if (Input.GetKeyDown(KeyCode.Space))
        {
            rb.AddForce(Vector2.up * 8000);
        }

        if (Input.GetKeyDown(KeyCode.F) && currentActionable != null)
        {
            Debug.Log("current != null");
            IActionable actionable = currentActionable.GetComponent <IActionable>();
            if (actionable != null)
            {
                Debug.Log("actionable.Action()");
                actionable.Action();
            }
        }
    }
Ejemplo n.º 35
0
 public ActionableException(IActionable data)
 {
     this.ActionableItem = data;
 }
Ejemplo n.º 36
0
 public MyUri AddArg(IActionable value)
 {
     return this.AddArg("param", value.Path.PathString);
 }
Ejemplo n.º 37
0
 private void TryMoveItem(IActionable a, Directory newParent)
 {
     var newLocation = Utils.CreateActionableFromPath(new PathStr(newParent.Path.NavigateIn(a.Name)));
     if (newLocation.Exists())
     {
         var type = a.GetType().Name.ToLower();
         MessageBoxResult r = MessageBox.Show(string.Format("There is already an {0} with the same name at the specified destination. Tap OK to overwrite the existing {0}, or Cancel to skip this item.", type), a.DisplayName, MessageBoxButton.OKCancel);
         if (r != MessageBoxResult.OK)
             return;
         newLocation.Delete(true);
     }
     try
     {
         a.Move(newParent);
     }
     catch (Exception ex)
     {
         return;
     }
 }
Ejemplo n.º 38
0
 private void TryMoveItem(IActionable a, Directory newLoc)
 {
     try
     {
         a.Move(newLoc);
     }
     catch (ActionableException)
     {
         MessageBoxResult r = MessageBox.Show("There is already a document or directory with the same name at this " +
             "location. Tap OK to overwrite this item, or Cancel to skip it.", a.Name, MessageBoxButton.OKCancel);
         if (r == MessageBoxResult.OK)
         {
             (new Directory(newLoc.Path.NavigateIn(a.Name))).Delete();
             TryMoveItem(a, newLoc);
         }
     }
 }
Ejemplo n.º 39
0
        private void NavigateOnSuccess(IActionable act)
        {
            var prevPage = GetPreviousPageUri();
            act.IsTemp = false;

            if (prevPage == null)
            {
                Utils.TryGoBack(NavigationService);
            }
            else if ((prevPage.StartsWith(App.AddNewItem.OriginalString) && _actionable is Document))
            {
                act.Open(NavigationService);
            }
            else if (prevPage.StartsWith(App.DocumentEditor.OriginalString))
            {
                NavigationService.RemoveBackEntry();
                act.Open(NavigationService);
            }
            else
            {
                Utils.TryGoBack(NavigationService);
            }
        }
Ejemplo n.º 40
0
        private bool IsInIgnoreList(Directory dest, IActionable itemToMove)
        {
            bool b = false;
            foreach (IActionable a in _actionables)
                b = b || a.Path.Equals(dest.Path);

            return b ||
                   dest.Path.PathString.Equals("Shared") ||
                   dest.Path.IsInTrash;
        }
Ejemplo n.º 41
0
 public static void CheckForExists(IActionable param, string paramName)
 {
     CheckForNull(param, paramName);
     if (!param.Exists())
         throw new ArgumentException("The parameter " + paramName + " did not exist.");
 }
Ejemplo n.º 42
0
        private void IconButton_Okay_Click(object sender, EventArgs e)
        {
            // Ensure the filename is unique.
            string newName = NewNameBox.Text.Trim();
            IList<string> badCharsInName = new List<string>();
            if (!Utils.IsValidFileName(newName, out badCharsInName))
            {
                AlertUserBadChars(badCharsInName);
                return;
            }
            if (!IsUniqueFileName(newName))
            {
                AlertUserDuplicateName();
                return;
            }
            if (newName.StartsWith("."))
            {
                AlertUserDotFile();
                return;
            }

            // Rename the item
            _actionable = _actionable.Rename(newName);
            _actionable.IsTemp = false;

            if (_actionable.IsTemp)
                _actionable.Open(NavigationService);
            else
                NavigationService.GoBack();
        }
Ejemplo n.º 43
0
        private void GetArgs()
        {
            IList<object> args = Utils.GetArguments();

            _actionable = (IActionable)args[0];
        }
Ejemplo n.º 44
0
 private void GetArgs()
 {
     _actionable = Utils.CreateActionableFromPath(new PathStr(NavigationContext.QueryString["param"]));
     if (NavigationContext.QueryString.ContainsKey("istemp"))
         _actionable.IsTemp = bool.Parse(NavigationContext.QueryString["istemp"]);
 }
Ejemplo n.º 45
0
        private bool NewCOM()
        {
            try
            {
                sysClient = new EncoreClient();
            }
            catch(Exception ex)
            {
                Logger.Log("Could not connect to COM: " + ex.Message);
                return false;
            }

            return true;
        }
Ejemplo n.º 46
0
        private bool NewWcf()
        {
            try
            {
                sysClient = new WCFClient(fileSettings.WcfConnString);
            }
            catch (Exception ex)
            {
                Logger.Log("Could not connect to WCF: " + ex.Message);
                return false;
            }

            return true;
        }
Ejemplo n.º 47
0
 /// <summary>
 /// Removes the favorite at the Path and adds a favorite at the newPath
 /// </summary>
 /// <param name="Path2"></param>
 /// <param name="newPath"></param>
 public static void ReplaceFavorite(IActionable oldFave, IActionable newFave)
 {
     oldFave.IsFavorite = false;
     newFave.IsFavorite = true;
 }
Ejemplo n.º 48
0
 //public bool HasVariableOpacity;
 //public static readonly DependencyProperty ListingOpacityProperty = DependencyProperty.Register("ListingOpacity", typeof(double), typeof(ListingsListItem), null);
 //public double ListingOpacity
 //{
 //    get
 //    {
 //        return (double)GetValue(ListingOpacityProperty);
 //    }
 //    set
 //    {
 //        if (HasVariableOpacity)
 //            SetValue(ListingOpacityProperty, value);
 //    }
 //}
 protected ListingsListItem(IActionable a)
 {
     // Initialize fields
     ActionableItem = a;
     this.Orientation = Orientation.Horizontal;
 }