1
0
jungervin 8 жил өмнө
parent
commit
67f80849ee

+ 0 - 741
EsPy/Components/AutocompleteMenu.cs

@@ -1,741 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Windows.Forms;
-using System.Drawing;
-using System.ComponentModel;
-using System.Drawing.Drawing2D;
-using System.Text.RegularExpressions;
-using ScintillaNET;
-
-namespace FastColoredTextBoxNS
-{
-    /// <summary>
-    /// Popup menu for autocomplete
-    /// </summary>
-    [Browsable(false)]
-    public class AutocompleteMenu : ToolStripDropDown, IDisposable
-    {
-        AutocompleteListView listView;
-        public ToolStripControlHost host;
-        public Range Fragment { get; internal set; }
-
-        /// <summary>
-        /// Regex pattern for serach fragment around caret
-        /// </summary>
-        public string SearchPattern { get; set; }
-        /// <summary>
-        /// Minimum fragment length for popup
-        /// </summary>
-        public int MinFragmentLength { get; set; }
-        /// <summary>
-        /// User selects item
-        /// </summary>
-        public event EventHandler<SelectingEventArgs> Selecting;
-        /// <summary>
-        /// It fires after item inserting
-        /// </summary>
-        /// 
-
-        public event EventHandler<SelectedEventArgs> Selected;
-        /// <summary>
-        /// Occurs when popup menu is opening
-        /// </summary>
-        public new event EventHandler<CancelEventArgs> Opening;
-        /// <summary>
-        /// Allow TAB for select menu item
-        /// </summary>
-        public bool AllowTabKey { get { return listView.AllowTabKey; } set { listView.AllowTabKey = value; } }
-        /// <summary>
-        /// Interval of menu appear (ms)
-        /// </summary>
-        public int AppearInterval { get { return listView.AppearInterval; } set { listView.AppearInterval = value; } }
-
-        /// <summary>
-        /// Back color of selected item
-        /// </summary>
-        [DefaultValue(typeof(Color), "Orange")]
-        public Color SelectedColor
-        {
-            get { return listView.SelectedColor; }
-            set { listView.SelectedColor = value; }
-        }
-
-        /// <summary>
-        /// Border color of hovered item
-        /// </summary>
-        [DefaultValue(typeof(Color), "Red")]
-        public Color HoveredColor
-        {
-            get { return listView.HoveredColor; }
-            set { listView.HoveredColor = value; }
-        }
-
-        public AutocompleteMenu(Scintilla tb)
-        {
-            // create a new popup and add the list view to it 
-            AutoClose = false;
-            AutoSize = false;
-            Margin = Padding.Empty;
-            Padding = Padding.Empty;
-            BackColor = Color.White;
-            listView = new AutocompleteListView(tb);
-            host = new ToolStripControlHost(listView);
-            host.Margin = new Padding(2, 2, 2, 2);
-            host.Padding = Padding.Empty;
-            host.AutoSize = false;
-            host.AutoToolTip = false;
-            CalcSize();
-            base.Items.Add(host);
-            listView.Parent = this;
-            SearchPattern = @"[\w\.]";
-            MinFragmentLength = 2;
-
-        }
-
-        public new Font Font
-        {
-            get { return listView.Font; }
-            set { listView.Font = value; }
-        }
-
-        new internal void OnOpening(CancelEventArgs args)
-        {
-            if (Opening != null)
-                Opening(this, args);
-        }
-
-        public new void Close()
-        {
-            listView.toolTip.Hide(listView);
-            base.Close();
-        }
-
-        internal void CalcSize()
-        {
-            host.Size = listView.Size;
-            Size = new System.Drawing.Size(listView.Size.Width + 4, listView.Size.Height + 4);
-        }
-
-        public virtual void OnSelecting()
-        {
-            listView.OnSelecting();
-        }
-
-        public void SelectNext(int shift)
-        {
-            listView.SelectNext(shift);
-        }
-
-        internal void OnSelecting(SelectingEventArgs args)
-        {
-            if (Selecting != null)
-                Selecting(this, args);
-        }
-
-        public void OnSelected(SelectedEventArgs args)
-        {
-            if (Selected != null)
-                Selected(this, args);
-        }
-
-        public new AutocompleteListView Items
-        {
-            get { return listView; }
-        }
-
-        /// <summary>
-        /// Shows popup menu immediately
-        /// </summary>
-        /// <param name="forced">If True - MinFragmentLength will be ignored</param>
-        public void Show(bool forced)
-        {
-            Items.DoAutocomplete(forced);
-        }
-
-        /// <summary>
-        /// Minimal size of menu
-        /// </summary>
-        public new Size MinimumSize
-        {
-            get { return Items.MinimumSize; }
-            set { Items.MinimumSize = value; }
-        }
-
-        /// <summary>
-        /// Image list of menu
-        /// </summary>
-        public new ImageList ImageList
-        {
-            get { return Items.ImageList; }
-            set { Items.ImageList = value; }
-        }
-
-        /// <summary>
-        /// Tooltip duration (ms)
-        /// </summary>
-        public int ToolTipDuration
-        {
-            get { return Items.ToolTipDuration; }
-            set { Items.ToolTipDuration = value; }
-        }
-
-        /// <summary>
-        /// Tooltip
-        /// </summary>
-        public ToolTip ToolTip
-        {
-            get { return Items.toolTip; }
-            set { Items.toolTip = value; }
-        }
-
-        protected override void Dispose(bool disposing)
-        {
-            base.Dispose(disposing);
-            if (listView != null && !listView.IsDisposed)
-                listView.Dispose();
-        }
-    }
-
-    [System.ComponentModel.ToolboxItem(false)]
-    public class AutocompleteListView : UserControl
-    {
-        public event EventHandler FocussedItemIndexChanged;
-
-        internal List<AutocompleteItem> visibleItems;
-        IEnumerable<AutocompleteItem> sourceItems = new List<AutocompleteItem>();
-        int focussedItemIndex = 0;
-        int hoveredItemIndex = -1;
-
-        private int ItemHeight
-        {
-            get { return Font.Height + 2; }
-        }
-
-        AutocompleteMenu Menu { get { return Parent as AutocompleteMenu; } }
-        int oldItemCount = 0;
-        Scintilla tb;
-        internal ToolTip toolTip = new ToolTip();
-        System.Windows.Forms.Timer timer = new System.Windows.Forms.Timer();
-
-        internal bool AllowTabKey { get; set; }
-        public ImageList ImageList { get; set; }
-        internal int AppearInterval { get { return timer.Interval; } set { timer.Interval = value; } }
-        internal int ToolTipDuration { get; set; }
-
-        public Color SelectedColor { get; set; }
-        public Color HoveredColor { get; set; }
-        public int FocussedItemIndex
-        {
-            get { return focussedItemIndex; }
-            set
-            {
-                if (focussedItemIndex != value)
-                {
-                    focussedItemIndex = value;
-                    if (FocussedItemIndexChanged != null)
-                        FocussedItemIndexChanged(this, EventArgs.Empty);
-                }
-            }
-        }
-
-        public AutocompleteItem FocussedItem
-        {
-            get
-            {
-                if (FocussedItemIndex >= 0 && focussedItemIndex < visibleItems.Count)
-                    return visibleItems[focussedItemIndex];
-                return null;
-            }
-            set
-            {
-                FocussedItemIndex = visibleItems.IndexOf(value);
-            }
-        }
-
-        internal AutocompleteListView(Scintilla tb)
-        {
-            SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer | ControlStyles.UserPaint, true);
-            base.Font = new Font(FontFamily.GenericSansSerif, 9);
-            visibleItems = new List<AutocompleteItem>();
-            VerticalScroll.SmallChange = ItemHeight;
-            MaximumSize = new Size(Size.Width, 180);
-            toolTip.ShowAlways = false;
-            AppearInterval = 500;
-            timer.Tick += new EventHandler(timer_Tick);
-            SelectedColor = Color.Orange;
-            HoveredColor = Color.Red;
-            ToolTipDuration = 3000;
-
-            this.tb = tb;
-
-            tb.KeyDown += new KeyEventHandler(tb_KeyDown);
-            //tb.Sele.SelectionChanged += new EventHandler(tb_SelectionChanged);
-            //tb.KeyPressed += new KeyPressEventHandler(tb_KeyPressed);
-
-            Form form = tb.FindForm();
-            if (form != null)
-            {
-                form.LocationChanged += delegate { SafetyClose(); };
-                form.ResizeBegin += delegate { SafetyClose(); };
-                form.FormClosing += delegate { SafetyClose(); };
-                form.LostFocus += delegate { SafetyClose(); };
-            }
-
-            tb.LostFocus += (o, e) =>
-            {
-                if (Menu != null && !Menu.IsDisposed)
-                    if (!Menu.Focused)
-                        SafetyClose();
-            };
-
-            //tb.Scroll += delegate { SafetyClose(); };
-
-            this.VisibleChanged += (o, e) =>
-            {
-                if (this.Visible)
-                    DoSelectedVisible();
-            };
-        }
-
-        void SafetyClose()
-        {
-            if (Menu != null && !Menu.IsDisposed)
-                Menu.Close();
-        }
-
-        void tb_KeyPressed(object sender, KeyPressEventArgs e)
-        {
-            bool backspaceORdel = e.KeyChar == '\b' || e.KeyChar == 0xff;
-
-            /*
-            if (backspaceORdel)
-                prevSelection = tb.Selection.Start;*/
-
-            if (Menu.Visible && !backspaceORdel)
-                DoAutocomplete(false);
-            else
-                ResetTimer(timer);
-        }
-
-        void timer_Tick(object sender, EventArgs e)
-        {
-            timer.Stop();
-            DoAutocomplete(false);
-        }
-
-        void ResetTimer(System.Windows.Forms.Timer timer)
-        {
-            timer.Stop();
-            timer.Start();
-        }
-
-        internal void DoAutocomplete()
-        {
-            DoAutocomplete(false);
-        }
-
-        internal void DoAutocomplete(bool forced)
-        {
-            if (!Menu.Enabled)
-            {
-                Menu.Close();
-                return;
-            }
-
-            visibleItems.Clear();
-            FocussedItemIndex = 0;
-            VerticalScroll.Value = 0;
-            //some magic for update scrolls
-            AutoScrollMinSize -= new Size(1, 0);
-            AutoScrollMinSize += new Size(1, 0);
-            //get fragment around caret
-            Range fragment = tb.Selection.GetFragment(Menu.SearchPattern);
-            string text = fragment.Text;
-            //calc screen point for popup menu
-            Point point = tb.PlaceToPoint(fragment.End);
-            point.Offset(2, tb.CharHeight);
-            //
-            if (forced || (text.Length >= Menu.MinFragmentLength
-                && tb.Selection.IsEmpty /*pops up only if selected range is empty*/
-                && (tb.Selection.Start > fragment.Start || text.Length == 0/*pops up only if caret is after first letter*/)))
-            {
-                Menu.Fragment = fragment;
-                bool foundSelected = false;
-                //build popup menu
-                foreach (var item in sourceItems)
-                {
-                    item.Parent = Menu;
-                    CompareResult res = item.Compare(text);
-                    if (res != CompareResult.Hidden)
-                        visibleItems.Add(item);
-                    if (res == CompareResult.VisibleAndSelected && !foundSelected)
-                    {
-                        foundSelected = true;
-                        FocussedItemIndex = visibleItems.Count - 1;
-                    }
-                }
-
-                if (foundSelected)
-                {
-                    AdjustScroll();
-                    DoSelectedVisible();
-                }
-            }
-
-            //show popup menu
-            if (Count > 0)
-            {
-                if (!Menu.Visible)
-                {
-                    CancelEventArgs args = new CancelEventArgs();
-                    Menu.OnOpening(args);
-                    if (!args.Cancel)
-                        Menu.Show(tb, point);
-                }
-                else
-                    Invalidate();
-            }
-            else
-                Menu.Close();
-        }
-
-        void tb_SelectionChanged(object sender, EventArgs e)
-        {
-            /*
-            FastColoredTextBox tb = sender as FastColoredTextBox;
-            
-            if (Math.Abs(prevSelection.iChar - tb.Selection.Start.iChar) > 1 ||
-                        prevSelection.iLine != tb.Selection.Start.iLine)
-                Menu.Close();
-            prevSelection = tb.Selection.Start;*/
-            if (Menu.Visible)
-            {
-                bool needClose = false;
-
-                if (!tb.Selection.IsEmpty)
-                    needClose = true;
-                else
-                    if (!Menu.Fragment.Contains(tb.Selection.Start))
-                {
-                    if (tb.Selection.Start.iLine == Menu.Fragment.End.iLine && tb.Selection.Start.iChar == Menu.Fragment.End.iChar + 1)
-                    {
-                        //user press key at end of fragment
-                        char c = tb.Selection.CharBeforeStart;
-                        if (!Regex.IsMatch(c.ToString(), Menu.SearchPattern))//check char
-                            needClose = true;
-                    }
-                    else
-                        needClose = true;
-                }
-
-                if (needClose)
-                    Menu.Close();
-            }
-
-        }
-
-        void tb_KeyDown(object sender, KeyEventArgs e)
-        {
-            var tb = sender as FastColoredTextBox;
-
-            if (Menu.Visible)
-                if (ProcessKey(e.KeyCode, e.Modifiers))
-                    e.Handled = true;
-
-            if (!Menu.Visible)
-            {
-                if (tb.HotkeysMapping.ContainsKey(e.KeyData) && tb.HotkeysMapping[e.KeyData] == FCTBAction.AutocompleteMenu)
-                {
-                    DoAutocomplete();
-                    e.Handled = true;
-                }
-                else
-                {
-                    if (e.KeyCode == Keys.Escape && timer.Enabled)
-                        timer.Stop();
-                }
-            }
-        }
-
-        void AdjustScroll()
-        {
-            if (oldItemCount == visibleItems.Count)
-                return;
-
-            int needHeight = ItemHeight * visibleItems.Count + 1;
-            Height = Math.Min(needHeight, MaximumSize.Height);
-            Menu.CalcSize();
-
-            AutoScrollMinSize = new Size(0, needHeight);
-            oldItemCount = visibleItems.Count;
-        }
-
-        protected override void OnPaint(PaintEventArgs e)
-        {
-            AdjustScroll();
-
-            var itemHeight = ItemHeight;
-            int startI = VerticalScroll.Value / itemHeight - 1;
-            int finishI = (VerticalScroll.Value + ClientSize.Height) / itemHeight + 1;
-            startI = Math.Max(startI, 0);
-            finishI = Math.Min(finishI, visibleItems.Count);
-            int y = 0;
-            int leftPadding = 18;
-            for (int i = startI; i < finishI; i++)
-            {
-                y = i * itemHeight - VerticalScroll.Value;
-
-                var item = visibleItems[i];
-
-                if (item.BackColor != Color.Transparent)
-                    using (var brush = new SolidBrush(item.BackColor))
-                        e.Graphics.FillRectangle(brush, 1, y, ClientSize.Width - 1 - 1, itemHeight - 1);
-
-                if (ImageList != null && visibleItems[i].ImageIndex >= 0)
-                    e.Graphics.DrawImage(ImageList.Images[item.ImageIndex], 1, y);
-
-                if (i == FocussedItemIndex)
-                    using (var selectedBrush = new LinearGradientBrush(new Point(0, y - 3), new Point(0, y + itemHeight), Color.Transparent, SelectedColor))
-                    using (var pen = new Pen(SelectedColor))
-                    {
-                        e.Graphics.FillRectangle(selectedBrush, leftPadding, y, ClientSize.Width - 1 - leftPadding, itemHeight - 1);
-                        e.Graphics.DrawRectangle(pen, leftPadding, y, ClientSize.Width - 1 - leftPadding, itemHeight - 1);
-                    }
-
-                if (i == hoveredItemIndex)
-                    using (var pen = new Pen(HoveredColor))
-                        e.Graphics.DrawRectangle(pen, leftPadding, y, ClientSize.Width - 1 - leftPadding, itemHeight - 1);
-
-                using (var brush = new SolidBrush(item.ForeColor != Color.Transparent ? item.ForeColor : ForeColor))
-                    e.Graphics.DrawString(item.ToString(), Font, brush, leftPadding, y);
-            }
-        }
-
-        protected override void OnScroll(ScrollEventArgs se)
-        {
-            base.OnScroll(se);
-            Invalidate();
-        }
-
-        protected override void OnMouseClick(MouseEventArgs e)
-        {
-            base.OnMouseClick(e);
-
-            if (e.Button == System.Windows.Forms.MouseButtons.Left)
-            {
-                FocussedItemIndex = PointToItemIndex(e.Location);
-                DoSelectedVisible();
-                Invalidate();
-            }
-        }
-
-        protected override void OnMouseDoubleClick(MouseEventArgs e)
-        {
-            base.OnMouseDoubleClick(e);
-            FocussedItemIndex = PointToItemIndex(e.Location);
-            Invalidate();
-            OnSelecting();
-        }
-
-        internal virtual void OnSelecting()
-        {
-            if (FocussedItemIndex < 0 || FocussedItemIndex >= visibleItems.Count)
-                return;
-            tb.TextSource.Manager.BeginAutoUndoCommands();
-            try
-            {
-                AutocompleteItem item = FocussedItem;
-                SelectingEventArgs args = new SelectingEventArgs()
-                {
-                    Item = item,
-                    SelectedIndex = FocussedItemIndex
-                };
-
-                Menu.OnSelecting(args);
-
-                if (args.Cancel)
-                {
-                    FocussedItemIndex = args.SelectedIndex;
-                    Invalidate();
-                    return;
-                }
-
-                if (!args.Handled)
-                {
-                    var fragment = Menu.Fragment;
-                    DoAutocomplete(item, fragment);
-                }
-
-                Menu.Close();
-                //
-                SelectedEventArgs args2 = new SelectedEventArgs()
-                {
-                    Item = item,
-                    Tb = Menu.Fragment.tb
-                };
-                item.OnSelected(Menu, args2);
-                Menu.OnSelected(args2);
-            }
-            finally
-            {
-                tb.TextSource.Manager.EndAutoUndoCommands();
-            }
-        }
-
-        private void DoAutocomplete(AutocompleteItem item, Range fragment)
-        {
-            string newText = item.GetTextForReplace();
-
-            //replace text of fragment
-            var tb = fragment.tb;
-
-            tb.BeginAutoUndo();
-            tb.TextSource.Manager.ExecuteCommand(new SelectCommand(tb.TextSource));
-            if (tb.Selection.ColumnSelectionMode)
-            {
-                var start = tb.Selection.Start;
-                var end = tb.Selection.End;
-                start.iChar = fragment.Start.iChar;
-                end.iChar = fragment.End.iChar;
-                tb.Selection.Start = start;
-                tb.Selection.End = end;
-            }
-            else
-            {
-                tb.Selection.Start = fragment.Start;
-                tb.Selection.End = fragment.End;
-            }
-            tb.InsertText(newText);
-            tb.TextSource.Manager.ExecuteCommand(new SelectCommand(tb.TextSource));
-            tb.EndAutoUndo();
-            tb.Focus();
-        }
-
-        int PointToItemIndex(Point p)
-        {
-            return (p.Y + VerticalScroll.Value) / ItemHeight;
-        }
-
-        protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
-        {
-            ProcessKey(keyData, Keys.None);
-
-            return base.ProcessCmdKey(ref msg, keyData);
-        }
-
-        private bool ProcessKey(Keys keyData, Keys keyModifiers)
-        {
-            if (keyModifiers == Keys.None)
-                switch (keyData)
-                {
-                    case Keys.Down:
-                        SelectNext(+1);
-                        return true;
-                    case Keys.PageDown:
-                        SelectNext(+10);
-                        return true;
-                    case Keys.Up:
-                        SelectNext(-1);
-                        return true;
-                    case Keys.PageUp:
-                        SelectNext(-10);
-                        return true;
-                    case Keys.Enter:
-                        OnSelecting();
-                        return true;
-                    case Keys.Tab:
-                        if (!AllowTabKey)
-                            break;
-                        OnSelecting();
-                        return true;
-                    case Keys.Escape:
-                        Menu.Close();
-                        return true;
-                }
-
-            return false;
-        }
-
-        public void SelectNext(int shift)
-        {
-            FocussedItemIndex = Math.Max(0, Math.Min(FocussedItemIndex + shift, visibleItems.Count - 1));
-            DoSelectedVisible();
-            //
-            Invalidate();
-        }
-
-        private void DoSelectedVisible()
-        {
-            if (FocussedItem != null)
-                SetToolTip(FocussedItem);
-
-            var y = FocussedItemIndex * ItemHeight - VerticalScroll.Value;
-            if (y < 0)
-                VerticalScroll.Value = FocussedItemIndex * ItemHeight;
-            if (y > ClientSize.Height - ItemHeight)
-                VerticalScroll.Value = Math.Min(VerticalScroll.Maximum, FocussedItemIndex * ItemHeight - ClientSize.Height + ItemHeight);
-            //some magic for update scrolls
-            AutoScrollMinSize -= new Size(1, 0);
-            AutoScrollMinSize += new Size(1, 0);
-        }
-
-        private void SetToolTip(AutocompleteItem autocompleteItem)
-        {
-            var title = autocompleteItem.ToolTipTitle;
-            var text = autocompleteItem.ToolTipText;
-
-            if (string.IsNullOrEmpty(title))
-            {
-                toolTip.ToolTipTitle = null;
-                toolTip.SetToolTip(this, null);
-                return;
-            }
-
-            IWin32Window window = this.Parent ?? this;
-            Point location = new Point((window == this ? Width : Right) + 3, 0);
-
-            if (string.IsNullOrEmpty(text))
-            {
-                toolTip.ToolTipTitle = null;
-                toolTip.Show(title, window, location.X, location.Y, ToolTipDuration);
-            }
-            else
-            {
-                toolTip.ToolTipTitle = title;
-                toolTip.Show(text, window, location.X, location.Y, ToolTipDuration);
-            }
-        }
-
-        public int Count
-        {
-            get { return visibleItems.Count; }
-        }
-
-        public void SetAutocompleteItems(ICollection<string> items)
-        {
-            List<AutocompleteItem> list = new List<AutocompleteItem>(items.Count);
-            foreach (var item in items)
-                list.Add(new AutocompleteItem(item));
-            SetAutocompleteItems(list);
-        }
-
-        public void SetAutocompleteItems(IEnumerable<AutocompleteItem> items)
-        {
-            sourceItems = items;
-        }
-    }
-
-    public class SelectingEventArgs : EventArgs
-    {
-        public AutocompleteItem Item { get; internal set; }
-        public bool Cancel { get; set; }
-        public int SelectedIndex { get; set; }
-        public bool Handled { get; set; }
-    }
-
-    public class SelectedEventArgs : EventArgs
-    {
-        public AutocompleteItem Item { get; internal set; }
-        public FastColoredTextBox Tb { get; set; }
-    }
-}

