Esempio n. 1
0
        public async Task <bool> CheckAllFiles(string finalLanguage, string originalLanguage)
        {
            var pathes = new List <string>();

            foreach (string path in Directory.EnumerateFiles(localPath, "*.html", SearchOption.AllDirectories))
            {
                pathes.Add(path);
            }
            foreach (string path in pathes)
            {
                var words = HtmlParser.GetWordsFromFile(path);

                var translatedTexts = new List <TranslatedText>();

                foreach (string word in words)
                {
                    var translated = await Translator.Translate(word, finalLanguage, originalLanguage);

                    translatedTexts.Add(translated);
                }

                FileEditor.ReplaceTextInFile(path, translatedTexts);
            }
            return(true);
        }
Esempio n. 2
0
 private void OnOpenFile()
 {
     if (openFileDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK)
     {
         System.IO.StreamReader openFile      = new System.IO.StreamReader(openFileDialog1.FileName);
         FileEditor             newFileEditor = new FileEditor(tabControl, openFileDialog1.FileName, openFileDialog1.SafeFileName, openFile.ReadToEnd());
         if (currentFileEditor.IsNew() && (!currentFileEditor.IsDirty()))
         {
             int currentTabIndex = tabControl.SelectedIndex;
             currentFileEditor            = newFileEditor;
             fileEditors[currentTabIndex] = newFileEditor;
             tabControl.SelectedTab.Text  = openFileDialog1.SafeFileName;
             tabControl.SelectedTab.Controls.Clear();
             tabControl.SelectedTab.Controls.Add(currentFileEditor.GetScintilla());
         }
         else
         {
             TabPage newTab = new TabPage(openFileDialog1.SafeFileName);
             tabControl.TabPages.Add(newTab);
             currentFileEditor = newFileEditor;
             fileEditors.Add(newFileEditor);
             newTab.Controls.Add(currentFileEditor.GetScintilla());
             tabControl.SelectTab(fileEditors.Count - 1);
         }
         openFile.Close();
     }
 }
Esempio n. 3
0
    public static bool GetDataFromFile(out List <string[]> platformInput, out List <string[]> hazardInput, out List <string[]> checkpointInput)
    {
        platformInput   = new List <string[]>();
        hazardInput     = new List <string[]>();
        checkpointInput = new List <string[]>();

        string filePath = FileEditor.GetFile();

        if (filePath != null)
        {
            StreamReader reader = new StreamReader(filePath);

            string line = "";

            while (!(line = reader.ReadLine()).Contains("|"))
            {
                platformInput.Add(line.Split(' '));
            }

            while (!(line = reader.ReadLine()).Contains("|"))
            {
                hazardInput.Add(line.Split(' '));
            }

            while ((line = reader.ReadLine()) != null)
            {
                checkpointInput.Add(line.Split(' '));
            }

            return(true);
        }

        return(false);
    }
        public FileEditor Post(FileEditor file)
        {
            UserProfile _user = AuthManager.CurrentUser;

            if (_user == null)
            {
                throw ExceptionResponse.Forbidden(Request, Messages.InvalidCredentials);
            }

            try
            {
                const string fileName = "Unititled";
                return(EditorServices.Create(file?.Name ?? fileName, _user.Id));
            }
            catch (NotFound ex)
            {
                throw ExceptionResponse.NotFound(Request, ex.Message);
            }
            catch (RequestForbidden ex)
            {
                throw ExceptionResponse.Forbidden(Request, ex.Message);
            }
            catch (Exception)
            {
                throw ExceptionResponse.ServerErrorResponse(Request);
            }
        }
