상속: MonoBehaviourX
예제 #1
1
		AppMiscOptionCreator(MessageBoxManager messageBoxManager, AppSettingsImpl appSettings) {
			this.messageBoxManager = messageBoxManager;
			this.appSettings = appSettings;
		}
예제 #2
0
 private void frmRPTOut_Load(object sender, EventArgs e)
 {
     this.BackColor = Properties.Settings.Default.colorBackGround;
     try
     {/////////
         comboBox1.AutoCompleteMode   = AutoCompleteMode.SuggestAppend;
         comboBox1.AutoCompleteSource = AutoCompleteSource.ListItems;
         comboBox2.AutoCompleteMode   = AutoCompleteMode.SuggestAppend;
         comboBox2.AutoCompleteSource = AutoCompleteSource.ListItems;
         comboBox3.AutoCompleteMode   = AutoCompleteMode.SuggestAppend;
         comboBox3.AutoCompleteSource = AutoCompleteSource.ListItems;
         comboBox4.AutoCompleteMode   = AutoCompleteMode.SuggestAppend;
         comboBox4.AutoCompleteSource = AutoCompleteSource.ListItems;
         comboBox5.AutoCompleteMode   = AutoCompleteMode.SuggestAppend;
         comboBox5.AutoCompleteSource = AutoCompleteSource.ListItems;
         getDate1();
         ////////////
         changeLanguage();
         MessageBoxManager.Yes = "نعم";
         MessageBoxManager.No  = "الغاء";
         MessageBoxManager.Register();
         ///////
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
예제 #3
0
 // event. Click sur le boutton 'arabeToolStripMenuItem'
 private void arabeToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         if (arabeToolStripMenuItem.Checked == false)
         {
             françaisToolStripMenuItem.Checked = false;
             arabeToolStripMenuItem.Checked    = true;
             // changement de la langue à l'arabe
             ClassGlobal.cul = CultureInfo.CreateSpecificCulture("ar");
             // enregistrement de la langue actuelle
             ClassGlobal.setDefaultLanguage("ar");
             // messagesBox => RightToLeft
             ClassGlobal.msgBoxOptions = MessageBoxOptions.RightAlign | MessageBoxOptions.RtlReading;
             // messagesBox buttons text
             MessageBoxManager.Yes = ClassGlobal.resManager.GetString("MessageBox_YES", ClassGlobal.cul);
             MessageBoxManager.No  = ClassGlobal.resManager.GetString("MessageBox_NO", ClassGlobal.cul);
             MessageBoxManager.Register();
             // main form => RightToLeft
             this.RightToLeft = RightToLeft.Yes;
             // modification du texte des controls
             switchLanguage();
             // on informe les fenêtres enfants
             this.OnLanguageChanged(sender, e);
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, ClassGlobal.AppName, MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, ClassGlobal.msgBoxOptions);
     }
 }
예제 #4
0
 // event. Click sur le boutton 'françaisToolStripMenuItem'
 private void françaisToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         if (françaisToolStripMenuItem.Checked == false)
         {
             françaisToolStripMenuItem.Checked = true;
             arabeToolStripMenuItem.Checked    = false;
             // changement de la langue au français
             ClassGlobal.cul = CultureInfo.CreateSpecificCulture("fr");
             // enregistrement de la langue actuelle
             ClassGlobal.setDefaultLanguage("fr");
             // messagesBox => état normal
             ClassGlobal.msgBoxOptions = new MessageBoxOptions();
             // messageBox buttons text => état normal
             MessageBoxManager.Unregister();
             // main form => état normal
             this.RightToLeft = RightToLeft.No;
             // modification du texte des controls
             switchLanguage();
             // on informe les fenêtres enfants
             this.OnLanguageChanged(sender, e);
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, ClassGlobal.AppName, MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, ClassGlobal.msgBoxOptions);
     }
 }
