private void MainForm_Load(object sender, EventArgs e) { apt_label.Text = tools.getString("apt_label"); apt_start_label.Text = tools.getString("apt_start_label"); apt_end_label.Text = tools.getString("apt_end_label"); ((Control)txt_pictureBox).AllowDrop = true; txt_pictureBox.DragEnter += txt_pictureBox_DragEnter; txt_pictureBox.DragLeave += txt_pictureBox_DragLeave; txt_pictureBox.DragDrop += txt_pictureBox_DragDrop; txt_pictureBox.BackgroundImage = drawBackGroundImage(); overlay_cover.BackColor = Color.FromArgb(150, Color.Black); overlay_cover.Parent = txt_pictureBox; overlay_cover.Location = new Point(0, 0); overlay_cover.Size = new Size(txt_pictureBox.Width, txt_pictureBox.Height); openFileDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory); openFileDialog.Multiselect = false; openFileDialog.FilterIndex = 1; setHotKeys(false); setAbout(false); updater.DoUpdate(true); StartListeningForWindowResize(); StartListeningForWindowSwitch(); }
private void ButtonBase_OnClick(object sender, RoutedEventArgs e) { AutoUpdater update = new AutoUpdater(new ApplicationInfo { ApplicationAssembly = Assembly.GetExecutingAssembly(), ApplicationIcon = null, ApplicationId = "app", ApplicationName = "App", UpdateXmlLocation = new Uri("http://127.0.0.1:8080/manifest/app/update.xml") }); update.DoUpdate(); }
private void CheckForUpdates() { try { var autoUpdater = new AutoUpdater(); var result = autoUpdater.DoUpdate("http://apps.juliahayward.com/MSOOrganiser"); if (result == AutoUpdateResult.UpdateInitiated) { this.Close(); Environment.Exit(0); } } catch (Exception) { /* don't bother logging */ } _updateCheckDone = true; }
public TaskbarForm() { InitializeComponent(); SetTools(); taskbar = TaskBarFactory.GetTaskbar(); taskbar.SizeChanged = TaskbarSizeChanged; SetupTaskbarForm(); LaunchInTaskBar(); BuildContextMenuStrip(); openFileDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory); openFileDialog.Multiselect = false; openFileDialog.FilterIndex = 1; updater = new AutoUpdater(this); updater.DoUpdate(true); RegisterHotkeys(); }