public MainWindow()
        {
            InitializeComponent();
            createStyleForTreeItem();
            noteDB     = new NoteDBDung();
            xlTag      = new XuLy_DuLieu_Tag(noteDB);
            xlTextNote = new XuLy_DuLieu_TextNote(noteDB);

            xlTag.register(this);
            xlTextNote.registerNote(this);

            if (noteDB.TAGs.Count() == 0)
            {
                initDumpDatabase();
            }

            refreshUI();
            content.Height = MainViewWindow.Height - menu.Height - content.Margin.Top;
            content.Width  = MainViewWindow.Width - FirstCollumn.Width.Value;
            curUserControl = new ViewAllTags(xlTag, xlTextNote, this, (int)content.Height, (int)content.Width);
            content.Children.Add(curUserControl);

            ShowInTaskbar = true;
            //MainViewWindow.WindowState = System.Windows.WindowState.Minimized;
            this.notifier.MouseDown += new WinForms.MouseEventHandler(notifier_MouseDown);
            this.notifier.Icon       = new System.Drawing.Icon("note.ico");
            this.notifier.Visible    = true;

            notifier.Text = "Keep notes";
            notifier.ShowBalloonTip(500, "Keep notes Notification", "Keep notes is comming!",
                                    System.Windows.Forms.ToolTipIcon.Info);
        }
Пример #2
0
        public ViewAllTags(XuLy_DuLieu_Tag xlTag, XuLy_DuLieu_TextNote xlTextNote, MainWindowTagClickCallback callback,
                           int height, int width)
        {
            InitializeComponent();
            this.heightViewTags = height;
            this.widthViewTags  = width;

            gridMain.Height = heightViewTags;
            gridMain.Width  = widthViewTags;

            obs         = xlTag;
            obsTextNote = xlTextNote;

            obs.register(this);
            obsTextNote.registerNote(this);

            refreshUI();

            this.mainWindowTagClickCallbackIns = callback;
        }
        public ViewTagDetail(XuLy_DuLieu_Tag aXlTag, XuLy_DuLieu_TextNote axlNote,
                             string atagName, int aheight, int awidth, ENUM_VIEW typeView = ENUM_VIEW.VIEW_BY_NONE)
        {
            InitializeComponent();

            tagName = atagName;
            height  = aheight;
            width   = awidth;

            MainViewTagDetail.Height = height;
            MainViewTagDetail.Width  = width;

            tagDetailContainer.Height = height;
            tagDetailContainer.Width  = width;

            xlTag      = aXlTag;
            xlTextNote = axlNote;
            xlTextNote.registerNote(this);

            refreshUINote();
        }