예제 #5
0
 private void btnInitFlightDir_Click(object sender, RoutedEventArgs e)
 {
     if (!autoFplDirectActive) //AutoNAV not active. Turn it on.
     {
         getAPState();
         if (pFplState == null || pFplState.fpl == null)
         {
             MessageBoxManager
             .GetMessageBoxStandardWindow("Info",
                                          "Must get or set FPL first.",
                                          ButtonEnum.Ok, Icon.Info)
             .Show();
         }
         else if (pFplState.fpl.Waypoints.Length > 0)
         {
             //updateAutoNav(pAircraftState);
             autoFplDirectActive       = true;
             _lblFmsState.Text         = "AutoNAV Enabled";
             _lblFmsState.Foreground   = Brushes.DarkGreen;
             _btnInitFlightDir.Content = "Disable AutoNAV";
         }
     }
     else //AutoNav running. Turn it off.
     {
         autoFplDirectActive       = false;
         _lblFmsState.Text         = "AutoNAV Disabled";
         _lblFmsState.Foreground   = Brushes.Red;
         _btnInitFlightDir.Content = "Enable AutoNAV";
     }
 }
        private void btn_remove_Click(object sender, EventArgs e)
        {
            testdata();

            MessageBoxManager.Yes = "نعم";
            MessageBoxManager.No  = "لا";
            MessageBoxManager.Register();
            DialogResult dr = MessageBox.Show("هل أنت متأكد من الحذف ؟؟", "تنبيه", MessageBoxButtons.YesNo);

            MessageBoxManager.Unregister();
            if (dr == DialogResult.Yes)
            {
                if (cn.State == ConnectionState.Closed)
                {
                    cn.Open();
                }

                int id;
                id = int.Parse(dataGridView1.SelectedRows[0].Cells[0].Value.ToString());
                co.deleteAdversaire_cause(id);
                getDataTable();
                ma.getDataTable();
                vider_champ();
                txb_searsh.Clear();
                history.AddHistory(" ادارة الخصوم", "الحدف", txb_name.Text);
                cn.Close();
            }
            else
            {
            }
        }
예제 #7
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            CPassword.GetRegistrationInfo();

            InitLocaleInfo();

            MessageBoxManager.Register();

            _xmlWrapper.LoadXml();

            Logger.Write(String.Format("File LoadXml Operation Starts : {0} {1}{2}",
                                       DateTime.Now.ToLongDateString(),
                                       DateTime.Now.ToLongTimeString(),
                                       "\r\n\t=========================================================\r\n"));


            if (CPassword.Verify())
            {
                miRegistration.Visible = false;
            }

            _portReader.NotificationReadReady     += PortReader_NotificationReadReady;
            _portReader.NotificationFinishedReady += PortReader_NotificationFinishedReady;
            _portReader.TelephoneReadReady        += PortReader_TelephoneReadReady;
            _portReader.TelephoneFinishedReady    += PortReader_TelephoneFinishedReady;

            CountryFilterDataBind();
            GroupFilterDataBind();
        }
예제 #8
0
        private void tsmiPregledMjesta_Click(object sender, EventArgs e)
        {
            MessageBoxManager.Unregister();
            PregledMjestaForma pregledMjesta = new PregledMjestaForma(this, tsslStatusnaLabela);

            pregledMjesta.ShowDialog();
        }
예제 #9
0
    private void imageLoadedCallback(Stream stream, bool succeeded)
    {
        //enableButtons();
        MessageBoxManager.Show("Image Status", "Image Loaded: " + succeeded);
        if (!succeeded)
        {
            if (stream != null)
            {
                stream.Dispose();
            }
            return;
        }

        try
        {
            var data = new byte[stream.Length];
            stream.Read(data, 0, data.Length);
            var newImage = new Texture2D(4, 4);
            newImage.LoadImage(data);
            newImage.Apply();
            ReignImage.sprite = Sprite.Create(newImage, new Rect(0, 0, newImage.width, newImage.height), new Vector2(.5f, .5f));
        }
        catch (Exception e)
        {
            MessageBoxManager.Show("Error", e.Message);
        }
        finally
        {
            // NOTE: Make sure you dispose of this stream !!!
            if (stream != null)
            {
                stream.Dispose();
            }
        }
    }
예제 #10
0
        //
        //
        //session
        //
        //add session
        public void add_session(Session c)
        {
            if (cn.State == ConnectionState.Closed)
            {
                cn.Open();
            }
            SqlTransaction tx = cn.BeginTransaction();

            try
            {
                SqlCommand   cmd = new SqlCommand("insert into sessione(date_session,id_cause,decision)values(@b,@z,@e)", cn);
                SqlParameter p1  = new SqlParameter("@b", c.Date_session);
                SqlParameter p2  = new SqlParameter("@z", c.Id_cause);
                SqlParameter p3  = new SqlParameter("@e", c.Decision);
                cmd.Parameters.Add(p1);
                cmd.Parameters.Add(p2);
                cmd.Parameters.Add(p3);

                cmd.Transaction = tx;
                cmd.ExecuteNonQuery();
                tx.Commit();
                cn.Close();
                MessageBoxManager.OK = "حسنا";
                MessageBoxManager.Register();
                DialogResult dr = MessageBox.Show("تمت الإضافة بنجاح", "", MessageBoxButtons.OK);
                MessageBoxManager.Unregister();
                //MessageBox.Show("تمت الإضافة بنجاح");
            }
            catch (Exception e)
            {
                tx.Rollback();
                MessageBox.Show(e.Message);
            }
        }
