コード例 #1
0
ファイル: Program.cs プロジェクト: bhpdev/BHP-Dev
        public static void Main()
        {
            AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            XDocument xdoc = null;

            try
            {
                xdoc = XDocument.Load("https://bhpcash.io/client/update.xml");
            }
            catch { }
            if (xdoc != null)
            {
                Version version = Assembly.GetExecutingAssembly().GetName().Version;
                Version minimum = Version.Parse(xdoc.Element("update").Attribute("minimum").Value);
                if (version < minimum)
                {
                    using (UpdateDialog dialog = new UpdateDialog(xdoc))
                    {
                        dialog.ShowDialog();
                    }
                    return;
                }
            }
            //if (!InstallCertificate()) return;
            using (LevelDBStore store = new LevelDBStore(Settings.Default.Paths.Chain))
                using (BhpSystem = new BhpSystem(store))
                {
                    Application.Run(MainForm = new MainForm(xdoc));
                }
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: nf25tod/AntShares
 private static bool CheckVersion()
 {
     try
     {
         XmlDocument doc = new XmlDocument();
         doc.Load("https://www.antshares.org/client/version.xml");
         Version minimum = Version.Parse(doc.GetElementsByTagName("version")[0].Attributes["minimum"].Value);
         Version latest  = Version.Parse(doc.GetElementsByTagName("version")[0].Attributes["latest"].Value);
         Version self    = Assembly.GetExecutingAssembly().GetName().Version;
         if (self >= latest)
         {
             return(true);
         }
         using (UpdateDialog dialog = new UpdateDialog {
             LatestVersion = latest
         })
         {
             dialog.ShowDialog();
         }
         return(self >= minimum);
     }
     catch
     {
         return(true);
     }
 }
コード例 #3
0
ファイル: MainForm.cs プロジェクト: sixteentons/Tabster
        private static void OnUpdateResponse(UpdateResponseEventArgs e)
        {
            var isStartupCheck = (bool)e.UserState;

            if (e.Error != null)
            {
                Logging.GetLogger().Error("Update check failed.", e.Error);
            }
            else
            {
                Logging.GetLogger().Info("Updated check latest version: " + e.Response.LatestVersion);
            }


            if (e.Response != null && e.Response.LatestVersion > TabsterEnvironment.GetVersion())
            {
                var updateDialog = new UpdateDialog(e.Response)
                {
                    StartPosition = FormStartPosition.CenterParent
                };
                updateDialog.ShowDialog();
            }

            else if (!isStartupCheck)
            {
                MessageBox.Show(Resources.UpdateDialogCaptionNone, Resources.UpdateDialogTitleNone, MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
コード例 #4
0
ファイル: UpdateDialog.cs プロジェクト: Yumamama/Sleeim_App
    //ダイアログを表示する
    public static void Show(string message)
    {
        GameObject   prehab = CreateDialog(dialogPath);
        UpdateDialog dialog = prehab.GetComponent <UpdateDialog> ();

        dialog.Init(message);
    }
コード例 #5
0
    private void button1_Click(object sender, EventArgs e)
    {
        var update = new UpdateDialog();

        update.OnButton2Click += OnUpdateDialogButton2Click;
        update.ShowDialog();
    }
コード例 #6
0
    //デバイスのファームウェアが最新のものかどうか確認する処理の流れ
    //ファームウェアが最新でなくても更新までは行わない
    IEnumerator FarmwareVersionCheckFlow()
    {
        Debug.Log("FarmwareVersionCheck");
        UpdateDialog.Show("同期中");
        // TODO:G1Dのファームウェアの更新があるかどうか調べる
        // long h1dVersionInDevice = FarmwareVersionStringToLong (UserDataManager.Device.GetH1DAppVersion ());
        //Ftpサーバーから最新のファームウェアのファイル名を取得
        string ratestH1dFileName = "";

        yield return(StartCoroutine(GetRatestFarmwareFileNameFromFtp("/Update/H1D", (string fileName) => ratestH1dFileName = fileName)));

        if (ratestH1dFileName == null)
        {
            //FTPサーバーにファイルが存在しなかった、もしくはエラーが発生したら
            UpdateDialog.Dismiss();
            yield break;
        }
        Debug.Log("Ratest H1D Farmware is " + ratestH1dFileName);
        if (false)
        {
            DeviceStateManager.Instance.OnFirmwareUpdateNecessary();
        }
        else
        {
            DeviceStateManager.Instance.OnFirmwareUpdateNonNecessary();
        }
        UpdateDialog.Dismiss();
    }
コード例 #7
0
        /// <summary>
        /// Create the upgrade dialog based on releaseNotesUri and updateOption
        /// </summary>
        private UpdateDialog CreateUpgradeDialog(Uri releaseNotesUri, AutoUpdateOption updateOption)
        {
            UpdateDialog dialog = new UpdateDialog(releaseNotesUri);

            if (updateOption == AutoUpdateOption.RequiredUpgrade)
            {
                dialog.btnUpdateLater.Visibility = Visibility.Collapsed;
                dialog.txtUpdateNotice.Text      = Properties.Resources.MainWindow_ShowUpgradeDialog_An_update_is_required;
            }

            // center horizontally - does not work when maximized on secondary screen
            Point topLeft = this.WindowState == WindowState.Maximized ?
                            this.GetTopLeftPoint() : new Point(this.Left, this.Top);

            dialog.Top   = topLeft.Y + this.borderTitleBar.ActualHeight + 8;
            dialog.Left  = topLeft.X + this.ictMainMenu.ActualWidth;
            dialog.Width = this.ActualWidth - this.ictMainMenu.ActualWidth;
            dialog.Owner = this;

            // Block until message bar disappears
            this.modeGrid.Opacity   = 0.5;
            this.AllowFurtherAction = false;

            return(dialog);
        }
コード例 #8
0
ファイル: Updater.cs プロジェクト: thomasramm/Vortragsmanager
        private static void UpdaterFinished(object sender, RunWorkerCompletedEventArgs e)
        {
            Log.Info(nameof(UpdaterFinished));
            _updateWorker.DoWork             -= new DoWorkEventHandler(UpdaterDoWork);
            _updateWorker.RunWorkerCompleted -= new RunWorkerCompletedEventHandler(UpdaterFinished);
            if (ServerDate == new DateTime(2000, 1, 1))
            {
                return;
            }
            if (LocalDate >= ServerDate)
            {
                if (!_silent)
                {
                    ThemedMessageBox.Show("Information",
                                          "Neueste Version ist bereits installiert",
                                          System.Windows.MessageBoxButton.OK,
                                          System.Windows.MessageBoxImage.Information);
                }
                return;
            }

            ServerVersions = (Ini)e.Result;

            var w    = new UpdateDialog();
            var data = (UpdateDialogViewModel)w.DataContext;

            data.LocalVersion  = LocalDate;
            data.ServerVersion = ServerDate;
            data.ServerIni     = ServerVersions;
            w.ShowDialog();
        }
コード例 #9
0
        private void ShowUpgradeDialog()
        {
            // Make the upgrade decision
            var autoUpdate = Container.GetDefaultInstance().AutoUpdate;
            AutoUpdateOption updateOption;

            if (!ShouldUserUpgrade(autoUpdate, out updateOption))
            {
                return;
            }

            // Create the upgrade dialog
            UpdateDialog dialog = CreateUpgradeDialog(autoUpdate.ReleaseNotesUri, updateOption);

            bool?dialogResult = dialog.ShowDialog();

            // user clicked update now (true)
            if (dialogResult.HasValue && dialogResult.Value)
            {
                try
                {
                    DownLoadInstaller(autoUpdate, updateOption);
                }
                catch (Exception) {}
            }
            else
            {
                // user clicked later (false)
                Logger.PublishTelemetryEvent(TelemetryAction.Upgrade_Update_Dismiss, TelemetryProperty.MSIVersion, autoUpdate.InstalledVersion.ToString());
            }

            this.modeGrid.Opacity   = 1;
            this.AllowFurtherAction = true;
        }
コード例 #10
0
ファイル: Main.cs プロジェクト: MikeMatt16/Abide
        private void checkForUpdatesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //Prepare
            XmlDocument    manifestDocument = new XmlDocument();
            UpdateManifest manifest         = null;
            bool           update           = Program.ForceUpdate;

            try
            {
                //Load XML Document
                manifestDocument.Load(Program.UpdateManifestUrl);

                //Get Update Manifest
                manifest = new UpdateManifest(manifestDocument);

                //Check
                update |= main_CheckForUpdate(manifest);
            }
            catch { update = false; }

            //Check
            if (update)
            {
                using (UpdateDialog updateDlg = new UpdateDialog(manifest))
                    if (updateDlg.ShowDialog() == DialogResult.OK)
                    {
                        Application.Exit();
                    }
            }
            else
            {
                MessageBox.Show("Abide is up to date.", "Up to date", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
コード例 #11
0
 internal static void ShowUpdateDialog(string details, IWin32Window parent)
 {
     using (var updateDialog = new UpdateDialog(details))
     {
         updateDialog.ShowDialog(parent);
     }
 }
コード例 #12
0
ファイル: Main.cs プロジェクト: MikeMatt16/Abide
        private void Main_Load(object sender, EventArgs e)
        {
            //Get Version string...
            versionToolStripMenuItem.Text = typeof(Main).Assembly.GetName().Version.ToString();

            //Check
            if (Program.UpdateManifest != null && !Program.IsAlpha && main_CheckForUpdate(Program.UpdateManifest) || Program.ForceUpdate)
            {
                using (UpdateDialog updateDlg = new UpdateDialog(Program.UpdateManifest))
                    if (updateDlg.ShowDialog() == DialogResult.OK)
                    {
                        Application.Exit();
                    }
            }

            //Load Files
            FileInfo info = null;

            foreach (string filename in Program.Files)
            {
                //Initialize
                try
                {
                    info = new FileInfo(filename);
                    switch (info.Extension)
                    {
                    case ".map": mapFile_Open(filename); break;
                    }
                }
                catch { }
            }
        }
コード例 #13
0
ファイル: Program.cs プロジェクト: neo-project/neo-node
        static void Main(string[] args)
        {
            AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
            Application.SetHighDpiMode(HighDpiMode.SystemAware);
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            XDocument xdoc = null;

            try
            {
                xdoc = XDocument.Load("https://raw.githubusercontent.com/neo-project/neo-gui/master/update.xml");
            }
            catch { }
            if (xdoc != null)
            {
                Version version = Assembly.GetExecutingAssembly().GetName().Version;
                Version minimum = Version.Parse(xdoc.Element("update").Attribute("minimum").Value);
                if (version < minimum)
                {
                    using UpdateDialog dialog = new UpdateDialog(xdoc);
                    dialog.ShowDialog();
                    return;
                }
            }
            Service.Start(args);
            Application.Run(MainForm = new MainForm(xdoc));
            Service.Stop();
        }
コード例 #14
0
        public static void Main()
        {
            // Create eventlog.txt for writing event logs to
            using (StreamWriter sw = File.CreateText("eventlog.txt"))
            {
                sw.WriteLine("Event log started at {0}", DateTime.Now.ToString());
                sw.WriteLine();
            }

            AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            XDocument xdoc = null;

            try
            {
                xdoc = XDocument.Load("https://neo.org/client/update.xml");
            }
            catch { }
            if (xdoc != null)
            {
                Version version = Assembly.GetExecutingAssembly().GetName().Version;
                Version minimum = Version.Parse(xdoc.Element("update").Attribute("minimum").Value);
                if (version < minimum)
                {
                    using (UpdateDialog dialog = new UpdateDialog(xdoc))
                    {
                        dialog.ShowDialog();
                    }
                    return;
                }
            }
            if (!InstallCertificate())
            {
                return;
            }
            const string PeerStatePath = "peers.dat";

            if (File.Exists(PeerStatePath))
            {
                using (FileStream fs = new FileStream(PeerStatePath, FileMode.Open, FileAccess.Read, FileShare.Read))
                {
                    LocalNode.LoadState(fs);
                }
            }
            using (Blockchain.RegisterBlockchain(new LevelDBBlockchain(Settings.Default.Paths.Chain)))
                using (LocalNode = new LocalNode())
                {
                    LocalNode.UpnpEnabled    = true;
                    Application.Run(MainForm = new MainForm(xdoc));
                }
            using (FileStream fs = new FileStream(PeerStatePath, FileMode.Create, FileAccess.Write, FileShare.None))
            {
                LocalNode.SaveState(fs);
            }
        }
コード例 #15
0
        private async void MainPage_Loaded(object sender, RoutedEventArgs e)
        {
            var isCanUpdate = await AutoUpdate.CheckUpdate();

            if (isCanUpdate)
            {
                var x = new UpdateDialog();
                await x.ShowAsync();
            }
        }
コード例 #16
0
 /// <summary>
 /// 询问是否更新
 /// </summary>
 private void AskForUpdate()
 {
     if (MessageBox.Show("检测到新版本,是否更新?", "提示", MessageBoxButton.YesNo, MessageBoxImage.Information) == MessageBoxResult.Yes)
     {
         UpdateDialog updateDialog = new UpdateDialog(localVersion, latestVersion)
         {
             Owner = Application.Current.MainWindow
         };
         updateDialog.ShowDialog();
     }
 }
コード例 #17
0
ファイル: RiftTimer.cs プロジェクト: tobbez/rift-timer
        // Display notification if update is available
        private void UpdateCheck()
        {
            if (isUpdateAvailable)
            {
                UpdateDialog updateDialog = new UpdateDialog(latestVersion);
                updateDialog.StartPosition = FormStartPosition.CenterParent;
                updateDialog.ShowDialog();

                updateDialog.Dispose();
            }
        }
コード例 #18
0
 public static void ShowUpdateDialog(UpdateDialog dialogInfo)
 {
     //AndroidDialog androidDialog = AndroidDialog.Create(dialogInfo.title, dialogInfo.body, dialogInfo.yes, dialogInfo.no, AndroidDialogTheme.ThemeDeviceDefaultLight);
     //androidDialog.ActionComplete += delegate(AndroidDialogResult result)
     //{
     //	if (result == AndroidDialogResult.YES)
     //	{
     //		Application.OpenURL("market://details?id=" + Application.bundleIdentifier);
     //	}
     //};
 }
コード例 #19
0
    //前回データの復元処理の流れ
    //復元を途中から再開する場合(復元するかどうかの確認が必要ない場合)に使用する
    static IEnumerator ReRestoreDataFlow(MonoBehaviour mono, Action onComplete)
    {
        //同期中の表示
        UpdateDialog.Show("同期中");
        //FTPサーバーに前回のデータが存在しているか確認する。
        var deviceAdress = UserDataManager.Device.GetPareringDeviceAdress();

        Debug.Log("deviceAdress:" + deviceAdress);
        int getPriviousDataResult = -1;         //前回データがあるかどうかの通信結果を格納する

        yield return(mono.StartCoroutine(IsExistPriviousDataInServer(deviceAdress, (int result) => getPriviousDataResult = result)));

        UpdateDialog.Dismiss();
        if (getPriviousDataResult == 1)
        {
            //前回のデータが存在していれば、復元を再開する
            yield return(mono.StartCoroutine(RestoreData(mono, deviceAdress)));
        }
        else if (getPriviousDataResult == 0)
        {
            //前回データが存在していなければ、以降復元確認は不要と設定
            UserDataManager.State.SaveNessesaryRestore(false);
        }
        else
        {
            //通信エラーが発生し、前回データの有無が確認できなければ
            //復元に失敗した事をユーザーに伝える
            yield return(mono.StartCoroutine(TellFailedRestoreData()));

            //ダイアログを表示して、アプリを終了する
                        #if UNITY_ANDROID
            //Androidの場合は、復元に失敗すればアプリを終了するか再接続するか確認する
            bool isShutDownApp = false;
            yield return(mono.StartCoroutine(AskShutDownApp((bool _isShutDownApp) => isShutDownApp = _isShutDownApp)));

            if (isShutDownApp)
            {
                //アプリを終了
                Application.Quit();
            }
            else
            {
                //終了しないなら、復元処理を再度行う
                yield return(mono.StartCoroutine(RestoreData(mono, deviceAdress)));
            }
                        #elif UNITY_IOS
            //iOSの場合は、アプリの終了が行えないため確認はせずに再接続する
            yield return(mono.StartCoroutine(RestoreData(mono, deviceAdress)));
                        #endif
        }
        onComplete();
    }
コード例 #20
0
        private async void UpdateInfoBtn_Click(object sender, RoutedEventArgs e)
        {
            var datalist  = conn.Query <Student>("select *from Student where Sno = ?", Login.Current.UserName.Text);
            var _username = conn.ExecuteScalar <string>("select Sname from Student where Sno = ?", Login.Current.UserName.Text);

            foreach (var item in datalist)
            {
                SNameTB2.Text = "姓名:" + _username;
                SnoTB2.Text   = "学号:" + item.Sno;
                SexTB2.Text   = item.Sex;
                AgeTB2.Text   = item.Age.ToString();
            }
            await UpdateDialog.ShowAsync();
        }
コード例 #21
0
 private async void UpdateItem_Click(object sender, RoutedEventArgs e)
 {
     SnoTB2.Text   = StudentItem.Sno;
     SnameTB2.Text = StudentItem.Sname.Substring(3);
     if (StudentItem.Sex.Substring(3).Equals("男"))
     {
         SexTB2.SelectedIndex = 0;
     }
     else
     {
         SexTB2.SelectedIndex = 1;
     }
     AgeTB2.Text     = StudentItem.Age.Substring(3);
     Spassword2.Text = StudentItem.Password.Substring(3);
     await UpdateDialog.ShowAsync();
 }
コード例 #22
0
ファイル: MainForm.cs プロジェクト: BGCX261/zma-svn-to-git
        //Dieses Event wird nur aufgerufen wenn ein Update gefunden wurde.
        void updateController1_updateFound(object sender, updateSystemDotNet.appEventArgs.updateFoundEventArgs e)
        {
            //Ueber e.Result kann auf die Updateinformationen zugegriffen werden.
            UpdateDialog ud = new UpdateDialog(e.Result, mc.Version);

            //if (MessageBox.Show(string.Format("An update is available!\r\nUpdate available: {0}\r\nWould you like to install the update now?", e.Result.newUpdatePackages[e.Result.newUpdatePackages.Count - 1].Version),
            //    "Update available",
            //    MessageBoxButtons.YesNo,
            //    MessageBoxIcon.Information) == DialogResult.Yes)
            if (ud.ShowDialog() == DialogResult.Yes)
            {
                //Diese Methode startet den asynchronen Updatedownload
                updateController.downloadUpdates();
                lblStatusBar.Text = "downloading update...";
            }
        }
コード例 #23
0
    //前回のデータを取得し、DBに登録する
    static IEnumerator RestoreData(MonoBehaviour mono, string deviceAdress)
    {
        Debug.Log("RestoreData");
        //同期中の表示
        UpdateDialog.Show("同期中");
        //サーバーにある前回データ全てのファイルパスを取得する
        List <string> filePathList = new List <string> ();

        yield return(mono.StartCoroutine(GetPriviousDataPathList(deviceAdress, (List <string> _filePathList) => filePathList = _filePathList)));

        UpdateDialog.Dismiss();
        if (filePathList != null)
        {
            //前回データのファイルパスが取得できれば
            int restoreDataCount = UserDataManager.State.GetRestoreDataCount();                 //既に復元済みのデータ件数
            yield return(mono.StartCoroutine(DownloadServerDatasToRegistDB(mono, filePathList, restoreDataCount)));
        }
        else
        {
            //何らかのエラーが発生すれば
            //復元に失敗した事をユーザーに伝える
            yield return(mono.StartCoroutine(TellFailedRestoreData()));

            //ダイアログを表示して、アプリを終了する
                        #if UNITY_ANDROID
            //Androidの場合は、復元に失敗すればアプリを終了するか再接続するか確認する
            bool isShutDownApp = false;
            yield return(mono.StartCoroutine(AskShutDownApp((bool _isShutDownApp) => isShutDownApp = _isShutDownApp)));

            if (isShutDownApp)
            {
                //アプリを終了
                Application.Quit();
            }
            else
            {
                //終了しないなら、復元処理を再度行う
                yield return(mono.StartCoroutine(RestoreData(mono, deviceAdress)));
            }
                        #elif UNITY_IOS
            //iOSの場合は、アプリの終了が行えないため確認はせずに再接続する
            yield return(mono.StartCoroutine(RestoreData(mono, deviceAdress)));
                        #endif
        }
        yield return(null);
    }
        private void DownloadComplete()
        {
            UpdateDialog dialog         = new UpdateDialog(update.body, CoreMusicApp.CURRENT_VERSION, update.tag_name);
            Point        middleOfParent = new Point(parent.Location.X + (parent.Size.Width / 2), parent.Location.Y + (parent.Size.Height / 2));

            dialog.Location = new Point(middleOfParent.X - (dialog.Width / 2), middleOfParent.Y - (dialog.Height / 2));
            var result = dialog.ShowDialog(parent);

            dialog.Dispose();
            if (result == DialogResult.Yes)
            {
                Install();
            }
            else if (result == DialogResult.Cancel)
            {
                Ignore = true;
            }
        }
コード例 #25
0
ファイル: Updater.cs プロジェクト: Venryx/Reborn-Mod-Manager
        public async void Update(Release version)
        {
            var file = version.Assets.First(asset => asset.Name == "Setup.msi");

            using (var client = new WebClient())
            {
                var update = new UpdateDialog("Update", "Downloading...");
                update.Show();
                client.DownloadProgressChanged += (sender, args) => update.Update(args.ProgressPercentage);
                var task = client.DownloadFileTaskAsync(file.BrowserDownloadUrl, DOWNLOAD_FILE);

                await task.ContinueWith(t =>
                {
                    System.Diagnostics.Process.Start($"{Directory.GetCurrentDirectory()}\\{DOWNLOAD_FILE}");
                    Environment.Exit(0);
                });
            }
        }
コード例 #26
0
ファイル: UpdatesChecker.cs プロジェクト: xiaoxiongnpu/NClass
        private static void ShowNewVersionInfo(VersionInfo info)
        {
            if (info.IsUpdated)
            {
                var updateDialog = new UpdateDialog(Strings.CheckingForUpdates, info.VersionName, info.Notes);
                var result       = updateDialog.ShowDialog();

                if (result == DialogResult.Yes)
                {
                    OpenUrl(info.DownloadPageUrl);
                }
            }
            else
            {
                MessageBox.Show(
                    Strings.NoUpdates, Strings.CheckingForUpdates,
                    MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
コード例 #27
0
ファイル: Program.cs プロジェクト: cronfoundation/cronium-gui
        static void RunMain(string[] args)
        {
            Parser clp = new Parser();

            _parsed = clp.ParseArguments <CLSettings>(args);


            AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            XDocument xdoc = null;

            try
            {
                xdoc = XDocument.Load("https://cron.org/client/update.xml");
            }
            catch
            {
            }

            if (xdoc != null)
            {
                Version version = Assembly.GetExecutingAssembly().GetName().Version;
                Version minimum = Version.Parse(xdoc.Element("update").Attribute("minimum").Value);
                if (version < minimum)
                {
                    using (UpdateDialog dialog = new UpdateDialog(xdoc))
                    {
                        dialog.ShowDialog();
                    }
                    return;
                }
            }
            if (!InstallCertificate())
            {
                return;
            }
            using (LevelDBStore store = new LevelDBStore(Settings.Default.Paths.Chain))
                using (CronSystem = new CronSystem(store, null))
                {
                    Application.Run(MainForm = new MainForm(xdoc));
                }
        }
コード例 #28
0
        protected override void Process([NotNull] RemoveServerComponentsPipeline pipeline)
        {
            Assert.ArgumentNotNull(pipeline, nameof(pipeline));

            if (AppHost.Settings.Options.HideUpdateDialog)
            {
                return;
            }

            var d = new UpdateDialog
            {
                Caption    = Resources.RecycleWarning_Process_Update_Server_Components,
                UpdateText = Resources.RecycleWarning_Process_
            };

            if (AppHost.Shell.ShowDialog(d) != true)
            {
                pipeline.Abort();
            }
        }
コード例 #29
0
 // Update is called once per frame
 void Update()
 {
             #if UNITY_EDITOR
     if (Input.GetKeyDown(KeyCode.A))
     {
         Dialog.Show(Localization.Get("Update_Title"), Localization.Get("Dialog_Ok"), Localization.Get("Dialog_Cancel"), () => {
         }, () => {
         });
     }
     if (Input.GetKeyDown(KeyCode.B))
     {
         Dialog.Show("bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", "ok", () => {
         });
     }
     if (Input.GetKeyDown(KeyCode.C))
     {
         ToastController.Show(false);
     }
     if (Input.GetKeyDown(KeyCode.U))
     {
         UpdateDialog.Show("");
     }
     if (Input.GetKeyDown(KeyCode.T))
     {
         Localization.language = "en";
         TipDialog.Show();
     }
     if (Input.GetKeyDown(KeyCode.V))
     {
         VoiceDialog.Show();
     }
     if (Input.GetKeyDown(KeyCode.M))
     {
         maskImage.color = Color.black;
     }
     if (Input.GetKeyDown(KeyCode.O))
     {
         Toast.Show("This is a toast.");
     }
             #endif
 }
コード例 #30
0
ファイル: VixenPlusForm.cs プロジェクト: ctmal956/vplus
        private static bool CheckForUpdates(Screen startupScreen, bool isInStartup)
        {
            var result = false;

            using (var dialog = new UpdateDialog(startupScreen, isInStartup)) {
                if (isInStartup && !dialog.IsTimeToCheckForUpdate())
                {
                    return(false);
                }

                dialog.ShowDialog();

                switch (dialog.DialogResult)
                {
                case DialogResult.Yes:
                    result = true;
                    break;
                }
            }
            return(result);
        }
 private void DownloadComplete()
 {
     UpdateDialog dialog = new UpdateDialog(update.body, CoreMusicApp.CURRENT_VERSION, update.tag_name);
     Point middleOfParent = new Point(parent.Location.X + (parent.Size.Width / 2), parent.Location.Y + (parent.Size.Height / 2));
     dialog.Location = new Point(middleOfParent.X - (dialog.Width / 2), middleOfParent.Y - (dialog.Height / 2));
     var result = dialog.ShowDialog(parent);
     dialog.Dispose();
     if (result == DialogResult.Yes)
     {
         Install();
     } else if (result == DialogResult.Cancel)
     {
         Ignore = true;
     }
 }