コード例 #1
0
        public static string GetContent(DateTime day, NoteManager manager)
        {
            string title = GetTitle (day);

            bool yesterdayAsTemplate;

            Note templateNote = manager.Find (TemplateTitle);

            // Attempt to load yesterday "NoteOfTheDay" note. If not, then template.
            // And if not again, then default.
            // First of all... Do you want to start with yesterday note?
            try{
                yesterdayAsTemplate = (bool) Preferences.Get(NoteOfTheDay.NOTD_YESTERDAY);
            }catch (Exception) {
                Logger.Debug("NoteOfTheDay: Couldn't find a preference for yesterday as template.");
                yesterdayAsTemplate = true; // Defaults to true. See NoteOfTheDayPreferences.cs
            }
            // TODO: Let number of days to look back for to be configurable.
            if (yesterdayAsTemplate) {
                /*
                 * Ok. Let me see...
                 * First of all: find yesterday note calculating yesterday date as today minus 24 h.
                 * There is a method for searching by date.
                 * Then, replace yesterday date for today date.
                 * And finally return note content.
                 */
                ; // TODO: PORASQUI
            } else {
                // Attempt to load content from template
                if (templateNote != null)
                    return templateNote.XmlContent.Replace (TemplateTitle, title);
                else
                    return GetTemplateContent (title);
            }
        }
コード例 #2
0
ファイル: MainForm.xaml.cs プロジェクト: redtower/MdNote
        private void DownButton_Click(object sender, RoutedEventArgs e)
        {
            if (_CurrentNote == null) { return; }
            NoteManager nnm = new NoteManager();
            Note buffer = null;

            foreach (Note item in _NoteManager.Items)
            {
                if (item.Id.Equals(_CurrentNote.Id))
                {
                    buffer = item;
                }
                else
                {
                    nnm.Items.Add(item);
                    if (buffer != null)
                    {
                        nnm.Items.Add(buffer);
                        buffer = null;
                    }
                }
            }

            if (buffer != null)
            {
                nnm.Items.Add(buffer);
            }

            _NoteManager = nnm;
            listBox1.DataContext = _NoteManager.Items;
            new NoteManagerFile().write(_NoteManager);
        }
コード例 #3
0
ファイル: Applet.cs プロジェクト: MichaelAquilina/tomboy
		public override void Creation ()
		{
			Logger.Log ("Applet Created...");

			manager = Tomboy.DefaultNoteManager;
			applet_event_box = new TomboyPanelAppletEventBox (manager);
			// No need to keep the reference
			new TomboyPrefsKeybinder (manager, applet_event_box);

			Flags |= PanelAppletFlags.ExpandMinor;

			Add (applet_event_box);
			Tomboy.Tray = applet_event_box.Tray;
			OnChangeSize (Size);
			ShowAll ();

			if (menu_verbs == null) {
				menu_verbs = new BonoboUIVerb [] {
					new BonoboUIVerb ("Sync", SyncVerb),
					new BonoboUIVerb ("Props", ShowPreferencesVerb),
					new BonoboUIVerb ("Help", ShowHelpVerb),
					new BonoboUIVerb ("About", ShowAboutVerb)
				};
			}

			SetupMenuFromResource (null, "GNOME_TomboyApplet.xml", menu_verbs);
		}
コード例 #4
0
		public RemoteControl (NoteManager mgr)
		{
			note_manager = mgr;
			note_manager.NoteDeleted += OnNoteDeleted;
			note_manager.NoteAdded += OnNoteAdded;
			note_manager.NoteSaved += OnNoteSaved;
		}
コード例 #5
0
        public static Note Create(NoteManager manager, DateTime day)
        {
            string title = GetTitle (day);
            string xml = GetContent (day, manager);

            Note notd = null;
            try {
                notd = manager.Create (title, xml);
            } catch (Exception e) {
                // Prevent blowup if note creation fails
                Logger.Error (
                        "NoteOfTheDay could not create \"{0}\": {1}",
                        title,
                        e.Message);
                notd = null;
            }

            if (notd != null) {
                // Automatically tag all new Note of the Day notes
                Tag notd_tag = TagManager.GetOrCreateSystemTag ("NoteOfTheDay");
                notd.AddTag (notd_tag);

                // notd.AddTag queues a save so the following is no longer necessary
                //notd.Save ();
            }

            return notd;
        }
コード例 #6
0
 public Note CreateNote(Note note)
 {
     Note result = null;
     using (NoteManager manager = new NoteManager())
     {
         result = manager.Create(note);
     }
     return result;
 }
コード例 #7
0
		public static NoteRecentChanges GetInstance (NoteManager manager)
		{
			if (instance == null)
				instance = new NoteRecentChanges (manager);
			System.Diagnostics.Debug.Assert (
				instance.manager == manager,
				"Multiple NoteManagers not supported");
			return instance;
		}
コード例 #8
0
 public bool DeleteNote(int userId, Note note)
 {
     bool result = false;
     using (NoteManager manager = new NoteManager())
     {
         if (manager.ValidateNoteOwner(userId, note.Id))
             result = manager.Delete(note.Id);
     }
     return result;
 }
コード例 #9
0
    // Use this for initialization
    public override void Awake()
    {
        base.Awake();
        instance = this;

        //add note to dictionary
        foreach (var note in notePrefabs)
        {
            noteDict.Add(note.name,note);
        }
    }
コード例 #10
0
ファイル: SilentUI.cs プロジェクト: MichaelAquilina/tomboy
		public void NoteConflictDetected (NoteManager manager, Note localConflictNote, NoteUpdate remoteNote, IList<string> noteUpdateTitles)
		{
			Logger.Debug ("SilentUI: NoteConflictDetected, overwriting without a care");
			// TODO: At least respect conflict prefs
			// TODO: Implement more useful conflict handling
			if (localConflictNote.Id != remoteNote.UUID)
				GuiUtils.GtkInvokeAndWait (() => {
					manager.Delete (localConflictNote);
				});
			SyncManager.ResolveConflict (SyncTitleConflictResolution.OverwriteExisting);
		}
コード例 #11
0
		public static string GetContent (DateTime day, NoteManager manager)
		{
			string title = GetTitle (day);

			// Attempt to load content from template
			Note templateNote = manager.Find (TemplateTitle);
			if (templateNote != null)
				return templateNote.XmlContent.Replace (TemplateTitle, title);
			else
				return GetTemplateContent (title);
		}
コード例 #12
0
    void Awake()
    {
        if (singleton == null) {
            singleton = this;
        }
        allNotes = new List<string>();

        foreach (TextAsset tAsset in Resources.LoadAll<TextAsset>("Writing")) {
            allNotes.Add(tAsset.text);
        }
    }
コード例 #13
0
		public override void Initialize ()
		{
			if (timeout == null) {
				timeout = new InterruptableTimeout ();
				timeout.Timeout += CheckNewDay;
				timeout.Reset (0);
				timeout_owner = true;
			}
			manager = Tomboy.DefaultNoteManager;
			initialized = true;
		}
コード例 #14
0
ファイル: RemoteControlProxy.cs プロジェクト: oluc/tomboy
		public static RemoteControl Register (NoteManager manager)
		{
#if ENABLE_DBUS
			BusG.Init ();

			RemoteControl remote_control = new RemoteControl (manager);
			Bus.Session.Register (Namespace,
			                      new ObjectPath (Path),
			                      remote_control);

			if (Bus.Session.RequestName (Namespace)
			                != RequestNameReply.PrimaryOwner)
				return null;

			return remote_control;
#else
			if (FirstInstance) {
				// Register an IPC channel for .NET remoting
				// access to our Remote Control
				IpcChannel = new IpcChannel (ServerName);
				ChannelServices.RegisterChannel (IpcChannel, false);
				RemotingConfiguration.RegisterWellKnownServiceType (
					typeof (RemoteControlWrapper),
					WrapperName,
					WellKnownObjectMode.Singleton);

				// The actual Remote Control has many methods
				// that need to be called in the GTK+ mainloop,
				// which will not happen when the method calls
				// come from a .NET remoting client. So we wrap
				// the Remote Control in a class that implements
				// the same interface, but wraps most method
				// calls in Gtk.Application.Invoke.
				//
				// Note that only one RemoteControl is ever
				// created, and that it is stored statically
				// in the RemoteControlWrapper.
				RemoteControl realRemote = new RemoteControl (manager);
				RemoteControlWrapper.Initialize (realRemote);

				RemoteControlWrapper remoteWrapper = (RemoteControlWrapper) Activator.GetObject (
					typeof (RemoteControlWrapper),
					ServiceUrl);
				return realRemote;
			} else {
				// If Tomboy is already running, register a
				// client IPC channel.
				IpcChannel = new IpcChannel (ClientName);
				ChannelServices.RegisterChannel (IpcChannel, false);
				return null;
			}
#endif
		}