+ 0 - 266
EsPy/Components/AutocopleteItem.cs

@@ -1,266 +0,0 @@
-using System;
-using System.Drawing;
-using System.Drawing.Printing;
-
-namespace FastColoredTextBoxNS
-{
-    /// <summary>
-    /// Item of autocomplete menu
-    /// </summary>
-    public class AutocompleteItem
-    {
-        public string Text;
-        public int ImageIndex = -1;
-        public object Tag;
-        string toolTipTitle;
-        string toolTipText;
-        string menuText;
-        public AutocompleteMenu Parent { get; internal set; }
-
-
-        public AutocompleteItem()
-        {
-        }
-
-        public AutocompleteItem(string text)
-        {
-            Text = text;
-        }
-
-        public AutocompleteItem(string text, int imageIndex)
-            : this(text)
-        {
-            this.ImageIndex = imageIndex;
-        }
-
-        public AutocompleteItem(string text, int imageIndex, string menuText)
-            : this(text, imageIndex)
-        {
-            this.menuText = menuText;
-        }
-
-        public AutocompleteItem(string text, int imageIndex, string menuText, string toolTipTitle, string toolTipText)
-            : this(text, imageIndex, menuText)
-        {
-            this.toolTipTitle = toolTipTitle;
-            this.toolTipText = toolTipText;
-        }
-
-        /// <summary>
-        /// Returns text for inserting into Textbox
-        /// </summary>
-        public virtual string GetTextForReplace()
-        {
-            return Text;
-        }
-
-        /// <summary>
-        /// Compares fragment text with this item
-        /// </summary>
-        public virtual CompareResult Compare(string fragmentText)
-        {
-            if (Text.StartsWith(fragmentText, StringComparison.InvariantCultureIgnoreCase) &&
-                   Text != fragmentText)
-                return CompareResult.VisibleAndSelected;
-
-            return CompareResult.Hidden;
-        }
-
-        /// <summary>
-        /// Returns text for display into popup menu
-        /// </summary>
-        public override string ToString()
-        {
-            return menuText ?? Text;
-        }
-
-        /// <summary>
-        /// This method is called after item inserted into text
-        /// </summary>
-        public virtual void OnSelected(AutocompleteMenu popupMenu, SelectedEventArgs e)
-        {
-            ;
-        }
-
-        /// <summary>
-        /// Title for tooltip.
-        /// </summary>
-        /// <remarks>Return null for disable tooltip for this item</remarks>
-        public virtual string ToolTipTitle
-        {
-            get { return toolTipTitle; }
-            set { toolTipTitle = value; }
-        }
-
-        /// <summary>
-        /// Tooltip text.
-        /// </summary>
-        /// <remarks>For display tooltip text, ToolTipTitle must be not null</remarks>
-        public virtual string ToolTipText
-        {
-            get { return toolTipText; }
-            set { toolTipText = value; }
-        }
-
-        /// <summary>
-        /// Menu text. This text is displayed in the drop-down menu.
-        /// </summary>
-        public virtual string MenuText
-        {
-            get { return menuText; }
-            set { menuText = value; }
-        }
-
-        /// <summary>
-        /// Fore color of text of item
-        /// </summary>
-        public virtual Color ForeColor
-        {
-            get { return Color.Transparent; }
-            set { throw new NotImplementedException("Override this property to change color"); }
-        }
-
-        /// <summary>
-        /// Back color of item
-        /// </summary>
-        public virtual Color BackColor
-        {
-            get { return Color.Transparent; }
-            set { throw new NotImplementedException("Override this property to change color"); }
-        }
-    }
-
-    public enum CompareResult
-    {
-        /// <summary>
-        /// Item do not appears
-        /// </summary>
-        Hidden,
-        /// <summary>
-        /// Item appears
-        /// </summary>
-        Visible,
-        /// <summary>
-        /// Item appears and will selected
-        /// </summary>
-        VisibleAndSelected
-    }
-
-    /// <summary>
-    /// Autocomplete item for code snippets
-    /// </summary>
-    /// <remarks>Snippet can contain special char ^ for caret position.</remarks>
-    public class SnippetAutocompleteItem : AutocompleteItem
-    {
-        public SnippetAutocompleteItem(string snippet)
-        {
-            Text = snippet.Replace("\r", "");
-            ToolTipTitle = "Code snippet:";
-            ToolTipText = Text;
-        }
-
-        public override string ToString()
-        {
-            return MenuText ?? Text.Replace("\n", " ").Replace("^", "");
-        }
-
-        public override string GetTextForReplace()
-        {
-            return Text;
-        }
-
-        public override void OnSelected(AutocompleteMenu popupMenu, SelectedEventArgs e)
-        {
-            e.Tb.BeginUpdate();
-            e.Tb.Selection.BeginUpdate();
-            //remember places
-            var p1 = popupMenu.Fragment.Start;
-            var p2 = e.Tb.Selection.Start;
-            //do auto indent
-            if (e.Tb.AutoIndent)
-            {
-                for (int iLine = p1.iLine + 1; iLine <= p2.iLine; iLine++)
-                {
-                    e.Tb.Selection.Start = new Place(0, iLine);
-                    e.Tb.DoAutoIndent(iLine);
-                }
-            }
-            e.Tb.Selection.Start = p1;
-            //move caret position right and find char ^
-            while (e.Tb.Selection.CharBeforeStart != '^')
-                if (!e.Tb.Selection.GoRightThroughFolded())
-                    break;
-            //remove char ^
-            e.Tb.Selection.GoLeft(true);
-            e.Tb.InsertText("");
-            //
-            e.Tb.Selection.EndUpdate();
-            e.Tb.EndUpdate();
-        }
-
-        /// <summary>
-        /// Compares fragment text with this item
-        /// </summary>
-        public override CompareResult Compare(string fragmentText)
-        {
-            if (Text.StartsWith(fragmentText, StringComparison.InvariantCultureIgnoreCase) &&
-                   Text != fragmentText)
-                return CompareResult.Visible;
-
-            return CompareResult.Hidden;
-        }
-    }
-
-    /// <summary>
-    /// This autocomplete item appears after dot
-    /// </summary>
-    public class MethodAutocompleteItem : AutocompleteItem
-    {
-        string firstPart;
-        string lowercaseText;
-
-        public MethodAutocompleteItem(string text)
-            : base(text)
-        {
-            lowercaseText = Text.ToLower();
-        }
-
-        public override CompareResult Compare(string fragmentText)
-        {
-            int i = fragmentText.LastIndexOf('.');
-            if (i < 0)
-                return CompareResult.Hidden;
-            string lastPart = fragmentText.Substring(i + 1);
-            firstPart = fragmentText.Substring(0, i);
-
-            if (lastPart == "") return CompareResult.Visible;
-            if (Text.StartsWith(lastPart, StringComparison.InvariantCultureIgnoreCase))
-                return CompareResult.VisibleAndSelected;
-            if (lowercaseText.Contains(lastPart.ToLower()))
-                return CompareResult.Visible;
-
-            return CompareResult.Hidden;
-        }
-
-        public override string GetTextForReplace()
-        {
-            return firstPart + "." + Text;
-        }
-    }
-
-    /// <summary>
-    /// This Item does not check correspondence to current text fragment.
-    /// SuggestItem is intended for dynamic menus.
-    /// </summary>
-    public class SuggestItem : AutocompleteItem
-    {
-        public SuggestItem(string text, int imageIndex) : base(text, imageIndex)
-        {
-        }
-
-        public override CompareResult Compare(string fragmentText)
-        {
-            return CompareResult.Visible;
-        }
-    }
-}