Esempio n. 5
0
        private void OnNewWindow()
        {
            currentFileEditor    = null;
            fileEditors          = new ArrayList();
            tabControl           = new TabControl();
            tabControl.Name      = "tabControl";
            tabControl.Selected += TabControl_Selected;
            tabControl.MouseUp  += TabControl_MouseUp;
            menuStrip1.Dock      = DockStyle.Top;
            tabControl.Dock      = DockStyle.Fill;
            splitContainer1.Panel1.Controls.Add(tabControl);
            splitContainer1.Panel1.Controls.Add(menuStrip1);       //Fixed the problem <- Can this line be avoided
            splitContainer2.Panel1.Controls.Add(tabControl);
            splitContainer2.Panel1.Controls.Add(menuStrip1);

            mnu             = new ContextMenu();
            mnuClose        = new MenuItem("Close");
            mnuClose.Click += new EventHandler(MnuClose_Click);
            mnu.MenuItems.AddRange(new MenuItem[] { mnuClose });

            uploadButton.Enabled = false;
            stepButton.Enabled   = false;
            breakPoints          = new ArrayList();

            if (!File.Exists(lastSessionName))
            {
                OnNewFile();
            }
            else
            {
                using (StreamReader reader = new StreamReader(lastSessionName)) {
                    string line;
                    while ((line = reader.ReadLine()) != null)
                    {
                        if (line.Equals("new tab"))
                        {
                            currentFileEditor = new FileEditor(tabControl);
                            fileEditors.Add(currentFileEditor);
                            TabPage newTab = new TabPage(currentFileEditor.ShortName());
                            tabControl.Controls.Add(newTab);
                            newTab.Controls.Add(currentFileEditor.GetScintilla());
                        }
                        else
                        {
                            if (File.Exists(line))
                            {
                                currentFileEditor = new FileEditor(tabControl, line, line.Substring(line.LastIndexOf("\\") + 1), File.ReadAllText(line));
                                fileEditors.Add(currentFileEditor);
                                TabPage newTab = new TabPage(currentFileEditor.ShortName());
                                tabControl.Controls.Add(newTab);
                                newTab.Controls.Add(currentFileEditor.GetScintilla());
                            }
                        }
                    }
                }
            }
            port = 3002;
            Client client = new Client(address, port, this);
        }
Esempio n. 6
0
        /// <summary>
        /// Ассоциация расширений с редактором
        /// </summary>
        public static void Register()
        {
            Associations = new Dictionary <string, Type>();
            ContentForms = new Dictionary <Type, Type>();
            Extensions   = new Dictionary <string, ExtensionInfo>();
            List <FileCreator> creators = new List <FileCreator>();

            foreach (Assembly assembly in AppDomain.CurrentDomain.GetAssemblies())
            {
                foreach (Type type in assembly.GetTypes())
                {
                    // Поиск редакторов
                    object[] attribs = type.GetCustomAttributes(typeof(FileEditor), false);
                    if (attribs != null && attribs.Length > 0)
                    {
                        FileEditor ce = attribs[0] as FileEditor;

                        // Сохранение формы
                        ContentForms.Add(type, ce.Form);

                        // Привязка к расширениям
                        foreach (string ex in ce.Extensions)
                        {
                            if (!Associations.ContainsKey(ex))
                            {
                                Associations.Add(ex, type);
                            }
                        }
                    }

                    // Поиск создаваемых файлов
                    if (type.IsSubclassOf(typeof(Editor)))
                    {
                        object        obj = Activator.CreateInstance(type);
                        FileCreator[] fc  = (FileCreator[])type.GetProperty("CreatingFiles").GetValue(obj, null);
                        if (fc != null && fc.Length > 0)
                        {
                            creators.AddRange(fc);
                        }

                        // Поиск описания расширений
                        ExtensionInfo[] exinf = (ExtensionInfo[])type.GetProperty("FileExtensionsInfo").GetValue(obj, null);
                        if (exinf != null && exinf.Length > 0)
                        {
                            foreach (ExtensionInfo ex in exinf)
                            {
                                string exs = ex.Extension.ToLower();
                                if (Extensions.ContainsKey(exs))
                                {
                                    Extensions.Add(exs, ex);
                                }
                            }
                        }
                    }
                }
            }
            creators.Sort((x, y) => x.Order.CompareTo(y.Order));
            CreatableList = creators.ToArray();
        }
Esempio n. 7
0
        async Task <string> ed(string command)
        {
            string result = " ";
            string name   = "";
            Folder parent = CurrentFolder;

            if (command.Substring(3) == "")
            {
                return("No File Name");
            }
            else
            {
                name = command.Substring(3);
            }

            // Check the existence of the File
            bool IsExist = await ICheckFileExist(name, parent.iFolder);

            if (IsExist)
            {
                foreach (File file in parent.Files)
                {
                    if (file.Name == name)
                    {
                        FileEditor.Text = await IReadFile(file.iFile);

                        CurrentFile = file;
                        break;
                    }
                }
            }
            else
            {
                File file = new File()
                {
                    Name   = name,
                    Parent = parent
                };
                file.iFile = await ICreateFile(file, parent.iFolder);

                parent.Files.Add(file);

                CurrentFile = file;
            }

            FileEditorTitle.Text     = "File Name: " + CurrentFile.Name;
            FileEditorGrid.IsVisible = true;

            // Editor.Focus() doesn't work due to timing probelm(?),
            // so maake it into Timer
            Device.StartTimer(TimeSpan.FromMilliseconds(1), () =>
            {
                FileEditor.Focus();
                return(false);   // Timer Cycle is only one time
            });

            return(result);
        }
        public void TestReadFile()
        {
            string path = "C:/Users/nicol/Documents/Graduate Classes/SSE 554/testRead.txt";

            MathProblemSolver.FileEditor myEditor = new FileEditor(path);
            List <string> lines = myEditor.readEntireFile();

            Assert.AreEqual(lines[0], "This is a test.");
        }
Esempio n. 9
0
        static void Main(string[] args)
        {
            FileEditor.Open();

            for (; ;)
            {
                SelectAction();
            }
        }
Esempio n. 10
0
        public void FileEditor_Should_CreateElement_When_ResolveEditor()
        {
            var source = new object();
            var editor = new FileEditor();

            var element = editor.CreateElement(source);

            Assert.IsNotNull(element);
        }
Esempio n. 11
0
        private void OnNewFile()
        {
            currentFileEditor = new FileEditor(tabControl);
            fileEditors.Add(currentFileEditor);
            TabPage newTab = new TabPage(currentFileEditor.ShortName());

            tabControl.TabPages.Add(newTab);
            newTab.Controls.Add(currentFileEditor.GetScintilla());
            tabControl.SelectTab(fileEditors.Count - 1);
        }
        public void TestWriteLineToFile()
        {
            string     path         = "C:/Users/nicol/Documents/Graduate Classes/SSE 554/test.txt";
            FileEditor myEditor     = new FileEditor(path);
            string     testSentence = "Test sentence.";

            myEditor.writeLineToFile(testSentence);
            List <string> lines = myEditor.readEntireFile();

            Assert.AreEqual(lines[lines.Count - 1], "Test sentence.");
        }
    public void SaveToFile()
    {
        string output = ConvertTilemap(platformTilemap);

        output += "|" + Environment.NewLine;
        output += ConvertTilemap(hazardTilemap);
        output += "|" + Environment.NewLine;
        output += ConvertGameObjects();

        FileEditor.SaveString(output);
    }
    public void LoadLastFile()
    {
        dataLoaded = FileEditor.GetLastData(out platformInput, out hazardInput, out checkpointInput);

        if (dataLoaded)
        {
            ClearMap();
            LoadInTiles(platformInput, hazardInput, checkpointInput);
            Debug.Log("Load Completed");
        }
    }
    public void LoadFromFile() // TODO - build out method to get all tiletypes procedurally
    {
        dataLoaded = FileEditor.GetDataFromFile(out platformInput, out hazardInput, out checkpointInput);

        if (dataLoaded)
        {
            ClearMap();
            LoadInTiles(platformInput, hazardInput, checkpointInput);
            Debug.Log("Load Completed");
        }
    }