コード例 #15
0
		public static void CreateJumpList (NoteManager note_manager)
		{
			ICustomDestinationList custom_destinationd_list = null;
			IObjectArray removed_objects = null;

			try {
				custom_destinationd_list =
				    (ICustomDestinationList) Activator.CreateInstance (Type.GetTypeFromCLSID (CLSID.DestinationList));

				uint slots;
				Guid riid = CLSID.IObjectArray;

				Logger.Debug ("Windows Taskbar: Begin jump list");
				custom_destinationd_list.BeginList (out slots, ref riid, out removed_objects);

				try {
					AddUserTasks (custom_destinationd_list);
				} catch (UnauthorizedAccessException uae) {
					Logger.Warn ("Access denied adding user tasks to jump list: {0}\n{1}",
						uae.Message, uae.StackTrace);
				}
				try {
					AddRecentNotes (custom_destinationd_list, note_manager, slots);
				} catch (UnauthorizedAccessException uae) {
					Logger.Warn ("Access denied adding recent notes to jump list: {0}\n{1}",
						uae.Message, uae.StackTrace);
				}

				Logger.Debug ("Windows Taskbar: Commit jump list");
				custom_destinationd_list.CommitList ();
			} catch (Exception e) {
				Logger.Error ("Error creating jump list: {0}\n{1}", e.Message, e.StackTrace);
				if (custom_destinationd_list != null) {
					custom_destinationd_list.AbortList ();
				}
			} finally {
				if (removed_objects != null) {
					Marshal.FinalReleaseComObject (removed_objects);
					removed_objects = null;
				}

				if (custom_destinationd_list != null) {
					Marshal.FinalReleaseComObject (custom_destinationd_list);
					custom_destinationd_list = null;
				}
			}
		}
コード例 #16
0
		public NotebooksTreeView(Gtk.TreeModel model) : base (model)
		{
			noteManager = Tomboy.DefaultNoteManager;
			
			// Set up the notebooksTree as a drag target so that notes
			// can be dragged into the notebook.
			Gtk.TargetEntry [] targets =
				new Gtk.TargetEntry [] {
					new Gtk.TargetEntry ("text/uri-list",
					Gtk.TargetFlags.App,
					1)
				};

			Gtk.Drag.DestSet (this,
							  Gtk.DestDefaults.All,
							  targets,
							  Gdk.DragAction.Move);
		}
コード例 #17
0
        public static void CleanupOld(NoteManager manager)
        {
            List<Note> kill_list = new List<Note> ();
            DateTime date_today = DateTime.Today; // time set to 00:00:00

            foreach (Note note in manager.Notes) {
                if (note.Title.StartsWith (title_prefix) &&
                                note.Title != TemplateTitle &&
                                note.CreateDate.Date != date_today &&
                                !HasChanged (note)) {
                    kill_list.Add (note);
                }
            }

            foreach (Note note in kill_list) {
                Logger.Debug ("NoteOfTheDay: Deleting old unmodified '{0}'",
                            note.Title);
                manager.Delete (note);
            }
        }
コード例 #18
0
ファイル: Client.cs プロジェクト: t-ashula/iolin
 public Client(OperaLink.Configs conf)
 {
     conf_ = conf;
       typeds_ = new TypedHistoryManager();
       ses_ = new SearchEngineManager();
       sds_ = new SpeedDialManager();
       notes_ = new NoteManager();
       bms_ = new BookmarkManager();
       xml_settings_ = new XmlWriterSettings
       {
     Encoding = System.Text.Encoding.UTF8,
     NewLineOnAttributes = false,
       };
       sync_state_ = 0;
       short_interval_ = 60;
       long_interval_ = 120;
       token_ = "";
       LastStatus = "";
       enc_ = Encoding.GetEncoding("utf-8");
 }
コード例 #19
0
ファイル: NotePanel.cs プロジェクト: fredatgithub/DtPad
        private void openOnEditorToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form1 form = (Form1)ParentForm;

            NoteManager.OpenNoteOnEditor(form);
        }
コード例 #20
0
ファイル: Applet.cs プロジェクト: MichaelAquilina/tomboy
		public TomboyPanelAppletEventBox (NoteManager manager)
: base ()
		{
			this.manager = manager;
			tray = new TomboyTray (manager, this);

			// Load a 16x16-sized icon to ensure we don't end up with a
			// 1x1 pixel.
			panel_size = 16;
			// Load Icon to display in the panel.
			// First we try the "tomboy-panel" icon. This icon can be replaced
			// by the user's icon theme. If the theme does not have this icon
			// then we fall back to the Tomboy Menu icon named "tomboy".
			var icon = GuiUtils.GetIcon ("tomboy-panel", panel_size) ??
				GuiUtils.GetIcon ("tomboy", panel_size);
			this.image = new Gtk.Image (icon);

			this.CanFocus = true;
			this.ButtonPressEvent += ButtonPress;
			this.Add (image);
			this.ShowAll ();

			string tip_text = TomboyTrayUtils.GetToolTipText ();

			tips = new Gtk.Tooltips ();
			tips.SetTip (this, tip_text, null);
			tips.Enable ();
			tips.Sink ();

			SetupDragAndDrop ();
		}
コード例 #21
0
ファイル: Tray.cs プロジェクト: MichaelAquilina/tomboy
		protected TomboyTray (NoteManager manager)
		{
			this.manager = manager;
			
			tray_menu = MakeTrayNotesMenu ();
		}
コード例 #22
0
ファイル: GoalPlate.cs プロジェクト: Yoonya/3DRhythmGameUnity
 // Start is called before the first frame update
 void Start()
 {
     theAudio  = GetComponent <AudioSource>();
     theNote   = FindObjectOfType <NoteManager>();
     theResult = FindObjectOfType <Result>();
 }
コード例 #23
0
        private void DrawScaleNoteList(IGenericDrawingSurface g, int offsetX, int startY, ScaleItem scale, ColorValue fontColor)
        {
            string scaleNotes = "";
            int    notePos    = 0;

            try
            {
                for (int i = 0; i < scale.ScaleIntervals.Length; i++)
                {
                    if (scale.ScaleIntervals[i])
                    {
                        notePos++;

                        scaleNotes += NoteManager.GetNoteName(scale.GetNoteAtSequencePosition(notePos, NoteManager.GetNoteByName(_guitarModel.SelectedKey)), true);
                        scaleNotes += "  ";
                    }
                }
            }
            catch (Exception)
            {
                System.Diagnostics.Debug.WriteLine("Exception: Couldn't resolve note name at one or more scale position");
            }

            g.DrawString(offsetX + 2, startY + 18, "Notes:", BasicFontSizePt, fontColor);
            g.DrawString(offsetX + 40, startY + 18, scaleNotes, BasicFontSizePt, fontColor);
        }
コード例 #24
0
ファイル: SyncDialog.cs プロジェクト: MichaelAquilina/tomboy
		public void NoteConflictDetected (NoteManager manager,
		                             Note localConflictNote,
		                             NoteUpdate remoteNote,
		                             IList<string> noteUpdateTitles)
		{
			SyncTitleConflictResolution savedBehavior = SyncTitleConflictResolution.Cancel;
			object dlgBehaviorPref = Preferences.Get (Preferences.SYNC_CONFIGURED_CONFLICT_BEHAVIOR);
			if (dlgBehaviorPref != null && dlgBehaviorPref is int) // TODO: Check range of this int
				savedBehavior = (SyncTitleConflictResolution)dlgBehaviorPref;

			SyncTitleConflictResolution resolution = SyncTitleConflictResolution.OverwriteExisting;
			// This event handler will be called by the synchronization thread
			// so we have to use the delegate here to manipulate the GUI.
			// To be consistent, any exceptions in the delgate will be caught
			// and then rethrown in the synchronization thread.
			Exception mainThreadException = null;
			Gtk.Application.Invoke (delegate {
				try {
					SyncTitleConflictDialog conflictDlg =
					new SyncTitleConflictDialog (localConflictNote, noteUpdateTitles);
					Gtk.ResponseType reponse = Gtk.ResponseType.Ok;

					bool noteSyncBitsMatch =
					        SyncManager.SynchronizedNoteXmlMatches (localConflictNote.GetCompleteNoteXml (),
					                                                remoteNote.XmlContent);

					// If the synchronized note content is in conflict
					// and there is no saved conflict handling behavior, show the dialog
					if (!noteSyncBitsMatch && savedBehavior == 0)
						reponse = (Gtk.ResponseType) conflictDlg.Run ();


					if (reponse == Gtk.ResponseType.Cancel)
						resolution = SyncTitleConflictResolution.Cancel;
					else {
						if (noteSyncBitsMatch)
							resolution = SyncTitleConflictResolution.OverwriteExisting;
						else if (savedBehavior == 0)
							resolution = conflictDlg.Resolution;
						else
							resolution = savedBehavior;

						switch (resolution) {
						case SyncTitleConflictResolution.OverwriteExisting:
							if (conflictDlg.AlwaysPerformThisAction)
								savedBehavior = resolution;
							// No need to delete if sync will overwrite
							if (localConflictNote.Id != remoteNote.UUID)
								manager.Delete (localConflictNote);
							break;
						case SyncTitleConflictResolution.RenameExistingAndUpdate:
							if (conflictDlg.AlwaysPerformThisAction)
								savedBehavior = resolution;
							RenameNote (localConflictNote, conflictDlg.RenamedTitle, true);
							break;
						case SyncTitleConflictResolution.RenameExistingNoUpdate:
							if (conflictDlg.AlwaysPerformThisAction)
								savedBehavior = resolution;
							RenameNote (localConflictNote, conflictDlg.RenamedTitle, false);
							break;
						}
					}

					Preferences.Set (Preferences.SYNC_CONFIGURED_CONFLICT_BEHAVIOR,
					                 (int) savedBehavior); // TODO: Clean up

					conflictDlg.Hide ();
					conflictDlg.Destroy ();

					// Let the SyncManager continue
					SyncManager.ResolveConflict (/*localConflictNote, */resolution);
				} catch (Exception e) {
					mainThreadException = e;
				}
			});
			if (mainThreadException != null)
				throw mainThreadException;
		}
