public override void Save(FileSaveInformation fileSaveInformation)
 {
     OnBeforeSave(EventArgs.Empty);
     catalog.Save(fileSaveInformation.FileName);
     ContentName = fileSaveInformation.FileName;
     IsDirty     = false;
 }
Esempio n. 2
0
 public override Task Save(FileSaveInformation fileSaveInformation)
 {
     File.WriteAllBytes(fileSaveInformation.FileName, hexEditor.HexEditorData.Bytes);
     ContentName  = fileSaveInformation.FileName;
     this.IsDirty = false;
     return(Task.FromResult(true));
 }
		public override Task Save (FileSaveInformation fileSaveInformation)
		{
			catalog.Save (fileSaveInformation.FileName);
			ContentName = fileSaveInformation.FileName;
			IsDirty = false;
			return Task.FromResult (true);
		}
		public override void Save (FileSaveInformation fileSaveInformation)
		{
			OnBeforeSave (EventArgs.Empty);
			catalog.Save (fileSaveInformation.FileName);
			ContentName = fileSaveInformation.FileName;
			IsDirty = false;
		}
		public override Task Save (FileSaveInformation fileSaveInformation)
		{
			File.WriteAllBytes (fileSaveInformation.FileName, hexEditor.HexEditorData.Bytes);
			ContentName = fileSaveInformation.FileName;
			this.IsDirty = false;
			return Task.FromResult (true);
		}
Esempio n. 6
0
 public override Task Save(FileSaveInformation fileSaveInformation)
 {
     catalog.Save(fileSaveInformation.FileName);
     ContentName = fileSaveInformation.FileName;
     IsDirty     = false;
     return(Task.FromResult(true));
 }
Esempio n. 7
0
        public override Task Save(FileSaveInformation info)
        {
            ResXDataNode[] nodes = widget.GetResxInfo(info.FileName);

            using (var stream = new MemoryStream())
            {
                var resxWriter = new ResXResourceWriter(stream);
                foreach (var node in nodes)
                {
                    resxWriter.AddResource(node);
                }
                resxWriter.Generate();
                stream.Flush();

                stream.Position = 0;
                //pretty xml
                var document = new XmlDocument();
                document.Load(stream);
                document.Save(info.FileName);
            }

            ContentName = info.FileName;
            IsDirty     = false;
            return(Task.FromResult(true));
        }
Esempio n. 8
0
 void IViewContent.Save(FileSaveInformation fileSaveInformation)
 {
     if (!string.IsNullOrEmpty(fileSaveInformation.FileName))
     {
         AutoSave.RemoveAutoSaveFile(fileSaveInformation.FileName);
     }
     textEditorImpl.Save(fileSaveInformation);
 }
Esempio n. 9
0
 public override Task Save(FileSaveInformation fileSaveInformation)
 {
     if (!string.IsNullOrEmpty(fileSaveInformation.FileName))
     {
         AutoSave.RemoveAutoSaveFile(fileSaveInformation.FileName);
     }
     return(textEditorImpl.ViewContent.Save(fileSaveInformation));
 }
Esempio n. 10
0
        public override Task Save(FileSaveInformation fileSaveInformation)
        {
            var fileName = fileSaveInformation.FileName;

            ResXDataNode [] nodes = widget.GetResxInfo(fileName);

            using (ResXResourceWriter resxWriter = new ResXResourceWriter(fileName)) {
                foreach (ResXDataNode node in nodes)
                {
                    resxWriter.AddResource(node);
                }

                resxWriter.Generate();
            }

            ContentName = fileName;
            IsDirty     = false;
            return(base.Save(fileSaveInformation));
        }
Esempio n. 11
0
        public override async Task Save(FileSaveInformation fileSaveInformation)
        {
            var mimeType = WorkbenchWindow?.Document?.Editor?.MimeType;
            await content.Save(fileSaveInformation.FileName);

            ContentName = fileSaveInformation.FileName;

            // work around bug in VS when you save it reverts to plain text
            // so, we restore the mime type to its original type.
            if (mimeType != null)
            {
                var editor = WorkbenchWindow?.Document.Editor;
                if (editor != null)
                {
                    editor.MimeType = mimeType;
                }
            }
            IsDirty = false;
        }
        public override void Save(FileSaveInformation fileSaveInformation)
        {
            string oldBuildFile = GuiBuilderService.GetBuildCodeFileName(project.Project, groupInfo.Name);

            base.Save(fileSaveInformation);
            if (designer == null)
            {
                return;
            }

            codeBinder.UpdateBindings(fileSaveInformation.FileName);

            designer.Save();

            string newBuildFile = GuiBuilderService.GetBuildCodeFileName(project.Project, groupInfo.Name);

            if (oldBuildFile != newBuildFile)
            {
                FileService.MoveFile(oldBuildFile, newBuildFile);
            }

            project.SaveProject(true);
        }
Esempio n. 13
0
        public override async Task Save(FileSaveInformation fileSaveInformation)
        {
            await base.Save(fileSaveInformation);

            if (designer == null)
            {
                return;
            }

            string oldBuildFile = GuiBuilderService.GetBuildCodeFileName(gproject.Project, window.RootWidget.Name);

            codeBinder.UpdateBindings(fileSaveInformation.FileName);
            if (!ErrorMode)
            {
                if (designer != null)
                {
                    designer.Save();
                }
                if (actionsBox != null)
                {
                    actionsBox.Save();
                }
            }

            string newBuildFile = GuiBuilderService.GetBuildCodeFileName(gproject.Project, window.RootWidget.Name);

            if (oldBuildFile != newBuildFile)
            {
                if (System.IO.File.Exists(newBuildFile))
                {
                    FileService.DeleteFile(newBuildFile);
                }
                FileService.MoveFile(oldBuildFile, newBuildFile);
            }

            gproject.SaveWindow(true, window.RootWidget.Name);
        }
 public override void Save(FileSaveInformation fileSaveInformation)
 {
     content.Save(fileSaveInformation);
 }
