• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Note类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: GetValues

        public IEnumerable<MethodValue> GetValues(ReflectedInstance value, Type type, MethodInfo methodInfo)
        {
            if (methodInfo.Name == "Beep")
            {
                Note[] melody = new Note[] {
                    new Note(Note.C, 0, 100),
                    new Note(Note.C, 0, 100),
                    new Note(Note.D, 0, 100),
                    new Note(Note.E, 0, 100),
                    new Note(Note.F, 0, 100),
                    new Note(Note.G, 0, 100),
                    new Note(Note.A, 0, 100),
                    new Note(Note.B, 0, 100),
                    new Note(Note.C, 1, 100),
                    new Note(Note.D, 1, 100),
                    new Note(Note.E, 1, 100),
                    new Note(Note.F, 1, 100),
                    new Note(Note.G, 1, 100),
                    new Note(Note.A, 1, 100),
                    new Note(Note.B, 1, 100),
                    new Note(Note.C, 2, 100)
                };

                var parameters = methodInfo.GetParameters();
                foreach (var note in melody)
                {
                    var methodValue = methodInfo.Invoke("Beep", new object[] { note.Frequency, note.Duration });
                    var parameter = new MethodValueParam(parameters[0].Name, parameters[0], note.Frequency);
                    var parameter1 = new MethodValueParam(parameters[1].Name, parameters[1], note.Duration);
                    yield return new MethodValue(methodValue, parameter, parameter1);
                }
            }
        }
开发者ID:juniorgasparotto,项目名称:ExpressionGraph,代码行数:33,代码来源:MethodReaderTestClass.cs


示例17: showDialog

        public static DialogResult showDialog(
			Form parent,
			Note note,
			bool fCanDelete )
        {
            using ( FNote dlg = new FNote() )
            {
                dlg.cmdDelete.Visible = fCanDelete;
                foreach ( string s in Directory.GetDirectories( Global.Preferences.MainPath ) )
                {
                    int i;
                    if ( int.TryParse( s.Substring( s.LastIndexOf('_') + 1 ), out i ) )
                        if ( i > 400000 )
                            dlg.cboOrder.Items.Add( i.ToString() );
                }
                if ( note.RegardingDate != DateTime.MinValue )
                    dlg.dtp.Date = note.RegardingDate;
                if ( note.OrderNumber != 0 )
                    dlg.cboOrder.Text = note.OrderNumber.ToString();
                dlg.txt.Text = note.Text;
                DialogResult retVal = dlg.ShowDialog( parent );
                if ( retVal == DialogResult.OK )
                {
                    note.Text = dlg.txt.Text;
                    note.RegardingDate = dlg.optDatum.Checked ?
                        dlg.dtp.Date : DateTime.MinValue;
                    int.TryParse( dlg.cboOrder.Text, out note.OrderNumber );
                }
                return retVal;
            }
        }
开发者ID:danbystrom,项目名称:VisionQuest,代码行数:31,代码来源:FNote.cs


示例18: AddOrMod

        public ActionResult AddOrMod(string title, string content, int id = -1)
        {
            if (!User.Identity.IsAuthenticated) return Redirect(_client.OAuthCheckUrl());
            try
            {
                var note = new Note();
                if (id != -1)
                {
                    note = _entities.Notes.SingleOrDefault(m => m.Id == id);
                    if (note == null)
                    {
                        throw new Exception("Note not exists.");
                    }

                }
                note.Title = title;
                note.Content = content;
                note.User = User.Identity.Name;

                if(note.EntityState != EntityState.Modified)
                _entities.AddToNotes(note);
                _entities.SaveChanges();
                _entities.Refresh(RefreshMode.StoreWins, note);
                return Json(new { code = 0, data = note }, JsonRequestBehavior.AllowGet);
            }
            catch (Exception ex)
            {
                return Json(new { code = 1, data = ex.Message }, JsonRequestBehavior.AllowGet);
            }
        }
开发者ID:usbuild,项目名称:azuren,代码行数:30,代码来源:NoteController.cs


示例19: ReadBeatFromTxt

    private void ReadBeatFromTxt(string fileName)
    {
        string noteString = Resources.Load<TextAsset>(fileName).text;
        string[] lines = noteString.Split('\n');

        int bpm = Int32.Parse(lines[1]);
        int quantize = Int32.Parse(lines[2]);
        float beatLen = 60.0f / (float)bpm * (4.0f / (float)quantize);

        uint count = 0;
        uint notecount = 0;
        for (int i = 3; i < lines.Length; ++i) {
            foreach (char c in lines[i]) {
                switch (c) {
                    case '0':
                        notecount++;
                        Note newNote
                            = new Note(notecount,
                                       (int)((count * beatLen + NoteMover.NoteDelay) * 1000000) + BEAT_DELAY_TEMP);
                        NoteList.Enqueue(newNote);
                        count++;
                        break;
                    case '-':
                        count++; break;
                    case ' ':
                        break;
                    case ';':
                        Turnline newTurnline = new Turnline(
                        (int)((count * beatLen + NoteMover.NoteDelay) * 1000000) + BEAT_DELAY_TEMP);
                        FlipList.Enqueue(newTurnline);
                        break;
                }
            }
        }
    }
开发者ID:SNUGDC,项目名称:Beat-It,代码行数:35,代码来源:BeatGenerator.cs


示例20: TestNote

 public void TestNote()
 {
     Note note = new Note(TITLE, "");
     Assert.AreEqual(note.Title, TITLE);
     note.Content = CONTENT;
     Assert.AreEqual(note.Content, CONTENT);
 }
开发者ID:calindotgabriel,项目名称:CleanNotes,代码行数:7,代码来源:TestNote.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Notification类代码示例发布时间:2022-05-24
下一篇:
C# Notation类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap