Ejemplo n.º 1
0
        private bool isApplicableAssembly(
            Metaspec.AssemblyInfo assemblyInfo,
            ExternalAssemblyReferenceInfo csProjAssemblyReferenceInfo
            )
        {
            //system dll
            if (csProjAssemblyReferenceInfo.assemblyInfo.getVersion().isNull())
            {
                string requiredTargetFramework = csProjAssemblyReferenceInfo.solutionRequiredTargetFramework;
                if (requiredTargetFramework != null)
                {
                    AssemblyVersion av = getMinAssemblyVersionFromRequiredTargetFramework(requiredTargetFramework);

                    if (assemblyInfo.getVersion() > av)
                    {
                        return(false);
                    }
                }
            }

            if (csProjAssemblyReferenceInfo.specificVersion)
            {
                if (assemblyInfo.Version.MajorVersion != csProjAssemblyReferenceInfo.assemblyInfo.Version.MajorVersion ||
                    assemblyInfo.Version.MinorVersion != csProjAssemblyReferenceInfo.assemblyInfo.Version.MinorVersion ||
                    assemblyInfo.Version.BuildNumber != csProjAssemblyReferenceInfo.assemblyInfo.Version.BuildNumber ||
                    assemblyInfo.Version.RevisionNumber != csProjAssemblyReferenceInfo.assemblyInfo.Version.RevisionNumber)
                {
                    return(false);
                }
            }

            return(true);
        }
Ejemplo n.º 2
0
 public AssemblyName(string name, int majorVersion, int minorVersion, int revision, int build, string culture, string publicKeyToken)
 {
     Name           = name;
     Version        = new AssemblyVersion(majorVersion, minorVersion, revision, build);
     Culture        = culture;
     PublicKeyToken = publicKeyToken;
 }
Ejemplo n.º 3
0
        public About()
        {
            InitializeComponent();

            applicationName = AssemblyTitle;

            this.Text = String.Format("About {0}", applicationName);
            this.labelProductName.Text = applicationName;
            string ver = String.Format("Version {0}", AssemblyVersion);

            string[] vparts = AssemblyVersion.Split('.');
            if (Int16.Parse(vparts[1]) < 1)
            {
                ver = "Alpha " + ver + " α";
            }
            else
            {
                if (Int16.Parse(vparts[1]) < 2)
                {
                    ver = "Beta " + ver + " β";
                }
            }

            this.labelVersion.Text = ver;
            //this.labelCopyright.Text = AssemblyCopyright;
            //this.labelCompanyName.Text = AssemblyCompany;
            this.textBoxDescription.Text = AssemblyDescription;


            labelSuite.Text    = applicationName + labelSuite.Text;
            labelFreeware.Text = applicationName + labelFreeware.Text;
        }
Ejemplo n.º 4
0
 public AboutBox()
 {
     InitializeComponent();
     this.Text = "About " + AssemblyTitle;
     this.labelProductName.Text = AssemblyProduct + String.Format(" {0}.{1}", AssemblyVersion.Split('.'));
     this.labelCopyright.Text   = AssemblyCopyright;
 }
Ejemplo n.º 5
0
        /// <summary>
        /// Creates an instance of a <see cref="Plugin"/> class to be inserted into the database.
        /// </summary>
        /// <param name="assembly">The assembly of the plug-in.</param>
        /// <param name="plugin">The initialized plug-in.</param>
        /// <param name="fileNameFull">The full file name of the plug-in assembly.</param>
        /// <returns>A <see cref="Plugin"/> class instance based on the given arguments.</returns>
        public static Plugin FromPlugin(Assembly assembly, IScriptNotepadPlugin plugin, string fileNameFull)
        {
            try
            {
                // create a result based on the given parameters..
                var result = new Plugin
                {
                    FileNameFull      = fileNameFull,
                    FileName          = Path.GetFileName(fileNameFull),
                    FilePath          = Path.GetDirectoryName(fileNameFull),
                    PluginName        = plugin.PluginName,
                    PluginDescription = plugin.PluginDescription,
                    IsActive          = true,
                    PluginInstalled   = DateTime.Now,
                    PluginVersion     = VersionStringFromAssembly(assembly),
                };

                // set the version for the plug-in..
                AssemblyVersion.SetPluginUpdated(result, assembly);

                // return the result..
                return(result);
            }
            catch (Exception ex)
            {
                // log the exception..
                ExceptionLogAction?.Invoke(ex);
                return(null);
            }
        }
