public ActionResult <AccountsView> ViewAccounts()
        {
            var view = new AccountsView();

            view.Load();
            return(view);
        }
Example #2
0
        private void moveDownToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (SelectedAccountItem != null && SelectedAccountItem.Group != null)
            {
                ListViewGroup Group = SelectedAccountItem.Group;
                int           Index = AccountsView.Groups.IndexOf(Group);

                if (Index < AccountsView.Groups.Count - 1)
                {
                    List <ListViewGroup> gs = new List <ListViewGroup>();

                    foreach (ListViewGroup group in AccountsView.Groups)
                    {
                        if (group == Group)
                        {
                            continue;
                        }

                        gs.Insert(gs.Count, group);
                    }

                    gs.Insert(Index + 1, Group);

                    AccountsView.BeginUpdate();
                    AccountsView.Groups.Clear();
                    AccountsView.Groups.AddRange(gs.ToArray());
                    AccountsView.EndUpdate();
                }
            }
        }
Example #3
0
 private void ShowSelectedContactTabs(MemberModel member)
 {
     if (member != null)
     {
         _originalMember = member.Clone();
         if (CanViewContactDetails)
         {
             ContactDetailsContent = new ContactDetailsView(member.Contact, true, member);
         }
         if (CanViewCorrespondence)
         {
             CorrespondenceContent = new CorrespondenceView(member.Contact, "Member");
         }
         if (CanViewActivity)
         {
             ActivityContent = new ActivityView(member.Contact);
         }
         if (CanViewAccounts)
         {
             AccountsContent = new AccountsView(member.Contact);
         }
         if (CanViewMemberDetails)
         {
             MemberDetailsContent = new MemberDetailsView(member);
         }
         if (CanViewNoteDetails)
         {
             MemberNotesContent = new MemberNotesView(member);
         }
         if (CanViewUpdateDetails)
         {
             MemberUpdateDetailsContent = new MemberUpdateDetailsView(member);
         }
     }
 }
Example #4
0
        private void AccountsView_MouseUp(object sender, MouseEventArgs e)
        {
            if ((DateTime.Now - DragTime).TotalMilliseconds < 120)
            {
                DraggingItem = null;
            }

            Cursor = Cursors.Default;

            if (DraggingItem == null)
            {
                return;
            }

            ListViewItem HoveringItem = AccountsView.GetItemAt(0, e.Y);

            if (HoveringItem == null)
            {
                return;
            }

            Rectangle rc = HoveringItem.GetBounds(ItemBoundsPortion.Entire);

            bool InsertBefore = (e.Y < rc.Top + (rc.Height / 2));

            if (DraggingItem != HoveringItem)
            {
                string  Item    = DraggingItem.SubItems[3].Text;
                Account account = AccountsList.FirstOrDefault(x => Item.Length >= x.Username.Length && x.Username == Item.Substring(0, x.Username.Length));

                if (account == null)
                {
                    MessageBox.Show("Something went wrong!", "Roblox Account Manager", MessageBoxButtons.OK, MessageBoxIcon.Error); return;
                }

                if (InsertBefore)
                {
                    AccountsView.Items.Remove(DraggingItem);
                    AccountsView.Items.Insert(HoveringItem.Index, DraggingItem);

                    AccountsList.Remove(account);
                    AccountsList.Insert(HoveringItem.Index - 1, account);
                }
                else
                {
                    AccountsView.Items.Remove(DraggingItem);
                    AccountsView.Items.Insert(HoveringItem.Index + 1, DraggingItem);

                    AccountsList.Remove(account);
                    AccountsList.Insert(HoveringItem.Index, account);
                }

                DraggingItem = null;

                SaveAccounts();
            }
        }
Example #5
0
        private void AccountsView_MouseDown(object sender, MouseEventArgs e)
        {
            if (AccountsView.Groups.Count > 0)
            {
                return;
            }

            DraggingItem = AccountsView.GetItemAt(e.X, e.Y);
            DragTime     = DateTime.Now;
        }
Example #6
0
 public void ShowAccounts()
 {
     AccountsView.Visible = true;
     AccountsView.ResetDataGridView();
     AccountsView.DataSource = AccountsDataSet;
     AccountsView.DataMember = AccountTable.TableName;
     RegisterButton.Text     = "Create Account Mode";
     StatusLabel.Text        = "Account Editing Mode";
     BindFields(AccountsView.Rows[0]);
 }
Example #7
0
        public void AccountsViewTest(string testEmail, string testPassword, bool isPositive)
        {
            AccountsView acc = new AccountsView(driver);

            acc.SigningIn(testEmail, testPassword);
            bool isDataOk = acc.AccountsViewing().isAccountsView();

            Assert.That(isDataOk,
                        Is.EqualTo(isPositive), $"Accounts list was validated {(isDataOk ? "successfully" : "unseccessfully")} ");
        }
