Exemplo n.º 1
0
        /// <summary>
        /// Handles the note double click which a Note in the Notes list is Double-clicked causing an open action
        /// </summary>
        /// <param name='sender'>
        /// Sender.
        /// </param>
        /// <param name='e'>
        /// E.
        /// </param>
        void HandleNoteDoubleClick(object sender, EventArgs e)
        {
            if (e == null)
            {
                throw new ArgumentNullException("e");
            }
            if (sender == null)
            {
                throw new ArgumentNullException("sender");
            }

            int selectedRow = _notesTableView.SelectedRow;

            if (selectedRow == -1)
            {
                Logger.Debug("No Note selected in tableview");
                return;
            }

            MyDocument myDoc = new MyDocument(notes.ElementAt(selectedRow).Value);

            _sharedDocumentController.AddDocument(myDoc);
            myDoc.MakeWindowControllers();
            myDoc.ShowWindows();
        }
Exemplo n.º 2
0
        /// <summary>
        /// Opens the note that was selected from the Dock Menu
        /// </summary>
        /// <param name='title'>
        /// Title.
        /// </param>
        void OpenNote(string title)
        {
            var        note  = NoteEngine.GetNote(title);
            MyDocument myDoc = new MyDocument(note);
            var        _sharedDocumentController = (NSDocumentController)NSDocumentController.SharedDocumentController;

            _sharedDocumentController.AddDocument(myDoc);
            myDoc.MakeWindowControllers();
            myDoc.ShowWindows();
        }
Exemplo n.º 3
0
        private void OpenNote(string title)
        {
            Note note;
            var  notes = AppDelegate.NoteEngine.GetNotes();

            notes.TryGetValue(title, out note);
            MyDocument myDoc = new MyDocument(note);
            var        _sharedDocumentController = (NSDocumentController)NSDocumentController.SharedDocumentController;

            _sharedDocumentController.AddDocument(myDoc);
            myDoc.MakeWindowControllers();
            myDoc.ShowWindows();
        }
Exemplo n.º 4
0
		/// <summary>
		/// Opens the note that was selected from the Dock Menu
		/// </summary>
		/// <param name='title'>
		/// Title.
		/// </param>
		void OpenNote (string title) {
			var note = NoteEngine.GetNote (title);
			MyDocument myDoc = new MyDocument (note);
			var _sharedDocumentController = (NSDocumentController)NSDocumentController.SharedDocumentController;
			_sharedDocumentController.AddDocument (myDoc);
			myDoc.MakeWindowControllers ();
			myDoc.ShowWindows ();
		}
		/// <summary>
		/// Handles the note double click which a Note in the Notes list is Double-clicked causing an open action
		/// </summary>
		/// <param name='sender'>
		/// Sender.
		/// </param>
		/// <param name='e'>
		/// E.
		/// </param>
		void HandleNoteDoubleClick (object sender, EventArgs e) {
			if (e == null)
				throw new ArgumentNullException ("e");
			if (sender == null)
				throw new ArgumentNullException ("sender");

			int selectedRow = _notesTableView.SelectedRow;
			if (selectedRow == -1) {
				Logger.Debug ("No Note selected in tableview");
				return;
			}

			MyDocument myDoc = new MyDocument (notes.ElementAt (selectedRow).Value);
			_sharedDocumentController.AddDocument (myDoc);
			myDoc.MakeWindowControllers ();
			myDoc.ShowWindows ();
		}
Exemplo n.º 6
0
		private void OpenNote (string title) {
            		Note note;
            		var notes = AppDelegate.NoteEngine.GetNotes();
            		notes.TryGetValue(title, out note);
            		MyDocument myDoc = new MyDocument (note);
            		var _sharedDocumentController = (NSDocumentController)NSDocumentController.SharedDocumentController;
            		_sharedDocumentController.AddDocument (myDoc);
            		myDoc.MakeWindowControllers ();
            		myDoc.ShowWindows ();
        	}