コード例 #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();
        }
コード例 #2
0
ファイル: AppDelegate.cs プロジェクト: Dynalon/tomboy.osx
        /// <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();
        }
コード例 #3
0
ファイル: MyDocument.cs プロジェクト: Dynalon/tomboy.osx
        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();
        }
コード例 #4
0
ファイル: AppDelegate.cs プロジェクト: rashoodkhan/tomboy.osx
		/// <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 ();
		}
コード例 #5
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 ();
		}
コード例 #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 ();
        	}