예제 #11
0
        private DialogResult PromptToDeleteForChangedHash(Merge merge, string modFilePath, string modName)
        {
            var msg =
                $"The '{modName}' {(merge.IsBundleContent ? "bundle" : "version of the following file")} " +
                "is different from when it was used in a merge, perhaps because the mod has been updated.\n\n" +
                $"This file has changed:\n\n{modFilePath}\n\n" +
                $"This merge is affected:\n\n{merge.RelativePath}\n        " +
                string.Join("\n        ", merge.Mods.Select(mod => mod.Name)) + "\n\n";

            msg += merge.IsBundleContent
                ? "Delete this affected merge & repack the merged bundle?"
                : "Delete this affected merge?";

            MessageBoxManager.Cancel = "Ne&ver";
            MessageBoxManager.Register();

            var choice = MessageBox.Show(
                msg,
                "Merged Mod File Changed",
                MessageBoxButtons.YesNoCancel,
                MessageBoxIcon.Exclamation);

            MessageBoxManager.Unregister();
            return(choice);
        }
예제 #12
0
        private static void Main(string[] args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            DevExpress.Skins.SkinManager.Default.RegisterAssembly(typeof(DevExpress.UserSkins.QASkinV1).Assembly);

            MessageBoxManager.Register();

            //Initialize();



            if (Debugger.IsAttached)
            {
                Run(args);
            }
            else
            {
                try
                {
                    Run(args);
                }
                catch (Exception ex)
                {
                    ShowException(ex);
                }
            }
        }
예제 #13
0
        private void button1_Click(object sender, EventArgs e)
        {
            MessageBoxManager.Yes    = "AFH";
            MessageBoxManager.No     = "SF";
            MessageBoxManager.Cancel = "Cancel";
            MessageBoxManager.Register();
            DialogResult answer = MessageBox.Show(res_man.GetString("AboutForm_DownloadUpdate_Server", cul) + " \n*Android File Host (AFH) \n*SourceForge (SF)",
                                                  "Moto_Boot_Logo_Maker " + res_man.GetString("AboutDownloadUpdateServerTitle", cul), MessageBoxButtons.YesNoCancel, MessageBoxIcon.Information);

            switch (answer)
            {
            case DialogResult.Yes:
                InternetCheck.CheckInternetProcessStart("https://androidfilehost.com/?w=files&flid=323184");
                MessageBoxManager.Unregister();
                this.Close();
                break;

            case DialogResult.No:
                InternetCheck.CheckInternetProcessStart("https://sourceforge.net/projects/motobootlogomaker/files/PORTABLE/");
                MessageBoxManager.Unregister();
                this.Close();
                break;

            case DialogResult.Cancel:
                MessageBoxManager.Unregister();
                return;
            }
            MessageBoxManager.Unregister();
        }
예제 #14
0
        /// <summary>
        /// Command callback.
        /// Called to navigate to a category.
        /// </summary>
        /// <param name="selectedCategory">Value selected.</param>
        private async void OnCategorySelection(SettingsCategoryEnum selectedCategory)
        {
            if (selectedCategory == _currentCategory)
            {
                return;
            }

            if (ContentViewModel.IsChangePending)
            {
                var result = await MessageBoxManager.GetMessageBoxStandardWindow(new MessageBoxStandardParams
                {
                    ContentTitle      = "Pending changes",
                    ContentMessage    = $"Some changes were not saved{Environment.NewLine}Do you want to save them?",
                    ButtonDefinitions = ButtonEnum.YesNoCancel,
                    Icon = Icon.Info,
                }).ShowDialog(NavigationActor.Instance.MainWindow);

                switch (result)
                {
                case ButtonResult.Yes:
                    OnSaveSettings();
                    break;

                case ButtonResult.Cancel:
                    return;     // Do not navigate on cancel.
                }
            }

            Navigate(selectedCategory);
        }
예제 #15
0
        private void btn_ajouter_Click(object sender, EventArgs e)
        {
            try
            {
                if (txb_name.Text == "")
                {
                    MessageBoxManager.OK = "حسنا";
                    MessageBoxManager.Register();
                    DialogResult dr = MessageBox.Show("المرجو ملئ الحقل المخصص بالاسم", "", MessageBoxButtons.OK);
                    MessageBoxManager.Unregister();
                }
                //else
                //{
                //    if (txb_genre_client.Text == "معنوي" && txb_juridique.Text == "" && txb_num_societe.Text == "" && txb_name.Text=="" && txb_tele.Text=="" && txb_adresse.Text=="")
                //    {
                //       // MessageBox.Show("المرجو ملئ الحقل المخصص لالسجل التجاري و الممثل القانوني ");
                //        MessageBoxManager.OK = "حسنا";
                //        MessageBoxManager.Register();
                //        DialogResult dr = MessageBox.Show("المرجو ملئ جميع الحقول", "", MessageBoxButtons.OK);
                //        MessageBoxManager.Unregister();
                //    }
                //    else
                //    {
                //        if (txb_genre_client.Text == "طبيعي" && (txb_cin.Text == "" || txb_name.Text=="" || txb_tele.Text=="" || txb_adresse.Text==""))
                //        {
                //           // MessageBox.Show("المرجو ملئ الحقل المخصص لرقم البطاقة الوطنية ");
                //            MessageBoxManager.OK = "حسنا";
                //            MessageBoxManager.Register();
                //            DialogResult dr = MessageBox.Show("المرجو ملئ جميع الحقول", "تنبيه", MessageBoxButtons.OK);
                //            MessageBoxManager.Unregister();
                //        }
                else
                {
                    if (cn.State == ConnectionState.Closed)
                    {
                        cn.Open();
                    }

                    client_cause c = new client_cause();
                    c.Type_client        = txb_genre_client.Text;
                    c.Cin                = txb_cin.Text;
                    c.Nom                = txb_name.Text;
                    c.Telephone          = txb_tele.Text;
                    c.Representant_legal = txb_juridique.Text;
                    c.Registre_commerce  = txb_num_societe.Text;
                    c.Adresse            = txb_adresse.Text;
                    co.add_client_cause(c);
                    getDataTable();
                    ma.getDataTable();
                    cn.Close();
                    btn_ajouter.Enabled = false;
                }
                history.AddHistory(" ادارة الموكلين", "الاضافة", txb_cin.Text);
            }

            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
예제 #16
0
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            try
            {
                if (cn.State == ConnectionState.Closed)
                {
                    cn.Open();
                }

                if (dateTimePicker2.Value < dateTimePicker1.Value)
                {
                    // MessageBox.Show("isk tcha");
                    MessageBoxManager.OK = "حسنا";

                    MessageBoxManager.Register();
                    DialogResult dr = MessageBox.Show("يجب على التاريخ الاخير ان يكون اكبر من الاخير", "تنبيه", MessageBoxButtons.OK);
                    MessageBoxManager.Unregister();
                }
                else
                {
                    cmd = new SqlCommand("select s.id_cause as[المرجع],cl.nom as[الموكل],a.nom_adv as[الخصم],c.num_cause_tribunal as [رقم القضية],c.type_cause as [نوع القضية],s.date_session as[تاريخ الجلسة],c.juge as[القاضي],s.decision as[الاجراء],c.ville as [المدينة],c.tribunal as [المحكمة] from cause c,sessione s,client_cause cl,adversaire_cause a where (s.date_session between '" + dateTimePicker1.Value.ToString() + "' and '" + dateTimePicker2.Value.ToString() + "') and s.id_cause=c.id_cause and c.id_client=cl.id_client_cause and a.id_adversaire_cause=c.id_adv  order by c.tribunal", cn);
                    ad  = new SqlDataAdapter(cmd);
                    ds  = new DataSet();
                    ad.Fill(ds, "a");
                    dataGridView1.DataSource = ds.Tables["a"];
                }

                cn.Close();
            }
            catch (Exception ee)
            {
                MessageBox.Show(ee.Message);
            }
        }
예제 #17
0
 private void tsmiOdjava_Click(object sender, EventArgs e)
 {
     this.Hide();
     MessageBoxManager.Unregister();
     loginForma.PodesiDugmad(prijavljenZaposleni);
     loginForma.Show();
 }
        private void btn_edit_Click(object sender, EventArgs e)
        {
            if (cn.State == ConnectionState.Closed)
            {
                cn.Open();
            }

            adversaire_cause cc = new adversaire_cause();

            if (txb_cin.Text == "" && txb_num_societe.Text == "")
            {
                MessageBoxManager.OK = "حسنا";
                MessageBoxManager.Register();
                DialogResult dr = MessageBox.Show("يجب إختيار السجل المراد تعديله", "", MessageBoxButtons.OK);
                MessageBoxManager.Unregister();
                //MessageBox.Show("يجب إختيار السجل المراد تعديله");
            }
            else
            {
                cc.Id_adv_cause       = int.Parse(dataGridView1.SelectedRows[0].Cells[0].Value.ToString());
                cc.Type_adversaire    = CB_genre_Adv.Text;
                cc.Cin                = txb_cin.Text;
                cc.Nom                = txb_name.Text;
                cc.Adjoint            = txt_adjoint.Text;
                cc.Representant_legal = txb_juridique.Text;
                cc.Registre_commerce  = txb_num_societe.Text;
                cc.Adresse            = txb_adresse.Text;
                co.update_adversaire_cause(cc);
                getDataTable();
                ma.getDataTable();
                vider_champ();
            }
            history.AddHistory(" ادارة الخصوم", "التعديل", txb_name.Text);
            cn.Close();
        }
예제 #19
0
        private void btnProcFolder_Click(object sender, EventArgs e)
        {
            if (fbdSelect.ShowDialog() != DialogResult.OK)
            {
                return;
            }

            MessageBoxManager.Yes = "Encrypt";
            MessageBoxManager.No  = "Decrypt";
            MessageBoxManager.Register();

            switch (MessageBox.Show(Resources.ProcessFolderPrompt, Resources.MessageBoxCaption, MessageBoxButtons.YesNoCancel))
            {
            case DialogResult.Yes:

                foreach (var f in Directory.GetFiles(fbdSelect.SelectedPath, "*", SearchOption.AllDirectories))
                {
                    lvwLoad.Items.Add(new ListViewItem(new[] { f, Resources.EncryptProperty }, 1));
                }
                break;

            case DialogResult.No:

                foreach (var f in Directory.GetFiles(fbdSelect.SelectedPath, "*", SearchOption.AllDirectories))
                {
                    lvwLoad.Items.Add(new ListViewItem(new[] { f, Resources.DecryptProperty }, 0));
                }
                break;

            case DialogResult.Cancel:
                break;
            }
            MessageBoxManager.Unregister();
        }
예제 #20
0
        /// <summary>
        /// Pop up confirm window
        /// </summary>
        /// <param name="vm"></param>
        /// <param name="confirmText"></param>
        public bool ConfirmWindow(INotifyPropertyChanged vm, string confirmText)
        {
            // Pop up dialog to require confirmation

            MessageBoxManager.Yes = TranslationService.Translate("View_Messagebox_Button_Yes")?.ToString();
            MessageBoxManager.No  = TranslationService.Translate("View_Messagebox_Button_No")?.ToString();
            MessageBoxManager.Register();

            var dialogService = ServiceLocator.Current.GetInstance <IDialogService>();

            MessageBoxResult rsl = dialogService.ShowMessageBox(vm,
                                                                confirmText,
                                                                TranslationService.Translate("View_Application_Title")?.ToString(),
                                                                MessageBoxButton.YesNo,
                                                                MessageBoxImage.Information);

            MessageBoxManager.Unregister();

            if (rsl.ToString().Equals("No"))
            {
                // cancel
                return(false);
            }

            return(true);
        }