Esempio n. 16
0
        private void CloseTab()
        {
            bool success         = true;
            int  currentTabIndex = tabControl.SelectedIndex;

            currentFileEditor = (FileEditor)fileEditors[currentTabIndex];
            if (currentFileEditor.IsDirty())
            {
                if (currentFileEditor.IsNew())
                {
                    DialogResult result = MessageBox.Show("Do you want to save " + currentFileEditor.ShortName() + "?", "Saving file", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);
                    if (result == DialogResult.Yes)
                    {
                        success = SaveAs();
                    }
                    else if (result == DialogResult.Cancel)
                    {
                        success = false;
                    }
                }
                else
                {
                    DialogResult result = MessageBox.Show("Do you want to save " + currentFileEditor.ShortName() + "?", "Saving file", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);
                    if (result == DialogResult.Yes)
                    {
                        Save(currentFileEditor.Path());
                    }
                    else if (result == DialogResult.Cancel)
                    {
                        success = false;
                    }
                }
            }
            if (success)
            {
                if (tabControl.TabCount == 1)
                {
                    System.Environment.Exit(0);
                }
                else
                {
                    fileEditors.RemoveAt(currentTabIndex);
                    tabControl.SelectedTab.Dispose();
                    if (currentTabIndex == tabControl.TabCount)
                    {
                        tabControl.SelectTab(currentTabIndex - 1);
                    }
                    else
                    {
                        tabControl.SelectTab(currentTabIndex);
                    }
                }
            }
        }
        public void TestWriteMultipleLinesToFile()
        {
            string        path          = "C:/Users/nicol/Documents/Graduate Classes/SSE 554/test.txt";
            FileEditor    myEditor      = new FileEditor(path);
            List <string> testSentences = new List <string>();

            testSentences.Add("Bow ties are cool.");
            testSentences.Add("Yer a wizard, Harry!");
            testSentences.Add("That's no moon...");
            testSentences.Add("It is a truth universally acknowledged");
            myEditor.writeMultipleLinesToFile(testSentences.ToArray());
            List <string> lines = myEditor.readEntireFile();

            Assert.AreEqual(lines.[lines.Count - 1], "It is a truth universally acknowledged");
Esempio n. 18
0
        private TabPage CreateNewTabPage(AssemblyFileViewModel viewModel)
        {
            var newTab = new TabPage();

            newTab.DataBindings.Add(new Binding(nameof(newTab.Text), viewModel, nameof(viewModel.FileName)));
            var tabContent = new FileEditor(viewModel, m_Preferences)
            {
                Dock = DockStyle.Fill
            };

            newTab.Controls.Add(tabContent);
            AreAnyFilesOpened = (m_EditorVm.AllOpenFiles.Count > 0);

            return(newTab);
        }
Esempio n. 19
0
 private void TabControl_MouseUp(object sender, MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Right)
     {
         for (int i = 0; i < tabControl.TabCount; i++)
         {
             Rectangle r = tabControl.GetTabRect(i);
             if (r.Contains(e.Location))
             {
                 currentFileEditor = (FileEditor)fileEditors[i];
                 tabControl.SelectTab(i);
                 mnu.Show(tabControl, e.Location);
             }
         }
     }
 }
Esempio n. 20
0
        public void FileEditor_Button_Should_OpenFileDialog()
        {
            var source = new object();
            var editor = new FileEditor();

            var element = editor.CreateElement(source);

            var grid = element as Grid;

            foreach (var child in grid.Children)
            {
                if (child is Button button)
                {
                    button.RaiseEvent(new RoutedEventArgs(ButtonBase.ClickEvent, button));
                }
            }
        }
Esempio n. 21
0
        public void TestSomethingWrittenInOutput()
        {
            FileEditor editor = new FileEditor("text1.txt", "solution.txt");

            editor.presentResults();

            FileInfo info = new FileInfo("solution.txt");
            long     size = info.Length;

            if (size > 0)
            {
                Assert.IsTrue(true);
            }
            else
            {
                Assert.IsTrue(false);
            }
        }
Esempio n. 22
0
        private bool CloseFile()
        {
            int i = 0;

            while (i < tabControl.TabCount)
            {
                currentFileEditor = (FileEditor)fileEditors[i];
                tabControl.SelectTab(i);
                if (currentFileEditor.IsDirty())
                {
                    if (currentFileEditor.IsNew())
                    {
                        DialogResult result = MessageBox.Show("Do you want to save this file?", "Saving new file", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);
                        if (result == DialogResult.Yes)
                        {
                            if (SaveAs() == false)
                            {
                                return(false);
                            }
                        }
                        else if (result == DialogResult.Cancel)
                        {
                            return(false);
                        }
                    }
                    else
                    {
                        DialogResult result = MessageBox.Show("Do you want to save " + currentFileEditor.ShortName() + "?", "Saving file", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);
                        if (result == DialogResult.Yes)
                        {
                            Save(currentFileEditor.Path());
                        }
                        else if (result == DialogResult.Cancel)
                        {
                            return(false);
                        }
                    }
                }
                i++;
            }
            saveSession();
            return(true);
        }