コード例 #25
0
ファイル: NotePanel.cs プロジェクト: fredatgithub/DtPad
        private void moveUpToolStripButton_Click(object sender, EventArgs e)
        {
            Form1 form = (Form1)ParentForm;

            NoteManager.MoveNoteFirstOrUp(form);
        }
コード例 #26
0
 public TransformExtension(NoteManager manager, Note root_note)
 {
     this.manager        = manager;
     this.resolved_notes = new List <string> ();
     this.resolved_notes.Add(root_note.Title.ToLower());
 }
コード例 #27
0
ファイル: HomeController.cs プロジェクト: ysa01/MyEverNote
        }// bu kod tempdata yapmadan categorileri index syfasındaçağırttık redirectoActionla sayfayı verdik ardından cat.notes notları çağırıp indexte görüntülettirdik

        public ActionResult MostLiked()
        {
            NoteManager mn = new NoteManager();

            return(View("Index", mn.GetAllNote().OrderByDescending(x => x.LikeCount).ToList()));
        }
コード例 #28
0
    // Use this for initialization
    void Start()
    {
        resetGlobalVariable();

        float secondPerMeasure = 240f / Global.currentModeInfo.bpm;

        // 판정 오브젝트
        judgeAnimation = judgeObject.GetComponent <JudgementAnimation>() as JudgementAnimation;
        //judgeObject.SetActive(false);


        if (Global.musicInfo != null)
        {
            // 오디오 로드
            mp3Audio      = GetComponent <AudioSource>();
            mp3Audio.clip = RSC.GetAudio(Global.musicInfo[Global.currentSelectMusic].mp3Name);
            if (mp3Audio.clip == null)
            {
                Debug.Log("Cannot load audio file.");
            }

            // 배경 비디오 로드
            GameObject tmpGO = RSC.GetVideo(Global.musicInfo[Global.currentSelectMusic].bgaName) as GameObject;
            if (tmpGO != null)
            {
                videoCache = tmpGO.GetComponent <MediaPlayerCtrl>();
                if (videoCache != null)
                {
                    videoCache.m_bLoop       = false;
                    videoCache.m_bFullScreen = true;
                    videoCache.m_bAutoPlay   = false;
                    Array.Resize(ref videoCache.m_TargetMaterial, 1);
                    videoCache.m_TargetMaterial[0] = bgObject;
                    videoCache.Stop();
                }
                else
                {
                    Debug.Log("Cannot load videocache.");
                }
            }
            else
            {
                Debug.Log("Object not Found");
            }
        }
        else
        {
            Debug.Log("Cannot load videocache.");
        }

        // 노트 오브젝트 로드
        if (Global.currentModeInfo.noteInfo != null)
        {
            Global.noteManager = new Dictionary <int, List <NoteManager> >();
            for (int i = 0; i < Global.currentModeInfo.noteInfo.Count; ++i)
            {
                List <NoteManager> tmpNoteManagerList = new List <NoteManager>();
                for (int j = 0; j < Global.currentModeInfo.noteInfo[i].Count; ++j)
                {
                    GameObject  noteObject     = Instantiate(dummyNote) as GameObject;
                    NoteManager tmpNoteManager = noteObject.GetComponent <NoteManager>() as NoteManager;
                    tmpNoteManager.noteInfo = Global.currentModeInfo.noteInfo[i][j];
                    noteObject.transform.SetParent(dummyNote.transform.parent);
                    noteObject.transform.localScale = new Vector3(1, 1, 1);
                    switch (tmpNoteManager.noteInfo.type)
                    {
                    case NoteType.Normal:
                    {
                        switch (tmpNoteManager.noteInfo.drag)
                        {
                        case DragType.Normal:
                            break;

                        case DragType.DragBody1:
                        case DragType.DragHead1:
                        case DragType.DragTail1:
                        case DragType.DragBody2:
                        case DragType.DragHead2:
                        case DragType.DragTail2:
                        { noteObject.GetComponent <UI2DSprite>().sprite2D = dummySprites[1]; }
                        break;

                        default:
                            break;
                        }
                    }
                    break;

                    case NoteType.LongHead:
                    case NoteType.LongBody:
                    case NoteType.LongTail:
                    { noteObject.GetComponent <UI2DSprite>().sprite2D = dummySprites[2]; }
                    break;

                    default:
                        break;
                    }
                    tmpNoteManager.absoluteTime = Global.firstNoteDelayTime + (secondPerMeasure * tmpNoteManager.noteInfo.measure) + (secondPerMeasure * tmpNoteManager.noteInfo.grid);

                    Vector3 tmpVector = new Vector3();
                    tmpVector.x = Global.sequencePosition[i].x;
                    tmpVector.y = Global.sequencePosition[i].y;
                    tmpVector.z = (float)(tmpNoteManager.absoluteTime * Global.z_PerMeasure);
                    noteObject.transform.localPosition = tmpNoteManager.absolutePosition = tmpVector;

                    //noteObject.SetActive(true);

                    noteObject.GetComponent <UIWidget>().depth = 10000 - j;

                    tmpNoteManagerList.Add(tmpNoteManager);
                }
                Global.noteManager[i] = tmpNoteManagerList;
            }
        }
    }
コード例 #29
0
    void processTouch(int currentNum)
    {
        for (int i = 0; i < Global.noteManager[currentNum].Count; ++i)
        {
            NoteManager tmpNM = Global.noteManager[currentNum][i];

            if (tmpNM.absoluteTime >= Global.judgeInfo[JudgeType.Miss].term)
            {
                break;
            }

            if (tmpNM.noteInfo.type == NoteType.Normal && tmpNM.noteInfo.drag == DragType.Normal)
            { // 일반 노트
                for (JudgeType j = 0; j < JudgeType.End; ++j)
                {
                    if (tmpNM.absoluteTime <= Global.judgeInfo[j].term &&
                        tmpNM.absoluteTime >= -Global.judgeInfo[j].term)
                    {
                        Global.noteManager[currentNum].Remove(tmpNM);
                        tmpNM.destroyObject();
                        addScore(Global.judgeInfo[j].score);
                        switch (j)
                        {
                        case JudgeType.Good:
                        {
                            setEffect(currentNum);
                        }
                        break;

                        case JudgeType.Miss:
                        {
                            resetCombo();
                        }
                        break;

                        default:
                        {
                            setEffect(currentNum);
                            addCombo(1);
                        }
                        break;
                        }
                        judgeAnimation.startJudgeAnimation(j);

                        return;
                    }
                }
            }
            else
            { // 롱노트, 드래그노트
                if (tmpNM.absoluteTime <= Global.judgeInfo[JudgeType.Long_Perfect].term)
                {
                    Global.noteManager[currentNum].Remove(tmpNM);
                    tmpNM.destroyObject();
                    addCombo(1);
                    if (tmpNM.noteInfo.type >= NoteType.LongBody)
                    {
                        addScore(Global.judgeInfo[JudgeType.Long_Perfect].score);
                    }
                    else if (tmpNM.noteInfo.drag >= DragType.DragBody1)
                    {
                        addScore(Global.judgeInfo[JudgeType.Perfect].score / 2);
                    }
                    setEffect(currentNum);
                    judgeAnimation.startJudgeAnimation(JudgeType.Perfect);
                    continue;
                }
            }
        }
    }
コード例 #30
0
 private void Start()
 {
     note = target.GetComponentInChildren <NoteManager>();
 }
