当前位置: 首页>>代码示例>>C#>>正文


C# Note类代码示例

本文整理汇总了C#中Note的典型用法代码示例。如果您正苦于以下问题:C# Note类的具体用法?C# Note怎么用?C# Note使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Note类属于命名空间,在下文中一共展示了Note类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: btnSubmit_Click

    /// <summary>
    /// Submit Button Click Event
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        NoteAdmin _Noteadmin = new NoteAdmin();
        Note _NoteAccess = new Note();

        _NoteAccess.CaseID = ItemID;
        _NoteAccess.AccountID = null;
        _NoteAccess.CreateDte = System.DateTime.Now;
        _NoteAccess.CreateUser = HttpContext.Current.User.Identity.Name;
        _NoteAccess.NoteTitle = txtNoteTitle.Text.Trim();
        _NoteAccess.NoteBody = ctrlHtmlText.Html ;

        bool Check = _Noteadmin.Insert(_NoteAccess);

        if (Check)
        {
            //redirect to main page
            Response.Redirect(CancelLink);
        }
        else
        {
            //display error message
            lblError.Text  = "An error occurred while updating. Please try again.";
            lblError.Visible = true;
        }
    }
开发者ID:daniela12,项目名称:gooptic,代码行数:31,代码来源:note_add.aspx.cs

示例2: OnNavigatedTo

        protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);

            string item = null;
            _isEditMode = false;

            if (NavigationContext.QueryString.TryGetValue("item", out item))
            {
                //call get note;
                if (_manager != null)
                {
                    _currentNote = _manager.Retrieve(Convert.ToInt32(item));
                    //set node properties to the UI
                    if (_currentNote == null)
                    {
                        tbContent.Text = string.Empty;
                        tbTitle.Text = string.Empty;
                    }
                    else
                    {
                        tbContent.Text = _currentNote.Content;
                        tbTitle.Text = _currentNote.Title;
                        _isEditMode = true;
                    }
                }
            }
        }
开发者ID:douglaszuniga,项目名称:Notas,代码行数:28,代码来源:Edit.xaml.cs

示例3: Play

 /// <summary>
 /// Play an array of Notes
 /// </summary>
 /// <param name="notes">An array of Note objects, each defining a frequency and duration</param>
 public void Play(Note[] notes)
 {
     foreach (Note note in notes)
     {
         Play(note.Frequency, note.Duration);
     }
 }
开发者ID:WadeTsai,项目名称:NetduinoDemo,代码行数:11,代码来源:PiezoSpeaker.cs

示例4: btnAdd_Click

 //Button Add click handler
 private void btnAdd_Click(object sender, EventArgs e)
 {
     if (CheckUpCount() == true)
     {
         try
         {
             //show Editor dialog
             frmEditor EditorForm = new frmEditor();
             EditorForm.ShowDialog();
             //add new data to data-collection
             if (EditorForm.IsCanceled == false)
             {
                 Note NewNote = new Note(EditorForm.TextName, EditorForm.TextArray);
                 EncryptedData.AddNote(NewNote);
             }
         }
         catch (OutOfMemoryException Exc)
         {
             MessageBox.Show(Exc.ToString());
         }
         catch (ArgumentException Exc)
         {
             MessageBox.Show(Exc.ToString());
         }
         //add new record to grid
         UpdateGrid();
     }
 }
开发者ID:optiklab,项目名称:SealedNotes,代码行数:29,代码来源:SealedNotes.cs

示例5: NoteDeletedHandler

		private void NoteDeletedHandler (object noteMgr, Note deletedNote)
		{
			deletedNotes [deletedNote.Id] = deletedNote.Title;
			fileRevisions.Remove (deletedNote.Id);

			Write (localManifestFilePath);
		}
开发者ID:oluc,项目名称:tomboy,代码行数:7,代码来源:TomboySyncClient.cs

示例6: CheckForResumedStartup

        async void CheckForResumedStartup()
        {
            if (await FileHelper.ExistsAsync(App.TransientFilename))
            {
                // Read the file.
                string str = await FileHelper.ReadTextAsync(App.TransientFilename);

                // Delete the file.
                await FileHelper.DeleteFileAsync(App.TransientFilename);

                // Break down the file contents.
                string[] contents = str.Split('\x1F');
                string filename = contents[0];
                bool isNoteEdit = Boolean.Parse(contents[1]);
                string entryText = contents[2];
                string editorText = contents[3];

                // Create the Note object and initialize it with saved data.
                Note note = new Note(filename);
                note.Title = entryText;
                note.Text = editorText;

                // Navigate to NotePage.
                NotePage notePage = new NotePage(note, isNoteEdit);
                await this.Navigation.PushAsync(notePage);
            }
        }
