public override void Save(FileSaveInformation fileSaveInformation)
 {
     OnBeforeSave(EventArgs.Empty);
     catalog.Save(fileSaveInformation.FileName);
     ContentName = fileSaveInformation.FileName;
     IsDirty     = false;
 }
Beispiel #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);
		}
 public override Task Save(FileSaveInformation fileSaveInformation)
 {
     catalog.Save(fileSaveInformation.FileName);
     ContentName = fileSaveInformation.FileName;
     IsDirty     = false;
     return(Task.FromResult(true));
 }
Beispiel #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));
        }
Beispiel #8
0
 void IViewContent.Save(FileSaveInformation fileSaveInformation)
 {
     if (!string.IsNullOrEmpty(fileSaveInformation.FileName))
     {
         AutoSave.RemoveAutoSaveFile(fileSaveInformation.FileName);
     }
     textEditorImpl.Save(fileSaveInformation);
 }
Beispiel #9
0
 public override Task Save(FileSaveInformation fileSaveInformation)
 {
     if (!string.IsNullOrEmpty(fileSaveInformation.FileName))
     {
         AutoSave.RemoveAutoSaveFile(fileSaveInformation.FileName);
     }
     return(textEditorImpl.ViewContent.Save(fileSaveInformation));
 }
Beispiel #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));
        }
Beispiel #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);
        }
Beispiel #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);
 }
		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);
		}
Beispiel #18
0
 public override Task Save(FileSaveInformation fileSaveInformation)
 {
     return(content.Save(fileSaveInformation));
 }
 void IViewContent.Save(FileSaveInformation info)
 {
     SaveAs(info);
 }
Beispiel #20
0
 public override Task Save(FileSaveInformation fileSaveInformation)
 {
     entry.Save(fileSaveInformation.FileName);
     IsDirty = false;
     return(Task.FromResult(true));
 }
Beispiel #21
0
 public override async Task Save(FileSaveInformation fileSaveInformation)
 {
     await content.Save(fileSaveInformation.FileName);
 }
Beispiel #22
0
		public override Task Save (FileSaveInformation fileSaveInformation)
		{
			entry.Save (fileSaveInformation.FileName);
			IsDirty = false;
			return Task.FromResult (true);
		}
Beispiel #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;
		}
		void IViewContent.Save (FileSaveInformation info)
		{
			SaveAs (info);
		}
		protected virtual void SaveAs (FileSaveInformation fileSaveInformation)
		{
		}
 protected virtual void SaveAs(FileSaveInformation fileSaveInformation)
 {
 }
Beispiel #28
0
		public override async Task Save (FileSaveInformation fileSaveInformation)
		{
			await content.Save (fileSaveInformation.FileName);
		}
		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;
		}
Beispiel #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);
		}
Beispiel #35
0
 public override void Save(FileSaveInformation fileSaveInformation)
 {
     entry.Save(fileSaveInformation.FileName);
     IsDirty = false;
 }
		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;
		}