コード例 #31
0
        public void DrawGuitarString(GuitarString s, int startY, int offsetX, IGenericDrawingSurface g)
        {
            String strNote = "";
            int    startX  = offsetX;

            //draw string
            int fretboardWidth = s.GetFretboardWidth(_guitarModel, s.StringNumber);
            int fanScaleMM     = (int)_guitarModel.MultiScaleFanFactor;

            if (_guitarModel.IsMultiScale)
            {
                startX        += (s.StringNumber * fanScaleMM);
                fretboardWidth = fretboardWidth - (s.StringNumber * fanScaleMM * 2);
            }

            if (_guitarModel.GuitarModelSettings.EnableDiagramStrings)
            {
                var stringThickness = 0.3 + ((_guitarModel.NumberOfStrings - s.StringNumber) * 0.1);

                g.DrawLine(startX, startY - 0.5, startX + fretboardWidth, startY - 0.5, stringThickness, ColorPalette[ThemeColorPreset.Foreground]);
                g.DrawLine(startX, startY, startX + fretboardWidth, startY, stringThickness, ColorPalette[ThemeColorPreset.MutedForeground]);
            }

            for (int fretNum = 0; fretNum <= _guitarModel.GuitarModelSettings.NumberFrets; fretNum++)
            {
                int tmpVal = fretNum + (int)s.OpenTuning.SelectedNote;
                int octave = 1;
                if (tmpVal > 11)
                {
                    tmpVal = tmpVal - 12;
                    octave++;
                }
                if (tmpVal > 11)
                {
                    tmpVal = tmpVal - 12;
                    octave++;
                }

                int sclVal = (fretNum - (int)_guitarModel.GuitarModelSettings.ScaleManager.CurrentKey) + (int)s.OpenTuning.SelectedNote;
                if (sclVal < 0)
                {
                    sclVal = sclVal + 12;
                }
                if (sclVal > 11)
                {
                    sclVal = sclVal - 12;
                }
                if (sclVal > 11)
                {
                    sclVal = sclVal - 12;
                }

                if (sclVal < 0)
                {
                    System.Diagnostics.Debug.WriteLine(sclVal);
                }

                if (_guitarModel.SelectedScale.ScaleIntervals[sclVal] == true)
                {
                    if (fretNum <= _guitarModel.GuitarModelSettings.NumberFrets)
                    {
                        ColorValue strokeColor = ColorPalette[ThemeColorPreset.Foreground];
                        ColorValue fillColor   = ColorPalette[ThemeColorPreset.Foreground];

                        if (fretNum == 0)
                        {
                            //fret zero has empty circle marker
                            fillColor = ColorPalette[ThemeColorPreset.Subtle];
                        }

                        if ((Note)tmpVal == _guitarModel.GetKey())
                        {
                            //root note has accent colour border
                            strokeColor = ColorPalette[ThemeColorPreset.Accent];
                        }

                        if (_guitarModel.GuitarModelSettings.EnableDisplacedFingeringMarkers)
                        {
                            //displace marker to place behind fret

                            if (fretNum > 0)
                            {
                                var posL = startX - GuitarString.FretNumberToClientX(fretNum - 1, _guitarModel, s.StringNumber);
                                startX -= posL / 2;
                                startX += (_guitarModel.GuitarModelSettings.MarkerSize / 2);
                            }
                            else
                            {
                                //fret 0, displace marker behind nut
                                startX = startX - (_guitarModel.GuitarModelSettings.MarkerSize / 2);
                            }
                        }

                        var currentNote = new NoteItem
                        {
                            Note         = (Note)tmpVal,
                            X            = startX - (_guitarModel.GuitarModelSettings.MarkerSize / 2),
                            Y            = startY - (_guitarModel.GuitarModelSettings.MarkerSize / 2),
                            FretNumber   = fretNum,
                            StringNumber = s.StringNumber,
                            Octave       = octave
                        };

                        _noteList.Add(currentNote);


                        if (_hightlightedNotes.Any(n => n.Note == currentNote.Note && n.StringNumber == currentNote.StringNumber && n.Octave == currentNote.Octave))
                        {
                            // highlight

                            g.FillEllipse(startX - (_guitarModel.GuitarModelSettings.MarkerSize / 2), startY - (_guitarModel.GuitarModelSettings.MarkerSize / 2), _guitarModel.GuitarModelSettings.MarkerSize, _guitarModel.GuitarModelSettings.MarkerSize, ColorPalette[ThemeColorPreset.MutedBackground], new ColorValue(255, 255, 255, 255));
                        }

                        //draw note marker centered behind fret
                        if (_guitarModel.GuitarModelSettings.EnableNoteColours == true)
                        {
                            var noteColor = NoteManager.GetNoteColour((Note)tmpVal, 2);
                            if (_hightlightedNotes.Any())
                            {
                                noteColor.A = 128;
                            }
                            g.FillEllipse(startX - (_guitarModel.GuitarModelSettings.MarkerSize / 2), startY - (_guitarModel.GuitarModelSettings.MarkerSize / 2), _guitarModel.GuitarModelSettings.MarkerSize, _guitarModel.GuitarModelSettings.MarkerSize, ColorPalette[ThemeColorPreset.MutedBackground], noteColor);
                        }
                        else
                        {
                            g.FillEllipse(startX - (_guitarModel.GuitarModelSettings.MarkerSize / 2), startY - (_guitarModel.GuitarModelSettings.MarkerSize / 2), _guitarModel.GuitarModelSettings.MarkerSize, _guitarModel.GuitarModelSettings.MarkerSize, fillColor, strokeColor);
                        }

                        //if enabled, draw note name/sequence number
                        if (_guitarModel.GuitarModelSettings.EnableDiagramNoteNames || _guitarModel.GuitarModelSettings.EnableDiagramNoteSequence || _guitarModel.GuitarModelSettings.EnableDiagramScaleIntervals)
                        {
                            if (_guitarModel.GuitarModelSettings.EnableDiagramNoteNames)
                            {
                                strNote = NoteManager.GetNoteName((Note)tmpVal, _guitarModel.GuitarModelSettings.EnableDiagramNoteNamesSharp);
                            }
                            if (_guitarModel.GuitarModelSettings.EnableDiagramNoteSequence)
                            {
                                strNote = "" + _guitarModel.GuitarModelSettings.ScaleManager.CurrentScale.GetSequenceNumberInScale(sclVal);
                            }
                            if (_guitarModel.GuitarModelSettings.EnableDiagramScaleIntervals)
                            {
                                strNote = "" + _guitarModel.GuitarModelSettings.ScaleManager.CurrentScale.GetIntervalNameInScale(sclVal);
                            }

                            double markerFontSize = BasicFontSizePt;
                            double labelX         = startX - (_guitarModel.GuitarModelSettings.MarkerSize * 0.45);
                            double labelY         = startY - (markerFontSize * 0.3);
                            if (strNote.Length == 1)
                            {
                                labelX += markerFontSize * 0.3;
                                g.DrawString(labelX + 0.5, labelY + 0.5, strNote, markerFontSize, ColorPalette[ThemeColorPreset.TextShadow]); //shadow
                                g.DrawString(labelX, labelY, strNote, markerFontSize, ColorPalette[ThemeColorPreset.ForegroundText]);
                            }
                            else
                            {
                                labelX += markerFontSize * 0.2;
                                labelY += markerFontSize * 0.1;
                                g.DrawString(labelX + 0.5, labelY + 0.5, strNote, markerFontSize * .8, ColorPalette[ThemeColorPreset.TextShadow]);
                                g.DrawString(labelX, labelY, strNote, markerFontSize * .8, ColorPalette[ThemeColorPreset.ForegroundText]);
                            }
                        }
                    }
                }

                startX = offsetX + GuitarString.FretNumberToClientX(fretNum + 1, _guitarModel, s.StringNumber);
            }
        }
コード例 #32
0
ファイル: NotePanel.cs プロジェクト: fredatgithub/DtPad
        private void moveLastToolStripButton_Click(object sender, EventArgs e)
        {
            Form1 form = (Form1)ParentForm;

            NoteManager.MoveNoteDownOrLast(form, true);
        }
コード例 #33
0
ファイル: FloodRunner.cs プロジェクト: vtaran/Dynamo
 public bool DeleteNote(NoteModel note, object whereFromDelete)
 {
     return(NoteManager.DeleteNote(note, whereFromDelete));
 }
コード例 #34
0
 private void Awake()
 {
     noteManager  = NoteManager.Instance;
     soundManager = SoundManager.Instance;
 }
コード例 #35
0
ファイル: Tomboy.cs プロジェクト: GNOME/tomboy
		public static void Main (string [] args)
		{
			// TODO: Extract to a PreInit in Application, or something
#if WIN32
			string tomboy_path =
				Environment.GetEnvironmentVariable ("TOMBOY_PATH_PREFIX");
			string tomboy_gtk_basepath =
				Environment.GetEnvironmentVariable ("TOMBOY_GTK_BASEPATH");
			Environment.SetEnvironmentVariable ("GTK_BASEPATH",
				tomboy_gtk_basepath ?? string.Empty);
			if (string.IsNullOrEmpty (tomboy_path)) {
				string gtk_lib_path = null;
				try {
					gtk_lib_path = (string)
						Microsoft.Win32.Registry.GetValue (@"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\AssemblyFolders\GtkSharp",
						                                   string.Empty,
						                                   string.Empty);
				} catch (Exception e) {
					Console.WriteLine ("Exception while trying to get GTK# install path: " +
					                   e.ToString ());
				}
				if (!string.IsNullOrEmpty (gtk_lib_path))
					tomboy_path =
						gtk_lib_path.Replace ("lib\\gtk-sharp-2.0", "bin");
			}
			if (!string.IsNullOrEmpty (tomboy_path))
				Environment.SetEnvironmentVariable ("PATH",
				                                    tomboy_path +
				                                    Path.PathSeparator +
				                                    Environment.GetEnvironmentVariable ("PATH"));
#endif
			Catalog.Init ("tomboy", Defines.GNOME_LOCALE_DIR);

			TomboyCommandLine cmd_line = new TomboyCommandLine (args);
			debugging = cmd_line.Debug;
			uninstalled = cmd_line.Uninstalled;

			if (!RemoteControlProxy.FirstInstance) {
				if (!cmd_line.NeedsExecute)
					cmd_line = new TomboyCommandLine (new string [] {"--search"});
				// Execute args at an existing tomboy instance...
				cmd_line.Execute ();
				Console.WriteLine ("Tomboy is already running.  Exiting...");
				return;
			}

			Logger.LogLevel = debugging ? Level.DEBUG : Level.INFO;
#if PANEL_APPLET
			is_panel_applet = cmd_line.UsePanelApplet;
#else
			is_panel_applet = false;
#endif

			// NOTE: It is important not to use the Preferences
			//       class before this call.
			Initialize ("tomboy", "Tomboy", "tomboy", args);

			// Add private icon dir to search path
			icon_theme = Gtk.IconTheme.Default;
			icon_theme.AppendSearchPath (Path.Combine (Path.Combine (Defines.DATADIR, "tomboy"), "icons"));

			// Create the default note manager instance.
			string note_path = GetNotePath (cmd_line.NotePath);
			manager = new NoteManager (note_path);
			manager.CommandLine = cmd_line;

			SetupGlobalActions ();
			ActionManager am = Tomboy.ActionManager;

			// TODO: Instead of just delaying, lazy-load
			//       (only an issue for add-ins that need to be
			//       available at Tomboy startup, and restoring
			//       previously-opened notes)
			GLib.Timeout.Add (500, () => {
				manager.Initialize ();
				SyncManager.Initialize ();

				ApplicationAddin [] addins =
				        manager.AddinManager.GetApplicationAddins ();
				foreach (ApplicationAddin addin in addins) {
					addin.Initialize ();
				}

				// Register the manager to handle remote requests.
				RegisterRemoteControl (manager);
				if (cmd_line.NeedsExecute) {
					// Execute args on this instance
					cmd_line.Execute ();
				}
#if WIN32
				if (Environment.OSVersion.Platform == PlatformID.Win32NT) {
					var os_version = Environment.OSVersion.Version;
					if (( os_version.Major == 6 && os_version.Minor > 0 ) || os_version.Major > 6) {
						JumpListManager.CreateJumpList (manager);

						manager.NoteAdded += delegate (object sender, Note changed) {
							JumpListManager.CreateJumpList (manager);
						};

						manager.NoteRenamed += delegate (Note sender, string old_title) {
							JumpListManager.CreateJumpList (manager);
						};

						manager.NoteDeleted += delegate (object sender, Note changed) {
							JumpListManager.CreateJumpList (manager);
						};
					}
				}
#endif
				return false;
			});

#if PANEL_APPLET
			if (is_panel_applet) {
				tray_icon_showing = true;

				// Show the Close item and hide the Quit item
				am ["CloseWindowAction"].Visible = true;
				am ["QuitTomboyAction"].Visible = false;

				RegisterPanelAppletFactory ();
				Logger.Debug ("All done.  Ciao!");
				Exit (0);
			}
#endif
			RegisterSessionManagerRestart (
			        Environment.GetEnvironmentVariable ("TOMBOY_WRAPPER_PATH"),
			        args,
			        new string [] { "TOMBOY_PATH=" + note_path  }); // TODO: Pass along XDG_*?
			StartTrayIcon ();

			Logger.Debug ("All done.  Ciao!");
		}