开发者ID:karanga,项目名称:xamarin-forms-book-preview,代码行数:27,代码来源:HomePage.cs

示例7: Open

    public void Open(List<Minion> minions, List<Note> notes)
    {
        //Transform parent = this.transform.parent;

        this.minion = null;
        foreach (Minion m in minions) {
            if (m.gameObject.name == this.minionName) {
                this.minion = m;
                break;
            }
        }

        this.note = null;
        foreach (Note n in notes) {
            if (n.gameObject.name == this.noteName) {
                this.note = n;
                break;
            }
        }

        if (this.minion != null) {
            this.minion.EnableClicks();
            this.minion.gameObject.GetComponent<SpriteRenderer>().color = Color.white;
        }
        if (this.note != null) {
            this.note.EnableClicks();
            this.note.gameObject.GetComponent<SpriteRenderer>().color = Color.white;
        }
    }
开发者ID:bluquar,项目名称:martian-music-invasion,代码行数:29,代码来源:TutorialBox.cs

示例8: AddNotes

        public void AddNotes(string SqlWhereClause = null)
        {
            int idFld = m_NotesTable.FindField("Notes_ID");
            int ownerFld = m_NotesTable.FindField("OwnerID");
            int typeFld = m_NotesTable.FindField("Type");
            int notesFld = m_NotesTable.FindField("Notes");
            int dsFld = m_NotesTable.FindField("DataSourceID");

            ICursor theCursor;

            if (SqlWhereClause == null) { theCursor = m_NotesTable.Search(null, false); }
            else
            {
                IQueryFilter QF = new QueryFilterClass();
                QF.WhereClause = SqlWhereClause;
                theCursor = m_NotesTable.Search(QF, false);
            }

            IRow theRow = theCursor.NextRow();

            while (theRow != null)
            {
                Note anNote = new Note();
                anNote.Notes_ID = theRow.get_Value(idFld).ToString();
                anNote.OwnerID = theRow.get_Value(ownerFld).ToString();
                anNote.Notes = theRow.get_Value(notesFld).ToString();
                anNote.Type = theRow.get_Value(typeFld).ToString();
                anNote.DataSourceID = theRow.get_Value(dsFld).ToString();
                anNote.RequiresUpdate = true;

                m_NotesDictionary.Add(anNote.Notes_ID, anNote);

                theRow = theCursor.NextRow();
            }
        }
开发者ID:genhan2011,项目名称:ncgmp-toolbar,代码行数:35,代码来源:NotesAccess.cs

示例9: Go

        private static void Go(long userId)
        {
            var settings = new MongoServerSettings
            {
                Server = new MongoServerAddress("127.0.0.1", 27017),
                SafeMode = SafeMode.False
            };
            var mongoServer = new MongoServer(settings);

            var database = mongoServer.GetDatabase("Test");

            var map = new NoteMap();
            var collection = new EntityCollection<Note>(database, map.GetDescriptor(), true);

            var note = new Note
            {
                NoteID = "1",
                Title = "This is a book.",
                Content = "Oh yeah",
                UserID = 123321L
            };
            // collection.InsertOnSubmit(note);
            // collection.SubmitChanges();
            // var data = collection.SelectTo(n => new { n.NoteID, n.UserID });
            collection.Log = Console.Out;
            var a = 4;
            collection.Update(
                n => new Note { },
                n => true);
        }
开发者ID:jefth,项目名称:EasyMongo,代码行数:30,代码来源:Program.cs

示例10: ComputeFitness

        public float ComputeFitness(Note[] individual)
        {
            float weighted_sum = 0;
            for (int i = 0; i < metrics.Length; i++)
            {
                var x = metrics[i].Generate(individual);
                var t = target_metrics[i];
                float magx = 0;
                float magt = 0;
                float dot = 0;
                foreach(var v in x.Values)
                    magx += v * v;
                foreach(var v in t.Values)
                    magt += v * v;
                foreach (var p in x.Keys)
                {
                    float f1 = x[p];
                    if (!t.ContainsKey(p))
                        continue;

                    float f2 = t[p];
                    dot += f1 * f2;
                }
                magx = (float)Math.Sqrt(magx);
                magt = (float)Math.Sqrt(magt);
                if (magx == 0 || magt == 0)
                    return 0;
                weighted_sum += dot / (magx * magt);
            }
            return weighted_sum / metrics.Length;
        }