예제 #21
0
        private void InitLocalization()
        {
            MessageBoxManager.Unregister();
            MessageBoxManager.Yes = International.GetText("Global_Yes");
            MessageBoxManager.No  = International.GetText("Global_No");
            MessageBoxManager.OK  = International.GetText("Global_OK");
            MessageBoxManager.Register();

            labelServiceLocation.Text = International.GetText("Service_Location") + ":";
            labelBitcoinAddress.Text  = International.GetText("BitcoinAddress") + ":";
            labelWorkerName.Text      = International.GetText("WorkerName") + ":";

            linkLabelVisitUs.Text         = International.GetText("Form_Main_visit_us");
            linkLabelCheckStats.Text      = International.GetText("Form_Main_check_stats");
            linkLabelChooseBTCWallet.Text = International.GetText("Form_Main_choose_bitcoin_wallet");

            // these strings are no longer used, check and use them as base
            string rateString               = International.GetText("Rate") + ":";
            string ratesBTCInitialString    = "0.00000000 BTC/" + International.GetText("Day");
            string ratesDollarInitialString = String.Format("0.00 {0}/", ConfigManager.Instance.GeneralConfig.DisplayCurrency) + International.GetText("Day");

            toolStripStatusLabelGlobalRateText.Text = International.GetText("Form_Main_global_rate") + ":";
            toolStripStatusLabelBTCDayText.Text     = "BTC/" + International.GetText("Day");
            toolStripStatusLabelBalanceText.Text    = (ConfigManager.Instance.GeneralConfig.DisplayCurrency + "/") + International.GetText("Day") + "     " + International.GetText("Form_Main_balance") + ":";

            devicesListViewEnableControl1.InitLocale();

            buttonBenchmark.Text   = International.GetText("Form_Main_benchmark");
            buttonSettings.Text    = International.GetText("Form_Main_settings");
            buttonStartMining.Text = International.GetText("Form_Main_start");
            buttonStopMining.Text  = International.GetText("Form_Main_stop");

            label_NotProfitable.Text = International.GetText("Form_Main_MINING_NOT_PROFITABLE");
            groupBox1.Text           = International.GetText("Form_Main_Group_Device_Rates");
        }
예제 #22
0
        private void simpleButton2_Click(object sender, EventArgs e)
        {
            MessageBoxManager.Yes = "نعم";
            MessageBoxManager.No  = "لا";
            MessageBoxManager.Register();
            DialogResult dr = MessageBox.Show("هل أنت متأكد من الحدف ؟؟", "تنبيه", MessageBoxButtons.YesNo);

            MessageBoxManager.Unregister();
            if (dr == DialogResult.Yes)
            {
                try
                {
                    string id = dataGridView1.CurrentRow.Cells[1].Value.ToString();
                    int    r  = order.delete(id);
                    if (r == 1)
                    {
                        MessageBox.Show("تم الحدف بنجاح");
                    }
                    else
                    {
                        MessageBox.Show("الرجاء إعادة المحاولة");
                    }
                    history.AddHistory("الأمر", "حدف", id);
                    refresh();
                }
                catch (Exception ee)
                {
                    MessageBox.Show("Error : " + ee);
                }
            }
            else
            {
            }
        }
예제 #23
0
        private async void ButtonAddGames_Click(object sender, RoutedEventArgs e)
        {
            var fileDialog = new OpenFileDialog
            {
                Title         = "Select File(s)",
                AllowMultiple = true,
                Filters       = fileFilterList
            };

            var files = await fileDialog.ShowAsync(this);

            if (files != null && files.Any())
            {
                IsBusy = true;

                var invalid = await Manager.AddGames(files);

                if (invalid.Any())
                {
                    await MessageBoxManager.GetMessageBoxStandardWindow("Ignored folders/files", string.Join(Environment.NewLine, invalid), icon : MessageBox.Avalonia.Enums.Icon.Error).ShowDialog(this);
                }

                IsBusy = false;
            }
        }