コード例 #36
0
        public ActionResult ViewClient(string sessionid, string Clientid)
        {
            objResponse Response = new objResponse();
            ClientModel model    = new ClientModel();

            session = new SessionHelper();
            EventManager    objEventManager = new EventManager();
            TaskManager     objTaskManager  = new TaskManager();
            DocumentManager objDocManager   = new DocumentManager();
            NoteManager     objNoteManager  = new NoteManager();

            UserManager  objUserManager = new UserManager();
            List <Users> UserList       = new List <Users>();

            UserList = objUserManager.GetUsers(session.UserSession.PIN);
            try
            {
                Response = objClientsManager.ViewClients(Convert.ToInt64(Clientid));

                if (Response.ErrorCode == 0)
                {
                    model.Client_ID         = Convert.ToInt64(Response.ResponseData.Tables[0].Rows[0]["Client_ID_Auto_PK"]);
                    model.Date              = Response.ResponseData.Tables[0].Rows[0]["Date"].ToString();
                    model.Name              = Response.ResponseData.Tables[0].Rows[0]["Name"].ToString();
                    model.CompanyName       = Response.ResponseData.Tables[0].Rows[0]["CompanyName"].ToString();
                    model.Email             = Response.ResponseData.Tables[0].Rows[0]["Email"].ToString();
                    model.Alternate_Email   = Response.ResponseData.Tables[0].Rows[0]["Alternate_Email"].ToString();
                    model.ContactNo         = Response.ResponseData.Tables[0].Rows[0]["ContactNo"].ToString();
                    model.SkypeNo           = Response.ResponseData.Tables[0].Rows[0]["SkypeNo"].ToString();;
                    model.AddressLine1      = Response.ResponseData.Tables[0].Rows[0]["AddressLine1"].ToString();
                    model.AddressLine2      = Response.ResponseData.Tables[0].Rows[0]["AddressLine2"].ToString();
                    model.City              = Response.ResponseData.Tables[0].Rows[0]["City"].ToString();;
                    model.State             = Response.ResponseData.Tables[0].Rows[0]["State"].ToString();
                    model.Country           = Response.ResponseData.Tables[0].Rows[0]["Country"].ToString();
                    model.ZipCode           = Response.ResponseData.Tables[0].Rows[0]["Zipcode"].ToString();
                    model.Client_Owner_Name = Response.ResponseData.Tables[0].Rows[0]["Owner"].ToString();
                    model.Source            = Response.ResponseData.Tables[0].Rows[0]["Source"].ToString();
                    model.JobDescription    = Response.ResponseData.Tables[0].Rows[0]["JobDescription"].ToString();

                    model.Events     = objEventManager.getEventsByRelateToID(Convert.ToInt64(session.UserSession.PIN), session.UserSession.UserId, Convert.ToInt64(Clientid), "CLIENT");
                    model.activities = UtilityManager.getActivityByRelateToID(Convert.ToInt64(session.UserSession.PIN), Convert.ToInt64(Clientid), "CLIENT");
                    model.tasks      = objTaskManager.getTasksByRelateToID(Convert.ToInt64(session.UserSession.PIN), Convert.ToInt64(Clientid), session.UserSession.UserId, "CLIENT");
                    model.Doc        = objDocManager.getDocsRelatedToID(Convert.ToInt64(session.UserSession.PIN), Convert.ToInt64(Clientid), "CLIENT", session.UserSession.UserId);
                    model.notes      = objNoteManager.getNotesByRelateToID(Convert.ToInt64(session.UserSession.PIN), Convert.ToInt64(Clientid), session.UserSession.UserId, "CLIENT");

                    ViewBag.Users = UserList;
                    return(View(model));
                }
                else
                {
                    ViewBag.Users     = UserList;
                    ViewBag.Error_Msg = "There is error in Fetching Client Details";
                    return(View(model));
                }
            }
            catch (Exception ex)
            {
                ViewBag.Users     = UserList;
                ViewBag.Error_Msg = ex.Message.ToString();;
                BAL.Common.LogManager.LogError("ViewClient Contro", 1, Convert.ToString(ex.Source), Convert.ToString(ex.Message), Convert.ToString(ex.StackTrace));
                return(View(model));
            }
        }
コード例 #37
0
		private static void AddRecentNotes (ICustomDestinationList custom_destinationd_list, NoteManager note_manager, uint slots)
		{
			IObjectCollection object_collection =
			    (IObjectCollection) Activator.CreateInstance (Type.GetTypeFromCLSID (CLSID.EnumerableObjectCollection));

			// Prevent template notes from appearing in the menu
			Tag template_tag = TagManager.GetOrCreateSystemTag (TagManager.TemplateNoteSystemTag);

			uint index = 0;
			foreach (Note note in note_manager.Notes) {
				if (note.IsSpecial)
					continue;

				// Skip template notes
				if (note.ContainsTag (template_tag))
					continue;

				string note_title = note.Title;
				if (note.IsNew) {
					note_title = String.Format (Catalog.GetString ("{0} (new)"), note_title);
				}

				IShellLink note_link = CreateShellLink (note_title, tomboy_path, "--open-note " + note.Uri,
				                                        System.IO.Path.Combine (icons_path, NoteIcon), -1);
				if (note_link != null)
					object_collection.AddObject (note_link);

				if (++index == slots - 1)
					break;
			}

			// Add Start Here note
			Note start_note = note_manager.FindByUri (NoteManager.StartNoteUri);
			if (start_note != null) {
				IShellLink start_note_link = CreateShellLink (start_note.Title, tomboy_path, "--open-note " +
				                                              NoteManager.StartNoteUri,
				                                              System.IO.Path.Combine (icons_path, NoteIcon), -1);
				if (start_note_link != null)
					object_collection.AddObject (start_note_link);
			}

			custom_destinationd_list.AppendCategory (Catalog.GetString ("Recent Notes"), (IObjectArray) object_collection);

			Marshal.ReleaseComObject (object_collection);
			object_collection = null;
		}
コード例 #38
0
ファイル: NoteChecker.cs プロジェクト: jang982/portfolio
 void Start()
 {
     noteManager = this.GetComponent <NoteManager>();
 }
コード例 #39
0
 public HomeController()
 {
     userManager     = new UserManager();
     noteManager     = new NoteManager();
     categoryManager = new CategoryManager();
 }
