Download data/DWSIM.Controls.PythonConsoleControl/PythonCompletionData.cs from introvoyz041/Dwsim: direct link, hf CLI and curl.
- Browser
- Download file 1.79 kB
-
https://huggingface.co/datasets/introvoyz041/Dwsim/resolve/main/data/DWSIM.Controls.PythonConsoleControl/PythonCompletionData.cs
- Command line
-
hf download hf://datasets/introvoyz041/Dwsim/data/DWSIM.Controls.PythonConsoleControl/PythonCompletionData.cs
-
curl -L -o PythonCompletionData.cs https://huggingface.co/datasets/introvoyz041/Dwsim/resolve/main/data/DWSIM.Controls.PythonConsoleControl/PythonCompletionData.cs
1.79 kB
| // Copyright (c) 2010 Joe Moorhouse | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using ICSharpCode.AvalonEdit.CodeCompletion; | |
| using ICSharpCode.AvalonEdit.Document; | |
| using ICSharpCode.AvalonEdit.Editing; | |
| using Microsoft.Scripting.Hosting.Shell; | |
| using Microsoft.Scripting; | |
| namespace PythonConsoleControl | |
| { | |
| /// <summary> | |
| /// Implements AvalonEdit ICompletionData interface to provide the entries in the completion drop down. | |
| /// </summary> | |
| public class PythonCompletionData : ICompletionData | |
| { | |
| CommandLine commandLine; | |
| public PythonCompletionData(string text, string stub, CommandLine commandLine, bool isInstance) | |
| { | |
| this.Text = text; | |
| this.Stub = stub; | |
| this.commandLine = commandLine; | |
| this.IsInstance = isInstance; | |
| } | |
| public System.Windows.Media.ImageSource Image | |
| { | |
| get { return null; } | |
| } | |
| public string Text { get; private set; } | |
| public string Stub { get; private set; } | |
| public bool IsInstance { get; private set; } | |
| // Use this property if you want to show a fancy UIElement in the drop down list. | |
| public object Content | |
| { | |
| get { return this.Text; } | |
| } | |
| public object Description | |
| { | |
| get { | |
| // Do nothing: description now updated externally and asynchronously. | |
| return "Not available"; | |
| } | |
| } | |
| public double Priority { get { return 0; } } | |
| public void Complete(TextArea textArea, ISegment completionSegment, EventArgs insertionRequestEventArgs) | |
| { | |
| textArea.Document.Replace(completionSegment, this.Text); | |
| } | |
| } | |
| } | |