+ 0 - 34
EsPy/Components/Completion/AutoCompletion.cs

@@ -1,34 +0,0 @@
-using ScintillaNET;
-using System;
-using System.Collections.Generic;
-using System.Drawing;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows.Forms;
-
-namespace EsPy.Components.Completion
-{
-    public class AutoCompletion : ToolStripDropDown, IDisposable
-    {
-        public AutoCompletion(Scintilla scintilla)
-        {
-            AutoClose = false;
-            AutoSize = false;
-            Margin = Padding.Empty;
-            Padding = Padding.Empty;
-            BackColor = Color.White;
-            CompletionListBox listView = new CompletionListBox(scintilla);
-            ToolStripControlHost host = new ToolStripControlHost(listView);
-            host.Margin = new Padding(2, 2, 2, 2);
-            host.Padding = Padding.Empty;
-            host.AutoSize = false;
-            host.AutoToolTip = false;
-            //CalcSize();
-            base.Items.Add(host);
-            listView.Parent = this;
-            //SearchPattern = @"[\w\.]";
-            //MinFragmentLength = 2;
-        }
-    }
-}

+ 0 - 76
EsPy/Components/Completion/CompletionForm.Designer.cs

@@ -1,76 +0,0 @@
-namespace EsPy.Components.Completion
-{
-    partial class CompletionForm
-    {
-        /// <summary>
-        /// Required designer variable.
-        /// </summary>
-        private System.ComponentModel.IContainer components = null;
-
-        /// <summary>
-        /// Clean up any resources being used.
-        /// </summary>
-        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-        protected override void Dispose(bool disposing)
-        {
-            if (disposing && (components != null))
-            {
-                components.Dispose();
-            }
-            base.Dispose(disposing);
-        }
-
-        #region Windows Form Designer generated code
-
-        /// <summary>
-        /// Required method for Designer support - do not modify
-        /// the contents of this method with the code editor.
-        /// </summary>
-        private void InitializeComponent()
-        {
-            this.components = new System.ComponentModel.Container();
-            this.imageList1 = new System.Windows.Forms.ImageList(this.components);
-            this.listBox1 = new EsPy.Components.Completion.CompletionListBox();
-            this.SuspendLayout();
-            // 
-            // imageList1
-            // 
-            this.imageList1.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit;
-            this.imageList1.ImageSize = new System.Drawing.Size(16, 16);
-            this.imageList1.TransparentColor = System.Drawing.Color.Transparent;
-            // 
-            // listBox1
-            // 
-            this.listBox1.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.listBox1.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
-            this.listBox1.FormattingEnabled = true;
-            this.listBox1.ImageList = null;
-            this.listBox1.Location = new System.Drawing.Point(2, 2);
-            this.listBox1.Name = "listBox1";
-            this.listBox1.Size = new System.Drawing.Size(188, 153);
-            this.listBox1.TabIndex = 0;
-            // 
-            // CompletionForm
-            // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
-            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(192, 157);
-            this.Controls.Add(this.listBox1);
-            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
-            this.KeyPreview = true;
-            this.Name = "CompletionForm";
-            this.Padding = new System.Windows.Forms.Padding(2);
-            this.ShowIcon = false;
-            this.ShowInTaskbar = false;
-            this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
-            this.Text = "CompletionForm";
-            this.Load += new System.EventHandler(this.CompletionForm_Load);
-            this.ResumeLayout(false);
-
-        }
-
-        #endregion
-        private System.Windows.Forms.ImageList imageList1;
-        private CompletionListBox listBox1;
-    }
-}

+ 0 - 65
EsPy/Components/Completion/CompletionForm.cs

@@ -1,65 +0,0 @@
-using EsPy.Python;
-using EsPy.Python.Jedi;
-using EsPy.Utility;
-using ScintillaNET;
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows.Forms;
-
-namespace EsPy.Components.Completion
-{
-    public partial class CompletionForm : Form
-    {
-        public class CompletionEventArgs : EventArgs
-        {
-            public string Word = "";
-            public CompletionEventArgs(string word)
-            {
-                this.Word = word;
-            }
-        }
-
-        public delegate void SelectedEvent(object sender, CompletionEventArgs e);
-        public delegate void ClosingEvent(object sender, CompletionEventArgs e);
-        public SelectedEvent Selected = null;
-        public ClosingEvent Closing = null;
-
-        public CompletionForm()
-        {
-            InitializeComponent();
-            //this.Capture = true;
-        }
-
-        public Scintilla Scintilla
-        {
-            get { return this.listBox1.Scintilla; }
-            set { this.listBox1.Scintilla = value; }
-        }
-
-        private List<BaseDefinition> FDefinitions = null;
-        public List<BaseDefinition> Definitions
-        {
-            get { return this.FDefinitions; }
-            set
-            {
-                this.listBox1.Items.Clear();
-                this.FDefinitions = value;
-                
-                this.listBox1.Items.AddRange(value.ToArray());
-                this.listBox1.Focus();// .Focused = true; //.SelectedIndex = 0;
-            }
-        }
-
-        public void Home()
-        {
-            
-        }
-      
-    }
-}

+ 0 - 123
EsPy/Components/Completion/CompletionForm.resx