Example #8
0
        public void AddAccountToList(Account account)
        {
            string Name = account.Username + " " + account.Alias;

            if (AccountsView.InvokeRequired)
            {
                var addItem = new SafeCallDelegateAccount(AddAccountToList);
                AccountsView.Invoke(addItem, new object[] { account });
            }
            else
            {
                AccountsView.Items.Add(new ListViewItem(new string[] { account.Username, account.Alias, account.Description.Replace("\n", ""), account.Username }));
            }
        }
Example #9
0
 public void LogOut()
 {
     if (!IsAdmin(CurrentUser))
     {
         SetUserStatus(CurrentUser, "Offline");
     }
     if (NotSaved)
     {
         if (MessageBoxEx.Show("Save your work or not?", "Save", MessageBoxButtons.YesNo) == DialogResult.Yes)
         {
             DatabaseSave();
         }
     }
     AccountsView.ResetDataGridView();
     SalesView.ResetDataGridView();
     ManagerNameLabel.Text = "JJETSystems";
     StatusLabel.Text      = DateTime.Now.ToLongDateString();
     AccountPanel.VisibleDock(true, RegisterPanel);
     RegisterButton.Text = "Register";
 }
Example #10
0
 private void ShowSelectedContactTabs(ContactModel model)
 {
     if (model != null)
     {
         if (CanViewContactDetails)
         {
             ContactDetailsContent = new ContactDetailsView(model);
         }
         if (CanViewCorrespondence)
         {
             CorrespondenceContent = new CorrespondenceView(model, "Contact");
         }
         if (CanViewActivity)
         {
             ActivityContent = new ActivityView(model);
         }
         if (CanViewAccounts)
         {
             AccountsContent = new AccountsView(model);
         }
     }
 }
Example #11
0
        private void OnRequestHeaderImages(List <string> images)
        {
            var defaultImage = UIImage.FromFile(ViewModel.DefaultAccountImageName);

            AccountImageView.Hidden = images.Count == 0;

            // clear all existing entries before beginning
            foreach (UIView view in AccountsView.Subviews)
            {
                if (!view.Equals(AccountImageView))
                {
                    AccountsView.RemoveConstraints(view.Constraints);
                    view.RemoveFromSuperview();
                }
            }

            if (images.Count > 0)
            {
                // proceed and add the new ones
                var prevImageView          = AccountImageView;
                var prevTrailingConstraint = AccountImageViewTrailingConstraint;
                var rect          = CGRect.FromLTRB(prevImageView.Frame.X + 2, prevImageView.Frame.Y + 2, prevImageView.Frame.Width - 4, prevImageView.Frame.Height - 4);
                var path          = UIBezierPath.FromRoundedRect(rect, prevImageView.Frame.Height / 2);
                var prevMaskLayer = new CAShapeLayer();

                if (!AccountsView.Constraints.Contains(AccountImageViewTrailingConstraint))
                {
                    AccountsView.AddConstraint(AccountImageViewTrailingConstraint);
                }

                prevMaskLayer.Path          = path.CGPath;
                prevMaskLayer.ShadowColor   = UIColor.Black.CGColor;
                prevMaskLayer.ShadowOpacity = 0.35f;
                prevMaskLayer.ShadowOffset  = new CGSize(0, 1);
                prevMaskLayer.ShadowRadius  = 2;
                prevMaskLayer.ShadowPath    = path.CGPath;

                prevImageView.ClipsToBounds       = false;
                prevImageView.Layer.Mask          = prevMaskLayer;
                prevImageView.Layer.MasksToBounds = false;
                prevImageView.SetImage(new NSUrl(images [0]), defaultImage);

                images.RemoveAt(0);
                AccountsView.Layer.MasksToBounds = false;
                AccountsView.ClipsToBounds       = false;

                foreach (string imageUrl in images)
                {
                    var imageView = new UIImageView();
                    var maskLayer = new CAShapeLayer();

                    maskLayer.Path          = path.CGPath;
                    maskLayer.ShadowColor   = prevMaskLayer.ShadowColor;
                    maskLayer.ShadowOpacity = prevMaskLayer.ShadowOpacity;
                    maskLayer.ShadowOffset  = prevMaskLayer.ShadowOffset;
                    maskLayer.ShadowRadius  = prevMaskLayer.ShadowRadius;
                    maskLayer.ShadowPath    = prevMaskLayer.ShadowPath;

                    imageView.ClipsToBounds       = prevImageView.ClipsToBounds;
                    imageView.Layer.Mask          = maskLayer;
                    imageView.Layer.MasksToBounds = prevImageView.Layer.MasksToBounds;
                    imageView.TranslatesAutoresizingMaskIntoConstraints = false;

                    imageView.SetImage(new NSUrl(imageUrl), defaultImage);

                    var heightConstraint   = NSLayoutConstraint.Create(imageView, NSLayoutAttribute.Height, NSLayoutRelation.Equal, null, NSLayoutAttribute.NoAttribute, 1, prevImageView.Frame.Height);
                    var widthConstraint    = NSLayoutConstraint.Create(imageView, NSLayoutAttribute.Width, NSLayoutRelation.Equal, null, NSLayoutAttribute.NoAttribute, 1, prevImageView.Frame.Width);
                    var leadingConstraint  = NSLayoutConstraint.Create(imageView, NSLayoutAttribute.Leading, NSLayoutRelation.Equal, prevImageView, NSLayoutAttribute.Trailing, 1, -prevImageView.Frame.Width / 2);
                    var centerYConstraint  = NSLayoutConstraint.Create(imageView, NSLayoutAttribute.CenterY, NSLayoutRelation.Equal, AccountsView, NSLayoutAttribute.CenterY, 1, 0);
                    var trailingConstraint = NSLayoutConstraint.Create(imageView, NSLayoutAttribute.Trailing, NSLayoutRelation.Equal, AccountsView, NSLayoutAttribute.Trailing, 1, 0);

                    AccountsView.AddSubview(imageView);
                    AccountsView.SendSubviewToBack(imageView);

                    AccountsView.RemoveConstraint(prevTrailingConstraint);
                    AccountsView.AddConstraint(heightConstraint);
                    AccountsView.AddConstraint(widthConstraint);
                    AccountsView.AddConstraint(leadingConstraint);
                    AccountsView.AddConstraint(centerYConstraint);
                    AccountsView.AddConstraint(trailingConstraint);

                    prevMaskLayer          = maskLayer;
                    prevImageView          = imageView;
                    prevTrailingConstraint = trailingConstraint;
                }
                AccountsView.LayoutIfNeeded();
            }
        }
