バージョン

Save(Stream,CalendarLookCategories) メソッド

UltraCalendarLook データをストリームに保存します。
シンタックス
'宣言
 
Public Overloads Sub Save( _
   ByVal stream As Stream, _
   ByVal categories As CalendarLookCategories _
) 
public void Save( 
   Stream stream,
   CalendarLookCategories categories
)

パラメータ

stream
UltraCalendarLook 情報のコピーをシリアル化する Stream オブジェクト。
categories
シリアル化するカテゴリの列挙体。
解説

ストリームが他の情報を含むことができるため、ストリームは UltraCalendarLook 情報のシリアル化を開始する位置に配置する必要があります。

CalendarLookCategories.Generalを渡すと、以下のプロパティ設定が保存されます。

  • ActiveDayAppearance
  • AllDayEventAppearance
  • AlternateMonthAppearance
  • AlternateMonthDayAppearance
  • AlternateMonthDayHeaderAppearance
  • AppointmentAppearance
  • DayAppearance
  • DayHeaderAppearance
  • DayOfWeekHeaderAppearance
  • DayWithActivityAppearance
  • HolidayAppearance
  • MonthAppearance
  • MonthDayAppearance
  • MonthHeaderAppearance
  • NoteAppearance
  • OwnerHeaderAppearance
  • ScrollBarLook
  • SelectedAppointmentAppearance
  • SelectedDayAppearance
  • SelectedHolidayAppearance
  • SelectedNoteAppearance
  • タグ
  • TodayAppearance
  • TodayHeaderAppearance
  • TrailingDayAppearance
  • WeekAppearance
  • WeekHeaderAppearance

使用例
Imports System.Diagnostics
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinSchedule

	Private Sub Button12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button12.Click

		Try
			Dim stream As New FileStream("C:\\Layout.bin", FileMode.OpenOrCreate)
			stream.Seek(0, SeekOrigin.Begin)

			Try
				Me.UltraCalendarLook1.Save(stream, CalendarLookCategories.All)
			Catch
				MessageBox.Show(Me, "Error encountered while saving to stream!", "Save Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
			End Try

			stream.Close()
		Catch
			Debug.WriteLine("Error encountered while saving stream!")
		End Try

	End Sub
using System.Diagnostics;
using Infragistics.Win;
using Infragistics.Win.UltraWinSchedule;

		private void button12_Click(object sender, System.EventArgs e)
		{

			try
			{
				FileStream stream = new FileStream("C:\\Layout.bin", FileMode.OpenOrCreate);
				stream.Seek(0, SeekOrigin.Begin);

				try
				{
					this.ultraCalendarLook1.Save(stream, CalendarLookCategories.All);
				}
				catch
				{
					MessageBox.Show(this, "Error encountered while saving to stream!", "Save Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
				}

				stream.Close();
			}
			catch
			{
				Debug.WriteLine("Error encountered while saving stream!");
			}

		}
参照