Esempio n. 1
0
        public NoteMain(int ID, FromCallBackDeligate newFormCB, DelegateWriteToDB writeMsgCB, MyStickyNotes.DelegateDeleteFromDB deleteFromDB)
        {
            InitializeComponent();
              //  noteMessage = "None";
            createNewNote = newFormCB;
            writeMsgToDB = writeMsgCB;
            deleteNoteFromDB = deleteFromDB;
            noteID = ID;

            this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainForm_FormClosing);
        }
Esempio n. 2
0
        public StickyNotesMain()
        {
            InitializeComponent();
            notesArr = new MyStickyNotes.Contols.NoteMain[128];
            currentNote = 0;
            CBNewForm = new MyStickyNotes.FromCallBackDeligate(CreateNewNote);
            writeToDB = new MyStickyNotes.DelegateWriteToDB(NoteMessage);
            DeleteFromDB = new MyStickyNotes.DelegateDeleteFromDB(DeleteNoteFromDB);
            notesDB = new MyStickyNotes.Database.NotesDBFile();
            currentNote = notesDB.ReadDBFromFile();
            this.Resize += new System.EventHandler(this.frmMain_Resize);

            if (currentNote != 0)
                ConstructNotes();
        }