Ejemplo n.º 6
0
        private void CreateSpoilerLog()
        {
            var itemList       = ItemList.Where(u => u.ReplacesItemId != -1).ToList();
            var settingsString = EncodeSettings();

            var directory = Path.GetDirectoryName(Settings.OutputROMFilename);
            var filename  = $"{Path.GetFileNameWithoutExtension(Settings.OutputROMFilename)}";

            Spoiler spoiler = new Spoiler()
            {
                Version                   = AssemblyVersion.Substring(26),
                SettingsString            = settingsString,
                Seed                      = Settings.Seed,
                RandomizeDungeonEntrances = Settings.RandomizeDungeonEntrances,
                ItemList                  = itemList,
                ITEM_NAMES                = Items.ITEM_NAMES,
                NewEnts                   = _newEnts
            };

            if (Settings.GenerateHTMLLog)
            {
                filename += "_SpoilerLog.html";
                using (StreamWriter newlog = new StreamWriter(Path.Combine(directory, filename)))
                {
                    Templates.HtmlSpoiler htmlspoiler = new Templates.HtmlSpoiler(spoiler);
                    newlog.Write(htmlspoiler.TransformText());
                }
            }
            else
            {
                filename += "_SpoilerLog.txt";
                CreateTextSpoilerLog(spoiler, Path.Combine(directory, filename));
            }
        }
Ejemplo n.º 7
0
 public frmMainESI()
 {
     InitializeComponent();
     this.Text            = this.Text + "  " + AssemblyVersion.Split('.')[0] + "." + AssemblyVersion.Split('.')[1] + "." + AssemblyVersion.Split('.')[2];// +" (build: " + AssemblyVersion.Split('.')[2] + ")";
     cboSia.SelectedIndex = 0;
     //int MaxCPU = Environment.ProcessorCount;
     //for (int i = 1; i <= MaxCPU; i++)
     //{
     //    cboCPU.Items.Add(i);
     //}
     //cboCPU.SelectedIndex = (int)Math.Floor(cboCPU.Items.Count / 2.0f)-1;
     lstGU = new List <clsGlycanUnit>();
     if (File.Exists(Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location) + "\\GU.txt"))
     {
         using (StreamReader sr = new StreamReader((Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location) + "\\GU.txt")))
         {
             sr.ReadLine();
             do
             {
                 string[] tmpAry = sr.ReadLine().Split(',');
                 lstGU.Add(new clsGlycanUnit(Convert.ToInt32(tmpAry[0]), Convert.ToDouble(tmpAry[1])));
             } while (!sr.EndOfStream);
         }
     }
 }
        /// <summary>
        /// When implemented in a derived class, performs the execution of the activity.
        /// </summary>
        /// <param name="context">The execution context under which the activity executes.</param>
        protected override void Execute(CodeActivityContext context)
        {
            var assemblyFileVersion          = AssemblyFileVersion.Get(context);
            var assemblyInformationalVersion = AssemblyInformationalVersion.Get(context);
            var assemblyVersion            = AssemblyVersion.Get(context);
            var createAttributeIfNotExists = CreateAttributeIfNotExists.Get(context);
            var directoryToSearch          = DirectoryToSearch.Get(context);
            var fileNamesToSearch          = FileNamesToSearch.Get(context);
            var commandLog = new CodeActivityContextCommandLog(context);
            var recursive  = Recursive.Get(context);
            var writeVerboseLogMessages = WriteVerboseLogMessages.Get(context);

            var command =
                new SetVersionAttributesInFilesCommand
            {
                AssemblyFileVersion          = assemblyFileVersion,
                AssemblyInformationalVersion = assemblyInformationalVersion,
                AssemblyVersion            = assemblyVersion,
                CreateAttributeIfNotExists = createAttributeIfNotExists,
                DirectoryToSearch          = directoryToSearch,
                FileNamesToSearch          = fileNamesToSearch,
                CommandLog = commandLog,
                Recursive  = recursive,
                WriteVerboseLogMessages = writeVerboseLogMessages
            };

            var successful = command.Execute();

            if (false == successful)
            {
                commandLog.Error("The SetVersionAttributesInFiles activity failed.");
            }
        }
