Ejemplo n.º 1
0
		public override void Run(Altaxo.Gui.Worksheet.Viewing.WorksheetController ctrl)
		{
			var comm = new OriginConnection();
			comm.Connect(true);
			comm.PutTable(ctrl.DataTable, false);
			comm.Disconnect(false, null, false);
		}
Ejemplo n.º 2
0
		public override void Run(Altaxo.Gui.Worksheet.Viewing.WorksheetController ctrl)
		{
			var comm = new OriginConnection();
			comm.Connect(true);
			if (!comm.IsConnected())
				return;

			string err = comm.GetTable(ctrl.DataTable.Name, ctrl.DataTable);
			comm.Disconnect(false, null, false);

			if (err != null)
			{
				Current.Gui.ErrorMessageBox(err);
				return;
			}
		}
Ejemplo n.º 3
0
		public override void Run()
		{
			var conn = new OriginConnection();
			conn.Connect(true);
			if (!conn.IsConnected())
				return;

			var list = new List<Tuple<string, Origin.WorksheetPage>>();
			ListAllWorksheetsInFolderAndSubfolders(conn.Application.RootFolder, string.Empty, list);

			int count = conn.Application.WorksheetPages.Count;
			for (int i = 0; i < list.Count; i++)
			{
				var path = list[i].Item1;
				var page = list[i].Item2;
				string name = page.Name;
				string lname = page.LongName;

				var newTable = new Altaxo.Data.DataTable();
				newTable.Name = path + (string.IsNullOrEmpty(lname) ? name : lname);
				string err = WorksheetActions.GetTable(page, newTable);
				if (null == err)
				{
					Current.ProjectService.CreateNewWorksheet(newTable);
				}
				else
				{
					Current.Gui.ErrorMessageBox(err);
				}
			}

			conn.Disconnect(false, null, false);
		}
Ejemplo n.º 4
0
		public override void Run()
		{
			var conn = new OriginConnection();
			conn.Connect(true);
			if (!conn.IsConnected())
				return;

			foreach (var table in Current.Project.DataTableCollection)
			{
				conn.PutTable(table, false);
			}

			conn.Disconnect(false, null, false);
		}