コード例 #40
0
        private void TransferData(EntityCollection ec, IOrganizationService service)
        {
            // References to websites
            var webSitesRefId = ec.Entities.SelectMany(e => e.Attributes)
                                .Where(a => a.Value is EntityReference reference && reference.LogicalName == "adx_website")
                                .Select(a => ((EntityReference)a.Value).Id)
                                .Distinct()
                                .ToList();

            // Websites included in records to process
            var webSitesIds = ec.Entities.Where(e => e.LogicalName == "adx_website")
                              .Select(e => e.Id)
                              .ToList();

            // If some references are not found in websites included in records
            // to process, ask the user to map to the appropriate website
            if (!webSitesRefId.All(id => webSitesIds.Contains(id)))
            {
                try
                {
                    var targetWebSites = service.RetrieveMultiple(new QueryExpression("adx_website")
                    {
                        ColumnSet = new ColumnSet("adx_name")
                    }).Entities;

                    if (!webSitesRefId.All(id => targetWebSites.Select(w => w.Id).Contains(id)))
                    {
                        var wsmDialog = new WebSiteMapper(ec, targetWebSites.Select(t => new Website(t)).ToList());
                        if (wsmDialog.ShowDialog() == DialogResult.Cancel)
                        {
                            return;
                        }
                    }
                }
                catch (FaultException <OrganizationServiceFault> error)
                {
                    if (error.Detail.ErrorCode == -2147217150)
                    {
                        MessageBox.Show(this,
                                        @"The target environment does not seem to have Portals solutions installed!",
                                        @"Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }
                    else
                    {
                        MessageBox.Show(this,
                                        $@"An unknown error occured when searching for websites: {error.Detail.Message}",
                                        @"Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }
                    pnlImport.SendToBack();
                    tsMain.Enabled = true;
                    return;
                }
            }

            var pluginCheck     = ec.Entities.Any(e => e.LogicalName == "adx_webpage");
            var javascriptCheck =
                ec.Entities.Any(e =>
                                e.LogicalName == "annotation" &&
                                (e.GetAttributeValue <string>("filename")?.ToLower().EndsWith(".js") ?? false)) &&
                nManager.HasJsRestriction;
            var webFileCleaning = ec.Entities.Any(e =>
                                                  e.LogicalName == "annotation" &&
                                                  e.GetAttributeValue <EntityReference>("objectid")?.LogicalName == "adx_webfile");
            var siteSettingsCheck = ec.Entities.Any(e => e.LogicalName == "adx_sitesetting");

            if (pluginCheck || javascriptCheck || siteSettingsCheck)
            {
                var dialog = new PreImportWarningDialog(pluginCheck, javascriptCheck, webFileCleaning, siteSettingsCheck);
                var result = dialog.ShowDialog(this);
                if (result == DialogResult.Cancel)
                {
                    return;
                }

                iSettings.DeactivateWebPagePlugins        = pluginCheck;
                iSettings.RemoveJavaScriptFileRestriction = javascriptCheck;
                iSettings.CleanWebFiles             = dialog.CleanWebFiles;
                iSettings.CreateOnlyNewSiteSettings = dialog.CreateOnlyNewSiteSettings;
            }

            var lm = new LogManager(GetType());

            if (File.Exists(lm.FilePath))
            {
                if (MessageBox.Show(this, @"A log file already exists. Would you like to create a new log file?", @"Question", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                {
                    File.Copy(lm.FilePath, $"{lm.FilePath.Substring(0, lm.FilePath.Length - 4)}-{DateTime.Now:yyyyMMdd_HHmmss}.txt", true);
                    File.Delete(lm.FilePath);
                }
            }

            btnCancel.Visible     = true;
            btnImport.Enabled     = false;
            pnlImportMain.Visible = true;
            pbImport.IsOnError    = false;
            lvProgress.Items.Clear();

            var worker = new BackgroundWorker
            {
                WorkerReportsProgress      = true,
                WorkerSupportsCancellation = true
            };

            worker.DoWork += (s, evt) =>
            {
                importWorker = (BackgroundWorker)s;

                if (emds.Count == 0)
                {
                    AddTile("Retrieve metadata", "We need entities metadata to process your records");

                    emds = MetadataManager.GetEntitiesList(service);

                    CompleteTile();
                }

                if (iSettings.DeactivateWebPagePlugins)
                {
                    AddTile("Disable plugins", "We need to disable web page plugins to ensure we don't create duplicates");

                    logger.LogInfo("Deactivating Webpage plugins steps");

                    pManager = new PluginManager(service);
                    pManager.DeactivateWebpagePlugins();

                    CompleteTile();

                    logger.LogInfo("Webpage plugins steps deactivated");
                }

                if (iSettings.RemoveJavaScriptFileRestriction && nManager.HasJsRestriction)
                {
                    AddTile("Remove file restriction", "We need to authorize JavaScript file type to create Web file correctly");

                    logger.LogInfo("Removing JavaScript file restriction");

                    nManager = new NoteManager(service);
                    nManager.RemoveRestriction();
                    nManager.TestRestriction();

                    // Wait 2 seconds to be sure the settings is updated
                    Thread.Sleep(2000);

                    CompleteTile();

                    logger.LogInfo("JavaScript file restriction removed");
                }

                AddTile("Process records", "Records are processed in three phases : one phase without lookup being populated. A second phase with lookup being populated. This ensure all relationships between records can be created on the second phase. And a third phase to deactivate records that need it.");

                var rm = new RecordManager(service);
                evt.Cancel = rm.ProcessRecords((EntityCollection)evt.Argument, emds, ConnectionDetail.OrganizationMajorVersion, importWorker, iSettings);

                if (evt.Cancel)
                {
                    CancelTile();
                }
                else
                {
                    CompleteTile();
                }

                if (iSettings.DeactivateWebPagePlugins)
                {
                    AddTile("Enable plugins", "We are enabling web page plugins so that your portal work smoothly");
                    logger.LogInfo("Reactivating Webpage plugins steps");

                    pManager.ActivateWebpagePlugins();

                    logger.LogInfo("Webpage plugins steps activated");
                    CompleteTile();
                }

                if (iSettings.RemoveJavaScriptFileRestriction && nManager.HasJsRestriction)
                {
                    AddTile("Add file restriction", "We are adding back restriction for JavaScript files.");
                    logger.LogInfo("Adding back JavaScript file restriction");

                    importWorker.ReportProgress(0, "Adding back JavaScript file restriction...");
                    nManager.AddRestriction();

                    logger.LogInfo("JavaScript file restriction added back");
                    CompleteTile();
                }
            };
            worker.RunWorkerCompleted += (s, evt) =>
            {
                llOpenLogFile.Visible  = true;
                btnImportClose.Enabled = true;
                btnImport.Enabled      = true;
                btnCancel.Visible      = false;

                if (evt.Cancelled)
                {
                    CancelTile();
                    lblProgress.Text = @"Import was canceled!";
                    return;
                }

                if (evt.Error != null)
                {
                    CancelTile();

                    logger.LogError(evt.Error.ToString());

                    MessageBox.Show(this, $@"An error occured: {evt.Error.Message}", @"Error", MessageBoxButtons.OK,
                                    MessageBoxIcon.Error);
                    return;
                }

                SendMessageToStatusBar?.Invoke(this, new StatusBarMessageEventArgs(string.Empty));
                lblProgress.Text = @"Records imported!";

                if (pbImport.IsOnError)
                {
                    MessageBox.Show(this, @"Import complete with errors

Please review the logs", @"Information", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
                else
                {
                    MessageBox.Show(this, @"Import complete", @"Success", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            };
            worker.ProgressChanged += (s, evt) =>
            {
                if (evt.UserState is string)
                {
                    lblProgress.Text = evt.UserState.ToString();
                    logger.LogInfo(evt.UserState.ToString());

                    SendMessageToStatusBar?.Invoke(this, new StatusBarMessageEventArgs(evt.UserState.ToString()));
                }
                else
                {
                    if (evt.UserState is ImportProgress progress)
                    {
                        foreach (var ep in progress.Entities)
                        {
                            var item = lvProgress.Items.Cast <ListViewItem>().FirstOrDefault(i => i.Tag.ToString() == ep.LogicalName);
                            if (item == null)
                            {
                                item = new ListViewItem($"{ep.Entity} ({ep.Count})")
                                {
                                    Tag = ep.LogicalName
                                };
                                item.SubItems.Add(ep.SuccessFirstPhase.ToString());
                                item.SubItems.Add(ep.ErrorFirstPhase.ToString());
                                item.SubItems.AddRange(new[] { "", "", "", "" });

                                if (ep.SuccessSecondPhase.HasValue || ep.ErrorSecondPhase.HasValue)
                                {
                                    item.SubItems[3].Text = (ep.SuccessSecondPhase ?? 0).ToString();
                                    item.SubItems[4].Text = (ep.ErrorSecondPhase ?? 0).ToString();
                                }

                                if (ep.SuccessSetStatePhase.HasValue || ep.ErrorSetState.HasValue)
                                {
                                    item.SubItems[5].Text = (ep.SuccessSetStatePhase ?? 0).ToString();
                                    item.SubItems[6].Text = (ep.ErrorSetState ?? 0).ToString();
                                }

                                lvProgress.Items.Add(item);
                            }
                            else
                            {
                                item.SubItems[1].Text = ep.SuccessFirstPhase.ToString();
                                item.SubItems[2].Text = ep.ErrorFirstPhase.ToString();

                                if (ep.SuccessSecondPhase.HasValue || ep.ErrorSecondPhase.HasValue)
                                {
                                    item.SubItems[3].Text = (ep.SuccessSecondPhase ?? 0).ToString();
                                    item.SubItems[4].Text = (ep.ErrorSecondPhase ?? 0).ToString();
                                }

                                if (ep.SuccessSetStatePhase.HasValue || ep.ErrorSetState.HasValue)
                                {
                                    item.SubItems[5].Text = (ep.SuccessSetStatePhase ?? 0).ToString();
                                    item.SubItems[6].Text = (ep.ErrorSetState ?? 0).ToString();
                                }
                            }

                            item.ForeColor = ep.ErrorFirstPhase > 0 || ep.ErrorSecondPhase > 0 || ep.ErrorSetState > 0
                                ? Color.Red
                                : Color.Green;

                            if (ep.ErrorFirstPhase > 0 || ep.ErrorSecondPhase > 0 || ep.ErrorSetState > 0)
                            {
                                pbImport.IsOnError = true;
                            }

                            pbImport.Value = progress.Entities.Sum(ent => ent.Processed) * 100 / progress.Count;
                        }
                    }
                }
            };
            worker.RunWorkerAsync(ec);
        }
コード例 #41
0
 private void Start()
 {
     theResult = FindObjectOfType <Result>();
     theNote   = FindObjectOfType <NoteManager>();
 }
コード例 #42
0
ファイル: NoteCtl.cs プロジェクト: wagarashibbb/ShootingNote
 void Start()
 {
     // NoteManagerをシーンから取得
     _noteManager = GameObject.Find(_part.ToString() + "Part").GetComponent <NoteManager>();
 }
コード例 #43
0
ファイル: Tray.cs プロジェクト: MichaelAquilina/tomboy
		public TomboyTray (NoteManager manager, ITomboyTray tray)
			: this (manager)
		{
			this.tray = tray;
		}
コード例 #44
0
        public ActionResult Index()
        {
            NoteManager nm = new NoteManager();

            return(View(nm.ListQueryable().OrderByDescending(x => x.ModifiedOn).ToList()));
        }
コード例 #45
0
 private void Start()
 {
     recordText.text = "...";
     note            = NoteManager.instance;
 }
コード例 #46
0
ファイル: GatePuzzle.cs プロジェクト: Karina10135/Harmonique
 private void Start()
 {
     noteManager = NoteManager.instance;
     anim        = GetComponent <Animator>();
 }
コード例 #47
0
	// Use this for initialization
	void Start () {
		NM = GameObject.FindGameObjectWithTag("NoteManager").GetComponent<NoteManager>();
		//SMS = GameObject.FindGameObjectWithTag ("SoundManager").GetComponent<SoundManagerScript> ();

		SMS = SoundManagerScript.Instance;

		if(noteName == "MiddleC"){
			currentNote = note.MiddleC;
			Yposition = -1.5f;
		}
		if(noteName == "CSharp"){
			currentNote = note.CSharp;
			Yposition = -1.5f;
		}
		if(noteName == "D"){
			currentNote = note.D;
			Yposition = -1.25f;
		}
		if(noteName == "DSharp"){
			currentNote = note.DSharp;
			Yposition = -1.25f;
		}
		if(noteName == "E"){
			currentNote = note.E;
			Yposition = -1f;
		}
		if(noteName == "F"){
			currentNote = note.F;
			Yposition = -0.75f;
		}
		if(noteName == "FSharp"){
			currentNote = note.FSharp;
			Yposition = -0.75f;
		}
		if(noteName == "G"){
			currentNote = note.G;
			Yposition = -0.5f;
		}
		if(noteName == "GSharp"){
			currentNote = note.GSharp;
			Yposition = -0.5f;
		}
		if(noteName == "A"){
			currentNote = note.A;
			Yposition = -0.25f;
		}
		if(noteName == "ASharp"){
			currentNote = note.ASharp;
			Yposition = -0.25f;
		}
		if(noteName == "B"){
			currentNote = note.B;
			Yposition = 0f;
		}
		if(noteName == "HighC"){
			currentNote = note.HighC;
			Yposition = 0.25f;
		}
		if(noteName == "HighCSharp"){
			currentNote = note.HighCSharp;
			Yposition = 0.25f;
		}
		if(noteName == "HighD"){
			currentNote = note.HighD;
			Yposition = 0.5f;
		}
		if(noteName == "HighDSharp"){
			currentNote = note.HighDSharp;
			Yposition = 0.5f;
		}
		if(noteName == "HighE"){
			currentNote = note.HighE;
			Yposition = 0.75f;
		}
		if(noteName == "HighF"){
			currentNote = note.HighF;
			Yposition = 1f;
		}
		this.gameObject.transform.position = new Vector3(transform.position.x, Yposition, transform.position.z);
	}
コード例 #48
0
ファイル: NotePanel.cs プロジェクト: fredatgithub/DtPad
        private void greenToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form1 form = (Form1)ParentForm;

            NoteManager.ChangeNoteColor(form, NoteManager.TagEnum.Green);
        }
コード例 #49
0
ファイル: GameManager.cs プロジェクト: GlitchBoss/MuscalRace
 void StartUp()
 {
     hasStarted = false;
     gas = PlayerPrefs.GetInt("Gas", 0);
     UIM = GameObject.Find("UIManager").GetComponent<UIManager>();
     switch (SceneManager.GetActiveScene().name)
     {
         case "BothClefs":
         case "TrebleClef":
         case "BassClef":
             notesRestartNum = notesLeft;
             NM = GameObject.Find("NoteManager").GetComponent<NoteManager>();
             noteBtns = UIM.noteBtns;
             break;
         case "MainMenu":
             UIM.SetUpGas(gas);
             currentCar = -1;
             notesLeft = notesRestartNum;
             break;
         case "Race":
             spawnPoint = GameObject.FindGameObjectWithTag("SpawnPoint").transform;
             try
             {
                 Instantiate(playerCars[currentCar],
                     spawnPoint.position, playerCars[currentCar].transform.rotation);
             }
             catch(System.IndexOutOfRangeException)
             {
             }
             break;
     }
 }
コード例 #50
0
ファイル: SyncDialog.cs プロジェクト: shubhtr/tomboy-1
        public void NoteConflictDetected(NoteManager manager,
                                         Note localConflictNote,
                                         NoteUpdate remoteNote,
                                         IList <string> noteUpdateTitles)
        {
            SyncTitleConflictResolution savedBehavior = SyncTitleConflictResolution.Cancel;
            object dlgBehaviorPref = Preferences.Get(Preferences.SYNC_CONFIGURED_CONFLICT_BEHAVIOR);

            if (dlgBehaviorPref != null && dlgBehaviorPref is int)             // TODO: Check range of this int
            {
                savedBehavior = (SyncTitleConflictResolution)dlgBehaviorPref;
            }

            SyncTitleConflictResolution resolution = SyncTitleConflictResolution.OverwriteExisting;
            // This event handler will be called by the synchronization thread
            // so we have to use the delegate here to manipulate the GUI.
            // To be consistent, any exceptions in the delgate will be caught
            // and then rethrown in the synchronization thread.
            Exception mainThreadException = null;

            Gtk.Application.Invoke(delegate {
                try {
                    SyncTitleConflictDialog conflictDlg =
                        new SyncTitleConflictDialog(localConflictNote, noteUpdateTitles);
                    Gtk.ResponseType reponse = Gtk.ResponseType.Ok;

                    bool noteSyncBitsMatch =
                        SyncManager.SynchronizedNoteXmlMatches(localConflictNote.GetCompleteNoteXml(),
                                                               remoteNote.XmlContent);

                    // If the synchronized note content is in conflict
                    // and there is no saved conflict handling behavior, show the dialog
                    if (!noteSyncBitsMatch && savedBehavior == 0)
                    {
                        reponse = (Gtk.ResponseType)conflictDlg.Run();
                    }


                    if (reponse == Gtk.ResponseType.Cancel)
                    {
                        resolution = SyncTitleConflictResolution.Cancel;
                    }
                    else
                    {
                        if (noteSyncBitsMatch)
                        {
                            resolution = SyncTitleConflictResolution.OverwriteExisting;
                        }
                        else if (savedBehavior == 0)
                        {
                            resolution = conflictDlg.Resolution;
                        }
                        else
                        {
                            resolution = savedBehavior;
                        }

                        switch (resolution)
                        {
                        case SyncTitleConflictResolution.OverwriteExisting:
                            if (conflictDlg.AlwaysPerformThisAction)
                            {
                                savedBehavior = resolution;
                            }
                            // No need to delete if sync will overwrite
                            if (localConflictNote.Id != remoteNote.UUID)
                            {
                                manager.Delete(localConflictNote);
                            }
                            break;

                        case SyncTitleConflictResolution.RenameExistingAndUpdate:
                            if (conflictDlg.AlwaysPerformThisAction)
                            {
                                savedBehavior = resolution;
                            }
                            RenameNote(localConflictNote, conflictDlg.RenamedTitle, true);
                            break;

                        case SyncTitleConflictResolution.RenameExistingNoUpdate:
                            if (conflictDlg.AlwaysPerformThisAction)
                            {
                                savedBehavior = resolution;
                            }
                            RenameNote(localConflictNote, conflictDlg.RenamedTitle, false);
                            break;
                        }
                    }

                    Preferences.Set(Preferences.SYNC_CONFIGURED_CONFLICT_BEHAVIOR,
                                    (int)savedBehavior);                       // TODO: Clean up

                    conflictDlg.Hide();
                    conflictDlg.Destroy();

                    // Let the SyncManager continue
                    SyncManager.ResolveConflict(/*localConflictNote, */ resolution);
                } catch (Exception e) {
                    mainThreadException = e;
                }
            });
            if (mainThreadException != null)
            {
                throw mainThreadException;
            }
        }
コード例 #51
0
		protected NoteRecentChanges (NoteManager manager)
: base (Catalog.GetString ("Search All Notes"))
		{
			this.manager = manager;
			this.IconName = "tomboy";
			this.DefaultWidth = 450;
			this.DefaultHeight = 400;
			this.current_matches = new Dictionary<string, int> ();
			this.Resizable = true;

			selected_tags = new Dictionary<Tag, Tag> ();

			AddAccelGroup (Tomboy.ActionManager.UI.AccelGroup);

			menu_bar = CreateMenuBar ();

			Gtk.Label label = new Gtk.Label (Catalog.GetString ("_Search:"));
			label.Xalign = 0.0f;

			find_combo = Gtk.ComboBoxEntry.NewText ();
			label.MnemonicWidget = find_combo;
			find_combo.Changed += OnEntryChanged;
			find_combo.Entry.ActivatesDefault = false;
			find_combo.Entry.Activated += OnEntryActivated;
			find_combo.Entry.FocusInEvent += OnEntryFocusIn;
			if (previous_searches != null) {
				foreach (string prev in previous_searches) {
					find_combo.AppendText (prev);
				}
			}

			clear_search_button = new Gtk.Button (new Gtk.Image (Gtk.Stock.Clear,
							      Gtk.IconSize.Menu));
			clear_search_button.Sensitive = false;
			clear_search_button.Clicked += ClearSearchClicked;
			clear_search_button.Show ();

			Gtk.Table table = new Gtk.Table (1, 3, false);
			table.Attach (label, 0, 1, 0, 1,
			              Gtk.AttachOptions.Fill,
			              Gtk.AttachOptions.Expand | Gtk.AttachOptions.Fill,
			              0, 0);
			table.Attach (find_combo, 1, 2, 0, 1,
			              Gtk.AttachOptions.Expand | Gtk.AttachOptions.Fill,
			              Gtk.AttachOptions.Expand | Gtk.AttachOptions.Fill,
			              0, 0);
			table.Attach (clear_search_button,
				      2, 3, 0, 1,
			              Gtk.AttachOptions.Fill,
			              Gtk.AttachOptions.Expand | Gtk.AttachOptions.Fill,
			              0, 0);
			table.ColumnSpacing = 4;
			table.ShowAll ();

			Gtk.HBox hbox = new Gtk.HBox (false, 0);
			hbox.PackStart (table, true, true, 0);
			hbox.ShowAll ();

			// Notebooks Pane
			Gtk.Widget notebooksPane = MakeNotebooksPane ();
			notebooksPane.Show ();

			MakeRecentTree ();
			tree.Show ();

			status_bar = new Gtk.Statusbar ();
			status_bar.HasResizeGrip = true;
			status_bar.Show ();

			// Update on changes to notes
			manager.NoteDeleted += OnNotesDeleted;
			manager.NoteAdded += OnNotesChanged;
			manager.NoteRenamed += OnNoteRenamed;
			manager.NoteSaved += OnNoteSaved;

			// List all the current notes
			UpdateResults ();

			matches_window = new Gtk.ScrolledWindow ();
			matches_window.ShadowType = Gtk.ShadowType.In;

			matches_window.HscrollbarPolicy = Gtk.PolicyType.Automatic;
			matches_window.VscrollbarPolicy = Gtk.PolicyType.Automatic;
			matches_window.Add (tree);
			matches_window.Show ();

			hpaned = new Gtk.HPaned ();
			hpaned.Position = 150;
			hpaned.Add1 (notebooksPane);
			hpaned.Add2 (matches_window);
			hpaned.Show ();

			RestorePosition ();

			Gtk.VBox vbox = new Gtk.VBox (false, 8);
			vbox.BorderWidth = 6;
			vbox.PackStart (hbox, false, false, 4);
			vbox.PackStart (hpaned, true, true, 0);
			vbox.PackStart (status_bar, false, false, 0);
			vbox.Show ();

			// Use another VBox to place the MenuBar
			// right at thetop of the window.
			content_vbox = new Gtk.VBox (false, 0);
#if !MAC
			content_vbox.PackStart (menu_bar, false, false, 0);
#endif
			content_vbox.PackStart (vbox, true, true, 0);
			content_vbox.Show ();

			this.Add (content_vbox);
			this.DeleteEvent += OnDelete;
			this.KeyPressEvent += OnKeyPressed; // For Escape

			// Watch when notes are added to notebooks so the search
			// results will be updated immediately instead of waiting
			// until the note's QueueSave () kicks in.
			Notebooks.NotebookManager.NoteAddedToNotebook += OnNoteAddedToNotebook;
			Notebooks.NotebookManager.NoteRemovedFromNotebook += OnNoteRemovedFromNotebook;
			
			// Set the focus chain for the top-most containers Bug #512175
			Gtk.Widget[] vbox_focus = new Gtk.Widget[2];
			vbox_focus[0] = hbox;
			vbox_focus[1] = hpaned;
			vbox.FocusChain = vbox_focus;

			// Set focus chain for sub widgits of first top-most container
			Gtk.Widget[] table_focus = new Gtk.Widget[2];
			table_focus[0] = find_combo;
			table_focus[1] = matches_window;
			hbox.FocusChain = table_focus;
			
			// set focus chain for sub widgits of seconf top-most container
			Gtk.Widget[] hpaned_focus = new Gtk.Widget[2];
			hpaned_focus[0] = matches_window;
			hpaned_focus[1] = notebooksPane;
			hpaned.FocusChain = hpaned_focus;
			
			// get back to the beginning of the focus chain
			Gtk.Widget[] scroll_right = new Gtk.Widget[1];
			scroll_right[0] = tree;
			matches_window.FocusChain = scroll_right;
			
			Tomboy.ExitingEvent += OnExitingEvent;
		}
コード例 #52
0
ファイル: NotePanel.cs プロジェクト: fredatgithub/DtPad
        private void tXTFilesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form1 form = (Form1)ParentForm;

            NoteManager.ExportNotes(form, NoteManager.ExportTypeEnum.Txt);
        }
コード例 #53
0
ファイル: Tomboy.cs プロジェクト: GNOME/tomboy
		static void RegisterRemoteControl (NoteManager manager)
		{
			try {
				remote_control = RemoteControlProxy.Register (manager);
				if (remote_control != null) {
					Logger.Debug ("Tomboy remote control active.");
				} else {
					// If Tomboy is already running, open the search window
					// so the user gets some sort of feedback when they
					// attempt to run Tomboy again.
					IRemoteControl remote = null;
					try {
						remote = RemoteControlProxy.GetInstance ();
						remote.DisplaySearch ();
					} catch {}

					Logger.Error ("Tomboy is already running.  Exiting...");
					System.Environment.Exit (-1);
				}
			} catch (Exception e) {
				Logger.Warn ("Tomboy remote control disabled (DBus exception): {0}",
				            e.Message);
			}
		}
コード例 #54
0
        private async void Refresh_Click(object sender, RoutedEventArgs e)
        {
            await NoteManager.TryReadAllFromStorageAsync();

            this.SelectMostAppropriateNote();
        }
コード例 #55
0
	// Use this for initialization
	void Start () {
		NM = GameObject.FindGameObjectWithTag("NoteManager").GetComponent<NoteManager>();
		this.gameObject.transform.position = new Vector3(transform.position.x, 0, transform.position.z);
	}
コード例 #56
0
        private void OnAddButtonClick(object sender, EventArgs e)
        {
            try
            {
                if (SysConfigInfo.OnlineUser == null)
                {
                    MessageBox.Show("没有用户在线!");
                    return;
                }

                if (string.IsNullOrEmpty(this.titleTextBox.Text.Trim()) ||
                    string.IsNullOrEmpty(this.remarkTextBox.Text.Trim()) ||
                    string.IsNullOrEmpty(this.contentTextBox.Text.Trim()))
                {
                    MessageBox.Show("请填写有效的内容!");
                    return;
                }

                NoteManager noteManager = new NoteManager(SysConfigInfo.WebServerBaseAddr);
                var         response    = noteManager.AddNoteAddContents(new AddNoteAndContentsRequest()
                {
                    Note = new Note()
                    {
                        AuthorId = SysConfigInfo.OnlineUser.Id,
                        IsShared = this.isSharedCheckBox.Checked,
                        Title    = this.titleTextBox.Text,
                        Remark   = this.remarkTextBox.Text
                    },
                    NoteContents = new List <NoteContent>()
                    {
                        new NoteContent()
                        {
                            Content = this.contentTextBox.Text,
                            Type    = 0
                        }
                    }
                },
                                                                         new TokenCheckInfo()
                {
                    Token   = SysConfigInfo.OnlineUser.Token,
                    UserId  = SysConfigInfo.OnlineUser.Id,
                    Version = SysConfigInfo.Version
                });

                if (response == null)
                {
                    MessageBox.Show("找不到指定的服务!");
                    return;
                }

                if (response.Code != 0 || response.ResponseData == null)
                {
                    MessageBox.Show("添加失败!");
                }
                else
                {
                    MessageBox.Show("添加成功!");
                    this.note                     = response.ResponseData.Note;
                    this.noteContents             = response.ResponseData.NoteContents;
                    this.addButton.Enabled        = false;
                    this.titleTextBox.Text        = this.note.Title;
                    this.remarkTextBox.Text       = this.note.Remark;
                    this.contentTextBox.Text      = this.noteContents[0].Content;
                    this.isSharedCheckBox.Checked = this.note.IsShared;
                    this.isSharedCheckBox.Enabled = false;
                }
            }
            catch (Exception ex)
            {
                LogHelper.WriteLog(LogType.Error, ex);
            }
        }
コード例 #57
0
ファイル: Search.cs プロジェクト: MichaelAquilina/tomboy
		public Search (NoteManager manager)
		{
			this.manager = manager;
		}
コード例 #58
0
        public ActionResult MostLiked()
        {
            NoteManager nm = new NoteManager();

            return(View("Index", nm.ListQueryable().OrderByDescending(x => x.LikeCount).ToList()));
        }
コード例 #59
0
 private async void NoteTextBox_LostFocus(object sender, RoutedEventArgs e)
 {
     // Do saves
     await NoteManager.WriteAllToStorageAsync();
 }
コード例 #60
0
ファイル: NotePanel.cs プロジェクト: fredatgithub/DtPad
        private void blackstandardToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form1 form = (Form1)ParentForm;

            NoteManager.ChangeNoteColor(form, NoteManager.TagEnum.Black);
        }