Esempio n. 23
0
        // Pop up the file editor
        string ed(string command)
        {
            string result = " ";
            string name   = "";

            if (command.Substring(3) == "")
            {
                return("No File Name");
            }
            else
            {
                name = command.Substring(3);
            }

            // Check the existence of the File
            bool IsExist = File.Exists(WorkingDir + name);


            if (IsExist)    // Get all text of the file
            {
                FileEditor.Text = File.ReadAllText(WorkingDir + name);
                OriginalFile    = FileEditor.Text;
            }
            else            // If no file, create a new file
            {
                //File.Create(name).Close();
                File.Create(name);
                FileEditor.Text = "";
            }

            FileEditorTitle.Text     = "File Name: " + name;
            FileEditorGrid.IsVisible = true;    // Make the file editor visible

            // Editor.Focus() doesn't work due to timing probelm(?),
            // so maake it into Timer
            Device.StartTimer(TimeSpan.FromMilliseconds(1), () =>
            {
                FileEditor.Focus();
                return(false);   // Timer Cycle is only one time
            });

            return(result);
        }
Esempio n. 24
0
 private bool CloseFile()
 {
     int i = 0;
     while (i < tabControl.TabCount)
     {
         currentFileEditor = (FileEditor)fileEditors[i];
         tabControl.SelectTab(i);
         if (currentFileEditor.IsDirty())
         {
             if (currentFileEditor.IsNew())
             {
                 DialogResult result = MessageBox.Show("Do you want to save this file?", "Saving new file", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);
                 if (result == DialogResult.Yes)
                 {
                     if (SaveAs() == false)
                         return false;
                 }
                 else if (result == DialogResult.Cancel)
                     return false;
             }
             else
             {
                 DialogResult result = MessageBox.Show("Do you want to save " + currentFileEditor.ShortName() + "?", "Saving file", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);
                 if (result == DialogResult.Yes)
                     Save(currentFileEditor.Path());
                 else if (result == DialogResult.Cancel)
                     return false;
             }
         }
         i++;
     }
     saveSession ();
     return true;
 }
Esempio n. 25
0
 public void SetEditorControl(FileEditor editorControl)
 {
     MainContent.Children.Clear();
     MainContent.Children.Add(editorControl);
 }
Esempio n. 26
0
 private void CloseTab()
 {
     bool success = true;
     int currentTabIndex = tabControl.SelectedIndex;
     currentFileEditor = (FileEditor)fileEditors[currentTabIndex];
     if (currentFileEditor.IsDirty())
     {
         if (currentFileEditor.IsNew())
         {
             DialogResult result = MessageBox.Show("Do you want to save " + currentFileEditor.ShortName() + "?", "Saving file", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);
             if (result == DialogResult.Yes)
                 success = SaveAs();
             else if (result == DialogResult.Cancel)
                 success = false;
         }
         else
         {
             DialogResult result = MessageBox.Show("Do you want to save " + currentFileEditor.ShortName() + "?", "Saving file", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);
             if (result == DialogResult.Yes)
                 Save(currentFileEditor.Path());
             else if (result == DialogResult.Cancel)
                 success = false;
         }
     }
     if (success)
     {
         if (tabControl.TabCount == 1)
             System.Environment.Exit(0);
         else
         {
             fileEditors.RemoveAt(currentTabIndex);
             tabControl.SelectedTab.Dispose();
             if (currentTabIndex == tabControl.TabCount)
             {
                 tabControl.SelectTab(currentTabIndex - 1);
             }
             else
                 tabControl.SelectTab(currentTabIndex);
         }
     }
 }
Esempio n. 27
0
 private void OnNewFile()
 {
     currentFileEditor = new FileEditor (tabControl);
     fileEditors.Add (currentFileEditor);
     TabPage newTab = new TabPage (currentFileEditor.ShortName ());
     tabControl.TabPages.Add (newTab);
     newTab.Controls.Add (currentFileEditor.GetScintilla ());
     tabControl.SelectTab (fileEditors.Count - 1);
 }
