예제 #1
0
		public SaveAction()
		{
            CommonExtensions.InvokeWhenStageIsReady(
                this,
				delegate
				{

					var c = new Canvas
					{
						Width = RTA_save.ImageDefaultWidth,
						Height = RTA_save.ImageDefaultHeight,

					};

					new Rectangle
					{
						Width = 24,
						Height = 24,
						Fill = Brushes.White,
						Opacity = 0
					}.AttachTo(c);

					new RTA_save().AttachTo(c).MoveTo(
						(22 - RTA_save.ImageDefaultWidth) / 2,
						(22 - RTA_save.ImageDefaultHeight) / 2
					);

					c.AttachToContainer(this);

					c.MouseLeftButtonUp +=
						delegate
						{
							var f = new global::ScriptCoreLib.CSharp.Avalon.Controls.FileDialog();



							// utf8?
							//var m = new MemoryStream(Encoding.ASCII.GetBytes(data));

							f.Save(
								Implementation.zip, 
								(Implementation.FileName).SkipUntilLastIfAny("/").TakeUntilLastIfAny(".") + ".zip"
							);



							//zip = new ZIPFile();
						};
				}
			);
		}