@@ -1,123 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<root>
-  <!-- 
-    Microsoft ResX Schema 
-    
-    Version 2.0
-    
-    The primary goals of this format is to allow a simple XML format 
-    that is mostly human readable. The generation and parsing of the 
-    various data types are done through the TypeConverter classes 
-    associated with the data types.
-    
-    Example:
-    
-    ... ado.net/XML headers & schema ...
-    <resheader name="resmimetype">text/microsoft-resx</resheader>
-    <resheader name="version">2.0</resheader>
-    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
-    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
-    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
-    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
-    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
-        <value>[base64 mime encoded serialized .NET Framework object]</value>
-    </data>
-    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
-        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
-        <comment>This is a comment</comment>
-    </data>
-                
-    There are any number of "resheader" rows that contain simple 
-    name/value pairs.
-    
-    Each data row contains a name, and value. The row also contains a 
-    type or mimetype. Type corresponds to a .NET class that support 
-    text/value conversion through the TypeConverter architecture. 
-    Classes that don't support this are serialized and stored with the 
-    mimetype set.
-    
-    The mimetype is used for serialized objects, and tells the 
-    ResXResourceReader how to depersist the object. This is currently not 
-    extensible. For a given mimetype the value must be set accordingly:
-    
-    Note - application/x-microsoft.net.object.binary.base64 is the format 
-    that the ResXResourceWriter will generate, however the reader can 
-    read any of the formats listed below.
-    
-    mimetype: application/x-microsoft.net.object.binary.base64
-    value   : The object must be serialized with 
-            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
-            : and then encoded with base64 encoding.
-    
-    mimetype: application/x-microsoft.net.object.soap.base64
-    value   : The object must be serialized with 
-            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
-            : and then encoded with base64 encoding.
-
-    mimetype: application/x-microsoft.net.object.bytearray.base64
-    value   : The object must be serialized into a byte array 
-            : using a System.ComponentModel.TypeConverter
-            : and then encoded with base64 encoding.
-    -->
-  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
-    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
-    <xsd:element name="root" msdata:IsDataSet="true">
-      <xsd:complexType>
-        <xsd:choice maxOccurs="unbounded">
-          <xsd:element name="metadata">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" />
-              </xsd:sequence>
-              <xsd:attribute name="name" use="required" type="xsd:string" />
-              <xsd:attribute name="type" type="xsd:string" />
-              <xsd:attribute name="mimetype" type="xsd:string" />
-              <xsd:attribute ref="xml:space" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="assembly">
-            <xsd:complexType>
-              <xsd:attribute name="alias" type="xsd:string" />
-              <xsd:attribute name="name" type="xsd:string" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="data">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
-              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
-              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
-              <xsd:attribute ref="xml:space" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="resheader">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" />
-            </xsd:complexType>
-          </xsd:element>
-        </xsd:choice>
-      </xsd:complexType>
-    </xsd:element>
-  </xsd:schema>
-  <resheader name="resmimetype">
-    <value>text/microsoft-resx</value>
-  </resheader>
-  <resheader name="version">
-    <value>2.0</value>
-  </resheader>
-  <resheader name="reader">
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-  <resheader name="writer">
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-  <metadata name="imageList1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>17, 17</value>
-  </metadata>
-</root>

+ 0 - 228
EsPy/Components/Completion/CompletionListBox.cs

@@ -1,228 +0,0 @@
-using EsPy.Python.Jedi;
-using EsPy.Utility;
-using ScintillaNET;
-using System;
-using System.Collections.Generic;
-using System.Drawing;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows.Forms;
-using static EsPy.Utility.TextHelper;
-
-namespace EsPy.Components.Completion
-{
-    public class CompletionListBox : ListBox
-    {
-
-        Form Form = new Form();
-        public CompletionListBox(Scintilla scintilla)
-        {
-            this.InitializeComponent();
-
-            if (scintilla == null)
-                throw new ArgumentNullException();
-
-            this.Scintilla = scintilla;
-            this.DrawMode = DrawMode.OwnerDrawFixed;
-            this.Dock = DockStyle.Fill;
-
-            int word_start_pos = Utility.TextHelper.KeywordStartPosition(this.Scintilla.Text,this.Scintilla.CurrentPosition - 1) + 1;
-            int x = this.Scintilla.PointXFromPosition(word_start_pos);
-            int y = this.Scintilla.PointYFromPosition(word_start_pos);
-            
-            Point p = this.Scintilla.PointToScreen(new Point(x, y));
-            this.Form.Owner = Globals.MainForm;
-            
-            this.Form.FormBorderStyle = FormBorderStyle.None;
-            this.Form.TopLevel = true;this.Form.Show();
-            this.Form.Top = p.Y + (int)(this.Scintilla.Font.Height * 1.2);
-            this.Form.Left = p.X;
-            this.Form.Height = this.Height;
-            this.Form.Controls.Add(this);
-
-            this.Form.Deactivate += Form_Deactivate;
-
-        }
-
-        private void Form_Deactivate(object sender, EventArgs e)
-        {
-            this.Form.Deactivate -= Form_Deactivate;
-            this.Form.Close();
-        }
-
-        protected override void OnDrawItem(System.Windows.Forms.DrawItemEventArgs e)
-        {
-            e.DrawBackground();
-            e.DrawFocusRectangle();
-
-            if (e.Index >= 0)
-            {
-                BaseDefinition item = (BaseDefinition)Items[e.Index];
-                if (item.ImageIndex != -1 && this.imageList1.Images.Count > item.ImageIndex)
-                {
-                    Size image_size = imageList1.ImageSize;
-                    this.imageList1.Draw(e.Graphics, e.Bounds.Left, e.Bounds.Top, item.ImageIndex);
-                    e.Graphics.DrawString(item.Text, e.Font, new SolidBrush(e.ForeColor),
-                        e.Bounds.Left + image_size.Width, e.Bounds.Top);
-                }
-                else
-                {
-                    e.Graphics.DrawString(item.Text, e.Font, new SolidBrush(e.ForeColor),
-                       e.Bounds.Left, e.Bounds.Top);
-                }
-            }
-        }
-
-        private ImageList imageList1;
-
-        //private ImageList FImageList;
-        //public ImageList ImageList
-        //{
-        //    get { return FImageList; }
-        //    set { FImageList = value; }
-        //}
-
-
-
-        public BaseDefinition SelectedDefinition
-        { get { return this.SelectedItem as BaseDefinition; } }
-
-
-        public Words Words
-        { get; set; }
-
-        private void DoFilter()
-        {
-            var defs = this.Definitions.Where(k => k.name.StartsWith(this.Words.Filter)).ToArray();
-
-            this.Items.Clear();
-            this.Items.AddRange(defs);
-
-            for (int i = 0; i < this.Items.Count; i++)
-            {
-
-                if (((this.Items[i] as BaseDefinition).name.StartsWith(Words.Filter)))
-                {
-                    this.SelectedIndex = i;
-                    break;
-                }
-            }
-        }
-
-        private List<BaseDefinition> FDefinitions = null;
-        public List<BaseDefinition> Definitions
-        {
-            get { return this.FDefinitions; }
-            set
-            {
-                this.Items.Clear();
-                this.FDefinitions = value;
-
-                // this.Items.AddRange(value.ToArray());
-                this.DoFilter();
-                this.Focus();// .Focused = true; //.SelectedIndex = 0;
-            }
-        }
-        private void SelectItem(int index)
-        {
-            if (this.Items.Count > 0)
-            {
-                if (index < 0 || index > this.Items.Count - 1)
-                    index = 0;
-
-                if (index < this.Items.Count)
-                    this.SelectedIndex = index;
-            }
-        }
-
-        public void SelectNextItem()
-        {
-            if (this.Items.Count > 0)
-            {
-                if (this.SelectedIndex < 0)
-                {
-                    this.SelectedIndex = 0;
-                    return;
-                }
-                if (this.SelectedIndex < this.Items.Count - 1)
-                    this.SelectedIndex++;
-            }
-        }
-
-        public void SelectPreviousItem()
-        {
-            if (this.Items.Count > 0)
-            {
-                if (this.SelectedIndex < 0)
-                {
-                    this.SelectedIndex = 0;
-                    return;
-                }
-                if (this.SelectedIndex > 0)
-                    this.SelectedIndex--;
-            }
-        }
-
-        public Scintilla Scintilla
-        { get; set; }
-
-        [System.Runtime.InteropServices.DllImport("user32.dll")]
-        private static extern IntPtr PostMessage(IntPtr hWnd, int msg, IntPtr wp, IntPtr lp);
-
-        protected override bool ProcessCmdKey(ref Message msg, Keys key)
-        {
-            const int WM_KEYDOWN = 0x100;
-            const int WM_SYSKEYDOWN = 0x104;
-
-            if (msg.Msg == WM_KEYDOWN || msg.Msg == WM_SYSKEYDOWN)
-            {
-                switch (key)
-                {
-                    case Keys.Up:
-                        this.SelectPreviousItem();
-                        return true;
-
-                    case Keys.Down:
-                        this.SelectNextItem();
-                        return true;
-
-                    case Keys.Escape:
-                        this.Form.Close();
-                        return true;
-
-                    case Keys.Enter:
-                        this.Form.Close();
-                        return true;
-                }
-
-                PostMessage(this.Scintilla.Handle, msg.Msg, msg.WParam, msg.LParam);
-                return true;
-            }
-            return base.ProcessCmdKey(ref msg, key);
-        }
-
-        private void InitializeComponent()
-        {
-            this.components = new System.ComponentModel.Container();
-            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CompletionListBox));
-            this.imageList1 = new System.Windows.Forms.ImageList(this.components);
-            this.SuspendLayout();
-            // 
-            // imageList1
-            // 
-            this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream")));
-            this.imageList1.TransparentColor = System.Drawing.Color.Transparent;
-            this.imageList1.Images.SetKeyName(0, "module.png");
-            this.imageList1.Images.SetKeyName(1, "function.png");
-            // 
-            // CompletionListBox
-            // 
-            this.ItemHeight = 16;
-            this.Size = new System.Drawing.Size(96, 96);
-            this.ResumeLayout(false);
-
-        }
-        private System.ComponentModel.IContainer components;
-    }
-}

+ 0 - 174
EsPy/Components/Completion/CompletionListBox.resx

