Esempio n. 1
0
        public BookIT(AspNetUsers anu1)
        {
            InitializeComponent();

            /* taskbarIcon = new TaskbarIcon();
             * taskbarIcon = (TaskbarIcon)FindResource("taskBarIconMain");
             * taskbarIcon.Visibility = Visibility.Hidden;*/
            taskBarIconMain.Visibility = Visibility.Hidden;
            anu         = anu1;
            stackPanels = new StackPanel[4];
            DisplayBookmarkList dbl = new DisplayBookmarkList();

            rgk = new RegisterKeyboardInput();
            rgk.KeyBoardKeyPressed += keyboard_KeyBoardKeyPressed;

            /*Label qw = new Label();
             * qw.Content = "dadsdsaddsa";
             * qw.Height = 299;
             * qw.Width = 299;
             * stackPanelMain.Children.Add(qw);
             * StackPanel sPanel = new StackPanel();
             * sPanel.Height = stackPanelMain.Height;
             * sPanel.Width = stackPanelMain.Width;
             * sPanel.VerticalAlignment = stackPanelMain.VerticalAlignment;
             * sPanel.HorizontalAlignment = stackPanelMain.HorizontalAlignment;
             * sPanel.Margin = stackPanelMain.Margin;
             * Label qw = new Label();
             * qw.Content = "cxycyxxcy";
             * qw.Height = 299;
             * qw.Width = 299;
             * sPanel.Children.Add(qw);
             * stackPanelMain.Children.Add(sPanel);*/
            mbt = dbl.getBookmarks();
            showBookmarks(mbt);
        }
Esempio n. 2
0
        private void SaveBookmarkEdit(object sender, RoutedEventArgs e)
        {
            MessageBox.Show("das");
            bool            urlFound = false;
            ModelBookmarTag mdl      = new ModelBookmarTag();

            mdl.tagList = new List <Tags>();
            foreach (object aa in gridAdd.Children)
            {
                if (aa is TextBox)
                {
                    TextBox helper = (TextBox)aa;
                    if (!urlFound)
                    {
                        urlFound = true;
                        string partId = extractId(helper.Name.ToString());
                        mdl.bookmarkedPage            = new Bookmarks();
                        mdl.bookmarkedPage.BookmarkID = Int32.Parse(partId);
                        mdl.bookmarkedPage.Url        = helper.Text.ToString();
                    }
                    else
                    {
                        Tags   t1     = new Tags();
                        string partId = extractId(helper.Name.ToString());
                        t1.TagID   = Int32.Parse(partId);
                        t1.TagName = helper.Text.ToString();
                        mdl.tagList.Add(t1);
                    }
                }
            }
            DisplayBookmarkList dbc = new DisplayBookmarkList(mdl);
        }
Esempio n. 3
0
        public ShortcutSaveBookmark(string a1)
        {
            InitializeComponent();
            this.userId = a1;
            DisplayBookmarkList dbl = new DisplayBookmarkList();

            mbt = dbl.getBookmarks();
            // registerKeyboard = new RegisterKeyboardInput(this);
            //  registerKeyboard.KeyBoardKeyPressed += keyboard_KeyBoardKeyPressed;
            foreach (ModelBookmarTag vara in mbt)
            {
                DisplaySearchUrl dsu = new DisplaySearchUrl();
                dsu.displayUrl = vara.bookmarkedPage.Url;
                listViewDisplayBookmark.Items.Add(dsu);
            }
            defaultBrowser = getDefaultBrowser();
            if (!this.IsVisible)
            {
                this.Show();
            }
            if (this.WindowState == WindowState.Minimized)
            {
                this.WindowState = WindowState.Normal;
            }
            //this.WindowStyle = System.Windows.WindowStyle.None;
            this.Topmost = true;
            this.Activate();
        }
Esempio n. 4
0
        private void EditBookmarkClick(object sender, RoutedEventArgs e)
        {
            clearGrid();
            MessageBox.Show("das");
            var boundData           = (testIt)((Button)sender).DataContext;
            DisplayBookmarkList dbl = new DisplayBookmarkList(Int32.Parse(boundData.id));
            ModelBookmarTag     mb  = dbl.getSingleBookmark();

            createEditBookmark(mb);
            boolTabEditItem = true;
            boolTabItemAdd  = false;

            //createAddBookmark();
            tabControl.SelectedIndex = 1;
        }
Esempio n. 5
0
        private void btnNext_Click(object sender, RoutedEventArgs e)
        {
            saveUrl = false;
            if (enterTag)
            {
                enterTag = false;
                saveUrl  = true;
                tag      = txtBoxEnterInfo.Text;
                //MessageBox.Show(tag);
                DisplayBookmarkList ddd = new DisplayBookmarkList();
                ddd.SaveBookmark(url, tag, id);

                txtBoxEnterInfo.Clear();
                btnNext.Content = "Next";
            }
            if (!enterTag && !saveUrl)
            {
                url             = txtBoxEnterInfo.Text;
                btnNext.Content = "Save";
                enterTag        = true;
                txtBoxEnterInfo.Clear();
            }
        }
Esempio n. 6
0
 public Register(MainWindow m1)
 {
     InitializeComponent();
     dbl          = new DisplayBookmarkList();
     this.mainWin = m1;
 }