Esempio n. 28
0
        private void OnNewWindow()
        {
            currentFileEditor = null;
            fileEditors = new ArrayList();
            tabControl = new TabControl();
            tabControl.Name = "tabControl";
            tabControl.Selected += TabControl_Selected;
            tabControl.MouseUp += TabControl_MouseUp;
            menuStrip1.Dock = DockStyle.Top;
            tabControl.Dock = DockStyle.Fill;
            splitContainer1.Panel1.Controls.Add(tabControl);
            splitContainer1.Panel1.Controls.Add(menuStrip1);       //Fixed the problem <- Can this line be avoided
            splitContainer2.Panel1.Controls.Add(tabControl);
            splitContainer2.Panel1.Controls.Add(menuStrip1);

            mnu = new ContextMenu();
            mnuClose = new MenuItem("Close");
            mnuClose.Click += new EventHandler(MnuClose_Click);
            mnu.MenuItems.AddRange(new MenuItem[] { mnuClose });

            uploadButton.Enabled = false;
            stepButton.Enabled = false;
            breakPoints = new ArrayList();

            if (!File.Exists (lastSessionName))
                OnNewFile ();
            else {
                using (StreamReader reader = new StreamReader (lastSessionName)) {
                    string line;
                    while ((line = reader.ReadLine ()) != null) {
                        if (line.Equals ("new tab")) {
                            currentFileEditor = new FileEditor (tabControl);
                            fileEditors.Add (currentFileEditor);
                            TabPage newTab = new TabPage (currentFileEditor.ShortName ());
                            tabControl.Controls.Add (newTab);
                            newTab.Controls.Add (currentFileEditor.GetScintilla ());
                        } else {
                            if (File.Exists (line)) {
                                currentFileEditor = new FileEditor (tabControl, line, line.Substring (line.LastIndexOf ("\\") + 1), File.ReadAllText (line));
                                fileEditors.Add (currentFileEditor);
                                TabPage newTab = new TabPage (currentFileEditor.ShortName ());
                                tabControl.Controls.Add (newTab);
                                newTab.Controls.Add (currentFileEditor.GetScintilla ());
                            }
                        }
                    }
                }
            }
            port = 3002;
            Client client = new Client(address, port, this);
        }
Esempio n. 29
0
 private void TabControl_Selected(object sender, TabControlEventArgs e)
 {
     currentFileEditor = (FileEditor)fileEditors[tabControl.SelectedIndex];
 }
Esempio n. 30
0
 private void OnOpenFile()
 {
     if (openFileDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK)
     {
         System.IO.StreamReader openFile = new System.IO.StreamReader(openFileDialog1.FileName);
         FileEditor newFileEditor = new FileEditor(tabControl, openFileDialog1.FileName, openFileDialog1.SafeFileName, openFile.ReadToEnd());
         if (currentFileEditor.IsNew() && (!currentFileEditor.IsDirty()))
         {
             int currentTabIndex = tabControl.SelectedIndex;
             currentFileEditor = newFileEditor;
             fileEditors[currentTabIndex] = newFileEditor;
             tabControl.SelectedTab.Text = openFileDialog1.SafeFileName;
             tabControl.SelectedTab.Controls.Clear();
             tabControl.SelectedTab.Controls.Add(currentFileEditor.GetScintilla());
         }
         else
         {
             TabPage newTab = new TabPage(openFileDialog1.SafeFileName);
             tabControl.TabPages.Add(newTab);
             currentFileEditor = newFileEditor;
             fileEditors.Add(newFileEditor);
             newTab.Controls.Add(currentFileEditor.GetScintilla());
             tabControl.SelectTab(fileEditors.Count - 1);
         }
         openFile.Close();
     }
 }
Esempio n. 31
0
 private void TabControl_MouseUp(object sender, MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Right)
     {
         for (int i = 0; i < tabControl.TabCount; i++)
         {
             Rectangle r = tabControl.GetTabRect(i);
             if (r.Contains(e.Location))
             {
                 currentFileEditor = (FileEditor)fileEditors[i];
                 tabControl.SelectTab(i);
                 mnu.Show(tabControl, e.Location);
             }
         }
     }
 }
 // PUT api/<controller>/5
 public void Put(int emailId, [FromBody] FileEditor editor, Permission type)
 {
 }
 // POST api/<controller>
 public void Post([FromBody] FileEditor editor, Dictionary <string, Permission> keyValuePairs)
 {
 }
 public DmiEXSizeChangeUndoItem(FileEditor fileEditor)
 {
     _fileEditor = fileEditor;
     _dmiEx      = (DmiEX)fileEditor.DmiEx.Clone();
 }
Esempio n. 35
0
 private void TabControl_Selected(object sender, TabControlEventArgs e)
 {
     currentFileEditor = (FileEditor)fileEditors[tabControl.SelectedIndex];
 }
Esempio n. 36
0
 public FileEditorTest(FileEditor fileEditor)
 {
     this.fileEditor = fileEditor;
 }
Esempio n. 37
0
 public OpenEditorFile(string path, FileEditor editor)
 {
     FilePath = path;
     Editor   = editor;
 }