Example #12
0
 public void AddToAccountsView(AccountsView accountsView)
 {
     base.AddObject("AccountsView", accountsView);
 }
Example #13
0
 public static AccountsView CreateAccountsView(int accountID, string accountNumber, int bankID_pk, string bank, bool active)
 {
     AccountsView accountsView = new AccountsView();
     accountsView.accountID = accountID;
     accountsView.accountNumber = accountNumber;
     accountsView.bankID_pk = bankID_pk;
     accountsView.bank = bank;
     accountsView.active = active;
     return accountsView;
 }
Example #14
0
        void ReleaseDesignerOutlets()
        {
            if (BackgroundImageView != null)
            {
                BackgroundImageView.Dispose();
                BackgroundImageView = null;
            }

            if (CountLabel != null)
            {
                CountLabel.Dispose();
                CountLabel = null;
            }

            if (FacebookButton != null)
            {
                FacebookButton.Dispose();
                FacebookButton = null;
            }

            if (FacebookTrailingConstraint != null)
            {
                FacebookTrailingConstraint.Dispose();
                FacebookTrailingConstraint = null;
            }

            if (FooterView != null)
            {
                FooterView.Dispose();
                FooterView = null;
            }

            if (FooterViewBottomConstraint != null)
            {
                FooterViewBottomConstraint.Dispose();
                FooterViewBottomConstraint = null;
            }

            if (PostButton != null)
            {
                PostButton.Dispose();
                PostButton = null;
            }

            if (TextView != null)
            {
                TextView.Dispose();
                TextView = null;
            }

            if (TwitterButton != null)
            {
                TwitterButton.Dispose();
                TwitterButton = null;
            }

            if (TwitterTrailingConstraint != null)
            {
                TwitterTrailingConstraint.Dispose();
                TwitterTrailingConstraint = null;
            }

            if (AccountsView != null)
            {
                AccountsView.Dispose();
                AccountsView = null;
            }
        }
Example #15
0
 private void AccountsView_MouseDown(object sender, MouseEventArgs e)
 {
     DraggingItem = AccountsView.GetItemAt(e.X, e.Y);
     DragTime     = DateTime.Now;
 }
Example #16
0
        void ReleaseDesignerOutlets()
        {
            if (AccountImageView != null)
            {
                AccountImageView.Dispose();
                AccountImageView = null;
            }

            if (AccountImageViewTrailingConstraint != null)
            {
                AccountImageViewTrailingConstraint.Dispose();
                AccountImageViewTrailingConstraint = null;
            }

            if (AccountsView != null)
            {
                AccountsView.Dispose();
                AccountsView = null;
            }

            if (HeaderView != null)
            {
                HeaderView.Dispose();
                HeaderView = null;
            }

            if (HeaderViewTopConstraint != null)
            {
                HeaderViewTopConstraint.Dispose();
                HeaderViewTopConstraint = null;
            }

            if (NameLabel != null)
            {
                NameLabel.Dispose();
                NameLabel = null;
            }

            if (PostBarButton != null)
            {
                PostBarButton.Dispose();
                PostBarButton = null;
            }

            if (SortOrderSegmentedControl != null)
            {
                SortOrderSegmentedControl.Dispose();
                SortOrderSegmentedControl = null;
            }

            if (TableViewTopConstraint != null)
            {
                TableViewTopConstraint.Dispose();
                TableViewTopConstraint = null;
            }

            if (SignedOutLabel != null)
            {
                SignedOutLabel.Dispose();
                SignedOutLabel = null;
            }
        }
Example #17
0
 public AccountsView()
 {
     Instance = this;
 }
Example #18
0
        private void mi_Accounts_Click(object sender, RoutedEventArgs e)
        {
            AccountsView v = new AccountsView();

            v.ShowDialog();
        }