@@ -1,174 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<root>
-  <!-- 
-    Microsoft ResX Schema 
-    
-    Version 2.0
-    
-    The primary goals of this format is to allow a simple XML format 
-    that is mostly human readable. The generation and parsing of the 
-    various data types are done through the TypeConverter classes 
-    associated with the data types.
-    
-    Example:
-    
-    ... ado.net/XML headers & schema ...
-    <resheader name="resmimetype">text/microsoft-resx</resheader>
-    <resheader name="version">2.0</resheader>
-    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
-    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
-    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
-    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
-    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
-        <value>[base64 mime encoded serialized .NET Framework object]</value>
-    </data>
-    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
-        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
-        <comment>This is a comment</comment>
-    </data>
-                
-    There are any number of "resheader" rows that contain simple 
-    name/value pairs.
-    
-    Each data row contains a name, and value. The row also contains a 
-    type or mimetype. Type corresponds to a .NET class that support 
-    text/value conversion through the TypeConverter architecture. 
-    Classes that don't support this are serialized and stored with the 
-    mimetype set.
-    
-    The mimetype is used for serialized objects, and tells the 
-    ResXResourceReader how to depersist the object. This is currently not 
-    extensible. For a given mimetype the value must be set accordingly:
-    
-    Note - application/x-microsoft.net.object.binary.base64 is the format 
-    that the ResXResourceWriter will generate, however the reader can 
-    read any of the formats listed below.
-    
-    mimetype: application/x-microsoft.net.object.binary.base64
-    value   : The object must be serialized with 
-            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
-            : and then encoded with base64 encoding.
-    
-    mimetype: application/x-microsoft.net.object.soap.base64
-    value   : The object must be serialized with 
-            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
-            : and then encoded with base64 encoding.
-
-    mimetype: application/x-microsoft.net.object.bytearray.base64
-    value   : The object must be serialized into a byte array 
-            : using a System.ComponentModel.TypeConverter
-            : and then encoded with base64 encoding.
-    -->
-  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
-    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
-    <xsd:element name="root" msdata:IsDataSet="true">
-      <xsd:complexType>
-        <xsd:choice maxOccurs="unbounded">
-          <xsd:element name="metadata">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" />
-              </xsd:sequence>
-              <xsd:attribute name="name" use="required" type="xsd:string" />
-              <xsd:attribute name="type" type="xsd:string" />
-              <xsd:attribute name="mimetype" type="xsd:string" />
-              <xsd:attribute ref="xml:space" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="assembly">
-            <xsd:complexType>
-              <xsd:attribute name="alias" type="xsd:string" />
-              <xsd:attribute name="name" type="xsd:string" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="data">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
-              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
-              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
-              <xsd:attribute ref="xml:space" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="resheader">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" />
-            </xsd:complexType>
-          </xsd:element>
-        </xsd:choice>
-      </xsd:complexType>
-    </xsd:element>
-  </xsd:schema>
-  <resheader name="resmimetype">
-    <value>text/microsoft-resx</value>
-  </resheader>
-  <resheader name="version">
-    <value>2.0</value>
-  </resheader>
-  <resheader name="reader">
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-  <resheader name="writer">
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-  <metadata name="imageList1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>17, 17</value>
-  </metadata>
-  <data name="imageList1.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
-    <value>
-        AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
-        LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
-        ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAB+
-        CQAAAk1TRnQBSQFMAgEBAgEAAQgBAAEIAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
-        AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
-        AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
-        AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
-        AWYDAAGZAwABzAIAATMDAAIzAgABMwFmAgABMwGZAgABMwHMAgABMwH/AgABZgMAAWYBMwIAAmYCAAFm
-        AZkCAAFmAcwCAAFmAf8CAAGZAwABmQEzAgABmQFmAgACmQIAAZkBzAIAAZkB/wIAAcwDAAHMATMCAAHM
-        AWYCAAHMAZkCAALMAgABzAH/AgAB/wFmAgAB/wGZAgAB/wHMAQABMwH/AgAB/wEAATMBAAEzAQABZgEA
-        ATMBAAGZAQABMwEAAcwBAAEzAQAB/wEAAf8BMwIAAzMBAAIzAWYBAAIzAZkBAAIzAcwBAAIzAf8BAAEz
-        AWYCAAEzAWYBMwEAATMCZgEAATMBZgGZAQABMwFmAcwBAAEzAWYB/wEAATMBmQIAATMBmQEzAQABMwGZ
-        AWYBAAEzApkBAAEzAZkBzAEAATMBmQH/AQABMwHMAgABMwHMATMBAAEzAcwBZgEAATMBzAGZAQABMwLM
-        AQABMwHMAf8BAAEzAf8BMwEAATMB/wFmAQABMwH/AZkBAAEzAf8BzAEAATMC/wEAAWYDAAFmAQABMwEA
-        AWYBAAFmAQABZgEAAZkBAAFmAQABzAEAAWYBAAH/AQABZgEzAgABZgIzAQABZgEzAWYBAAFmATMBmQEA
-        AWYBMwHMAQABZgEzAf8BAAJmAgACZgEzAQADZgEAAmYBmQEAAmYBzAEAAWYBmQIAAWYBmQEzAQABZgGZ
-        AWYBAAFmApkBAAFmAZkBzAEAAWYBmQH/AQABZgHMAgABZgHMATMBAAFmAcwBmQEAAWYCzAEAAWYBzAH/
-        AQABZgH/AgABZgH/ATMBAAFmAf8BmQEAAWYB/wHMAQABzAEAAf8BAAH/AQABzAEAApkCAAGZATMBmQEA
-        AZkBAAGZAQABmQEAAcwBAAGZAwABmQIzAQABmQEAAWYBAAGZATMBzAEAAZkBAAH/AQABmQFmAgABmQFm
-        ATMBAAGZATMBZgEAAZkBZgGZAQABmQFmAcwBAAGZATMB/wEAApkBMwEAApkBZgEAA5kBAAKZAcwBAAKZ
-        Af8BAAGZAcwCAAGZAcwBMwEAAWYBzAFmAQABmQHMAZkBAAGZAswBAAGZAcwB/wEAAZkB/wIAAZkB/wEz
-        AQABmQHMAWYBAAGZAf8BmQEAAZkB/wHMAQABmQL/AQABzAMAAZkBAAEzAQABzAEAAWYBAAHMAQABmQEA
-        AcwBAAHMAQABmQEzAgABzAIzAQABzAEzAWYBAAHMATMBmQEAAcwBMwHMAQABzAEzAf8BAAHMAWYCAAHM
-        AWYBMwEAAZkCZgEAAcwBZgGZAQABzAFmAcwBAAGZAWYB/wEAAcwBmQIAAcwBmQEzAQABzAGZAWYBAAHM
-        ApkBAAHMAZkBzAEAAcwBmQH/AQACzAIAAswBMwEAAswBZgEAAswBmQEAA8wBAALMAf8BAAHMAf8CAAHM
-        Af8BMwEAAZkB/wFmAQABzAH/AZkBAAHMAf8BzAEAAcwC/wEAAcwBAAEzAQAB/wEAAWYBAAH/AQABmQEA
-        AcwBMwIAAf8CMwEAAf8BMwFmAQAB/wEzAZkBAAH/ATMBzAEAAf8BMwH/AQAB/wFmAgAB/wFmATMBAAHM
-        AmYBAAH/AWYBmQEAAf8BZgHMAQABzAFmAf8BAAH/AZkCAAH/AZkBMwEAAf8BmQFmAQAB/wKZAQAB/wGZ
-        AcwBAAH/AZkB/wEAAf8BzAIAAf8BzAEzAQAB/wHMAWYBAAH/AcwBmQEAAf8CzAEAAf8BzAH/AQAC/wEz
-        AQABzAH/AWYBAAL/AZkBAAL/AcwBAAJmAf8BAAFmAf8BZgEAAWYC/wEAAf8CZgEAAf8BZgH/AQAC/wFm
-        AQABIQEAAaUBAANfAQADdwEAA4YBAAOWAQADywEAA7IBAAPXAQAD3QEAA+MBAAPqAQAD8QEAA/gBAAHw
-        AfsB/wEAAaQCoAEAA4ADAAH/AgAB/wMAAv8BAAH/AwAB/wEAAf8BAAL/AgAD/0MAAf8B8gH/BQAB/wEH
-        AfAB/wIAARMBDgEHLgAB/wGTASUBbgHwAf8CAAH/AfcCTgHsAfMCAAHzAQAB8ggAAfMjAAH/ARwBLAFN
-        ASYBJQFuAfMB/wGYA04BLQFOAe8BAAH/AQ4B6wIAAfABEgQAARIBbQH0IQABkwZNAe8BBwFUATMDVAEz
-        AXECAAFtAQAB/wEAAeoBBwESAe0B/wESAW0BkgHqAf8gAAF0Ak0DUwFNAZMBmAIzBFUBcgIAAfcBAAEH
-        AQABEgH/AQAB9AHsARIB/wEAAW0B7yAAAXQCUwEsAU0CdQGTAZgEMwFVAeQBlwIAAfABAAH4AQABEgH0
-        AgABkgHvAgABvAHqIAABdAJTA00BUwGuAdMBsgFxA1UBWgGYAgAB9AEAAREBAAHqAbwBAAH/AeoB7AHz
-        AQAB9AESIAABkwSaAXUBkQPZAdMBswGdAeQBlwH0AgAB/wEOAQAB/wHvAW0BAAFtARIB/wHvARIB/wES
-        IAAB/wEaAZoBGgGaAe0G2QGdAZgB/wQAAeoBAAHyAf8B6gGSAf8EAAEHAeoiAAH1ARoBmQG7AtkD2gHZ
-        AfcB/wQAARADAAEPAfQBbQESBAABEgHxJQABuwH+A9kC2gHxBgABvAEAAewDAAHzKwAB7gXaAbQB9AYA
-        Af8BDgFDLwAB/wEJAdsC4QG6AfQIAAHsAQAB8QHvARIuAAH0AQkBuwH/CQAB9AHsAREBDgEHZwABQgFN
-        AT4HAAE+AwABKAMAAUADAAEQAwABAQEAAQEFAAGAFwAD/wEABP8EAAHHAcMBHwH/BAACgQGPAfcGAAGM
-        AfEGAAHEBwABxAGEBgABxAHMBgABxAGEBgABwAGABQABAQHgATwEAAHAAQMBwAE8BAAB+AEHAeMBvwQA
-        AfgBBwHjAf8EAAH4AQ8B8AF/BAAB/gEfAfABfwQABP8EAAs=
-</value>
-  </data>
-  <metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-    <value>False</value>
-  </metadata>
-</root>

+ 0 - 99
EsPy/Components/Place.cs

@@ -1,99 +0,0 @@
-using System;
-
-namespace FastColoredTextBoxNS
-{
-    /// <summary>
-    /// Line index and char index
-    /// </summary>
-    public struct Place : IEquatable<Place>
-    {
-        public int iChar;
-        public int iLine;
-
-        public Place(int iChar, int iLine)
-        {
-            this.iChar = iChar;
-            this.iLine = iLine;
-        }
-
-        public void Offset(int dx, int dy)
-        {
-            iChar += dx;
-            iLine += dy;
-        }
-
-        public bool Equals(Place other)
-        {
-            return iChar == other.iChar && iLine == other.iLine;
-        }
-
-        public override bool Equals(object obj)
-        {
-            return (obj is Place) && Equals((Place)obj);
-        }
-
-        public override int GetHashCode()
-        {
-            return iChar.GetHashCode() ^ iLine.GetHashCode();
-        }
-
-        public static bool operator !=(Place p1, Place p2)
-        {
-            return !p1.Equals(p2);
-        }
-
-        public static bool operator ==(Place p1, Place p2)
-        {
-            return p1.Equals(p2);
-        }
-
-        public static bool operator <(Place p1, Place p2)
-        {
-            if (p1.iLine < p2.iLine) return true;
-            if (p1.iLine > p2.iLine) return false;
-            if (p1.iChar < p2.iChar) return true;
-            return false;
-        }
-
-        public static bool operator <=(Place p1, Place p2)
-        {
-            if (p1.Equals(p2)) return true;
-            if (p1.iLine < p2.iLine) return true;
-            if (p1.iLine > p2.iLine) return false;
-            if (p1.iChar < p2.iChar) return true;
-            return false;
-        }
-
-        public static bool operator >(Place p1, Place p2)
-        {
-            if (p1.iLine > p2.iLine) return true;
-            if (p1.iLine < p2.iLine) return false;
-            if (p1.iChar > p2.iChar) return true;
-            return false;
-        }
-
-        public static bool operator >=(Place p1, Place p2)
-        {
-            if (p1.Equals(p2)) return true;
-            if (p1.iLine > p2.iLine) return true;
-            if (p1.iLine < p2.iLine) return false;
-            if (p1.iChar > p2.iChar) return true;
-            return false;
-        }
-
-        public static Place operator +(Place p1, Place p2)
-        {
-            return new Place(p1.iChar + p2.iChar, p1.iLine + p2.iLine);
-        }
-
-        public static Place Empty
-        {
-            get { return new Place(); }
-        }
-
-        public override string ToString()
-        {
-            return "(" + iChar + "," + iLine + ")";
-        }
-    }
-}

+ 0 - 13
EsPy/Components/PyCompletion.cs

@@ -1,13 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace EsPy.Components
-{
-    public class PyCompletion
-    {
-
-    }
-}

+ 0 - 116
EsPy/Dialogs/AboutDialog.Designer.cs

