public void SetAboutInfo(AboutInfo aboutInfo) { lbProductName.Text = aboutInfo.ProductName; lbWeb.Text = aboutInfo.Website; lbCopyright.Text = aboutInfo.Copyright; if (String.IsNullOrEmpty(aboutInfo.Version)) { AssemblyName mainUIAssemblyName = Assembly.GetAssembly(typeof(UCAbout)).GetName(); lbVersion2.Text = "Core Version " + mainUIAssemblyName.Version; Assembly exeAssembly = Assembly.GetEntryAssembly(); if (exeAssembly != null) { lbVersion.Text = "Version " + exeAssembly.GetName().Version; } else { lbVersion.Text = "Version " + lbVersion2.Text; } } else { lbVersion.Text = aboutInfo.Version; lbVersion2.Hide(); } }
/// <summary> /// Create a mainform as a component of client codes. /// Client codes should give an assembly with an ILocalDataSource class. /// </summary> public SyncMLForm(string syncDataSourceAssembly, AboutInfo aboutInfo) : this() { localDataSourceAssembly = syncDataSourceAssembly; this.aboutInfo = aboutInfo; }
/// <summary> /// This is mostly used for constructing with a known localDataSource in an integrated solution. /// An example is CX. /// </summary> public SyncMLForm(Type localDataSourceType, AboutInfo aboutInfo) : this() { this.localDataSourceType = localDataSourceType; this.aboutInfo = aboutInfo; }
/// <summary> /// Create a mainform as a component of client codes. /// Client codes will create ILocalDataSource object. /// </summary> /// <param name="syncDataSource"></param> public SyncMLForm(ILocalDataSource syncDataSource, AboutInfo aboutInfo) : this() { localDataSource = syncDataSource; this.aboutInfo = aboutInfo; }