开发者ID:stefan-j,项目名称:GeneticMIDI,代码行数:31,代码来源:MetricSimilarity.cs

示例11: GetNotes

        public List<Note> GetNotes(Roll roll)
        {
            string sql = NotesSql(roll);
            var reader = Data_Context.RunSelectSQLQuery(sql, 30);

            var notes = new List<Note>();

            if (reader.HasRows)
            {
                var sReader = new SpecialistsReader();
                while (reader.Read())
                {
                    string uName = reader["Author"] as string;
                    var spec = sReader.GetSpecialist(uName);
                    string n = reader["Note"] as string;
                    DateTime date = reader.GetDateTime(4);
                    string step = reader["StepTypeID"] as string;

                    var note = new Note(spec, n, date, step);
                    notes.Add(note);
                }
                return notes;
            }
            else return null;
        }
开发者ID:reedcwilson,项目名称:SpecialistDashboard,代码行数:25,代码来源:NoteReader.cs

示例12: NoteContent

        public NoteContent(object sender , object sender1)
        {
            this.InitializeComponent();
            item = (Button)sender;
            item1 = (Button) sender1;
            notepadRepository = new NotepadRepository();
            ourNotes = notepadRepository.GetNotes(item.Content.ToString().ToLower());
            notepad = ourNotes[0].notepad;

            foreach (Note note in ourNotes)
            {
                if (note.title == item1.Content.ToString().ToLower())
                    CurrNote = note;
            }
            if (CurrNote != null)
            {
                if (CurrNote.title == "+")
                    CurrNote.title = "New Title";
                NoteAct.Text = CurrNote.content;
                //NoteAct.Document.SetText(new Windows.UI.Text.TextSetOptions(), CurrNote.content);
                NoteName.Text = CurrNote.title;
            }
            AppTitle.Text = notepad;
                foreach (Note note in ourNotes)
            {
                notes.Items.Add(createNoteButton(note.title,note.content));
            }
        }
开发者ID:RodionXedin,项目名称:YetAnotherEvernote,代码行数:28,代码来源:NoteContent.xaml.cs

示例13: NewItemWindow

        public NewItemWindow(Note source)
            : this()
        {
            Title = "Edit Note";

            NoteEditControl.SourceNote = source;
        }
开发者ID:Klaudit,项目名称:inbox2_desktop,代码行数:7,代码来源:NewItemWindow.xaml.cs

示例14: lbAddNote_Click

        /// <summary>
        /// Handles the Click event of the lbAddNote control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="EventArgs" /> instance containing the event data.</param>
        protected void lbAddNote_Click( object sender, EventArgs e )
        {
            var rockContext = new RockContext();
            var service = new NoteService( rockContext );

            var note = new Note();
            note.IsSystem = false;
            note.IsAlert = false;
            note.NoteTypeId = noteType.Id;
            note.EntityId = contextEntity.Id;
            note.Text = tbNewNote.Text;

            if ( noteType.Sources != null )
            {
                var source = noteType.Sources.DefinedValues.FirstOrDefault();
                if ( source != null )
                {
                    note.SourceTypeValueId = source.Id;
                }
            }

            service.Add( note );
            rockContext.SaveChanges();

            ShowNotes();
        }
开发者ID:tcavaletto,项目名称:Rock-CentralAZ,代码行数:31,代码来源:PrayerCommentDetail.ascx.cs

示例15: getNoteIndex

 public static int getNoteIndex(Note note)
 {
     switch (note)
     {
         case Note.C1:
         case Note.Cs:
             return 0;
         case Note.D1:
         case Note.Ds:
             return 1;
         case Note.E1:
             return 2;
         case Note.F1:
         case Note.Fs:
             return 3;
         case Note.G1:
         case Note.Gs:
             return 4;
         case Note.A1:
         case Note.As:
             return 5;
         case Note.B1:
             return 6;
         case Note.C2:
             return 7;
         default:
             return -1;
     }
 }
开发者ID:xstreck1,项目名称:OnTheGoPiano,代码行数:29,代码来源:Values.cs


注:本文中的Note类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。