Ejemplo n.º 9
0
        private void showWhatsNew()
        {
            // 1st time users: Settings.FileAssoc is null -and- Settings.Version is null or white space.
            // prev users: Settings.FileAssoc is not null -or- Settings.Version is not null or white space
            bool update = !Settings.FileAssoc.IsNull() || !Settings.Version.IsNullOrWhiteSpace();

            if (update)
            {
                bool show = false;
                Version.TryParse(Settings.Version, out var version);
                if (version is null || version < AssemblyVersion)
                {
                    show = true;
                }

                if (show)
                {
                    var dlg = new WhatsNewForm {
                        Owner = this
                    };
                    dlg.ShowDialog();

                    Settings.Version = AssemblyVersion.ToString();
                    Settings.Save();
                }
            }
            else
            {
                Settings.Version = AssemblyVersion.ToString();
                Settings.Save();
            }
        }
Ejemplo n.º 10
0
        // GET /repository/
        public void Delete(string assembly, string version)
        {
            AssemblyVersion realVersion = Version.Parse(version);
            var             file        = Directory.EnumerateFiles(AppConfig.RepositoryPath, "*.ldoc")
                                          .SingleOrDefault(ld =>
            {
                var fd = FileDescriptor.Load(new FileInfo(ld));
                return
                (string.Equals(fd.Assembly,
                               assembly,
                               StringComparison.OrdinalIgnoreCase) &&
                 fd.Version == realVersion);
            });

            if (file == null)
            {
                throw new HttpResponseException(HttpStatusCode.NotFound);
            }

            File.Delete(file);

            App.Instance.Content.QueueRebuild(string.Format("Deleted assembly: {{A:{0}, V:{1}}}",
                                                            assembly,
                                                            realVersion.ToString()));
        }
Ejemplo n.º 11
0
        private AssemblyVersion GetOrAddAssemblyVersionEntity(Assembly assemblyEntity, AssemblyName assemblyName)
        {
            if (assemblyName.Version == null)
            {
                throw new ArgumentException(null, nameof(assemblyName));
            }
            var assemblyVersion       = assemblyName.Version?.ToString();
            var assemblyVersionEntity = dbContext.AssemblyVersions.FirstOrDefault(s => s.AssemblyId == assemblyEntity.AssemblyId && s.Version == assemblyVersion);

            if (assemblyVersionEntity == null)
            {
                assemblyVersionEntity = new AssemblyVersion
                {
                    AssemblyId      = assemblyEntity.AssemblyId,
                    Version         = assemblyVersion,
                    MajorVersion    = Math.Max(0, assemblyName.Version.Major),
                    MinorVersion    = Math.Max(0, assemblyName.Version.Minor),
                    BuildVersion    = Math.Max(0, assemblyName.Version.Build),
                    RevisionVersion = Math.Max(0, assemblyName.Version.Revision),
                };
                assemblyEntity.AssemblyVersions.Add(assemblyVersionEntity);
                dbContext.SaveChanges();

                Logger.LogInformation($"{assemblyEntity.Name}.{assemblyVersionEntity.Version} assembly added to Assembly database");
            }
            else
            {
                Logger.LogDebug($"{assemblyEntity.Name}.{assemblyVersionEntity.Version} assembly already added to Assembly database. Ignoring.");
            }

            return(assemblyVersionEntity);
        }