예제 #24
0
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            try
            {
                MessageBoxManager.Yes = "نعم";
                MessageBoxManager.No  = "لا";
                MessageBoxManager.Register();
                DialogResult dr = MessageBox.Show("هل أنت متأكد من الاضافة .. ؟؟", "تنبيه", MessageBoxButtons.YesNo);
                MessageBoxManager.Unregister();
                if (dr == DialogResult.Yes)
                {
                    if (cnx.State == ConnectionState.Closed)
                    {
                        cnx.Open();
                    }

                    cmd.CommandText = "insert into Paiement values(" + txb_avance.Text + ",getdate() ," + comboBox1.SelectedItem + ")";
                    cmd.Connection  = cnx;
                    cmd.ExecuteNonQuery();
                    MessageBoxManager.OK = "حسنا";
                    MessageBoxManager.Register();
                    DialogResult d = MessageBox.Show("لقد ثمث الاضافة ...  ", "تنبيه", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    cnx.Close();
                }
                else
                {
                    this.Close();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
예제 #25
0
        private void simpleButton2_Click(object sender, EventArgs e)
        {
            MessageBoxManager.Yes = "نعم";
            MessageBoxManager.No  = "لا";
            MessageBoxManager.Register();
            DialogResult dr = MessageBox.Show("هل أنت متأكد من التعديل .. ؟؟", "تنبيه", MessageBoxButtons.YesNo);

            MessageBoxManager.Unregister();
            if (dr == DialogResult.Yes)
            {
                Properties.Settings.Default.Server   = txtServerName.Text;
                Properties.Settings.Default.DataBase = txtDBName.Text;
                Properties.Settings.Default.Mode     = radioSQLAuth.Checked == true ? "SQL" : "Windows";
                Properties.Settings.Default.ID       = txtUser.Text;
                Properties.Settings.Default.PassWord = txtPass.Text;
                Properties.Settings.Default.Save();
                MessageBoxManager.OK = "حسنا";
                MessageBoxManager.Register();
                DialogResult d = MessageBox.Show("لقد ثم التعديل ", "تنبيه", MessageBoxButtons.OK, MessageBoxIcon.Information);
                MessageBoxManager.Unregister();
            }
            else
            {
                this.Close();
            }
        }
예제 #26
0
        private void ShowTaskDetail(Task task)
        {
            MessageBoxManager.Yes    = "Edit";
            MessageBoxManager.No     = "Delete";
            MessageBoxManager.Cancel = "Close";
            MessageBoxManager.Register();

            var dialogResult = MessageBox.Show(string.Format("Title: {0}\nDescription: {1}\nTime create: {2}",
                                                             task.Title, task.Description, Convert.ToDateTime(task.TimeCreate)),
                                               "Task Detail", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Information);

            MessageBoxManager.Unregister();

            if (dialogResult == DialogResult.Yes)
            {
                EditTask(task);
            }
            else if (dialogResult == DialogResult.No)
            {
                var confirmResult = MessageBox.Show("Do you want to delete this task?", "Warning",
                                                    MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
                if (confirmResult == DialogResult.Yes)
                {
                    DeleteTask(task.Id);
                }
            }
        }
예제 #27
0
        private void InitLocalization()
        {
            MessageBoxManager.Unregister();
            MessageBoxManager.Yes    = International.GetText("Global_Yes");
            MessageBoxManager.No     = International.GetText("Global_No");
            MessageBoxManager.OK     = International.GetText("Global_OK");
            MessageBoxManager.Cancel = International.GetText("Global_Cancel");
            MessageBoxManager.Retry  = International.GetText("Global_Retry");
            MessageBoxManager.Register();

            labelServiceLocation.Text = International.GetText("Service_Location") + ":";
            labelBitcoinAddress.Text  = International.GetText("BitcoinAddress") + ":";
            labelWorkerName.Text      = International.GetText("WorkerName") + ":";

            linkLabelCheckStats.Text      = International.GetText("Form_Main_check_stats");
            linkLabelChooseBTCWallet.Text = International.GetText("Form_Main_choose_bitcoin_wallet");

            toolStripStatusLabelGlobalRateText.Text = International.GetText("Form_Main_global_rate") + ":";
            toolStripStatusLabelBTCDayText.Text     = "BTC/" + International.GetText("Day");
            toolStripStatusLabelBalanceText.Text    = (ExchangeRateAPI.ActiveDisplayCurrency + "/") + International.GetText("Day") + "     " + International.GetText("Form_Main_balance") + ":";

            devicesListViewEnableControl1.InitLocale();

            buttonBenchmark.Text   = International.GetText("Form_Main_benchmark");
            buttonSettings.Text    = International.GetText("Form_Main_settings");
            buttonStartMining.Text = International.GetText("Form_Main_start");
            buttonStopMining.Text  = International.GetText("Form_Main_stop");
            buttonHelp.Text        = International.GetText("Form_Main_help");

            label_NotProfitable.Text = International.GetText("Form_Main_MINING_NOT_PROFITABLE");
            groupBox1.Text           = International.GetText("Form_Main_Group_Device_Rates");
        }
예제 #28
0
        void FormHelpers.ICustomTranslate.CustomTranslate()
        {
            MessageBoxManager.Unregister();
            MessageBoxManager.Yes    = Tr("&Yes");
            MessageBoxManager.No     = Tr("&No");
            MessageBoxManager.OK     = Tr("&OK");
            MessageBoxManager.Cancel = Tr("&Cancel");
            MessageBoxManager.Retry  = Tr("&Retry");
            MessageBoxManager.Register();

            //??? doesn't get translated if we don't translate it directly????
            toolStripStatusLabelGlobalRateText.Text = Tr("Global rate:");
            toolStripStatusLabelBTCDayText.Text     =
                "BTC/" + Tr(ConfigManager.GeneralConfig.TimeUnit.ToString());
            toolStripStatusLabelBalanceText.Text = RatesAndStatsStates.Instance.LabelBalanceText;

            devicesListViewEnableControl1.InitLocale();

            // this one here is probably redundant
            labelDemoMode.Text = Tr("{0} is running in DEMO mode!", NHMProductInfo.Name);
            toolTip1.SetToolTip(labelDemoMode, Tr("You have not entered a bitcoin address. {0} will start mining in DEMO mode. In the DEMO mode, you can test run the miner and be able see how much you can earn using your computer. Would you like to continue in DEMO mode?\n\nDISCLAIMER: YOU WILL NOT EARN ANYTHING DURING DEMO MODE!", NHMProductInfo.Name));

            SetToolTip(Tr("User's bitcoin address for mining."),
                       textBoxBTCAddress, labelBitcoinAddress);

            SetToolTip(Tr("To identify the user's computer."),
                       textBoxWorkerName, labelWorkerName);

            SetToolTip(Tr("Sets the mining location. Choosing Hong Kong or Tokyo will add extra latency."),
                       comboBoxLocation, labelServiceLocation);
        }
예제 #29
0
 private void btn_remove_Click(object sender, EventArgs e)
 {
     if (dataGridView1.Rows.Count == 0)
     {
         MessageBox.Show("الجدول غير ممتلئ");
     }
     else
     {
         MessageBoxManager.Yes = "نعم";
         MessageBoxManager.No  = "لا";
         MessageBoxManager.Register();
         DialogResult dr = MessageBox.Show("هل أنت متأكد من الحدف ؟؟", "تنبيه", MessageBoxButtons.YesNo);
         MessageBoxManager.Unregister();
         if (dr == DialogResult.Yes && dataGridView1.Rows.Count > 0)
         {
             client_order c = client_order.findById((int)dataGridView1.CurrentRow.Cells[0].Value);
             c.delete();
             history.AddHistory("موكلي الأمر", "حدف", dataGridView1.CurrentRow.Cells[0].Value.ToString());
             MessageBox.Show("تم الحذف بنجاح");
             refresh();
         }
         else
         {
         }
     }
 }
예제 #30
0
 private void NarudzbaForma_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (e.CloseReason == CloseReason.UserClosing)
     {
         if (!btnKreiratiNarudzbu.Enabled)
         {
             if (DialogResult.Yes == MessageBox.Show("Otvorena narudžba će biti poništena zatvaranjem aplikacije! Da li želite zatvoriti aplikaciju?", "Upozorenje", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button2))
             {
                 PonistiKreiranuNarudzbu();
                 MessageBoxManager.Unregister();
                 menadzerForma.PodesiDugmad();
                 this.Close();
             }
             else
             {
                 e.Cancel = true;
             }
         }
         else
         {
             if (brojacNarudzbi == 1)
             {
                 statusnaLabela.Text = "Narudžba je kreirana;";
             }
             else
             {
                 statusnaLabela.Text = "Narudžbe su kreirane;";
             }
             MessageBoxManager.Unregister();
             menadzerForma.PodesiDugmad();
             this.Close();
         }
     }
 }
예제 #31
0
 private void btn_ajouter_Click(object sender, EventArgs e)
 {
     if (txt_decision.Text == "" || cb_id_cause.Text == "")
     {
         MessageBoxManager.OK = "حسنا";
         MessageBoxManager.Register();
         DialogResult dr = MessageBox.Show("المرجو ملئ جميع الحقول", "تنبيه", MessageBoxButtons.OK);
         MessageBoxManager.Unregister();
     }
     else
     {
         try
         {
             //cn.Open();
             Session se = new Session();
             se.Date_session = dateTimePicker1.Value;
             se.Decision     = txt_decision.Text;
             se.Id_cause     = cb_id_cause.Text;
             co.add_session(se);
             getdata();
             history.AddHistory("الجلسات", "الاضافة", cb_id_cause.Text);
             //cn.Close();
         }
         catch (Exception ex)
         {
             MessageBox.Show(ex.Message);
         }
     }
 }
	public static void Show(MessageBoxManager messageBox, CallbackMethod callback)
	{
		MessageBoxManager.callback = callback;
		messageBox.gameObject.SetActive(true);
	}