Пример #1
0
        public void OpenEditorAsNewCommand_Execute()
        {
            if (SelectedNode == null)
            {
                return;
            }

            if (!(SelectedNode is NodeEntryCollection))
            {
                return;
            }

            // TODO: Check "accept".

            // TODO: AtomEntry...
            EntryFull newEntry = new AtomEntry("", ((SelectedNode as NodeEntryCollection).Client as BlogClient));

            newEntry.PostUri = (SelectedNode as NodeEntryCollection).Uri;

            BlogEntryEventArgs ag = new BlogEntryEventArgs
            {
                Entry = newEntry
                        //
            };

            OpenEditorNewView?.Invoke(this, ag);
        }
Пример #2
0
        public void OpenEditorCommand_Execute(EntryItem selectedEntry)
        {
            if (selectedEntry == null)
            {
                return;
            }

            if (selectedEntry is EntryItem)
            {
                if (selectedEntry.EntryBody == null)
                {
                    return;
                }

                if (selectedEntry.Client == null)
                {
                    return;
                }

                BlogEntryEventArgs ag = new BlogEntryEventArgs
                {
                    Entry = selectedEntry.EntryBody
                            //
                };

                OpenEditorView?.Invoke(this, ag);
            }
        }