/// <summary>
 ///     Determines whether [is message originator].
 /// </summary>
 /// <returns></returns>
 public bool IsMessageOriginator( )
 {
     return
         (MachineName.Equals(Identity.MachineName, StringComparison.InvariantCultureIgnoreCase) &&
          ProcessId.Equals(Identity.ProcessId) &&
          AppDomainId.Equals(Identity.AppDomainId));
 }
    public override bool Equals(object obj)
    {
        var other = obj as PaintMachineLookup;

        if (other == null)
        {
            return(false);
        }
        return(MachineName.Equals(other.MachineName) && Pass.Equals(other.Pass));
    }
 public void ConnectToComputer(string name)
 {
     if (!MachineName.Equals(name))
     {
         using (new WaitCursor())
         {
             MachineName = name;
             if (name.Equals(Environment.MachineName, StringComparison.OrdinalIgnoreCase))
             {
                 Caption = string.Format(Resources.IDS_SERVICES_CAPTION_LOCAL_MACHINE, ControllerName, name);
             }
             else
             {
                 Caption = string.Format(Resources.IDS_SERVICES_CAPTION_REMOTE_MACHINE, ControllerName, name);
             }
             MainWindow.Instance.UpdateTitle();
             MainWindow.Items.Clear();
             MainWindow.Instance.RefreshDisplay(null, null);
         }
     }
 }
Exemple #4
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        public override bool Equals(object obj)
        {
            if (obj == null || GetType() != obj.GetType())
            {
                return(false);
            }

            var  y = obj as PlayerInformation;
            bool r = MachineName.Equals(y.MachineName, StringComparison.CurrentCultureIgnoreCase) && Url.Equals(y.Url, StringComparison.CurrentCultureIgnoreCase);

            if (r)
            {
                if (AudioDevices.Count() == y.AudioDevices.Count())
                {
                    r = AudioDevices.Except(y.AudioDevices).Count() == 0;
                }
                else
                {
                    r = false;
                }
            }
            return(r);
        }