示例#1
0
        /// <summary>
        /// Executed when a version is selected in the dropdown. Loads the version selected
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void barButtonItemVersionList_ItemClick(object sender, ItemClickEventArgs e)
        {
            SplashForm.ShowSplashScreen();
            bool   success   = false;
            string selName   = "";
            string selection = "";

            try
            {
                BarManager barManager = sender as BarManager;
                selection = barManager.PressedLink.Item.Caption;
                selName   = barManager.PressedLink.Item.Name;

                success = form1.LoadRiotDataFromFile(selName);
                if (!success)
                {
                    success = form1.DataCollection(selName);
                }
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show(ex.ToString());
            }

            if (success)
            {
                //Performs the update to all tabes
                form1.UpdateFormWithData(false);                 //Won't recreate the version drop down list

                ClearSelectionsFromOldVersion();


                //Update dropdown
                dropDownButtonRiotVersion.Text = selection;
            }
            SplashForm.CloseForm();
        }