@@ -1,116 +0,0 @@
-namespace EsPy.Dialogs
-{
-    partial class AboutDialog
-    {
-        /// <summary>
-        /// Required designer variable.
-        /// </summary>
-        private System.ComponentModel.IContainer components = null;
-
-        /// <summary>
-        /// Clean up any resources being used.
-        /// </summary>
-        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-        protected override void Dispose(bool disposing)
-        {
-            if (disposing && (components != null))
-            {
-                components.Dispose();
-            }
-            base.Dispose(disposing);
-        }
-
-        #region Windows Form Designer generated code
-
-        /// <summary>
-        /// Required method for Designer support - do not modify
-        /// the contents of this method with the code editor.
-        /// </summary>
-        private void InitializeComponent()
-        {
-            this.button1 = new System.Windows.Forms.Button();
-            this.label1 = new System.Windows.Forms.Label();
-            this.label2 = new System.Windows.Forms.Label();
-            this.label3 = new System.Windows.Forms.Label();
-            this.label4 = new System.Windows.Forms.Label();
-            this.SuspendLayout();
-            // 
-            // button1
-            // 
-            this.button1.DialogResult = System.Windows.Forms.DialogResult.OK;
-            this.button1.Location = new System.Drawing.Point(285, 78);
-            this.button1.Name = "button1";
-            this.button1.Size = new System.Drawing.Size(75, 23);
-            this.button1.TabIndex = 0;
-            this.button1.Text = "Close";
-            this.button1.UseVisualStyleBackColor = true;
-            // 
-            // label1
-            // 
-            this.label1.AutoSize = true;
-            this.label1.Font = new System.Drawing.Font("Arial", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
-            this.label1.Location = new System.Drawing.Point(12, 9);
-            this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(321, 22);
-            this.label1.TabIndex = 1;
-            this.label1.Text = "EsPy. An ESP8266 MicroPython IDE";
-            // 
-            // label2
-            // 
-            this.label2.AutoSize = true;
-            this.label2.Location = new System.Drawing.Point(16, 36);
-            this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(35, 13);
-            this.label2.TabIndex = 3;
-            this.label2.Text = "label2";
-            // 
-            // label3
-            // 
-            this.label3.AutoSize = true;
-            this.label3.Location = new System.Drawing.Point(16, 56);
-            this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(35, 13);
-            this.label3.TabIndex = 4;
-            this.label3.Text = "label3";
-            // 
-            // label4
-            // 
-            this.label4.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
-            this.label4.Location = new System.Drawing.Point(12, 73);
-            this.label4.Name = "label4";
-            this.label4.Size = new System.Drawing.Size(348, 2);
-            this.label4.TabIndex = 5;
-            this.label4.Text = "label4";
-            // 
-            // AboutDialog
-            // 
-            this.AcceptButton = this.button1;
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
-            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(372, 110);
-            this.Controls.Add(this.label4);
-            this.Controls.Add(this.label3);
-            this.Controls.Add(this.label2);
-            this.Controls.Add(this.label1);
-            this.Controls.Add(this.button1);
-            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
-            this.MaximizeBox = false;
-            this.MinimizeBox = false;
-            this.Name = "AboutDialog";
-            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
-            this.Text = "About";
-            this.Load += new System.EventHandler(this.AboutDialog_Load);
-            this.ResumeLayout(false);
-            this.PerformLayout();
-
-        }
-
-        #endregion
-
-        private System.Windows.Forms.Button button1;
-        private System.Windows.Forms.Label label1;
-        private System.Windows.Forms.Label label2;
-        private System.Windows.Forms.Label label3;
-        private System.Windows.Forms.Label label4;
-    }
-}

+ 0 - 26
EsPy/Dialogs/AboutDialog.cs

@@ -1,26 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows.Forms;
-
-namespace EsPy.Dialogs
-{
-    public partial class AboutDialog : Form
-    {
-        public AboutDialog()
-        {
-            InitializeComponent();
-        }
-
-        private void AboutDialog_Load(object sender, EventArgs e)
-        {
-            this.label2.Text = "v" + Application.ProductVersion;
-            this.label3.Text = "Copyright (c) Jung Ervin 2016";
-        }
-    }
-}

+ 0 - 120
EsPy/Dialogs/AboutDialog.resx

@@ -1,120 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<root>
-  <!-- 
-    Microsoft ResX Schema 
-    
-    Version 2.0
-    
-    The primary goals of this format is to allow a simple XML format 
-    that is mostly human readable. The generation and parsing of the 
-    various data types are done through the TypeConverter classes 
-    associated with the data types.
-    
-    Example:
-    
-    ... ado.net/XML headers & schema ...
-    <resheader name="resmimetype">text/microsoft-resx</resheader>
-    <resheader name="version">2.0</resheader>
-    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
-    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
-    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
-    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
-    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
-        <value>[base64 mime encoded serialized .NET Framework object]</value>
-    </data>
-    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
-        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
-        <comment>This is a comment</comment>
-    </data>
-                
-    There are any number of "resheader" rows that contain simple 
-    name/value pairs.
-    
-    Each data row contains a name, and value. The row also contains a 
-    type or mimetype. Type corresponds to a .NET class that support 
-    text/value conversion through the TypeConverter architecture. 
-    Classes that don't support this are serialized and stored with the 
-    mimetype set.
-    
-    The mimetype is used for serialized objects, and tells the 
-    ResXResourceReader how to depersist the object. This is currently not 
-    extensible. For a given mimetype the value must be set accordingly:
-    
-    Note - application/x-microsoft.net.object.binary.base64 is the format 
-    that the ResXResourceWriter will generate, however the reader can 
-    read any of the formats listed below.
-    
-    mimetype: application/x-microsoft.net.object.binary.base64
-    value   : The object must be serialized with 
-            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
-            : and then encoded with base64 encoding.
-    
-    mimetype: application/x-microsoft.net.object.soap.base64
-    value   : The object must be serialized with 
-            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
-            : and then encoded with base64 encoding.
-
-    mimetype: application/x-microsoft.net.object.bytearray.base64
-    value   : The object must be serialized into a byte array 
-            : using a System.ComponentModel.TypeConverter
-            : and then encoded with base64 encoding.
-    -->
-  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
-    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
-    <xsd:element name="root" msdata:IsDataSet="true">
-      <xsd:complexType>
-        <xsd:choice maxOccurs="unbounded">
-          <xsd:element name="metadata">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" />
-              </xsd:sequence>
-              <xsd:attribute name="name" use="required" type="xsd:string" />
-              <xsd:attribute name="type" type="xsd:string" />
-              <xsd:attribute name="mimetype" type="xsd:string" />
-              <xsd:attribute ref="xml:space" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="assembly">
-            <xsd:complexType>
-              <xsd:attribute name="alias" type="xsd:string" />
-              <xsd:attribute name="name" type="xsd:string" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="data">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
-              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
-              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
-              <xsd:attribute ref="xml:space" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="resheader">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" />
-            </xsd:complexType>
-          </xsd:element>
-        </xsd:choice>
-      </xsd:complexType>
-    </xsd:element>
-  </xsd:schema>
-  <resheader name="resmimetype">
-    <value>text/microsoft-resx</value>
-  </resheader>
-  <resheader name="version">
-    <value>2.0</value>
-  </resheader>
-  <resheader name="reader">
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-  <resheader name="writer">
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-</root>

+ 1 - 0
EsPy/EsPy.csproj

@@ -229,6 +229,7 @@
     <None Include="pip.bat">
     <None Include="pip.bat">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
     </None>
+    <Content Include="Release\EsPy.1.0.0.4.7z" />
     <None Include="Resources\error16.png" />
     <None Include="Resources\error16.png" />
     <None Include="Resources\info.png" />
     <None Include="Resources\info.png" />
     <None Include="Resources\compile.png" />
     <None Include="Resources\compile.png" />

+ 0 - 14
EsPy/Forms/CodeCompletionList.cs

@@ -1,14 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows.Forms;
-
-namespace EsPy.Forms
-{
-    public class CodeCompletionList : Form
-    {
-
-    }
-}

+ 0 - 39
EsPy/Utility/Completion.cs

@@ -1,39 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace EsPy.Utility
-{
-    public class Completion
-    {
-        public string Module = "";
-        public string Complete = "";
-        public string Name = "";
-        public string[] Params = null;
-        public string Type = "";
-        public string Doc = "";
-
-        public Completion()
-        { }
-
-        public Completion(string module, string complete, string name, string[] args, string type, string doc)
-        {
-            this.Module = module;
-            this.Complete = complete;
-            this.Name = name;
-            this.Params = args;
-            this.Type = type;
-            this.Doc = doc;
-
-        }
-
-        public override string ToString()
-        {
-            return this.Module + " " + this.Name;
-            //return base.ToString();
-        }
-
-    }
-}

+ 0 - 194
EsPy/Utility/ConsoleAppManager.cs

@@ -1,194 +0,0 @@
-////=============================================================================================
-////http://stackoverflow.com/questions/21848271/redirecting-standard-input-of-console-application
-////=============================================================================================
-
-//using System;
-//using System.Diagnostics;
-//using System.Text;
-//using System.Threading;
-//using System.Threading.Tasks;
-
-//public class ConsoleAppManager
-//{
-//    private readonly string appName;
-//    private readonly Process process = new Process();
-//    private readonly object theLock = new object();
-//    private SynchronizationContext context;
-//    private string pendingWriteData;
-
-//    public ConsoleAppManager(string appName)
-//    {
-//        this.appName = appName;
-
-//        this.process.StartInfo.FileName = this.appName;
-//        this.process.StartInfo.RedirectStandardError = true;
-//        this.process.StartInfo.StandardErrorEncoding = Encoding.UTF8;
-
-//        this.process.StartInfo.RedirectStandardInput = true;
-//        this.process.StartInfo.RedirectStandardOutput = true;
-//        this.process.EnableRaisingEvents = true;
-//        this.process.StartInfo.CreateNoWindow = true;
-
-//        this.process.StartInfo.UseShellExecute = false;
-
-//        this.process.StartInfo.StandardOutputEncoding = Encoding.UTF8;
-
-//        this.process.Exited += this.ProcessOnExited;
-//    }
-
-//    public event EventHandler<string> ErrorTextReceived;
-//    public event EventHandler ProcessExited;
-//    public event EventHandler<string> StandartTextReceived;
-
-//    public int ExitCode
-//    {
-//        get { return this.process.ExitCode; }
-//    }
-
-//    public bool Running
-//    {
-//        get; private set;
-//    }
-
-//    public void ExecuteAsync(params string[] args)
-//    {
-//        if (this.Running)
-//        {
-//            throw new InvalidOperationException(
-//                "Process is still Running. Please wait for the process to complete.");
-//        }
-
-//        string arguments = string.Join(" ", args);
-
-//        this.process.StartInfo.Arguments = arguments;
-
-//        this.context = SynchronizationContext.Current;
-
-//        this.process.Start();
-//        this.Running = true;
-
-//        new Task(this.ReadOutputAsync).Start();
-//        new Task(this.WriteInputTask).Start();
-//        new Task(this.ReadOutputErrorAsync).Start();
-//    }
-
-//    public void Write(string data)
-//    {
-//        if (data == null)
-//        {
-//            return;
-//        }
-
-//        lock (this.theLock)
-//        {
-//            this.pendingWriteData = data;
-//        }
-//    }
-
-//    public void WriteLine(string data)
-//    {
-//        this.Write(data + Environment.NewLine);
-//    }
-
-//    protected virtual void OnErrorTextReceived(string e)
-//    {
-//        EventHandler<string> handler = this.ErrorTextReceived;
-
-//        if (handler != null)
-//        {
-//            if (this.context != null)
-//            {
-//                this.context.Post(delegate { handler(this, e); }, null);
-//            }
-//            else
-//            {
-//                handler(this, e);
-//            }
-//        }
-//    }
-
-//    protected virtual void OnProcessExited()
-//    {
-//        EventHandler handler = this.ProcessExited;
-//        if (handler != null)
-//        {
-//            handler(this, EventArgs.Empty);
-//        }
-//    }
-
-//    protected virtual void OnStandartTextReceived(string e)
-//    {
-//        EventHandler<string> handler = this.StandartTextReceived;
-
-//        if (handler != null)
-//        {
-//            if (this.context != null)
-//            {
-//                this.context.Post(delegate { handler(this, e); }, null);
-//            }
-//            else
-//            {
-//                handler(this, e);
-//            }
-//        }
-//    }
-
-//    private void ProcessOnExited(object sender, EventArgs eventArgs)
-//    {
-//        this.OnProcessExited();
-//    }
-
-//    private async void ReadOutputAsync()
-//    {
-//        var standart = new StringBuilder();
-//        var buff = new char[1024];
-//        int length;
-
-//        while (this.process.HasExited == false)
-//        {
-//            standart.Clear();
-
-//            length = await this.process.StandardOutput.ReadAsync(buff, 0, buff.Length);
-//            standart.Append(buff.SubArray(0, length));
-//            this.OnStandartTextReceived(standart.ToString());
-//            Thread.Sleep(1);
-//        }
-
-//        this.Running = false;
-//    }
-
-//    private async void ReadOutputErrorAsync()
-//    {
-//        var sb = new StringBuilder();
-
-//        do
-//        {
-//            sb.Clear();
-//            var buff = new char[1024];
-//            int length = await this.process.StandardError.ReadAsync(buff, 0, buff.Length);
-//            sb.Append(buff.SubArray(0, length));
-//            this.OnErrorTextReceived(sb.ToString());
-//            Thread.Sleep(1);
-//        }
-//        while (this.process.HasExited == false);
-//    }
-
-//    private async void WriteInputTask()
-//    {
-//        while (this.process.HasExited == false)
-//        {
-//            Thread.Sleep(1);
-
-//            if (this.pendingWriteData != null)
-//            {
-//                await this.process.StandardInput.WriteLineAsync(this.pendingWriteData);
-//                await this.process.StandardInput.FlushAsync();
-
-//                lock (this.theLock)
-//                {
-//                    this.pendingWriteData = null;
-//                }
-//            }
-//        }
-//    }
-//}

+ 0 - 12
EsPy/Utility/Keyword.cs

@@ -1,12 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace EsPy.Utility
-{
-    public class Keyword
-    {
-    }
-}

+ 0 - 31
EsPy/Utility/Keywords.cs

@@ -1,31 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace EsPy.Utility
-{
-    public class Keywords : List<Completion>
-    {
-        //public string Key
-        //{
-        //    get
-        //    {
-        //        if (this.Count == 0)
-        //            return null;
-        //        else if (this.Count == 1)
-        //            return this[0].Word;
-
-        //        string key = "";
-        //        string sep = "";
-        //        for (int i = 1; i < this.Count; i++)
-        //        {
-        //            key += sep + this[i].Word;
-        //            sep = ".";
-        //        }
-        //        return key;
-        //    }
-        //}
-    }
-}

+ 0 - 201
EsPy/uPy/micropython_pyb-master/LICENSE

@@ -1,201 +0,0 @@
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "{}"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright {yyyy} {name of copyright owner}
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.

+ 0 - 10
EsPy/uPy/micropython_pyb-master/README.md

@@ -1,10 +0,0 @@
-micropython_pyb
-==================
-
-This project provides a pyb.py file for use with IDEs in developing a project for the Pyboard.
-
-There is no implementation in the file, it is there for code completion only.
-
-It's probably a bit rough, feel free to open an issue, tweaks should be easy.
-
-https://github.com/dastultz/micropython_pyb

+ 0 - 1019
EsPy/uPy/micropython_pyb-master/lib/pyb.py

@@ -1,1019 +0,0 @@
-def delay(ms):
-    """
-    Delay for the given number of milliseconds.
-    """
-    pass
-
-
-def udelay(us):
-    """
-    Delay for the given number of microseconds.
-    """
-    pass
-
-
-def millis():
-    """
-    Returns the number of milliseconds since the board was last reset.
-    """
-    pass
-
-
-def micros():
-    """
-    Returns the number of microseconds since the board was last reset.
-    """
-    pass
-
-
-def elapsed_millis(start):
-    """
-    Returns the number of milliseconds which have elapsed since ``start``.
-    """
-    pass
-
-
-def elapsed_micros(start):
-    """
-    Returns the number of microseconds which have elapsed since ``start``.
-    """
-    pass
-
-
-def hard_reset():
-    """
-    Resets the pyboard in a manner similar to pushing the external RESET
-    button.
-    """
-
-
-def bootloader():
-    """
-    Activate the bootloader without BOOT\* pins.
-    """
-    pass
-
-
-def disable_irq():
-    """
-    Disable interrupt requests.
-    """
-    pass
-
-
-def enable_irq(state=True):
-    """
-    Enable interrupt requests.
-    """
-    pass
-
-
-def freq(sysclk, hclk, pclk1, pclk2):
-    """
-    If given no arguments, returns a tuple of clock frequencies.
-    """
-    pass
-
-
-def wfi():
-    """
-    Wait for an internal or external interrupt.
-    """
-    pass
-
-
-def stop():
-    """
-    Put the pyboard in a "sleeping" state.
-    """
-
-
-def standby():
-    """
-    Put the pyboard into a "deep sleep" state.
-    """
-    pass
-
-
-def info(dump_alloc_table):
-    """
-    Print out lots of information about the board.
-    """
-    pass
-
-
-def main(filename):
-    """
-    Set the filename of the main script to run after boot.py is finished.
-    """
-    pass
-
-
-def mount(device, mountpoint, *, readonly=False, mkfs=False):
-    """
-    Mount a block device and make it available as part of the filesystem.
-    """
-    pass
-
-
-def repl_uart(uart):
-    """
-    Get or set the UART object where the REPL is repeated on.
-    """
-    pass
-
-
-def rng():
-    """
-    Return a 30-bit hardware generated random number.
-    """
-    pass
-
-
-def sync():
-    """
-    Sync all file systems.
-    """
-    pass
-
-
-def unique_id():
-    """
-    Returns a string of 12 bytes (96 bits), which is the unique ID of the MCU.
-    """
-    pass
-
-
-class Accel:
-
-    def filtered_xyz(self):
-        """
-        Get a 3-tuple of filtered x, y and z values.
-        """
-        pass
-
-    def tilt(self):
-        """
-        Get the tilt register.
-        """
-        pass
-
-    def x(self):
-        """
-        Get the x-axis value.
-        """
-        pass
-
-    def y(self):
-        """
-        Get the y-axis value.
-        """
-        pass
-
-    def z(self):
-        """
-        Get the z-axis value.
-        """
-        pass
-
-    def write(self, register, value):
-        pass
-
-    def read(self, register):
-        pass
-
-
-class ADC:
-
-    def __init__(self, pin):
-        """
-        Create an ADC object associated with the given pin.
-        This allows you to then read analog values on that pin.
-        """
-        pass
-
-    def read(self):
-        """
-        Read the value on the analog pin and return it.  The returned value
-        will be between 0 and 4095.
-        """
-        pass
-
-    def read_timed(buf, timer):
-        """
-        Read analog values into ``buf`` at a rate set by the ``timer`` object.
-        """
-        pass
-
-class CAN:
-
-    NORMAL = "NORMAL"
-    LOOPBACK = "LOOPBACK"
-    SILENT = "SILENT"
-    SILENT_LOOPBACK = "SILENT_LOOPBACK"
-    
-    LIST16 = "LIST16"
-    MASK16 = "MASK16"
-    LIST32 = "LIST32"
-    MASK32 = "MASK32"
-    
-    def __init__(self, bus, mode=None, extframe=False, prescaler=100, *, sjw=1, bs1=6, bs2=8):
-        """
-        Construct a CAN object on the given bus.
-        """
-        pass
-
-    @classmethod
-    def initfilterbanks(cls, nr):
-        """
-        Reset and disable all filter banks and assign how many banks should be available for CAN(1).
-        """
-        pass
-
-    def init(self, mode, extframe=False, prescaler=100, *, sjw=1, bs1=6, bs2=8):
-        """
-        Initialise the CAN bus with the given parameters
-        """
-        pass
-
-    def deinit(self):
-        """
-        Turn off the CAN bus.
-        """
-        pass
-
-    def setfilter(self, bank, mode, fifo, params, *, rtr):
-        """
-        Configure a filter bank
-        """
-        pass
-
-
-class DAC:
-
-    NORMAL = "NORMAL"
-    CIRCULAR = "CIRCULAR"
-    
-    def __init__(self, port, bits=8):
-        """
-        Construct a new DAC object.
-        """
-        pass
-
-    def init(self, bits=8):
-        """
-        Reinitialise the DAC.  ``bits`` can be 8 or 12.
-        """
-        pass
-
-    def noise(self, freq):
-        """
-        Generate a pseudo-random noise signal.
-        """
-        pass
-
-    def triangle(self, freq):
-        """
-        Generate a triangle wave.
-        """
-        pass
-
-    def write(self, value):
-        """
-        Direct access to the DAC output.
-        """
-        pass
-
-    def write_timed(self, data, freq, *, mode=DAC.NORMAL):
-        """
-        Initiates a burst of RAM to DAC using a DMA transfer.
-        """
-        pass
-
-
-class ExtInt:
-
-    IRQ_FALLING = "IRQ_FALLING"
-    IRQ_RISING = "IRQ_RISING"
-    IRQ_RISING_FALLING = "IRQ_RISING_FALLING"
-
-    def __init__(self, pin, mode, pull, callback):
-        """
-        Create an ExtInt object
-        """
-        pass
-
-    @classmethod
-    def regs(cls):
-        """
-        Dump the values of the EXTI registers.
-        """
-
-    def disable(self, ):
-        """
-        Disable the interrupt associated with the ExtInt object.
-        This could be useful for debouncing.
-        """
-        pass
-
-    def enable(self, ):
-        """
-        Enable a disabled interrupt.
-        """
-        pass
-
-    def line(self, ):
-        """
-        Return the line number that the pin is mapped to.
-        """
-        pass
-
-    def swint(self, ):
-        """
-        Trigger the callback from software.
-        """
-        pass
-
-
-class I2C:
-
-    MASTER = "MASTER"
-    SLAVE = "SLAVE"
-
-    def __init__(self, bus):
-        """
-        Construct an I2C object on the given bus.
-        """
-        pass
-
-
-    def deinit(self):
-        """
-        Turn off the I2C bus.
-        """
-        pass
-
-    def init(self, mode, *, addr=0x12, baudrate=400000, gencall=False):
-        """
-        Initialise the I2C bus with the given parameters.
-        """
-        pass
-
-    def is_ready(self, addr):
-        """
-        Check if an I2C device responds to the given address.  Only valid when in master mode.
-        """
-        pass
-
-    def mem_read(self, data, addr, memaddr, *, timeout=5000, addr_size=8):
-        """
-        Read from the memory of an I2C device.
-        """
-        pass
-
-    def mem_write(self, data, addr, memaddr, *, timeout=5000, addr_size=8):
-        """
-        Write to the memory of an I2C device.
-        """
-        pass
-
-    def recv(self, recv, addr=0x00, *, timeout=5000):
-        """
-        Receive data on the bus.
-        """
-        pass
-
-    def send(self, send, addr=0x00, *, timeout=5000):
-        """
-        Send data on the bus.
-        """
-        pass
-
-    def scan(self):
-        """
-        Scan all I2C addresses from 0x01 to 0x7f and return a list of those that respond.
-        """
-        pass
-
-class LCD:
-
-    def __init__(self, skin_position):
-        """
-        Construct an LCD object in the given skin position.  ``skin_position`` can be 'X' or 'Y', and
-        should match the position where the LCD pyskin is plugged in.
-        """
-        pass
-
-    def command(self, instr_data, buf):
-        """
-        Send an arbitrary command to the LCD.  Pass 0 for ``instr_data`` to send an
-        instruction, otherwise pass 1 to send data.  ``buf`` is a buffer with the
-        instructions/data to send.
-        """
-
-    def contrast(self, value):
-        """
-        Set the contrast of the LCD.  Valid values are between 0 and 47.
-        """
-        pass
-
-    def fill(self, colour):
-        """
-        Fill the screen with the given colour (0 or 1 for white or black).
-        """
-        pass
-
-    def get(self, x, y):
-        """
-        Get the pixel at the position ``(x, y)``.  Returns 0 or 1.
-        """
-        pass
-
-    def light(self, value):
-        """
-        Turn the backlight on/off.  True or 1 turns it on, False or 0 turns it off.
-        """
-        pass
-
-    def pixel(self, x, y, colour):
-        """
-        Set the pixel at ``(x, y)`` to the given colour (0 or 1).
-        """
-        pass
-
-    def show(self, ):
-        """
-        Show the hidden buffer on the screen.
-        """
-        pass
-
-    def text(self, str, x, y, colour):
-        """
-        Draw the given text to the position ``(x, y)`` using the given colour (0 or 1).
-        """
-        pass
-
-    def write(self, str):
-        """
-        Write the string ``str`` to the screen.  It will appear immediately.
-        """
-        pass
-
-
-class LED:
-    def __init__(self, id):
-        """
-        Create an LED object associated with the given LED
-        """
-        pass
-
-    def intensity(self, value):
-        """
-        Get or set the LED intensity.  Intensity ranges between 0 (off) and 255 (full on).
-        """
-
-    def off(self, ):
-        """
-        Turn the LED off.
-        """
-        pass
-
-    def on(self, ):
-        """
-        Turn the LED on, to maximum intensity.
-        """
-        pass
-
-    def toggle(self, ):
-        """
-        Toggle the LED between on (maximum intensity) and off.
-        """
-        pass
-
-
-class Pin:
-
-    AF_OD = "AF_OD"
-    AF_PP = "AF_PP"
-    ANALOG = "ANALOG"
-    IN = "IN"
-    OUT_OD = "OUT_OD"
-    OUT_PP = "OUT_PP"
-    PULL_DOWN = "PULL_DOWN"
-    PULL_NONE = "PULL_NONE"
-    PULL_UP = "PULL_UP"
-
-    def __init__(self, id):
-        """
-        Create a new Pin object associated with the id.
-        """
-        pass
-
-    @classmethod
-    def af_list(cls, ):
-        """
-        Returns an array of alternate functions available for this pin.
-        """
-        pass
-
-    @classmethod
-    def debug(cls, state):
-        """
-        Get or set the debugging state (``True`` or ``False`` for on or off).
-        """
-        pass
-
-    @classmethod
-    def dict(cls, dict):
-        """
-        Get or set the pin mapper dictionary.
-        """
-        pass
-
-    @classmethod
-    def mapper(cls, fun):
-        """
-        Get or set the pin mapper function.
-        """
-        pass
-
-    def init(self, mode, pull=Pin.PULL_NONE, af=-1):
-        """
-        Initialise the pin:
-        """
-        pass
-
-    def value(self, value):
-        """
-        Get or set the digital logic level of the pin.
-        """
-        pass
-
-    def __str__(self):
-        """
-        Return a string describing the pin object.
-        """
-        pass
-
-    def af(self):
-        """
-        Returns the currently configured alternate-function of the pin.
-        """
-        pass
-
-    def gpio(self):
-        """
-        Returns the base address of the GPIO block associated with this pin.
-        """
-        pass
-
-    def mode(self):
-        """
-        Returns the currently configured mode of the pin.
-        """
-        pass
-
-    def name(self):
-        """
-        Get the pin name.
-        """
-        pass
-
-    def names(self):
-        """
-        Returns the cpu and board names for this pin.
-        """
-        pass
-
-    def pin(self):
-        """
-        Get the pin number.
-        """
-        pass
-
-    def port(self):
-        """
-        Get the pin port.
-        """
-        pass
-
-    def pull(self):
-        """
-        Returns the currently configured pull of the pin.
-        """
-        pass
-
-class PinAF:
-
-    def __str__(self):
-        """
-        Return a string describing the alternate function.
-        """
-        pass
-
-    def index(self):
-        """
-        Return the alternate function index.
-        """
-        pass
-
-    def name(self):
-        """
-        Return the name of the alternate function.
-        """
-        pass
-
-    def reg(self):
-        """
-        Return the base register associated with the peripheral assigned to this
-        alternate function.
-        """
-        pass
-
-
-class RTC:
-
-    def __init__(self):
-        """
-        Create an RTC object.
-        """
-        pass
-
-    def datetime(self, datetimetuple):
-        """
-        Get or set the date and time of the RTC.
-        """
-        pass
-
-    def wakeup(self, timeout, callback=None):
-        """
-        Set the RTC wakeup timer to trigger repeatedly at every ``timeout``
-        milliseconds.
-        """
-        pass
-
-    def info(self):
-        """
-        Get information about the startup time and reset source.
-        """
-        pass
-
-    def calibration(self, cal):
-        """
-        Get or set RTC calibration.
-        """
-        pass
-
-class Servo:
-
-    def __init__(self, id):
-        """
-        Create a servo object.  ``id`` is 1-4, and corresponds to pins X1 through X4.
-        """
-        pass
-
-    def angle(self, angle, time=0):
-        """
-        If no arguments are given, this function returns the current angle.
-        """
-        pass
-
-    def speed(self, speed, time=0):
-        """
-        If no arguments are given, this function returns the current speed.
-        """
-        pass
-
-    def pulse_width(self, value):
-        """
-        If no arguments are given, this function returns the current raw pulse-width
-        value.
-        """
-        pass
-
-    def calibration(self, pulse_min, pulse_max, pulse_centre, pulse_angle_90, pulse_speed_100):
-        """
-        If no arguments are given, this function returns the current calibration
-        data, as a 5-tuple.
-        """
-        pass
-
-
-class SPI:
-
-    MASTER = "MASTER"
-    SLAVE = "SLAVE"
-    LSB = "LSB"
-    MSB = "MSB"
-
-    def __init__(self, bus):
-        """
-        Construct an SPI object on the given bus.
-        """
-        pass
-
-    def deinit(self):
-        """
-        Turn off the SPI bus.
-        """
-        pass
-
-    def init(self, mode, baudrate=328125, *, prescaler, polarity=1, phase=0, bits=8, firstbit=SPI.MSB, ti=False, crc=None):
-        """
-        Initialise the SPI bus with the given parameters:
-        """
-        pass
-
-    def recv(self, recv, *, timeout=5000):
-        """
-        Receive data on the bus:
-        """
-        pass
-
-    def send(self, send, *, timeout=5000):
-        """
-        Send data on the bus:
-        """
-        pass
-
-    def send_recv(self, send, recv=None, *, timeout=5000):
-        """
-        Send and receive data on the bus at the same time:
-        """
-        pass
-
-
-class Switch:
-
-    def __init__(self):
-        """
-        Create and return a switch object.
-        """
-        pass
-
-    def switch(self):
-        """
-        Return the switch state: ``True`` if pressed down, ``False`` otherwise.
-        """
-        pass
-
-    def callback(self, fun):
-        """
-        Register the given function to be called when the switch is pressed down.
-        """
-        pass
-
-class Timer:
-
-    def __init__(self, id):
-        """
-        Construct a new timer object of the given id.
-        """
-        pass
-
-    def init(self, *, freq, prescaler, period):
-        """
-        Initialise the timer.
-        """
-        pass
-
-    def deinit(self):
-        """
-        Deinitialises the timer.
-        """
-        pass
-
-    def callback(self, fun):
-        """
-        Set the function to be called when the timer triggers.
-        """
-        pass
-
-    def channel(self, channel, mode):
-        """
-        If only a channel number is passed, then a previously initialized channel
-        object is returned (or ``None`` if there is no previous channel).
-        """
-        pass
-
-    def counter(self, value):
-        """
-        Get or set the timer counter.
-        """
-
-    def freq(self, value):
-        """
-        Get or set the frequency for the timer (changes prescaler and period if set).
-        """
-        pass
-
-    def period(self, value):
-        """
-        Get or set the period of the timer.
-        """
-        pass
-
-    def prescaler(self, value):
-        """
-        Get or set the prescaler for the timer.
-        """
-        pass
-
-    def source_freq(self):
-        """
-        Get the frequency of the source of the timer.
-        """
-        pass
-
-
-class TimerChannel:
-
-    def callback(self, fun):
-        """
-        Set the function to be called when the timer channel triggers.
-        """
-        pass
-
-    def capture(self, value):
-        """
-        Get or set the capture value associated with a channel.
-        """
-        pass
-
-    def compare(self, value):
-        """
-        Get or set the compare value associated with a channel.
-        """
-        pass
-
-    def pulse_width(self, value):
-        """
-        Get or set the pulse width value associated with a channel.
-        """
-
-    def pulse_width_percent(self, value):
-        """
-        Get or set the pulse width percentage associated with a channel.
-        """
-        pass
-
-
-class UART:
-
-    RTS = "RTS"
-    CTS = "CTS"
-
-    def __init__(self, bus):
-        """
-        Construct a UART object on the given bus.
-        """
-        pass
-
-    def init(self, baudrate, bits=8, parity=None, stop=1, \*, timeout=1000, flow=None, timeout_char=0, read_buf_len=64):
-        """
-        Initialise the UART bus with the given parameters:
-        """
-        pass
-
-    def deinit(self):
-        """
-        Turn off the UART bus.
-        """
-        pass
-
-    def any(self):
-        """
-        Return ``True`` if any characters waiting, else ``False``.
-        """
-        pass
-
-    def writechar(self, char):
-        """
-        Write a single character on the bus.
-        """
-        pass
-
-    def read(self, nbytes):
-        """
-        Read characters.
-        """
-        pass
-
-    def readall(self):
-        """
-        Read as much data as possible.
-        """
-        pass
-
-    def readchar(self):
-        """
-        Receive a single character on the bus.
-        """
-        pass
-
-    def readinto(self, buf, nbytes):
-        """
-        Read bytes into the ``buf``.
-        """
-        pass
-
-    def readline(self):
-        """
-        Read a line, ending in a newline character.
-        """
-        pass
-
-    def write(self, buf):
-        """
-        Write the buffer of bytes to the bus.
-        """
-        pass
-
-    def sendbreak(self):
-        """
-        Send a break condition on the bus.
-        """
-        pass
-
-
-class USB_VCP:
-
-    def __init__(self):
-        """
-        Create a new USB_VCP object.
-        """
-        pass
-
-    def setinterrupt(self, chr):
-        """
-        Set the character which interrupts running Python code.
-        """
-        pass
-
-    def isconnected(self):
-        """
-        Return ``True`` if USB is connected as a serial device, else ``False``.
-        """
-        pass
-
-    def any(self):
-        """
-        Return ``True`` if any characters waiting, else ``False``.
-        """
-        pass
-
-    def close(self):
-        """
-        This method does nothing. It exists so the USB_VCP object can act as a file.
-        """
-        pass
-
-    def read(self, nbytes):
-        """
-        Read at most ``nbytes`` from the serial device and return them as a bytes object.
-        """
-        pass
-
-    def readall(self):
-        """
-        Read all available bytes from the serial device and return them as
-        a bytes object, or ``None`` if no pending data available.
-        """
-        pass
-
-    def readinto(self, buf, maxlen):
-        """
-        Read bytes from the serial device and store them into ``buf``, which
-        should be a buffer-like object.
-        """
-        pass
-
-    def readline(self):
-        """
-        Read a whole line from the serial device.
-        """
-        pass
-
-    def readlines(self):
-        """
-        Read as much data as possible from the serial device, breaking it into lines.
-        """
-        pass
-
-    def write(self, buf):
-        """
-        Write the bytes from ``buf`` to the serial device.
-        """
-        pass
-
-    def recv(self, data, *, timeout=5000):
-        """
-        Receive data on the bus.
-        """
-        pass
-
-    def send(self, data, *, timeout=5000):
-        """
-        Send data over the USB VCP.
-        """
-        pass