private void Init() { this.Size = new Size(Settings.Default.MainFormWidth, Settings.Default.MainFormHeight); #if !DEBUG checkForUpdatesToolStripMenuItem.Visible = false; #endif this.Text = ProgramUI.GetApplicationName() + " - " + ProgramUI.GetApplicationVersion(); Instance = this; var treeView = new FileSystemTree(); FileSysTree = treeView; treeView.Show(dockPanelMain, DockState.DockLeft); var logs = new Logs(); LogControl = logs.LogControl; logs.Show(dockPanelMain, DockState.DockBottom); MainDockPanel = dockPanelMain; foreach (var item in ProgramUI.GetConfigs()) { Type serviceType = Type.GetType(item.ToString()); IConfigService configService = Activator.CreateInstance(serviceType) as IConfigService; var UIControl = Helper.GetUIControl(configService); if (UIControl.IsVisibleInReleaseMode()) { var toolTrip = newToolStripMenuItem.DropDownItems.Add(configService.GetTitle()); toolTrip.Tag = configService; toolTrip.Click += new EventHandler(tsmiNewForm_Click); } } }
private void InitializeProductInformation() { _labelProductName.Text = ProgramUI.GetApplicationName(); _labelVersion.Text = ProgramUI.GetApplicationVersion(); #if !DEBUG _linkLabelUpdate.Visible = false; #endif }
/// <summary> /// Am'I up to date ? /// </summary> /// <returns></returns> public bool UpTodate() { var onLineVersionInformation = GetLastVersion(); Version onLineVersion = new Version(onLineVersionInformation.Version); Version currentMdVersion = new Version(ProgramUI.GetApplicationVersion()); if (onLineVersion.CompareTo(currentMdVersion) > 0) { return(false); } return(true); }