Esempio n. 15
0
		public virtual Task Save (FileSaveInformation fileSaveInformation)
		{
			throw new NotImplementedException ();
		}
		public override Task Save (FileSaveInformation fileSaveInformation)
		{
			return Save (fileSaveInformation.FileName, fileSaveInformation.Encoding ?? encoding);
		}
		public override void Save (FileSaveInformation fileSaveInformation)
		{
			base.Save (fileSaveInformation);
			
			if (designer == null)
				return;
			
			string oldBuildFile = GuiBuilderService.GetBuildCodeFileName (gproject.Project, window.RootWidget.Name);
			
			codeBinder.UpdateBindings (fileSaveInformation.FileName);
			if (!ErrorMode) {
				if (designer != null)
					designer.Save ();
				if (actionsBox != null)
					actionsBox.Save ();
			}
			
			string newBuildFile = GuiBuilderService.GetBuildCodeFileName (gproject.Project, window.RootWidget.Name);
			
			if (oldBuildFile != newBuildFile) {
				if (System.IO.File.Exists (newBuildFile))
					FileService.DeleteFile (newBuildFile);
				FileService.MoveFile (oldBuildFile, newBuildFile);
			}
			
			gproject.SaveWindow (true, window.RootWidget.Name);
		}
Esempio n. 18
0
 public override Task Save(FileSaveInformation fileSaveInformation)
 {
     return(content.Save(fileSaveInformation));
 }
 void IViewContent.Save(FileSaveInformation info)
 {
     SaveAs(info);
 }
Esempio n. 20
0
 public override Task Save(FileSaveInformation fileSaveInformation)
 {
     entry.Save(fileSaveInformation.FileName);
     IsDirty = false;
     return(Task.FromResult(true));
 }
Esempio n. 21
0
 public override async Task Save(FileSaveInformation fileSaveInformation)
 {
     await content.Save(fileSaveInformation.FileName);
 }
Esempio n. 22
0
		public override Task Save (FileSaveInformation fileSaveInformation)
		{
			entry.Save (fileSaveInformation.FileName);
			IsDirty = false;
			return Task.FromResult (true);
		}
Esempio n. 23
0
 public override Task Save(FileSaveInformation fileSaveInformation)
 {
     return(Task.Run(() => Controller.Save(fileSaveInformation.FileName.FullPath)));
 }
		public override void Save (FileSaveInformation fileSaveInformation)
		{
			File.WriteAllBytes (fileSaveInformation.FileName, hexEditor.HexEditorData.Bytes);
			ContentName = fileSaveInformation.FileName;
			this.IsDirty = false;
		}
Esempio n. 25
0
		void IViewContent.Save (FileSaveInformation info)
		{
			SaveAs (info);
		}
Esempio n. 26
0
		protected virtual void SaveAs (FileSaveInformation fileSaveInformation)
		{
		}
 protected virtual void SaveAs(FileSaveInformation fileSaveInformation)
 {
 }
Esempio n. 28
0
		public override async Task Save (FileSaveInformation fileSaveInformation)
		{
			await content.Save (fileSaveInformation.FileName);
		}
Esempio n. 29
0
		public override Task Save (FileSaveInformation fileSaveInformation)
		{
			if (!string.IsNullOrEmpty (fileSaveInformation.FileName))
				AutoSave.RemoveAutoSaveFile (fileSaveInformation.FileName);
			return textEditorImpl.ViewContent.Save (fileSaveInformation);
		}
		public override Task Save (FileSaveInformation fileSaveInformation)
		{
			return content.Save (fileSaveInformation);
		}
        public override void Save (FileSaveInformation fileName)
		{
            openFile.NetworkRequestLayer.Save(fileName.FileName);
            ContentName = fileName.FileName;
		}
Esempio n. 32
0
		public override async Task Save (FileSaveInformation fileSaveInformation)
		{
			string oldBuildFile = GuiBuilderService.GetBuildCodeFileName (project.Project, groupInfo.Name);
			
			await base.Save (fileSaveInformation);
			if (designer == null)
				return;

			codeBinder.UpdateBindings (fileSaveInformation.FileName);
			
			designer.Save ();
			
			string newBuildFile = GuiBuilderService.GetBuildCodeFileName (project.Project, groupInfo.Name);
			if (oldBuildFile != newBuildFile)
				FileService.MoveFile (oldBuildFile, newBuildFile);

			project.SaveProject (true);
		}
        public override void Save (FileSaveInformation fileName)
        {
		    if (openFile.Behaviour != null) {
                openFile.Behaviour.Save (fileName.FileName);
		    }
            ContentName = fileName.FileName;
		}
		public override void Save (FileSaveInformation fileSaveInformation)
		{
			content.Save (fileSaveInformation);
		}
Esempio n. 35
0
 public override void Save(FileSaveInformation fileSaveInformation)
 {
     entry.Save(fileSaveInformation.FileName);
     IsDirty = false;
 }
Esempio n. 36
0
		public override void Save (FileSaveInformation fileSaveInformation)
		{
			Save (fileSaveInformation.FileName, fileSaveInformation.Encoding ?? encoding);
		}
 public override void Save(FileSaveInformation fileSaveInformation)
 {
     File.WriteAllBytes(fileSaveInformation.FileName, hexEditor.HexEditorData.Bytes);
     ContentName  = fileSaveInformation.FileName;
     this.IsDirty = false;
 }
		public override void Save (FileSaveInformation fileSaveInformation)
		{
			entry.Save (fileSaveInformation.FileName);
			IsDirty = false;
		}