Ejemplo n.º 12
0
        private void showWhatsNew()
        {
            // Window should only be shown to existing users after update.
            // Version should be saved to settings for new users as well.

            // new users: Settings.FileAssoc is null -and- Settings.Version is null or white space.
            bool newuser = Settings.FileAssoc.IsNull() && Settings.Version.IsNullOrWhiteSpace();

            // update: settings version number is null or lower than assembly
            Version.TryParse(Settings.Version, out var version);
            bool update = version is null || version < AssemblyVersion;

            bool show = update && !newuser;

            if (show)
            {
                var dlg = new WhatsNewForm {
                    Owner = this
                };
                dlg.ShowDialog();
            }

            if (update)
            {
                Settings.Version = AssemblyVersion.ToString();
                Settings.Save();
            }
        }
Ejemplo n.º 13
0
        private void LogWin_Load(object sender, EventArgs e)
        {
            try
            {
                BackColorSet();
                //关于信息读取
                webBrowser_weibo.Navigate(Application.StartupPath + @"\Extensions\weibo.htm");
                lb_product.Text   = AssemblyTitle;
                lb_vision.Text   += AssemblyVersion;
                lb_copyright.Text = AssemblyCopyright;
                localversion      = int.Parse(AssemblyVersion.Replace(".", ""));

                //设置信息初始化
                cb_lg.SelectedIndex      = MonitorLog.Languages.FirstOrDefault(r => r.Value == AppConfig.Instance().Language).Key;
                tb_rule.Text             = AppConfig.Instance().Rule;
                ckb_mohu.Checked         = AppConfig.Instance().IsDimrule;
                ckb_usecustome.Checked   = AppConfig.Instance().IsUseCustomeHosts;
                Ckb_HideFrm.Checked      = _setting.IsHideFrm;
                ckb_autoupdate.Checked   = AppConfig.Instance().IsAutoCheckUpdate;
                ckb_autofindfile.Checked = btn_findloaclfolder.Enabled = AppConfig.Instance().IsAutoFindFile;
                lb_loaclfilefolder.Text  = AppConfig.Instance().LocalFileDirectory;

                //离线设置
                LixianCofig();

                //自动更新
                AutoCheckUpdateAlert();
            }
            catch (Exception ex)
            {
                MessageBox.Show(@"程序运行时发生异常!异常信息:" + ex.Message, @"Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Ejemplo n.º 14
0
        //Events
        private async void CheckLatestVersion()
        {
            labelStatus.Text = "Checking for updates";
            await Task.Run(() => Check());

            if (CheckComplete && NVavailible)
            {
                bool     betterVersion = false;
                string[] numArr        = NewVersion[0].Split(new char[] { '.' });
                string[] currArr       = AssemblyVersion.Split(new char[] { '.' });

                for (byte i = 0; i < numArr.Length; i++)
                {
                    if (byte.Parse(numArr[i]) > byte.Parse(currArr[i]))
                    {
                        betterVersion = true;
                        break;
                    }
                }

                if (betterVersion)
                {
                    labelStatus.Text      = String.Format("New version {0} available!", NewVersion[0]);
                    labelStatus.ForeColor = Color.LimeGreen;
                    labelStatus.Font      = new Font("Microsoft Sans Serif", 8.25F, FontStyle.Bold, GraphicsUnit.Point, 204);

                    buttonDownload.Visible = true;
                    buttonDownload.Click  += new EventHandler(this.buttonDownload_Click);

                    this.Size = new Size(300, 225);

                    buttonOK.Text = "Cancel";
                }
                else
                {
                    labelStatus.Text      = String.Format("You are using latest version!");
                    labelStatus.ForeColor = Color.LimeGreen;
                    labelStatus.Font      = new Font("Microsoft Sans Serif", 8.25F, FontStyle.Bold, GraphicsUnit.Point, 204);

                    buttonDownload.Visible = true;
                    buttonDownload.Click  += new EventHandler(this.buttonDownload_Click);
                    buttonDownload.Text    = "Download && Repair";

                    this.Size = new Size(300, 225);

                    buttonOK.Text = "Cancel";
                }
            }
            else
            {
                labelStatus.Text      = String.Format("Cannot check for updates!");
                labelStatus.ForeColor = Color.Crimson;
                labelStatus.Font      = new Font("Microsoft Sans Serif", 8.25F, FontStyle.Bold, GraphicsUnit.Point, 204);
            }

            buttonOK.Click  += new EventHandler(this.buttonOk_Click);
            buttonOK.Enabled = true;
        }
Ejemplo n.º 15
0
        public void AssemblyVersionConstructor_CreatesAGoodObject_WhenCalledWithProperString()
        {
            AssemblyVersion underTest = new AssemblyVersion("1.2.3.4");

            Assert.AreEqual(1, underTest.Major);
            Assert.AreEqual(2, underTest.Minor);
            Assert.AreEqual(3, underTest.Build);
            Assert.AreEqual(4, underTest.Revision);
        }
Ejemplo n.º 16
0
        public void AssemblyVersionOperatorIncrement_CorrectlyOperates_WhenCalledWithProperObject()
        {
            AssemblyVersion underTest = new AssemblyVersion("1.2.3.4").Next();

            Assert.AreEqual(1, underTest.Major);
            Assert.AreEqual(2, underTest.Minor);
            Assert.AreEqual(3, underTest.Build);
            Assert.AreEqual(5, underTest.Revision);
        }
Ejemplo n.º 17
0
 public AboutBox()
 {
     InitializeComponent();
     this.Text = "O aplikaciji";
     this.labelProductName.Text   = AssemblyProduct;
     this.labelVersion.Text       = String.Format("Različica {0}", AssemblyVersion.Substring(0, AssemblyVersion.Length - 2));
     this.labelCopyright.Text     = AssemblyCopyright;
     this.labelCompanyName.Text   = AssemblyCompany;
     this.textBoxDescription.Text = AssemblyDescription;
 }
Ejemplo n.º 18
0
        public void ShouldParseNumbersMultiDigit()
        {
            var sut = new AssemblyVersion("11.22.33.44");

            Assert.AreEqual(11, sut.Major);
            Assert.AreEqual(22, sut.Minor);
            Assert.AreEqual(33, sut.Build);
            Assert.AreEqual(44, sut.Revision);
            Assert.IsFalse(sut.IsUnknown);
        }
Ejemplo n.º 19
0
        // GET /repository/LBi.Test/1.0.5.4
        public FileDescriptor Get(string assembly, string version)
        {
            AssemblyVersion realVersion = Version.Parse(version);

            return(Directory.EnumerateFiles(AppConfig.RepositoryPath, "*.ldoc")
                   .Select(ldocFile => FileDescriptor.Load(new FileInfo(ldocFile)))
                   .SingleOrDefault(
                       ld => string.Equals(ld.Assembly, assembly, StringComparison.OrdinalIgnoreCase) &&
                       ld.Version == realVersion));
        }
Ejemplo n.º 20
0
        public void ShouldParseNumbers()
        {
            var sut = new AssemblyVersion("1.2.3.4");

            Assert.AreEqual(1, sut.Major);
            Assert.AreEqual(2, sut.Minor);
            Assert.AreEqual(3, sut.Build);
            Assert.AreEqual(4, sut.Revision);
            Assert.IsFalse(sut.IsUnknown);
        }
Ejemplo n.º 21
0
        public void ShouldParseNumbers_Zeros()
        {
            var sut = new AssemblyVersion("0.0.0.0");

            Assert.AreEqual(0, sut.Major);
            Assert.AreEqual(0, sut.Minor);
            Assert.AreEqual(0, sut.Build);
            Assert.AreEqual(0, sut.Revision);
            Assert.IsFalse(sut.IsUnknown);
        }
Ejemplo n.º 22
0
 public AboutBox()
 {
     InitializeComponent();
     //this.Text = String.Format("About {0}", AssemblyTitle);
     //this.labelProductName.Text = AssemblyProduct;
     this.labelVersion.Text     = String.Format("Version {0}", AssemblyVersion.Substring(0, AssemblyVersion.Length - 2));
     this.labelCopyright.Text   = AssemblyCopyright;
     this.labelCompanyName.Text = AssemblyCompany;
     //this.textBoxDescription.Text = AssemblyDescription;
 }
Ejemplo n.º 23
0
        public void DefaultValues()
        {
            var sut = new AssemblyVersion();

            Assert.AreEqual(-1, sut.Major);
            Assert.AreEqual(-1, sut.Minor);
            Assert.AreEqual(-1, sut.Build);
            Assert.AreEqual(-1, sut.Revision);
            Assert.IsTrue(sut.IsUnknown);
        }
Ejemplo n.º 24
0
 public SplashScreen()
 {
     InitializeComponent();
     lblTitle.Text     = AssemblyTitle + " " + AssemblyVersion;
     lblVersion.Text   = "Version " + AssemblyVersion.ToString();
     lblCopyright.Text = AssemblyCopyright.Replace("\r\n", " ");
     lblLicense.Text   = String.Format(
         "{0} comes with ABSOLUTELY NO WARRANTY; for details click \"Help->License\". This is free software and you are welcome to redistribute it under certain conditions. Click \"Help->License\" for details",
         AssemblyTitle
         );
 }
 private void GetCurrentVersion()
 {
     try
     {
         version = AssemblyVersion.ToString(4);
     }
     catch
     {
         version = "ERROR";
     }
 }
        /// <summary>
        /// Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes,
        /// follows, or occurs in the same position in the sort order as the other object.
        /// </summary>
        /// <param name="other">An object to compare with this instance.</param>
        /// <returns>A value that indicates the relative order of the objects being compared.</returns>
        public int CompareTo(LatestVersion other)
        {
            int result = AssemblyVersion.CompareTo(other.AssemblyVersion);

            if (result == 0)
            {
                result = FileVersion.CompareTo(other.FileVersion);
            }

            return(result);
        }
Ejemplo n.º 27
0
        IExternalAssembly betterAssembly(Metaspec.AssemblyInfo info, IExternalAssembly[] assemblies, bool any)
        {
            AssemblyVersion version = info.Version;
            bool            system  = false;

            if (info.Name == "mscorlib" ||
                info.Name == "System.Core")
            {
                version.MinorVersion   = 0;
                version.BuildNumber    = 0;
                version.RevisionNumber = 0;
                system = true;
            }

            bool bestFound = true;

            for (int i = 0; i != assemblies.Length; ++i)
            {
                bestFound = true;
                for (int j = 0; j != assemblies.Length; ++j)
                {
                    if (i == j)
                    {
                        continue;
                    }

                    int better = 0;
                    Metaspec.AssemblyInfo ai = getAssemblyKey(assemblies[i]);
                    Metaspec.AssemblyInfo aj = getAssemblyKey(assemblies[j]);
                    if (ai != null &&
                        aj != null)
                    {
                        better = betterAssembly2(info.Version, ai.Version, aj.Version, system);
                    }
                    if (better != 1)
                    {
                        bestFound = false;
                        break;
                    }
                }
                if (bestFound)
                {
                    return(assemblies[i]);
                }
            }

            if (any)
            {
                return(assemblies[0]);
            }

            return(null);
        }
Ejemplo n.º 28
0
 //private int _endScan = 0;
 //ThermoRawReader raw;
 public frmBatch()
 {
     InitializeComponent();
     this.Text            = this.Text + "  " + AssemblyVersion.Split('.')[0] + "." + AssemblyVersion.Split('.')[1] + "." + AssemblyVersion.Split('.')[2];// +" (build: " + AssemblyVersion.Split('.')[2] + ")";
     cboSia.SelectedIndex = 0;
     //int MaxCPU = Environment.ProcessorCount;
     //for (int i = 1; i <= MaxCPU; i++)
     //{
     //    cboCPU.Items.Add(i);
     //}
     //cboCPU.SelectedIndex = (int)Math.Floor(cboCPU.Items.Count / 2.0f)-1;
 }
Ejemplo n.º 29
0
        private async void CheckLatestVersion()
        {
            if (CheckForUpdates)
            {
                button1.Text = "Checking for updates";
                await Task.Run(() => Check());

                if (NVavailible)
                {
                    bool     betterVersion = false;
                    string[] numArr        = NewVersion[0].Split(new char[] { '.' });
                    string[] currArr       = AssemblyVersion.Split(new char[] { '.' });

                    for (byte i = 0; i < numArr.Length; i++)
                    {
                        if (byte.Parse(numArr[i]) > byte.Parse(currArr[i]))
                        {
                            betterVersion = true;
                            break;
                        }
                    }

                    tableLayoutPanel2.RowStyles[3] = new RowStyle(SizeType.Absolute, 30F);

                    if (betterVersion)
                    {
                        linkLabelNewVersion.Text      = String.Format("New version {0} available!", NewVersion[0]);
                        linkLabelNewVersion.LinkColor = Color.LimeGreen;
                        linkLabelNewVersion.Font      = new Font("Microsoft Sans Serif", 8.25F, FontStyle.Bold, GraphicsUnit.Point, 204);
                    }
                    else
                    {
                        linkLabelNewVersion.Text              = String.Format("You are using latest version!", NewVersion[0]);
                        linkLabelNewVersion.LinkBehavior      = LinkBehavior.NeverUnderline;
                        linkLabelNewVersion.Links[0].Enabled  = false;
                        linkLabelNewVersion.DisabledLinkColor = Color.LimeGreen;
                        linkLabelNewVersion.Font              = new Font("Microsoft Sans Serif", 8.25F, FontStyle.Bold, GraphicsUnit.Point, 204);
                    }
                }
                else
                {
                    tableLayoutPanel2.RowStyles[3]        = new RowStyle(SizeType.Absolute, 30F);
                    linkLabelNewVersion.Text              = String.Format("Cannot check for updates!", NewVersion[0]);
                    linkLabelNewVersion.LinkBehavior      = LinkBehavior.NeverUnderline;
                    linkLabelNewVersion.Links[0].Enabled  = false;
                    linkLabelNewVersion.DisabledLinkColor = Color.Crimson;
                    linkLabelNewVersion.Font              = new Font("Microsoft Sans Serif", 8.25F, FontStyle.Bold, GraphicsUnit.Point, 204);
                }
            }

            button1.Click += new EventHandler(this.button1_Click);
            button1.Text   = "OK";
        }
Ejemplo n.º 30
0
        /// <summary>
        /// Load the About Form
        /// </summary>
        /// <param name="sender">Object</param>
        /// <param name="e">EventArgs</param>
        private void Form_About_Load(object sender, EventArgs e)
        {
            // Set the abouts forms icon from the owner form
            Icon = Owner.Icon;
            pictureBox_Icon.Image = Icon.ToBitmap();
            Text = "About: " + Owner.Text;

            // Set the version information from the AssemblyInfo file
            // using the AssemblyVersion class.
            var version = new AssemblyVersion();

            label_About.Text = "\r\n" + version;
        }
 public AssemblyInfoPatchResult(string fullPath,
     string fileBackupPath,
     AssemblyVersion oldAssemblyVersion,
     AssemblyVersion assemblyVersion,
     AssemblyFileVersion oldAssemblyFileVersion,
     AssemblyFileVersion assemblyFileVersion,
     bool succeeded = true,
     AssemblyMetaData oldAssemblyMetadata = null,
     AssemblyMetaData newAssemblyMetadata = null)
 {
     _fullPath = fullPath;
     _fileBackupPath = fileBackupPath;
     _oldAssemblyVersion = oldAssemblyVersion;
     _assemblyVersion = assemblyVersion;
     _oldAssemblyFileVersion = oldAssemblyFileVersion;
     _assemblyFileVersion = assemblyFileVersion;
     _succeeded = succeeded;
     _oldAssemblyMetadata = oldAssemblyMetadata;
     _newAssemblyMetadata = newAssemblyMetadata;
 }