Пример #1
0
        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();
            }
        }
Пример #2
0
 /// <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;
 }
Пример #3
0
 /// <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;
 }
Пример #4
0
 /// <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;
 }