コード例 #1
0
        public static void Install(string folderPath, Percentage.SetHandler SetPercent, bool overwrite, bool graphical)
        {
            Percentage perc = new Percentage(SetPercent);

            perc.SetTotal(0);

            perc.NextLimit = 0.1;

            try
            {
                AIVChange.DoChange(folderPath, overwrite, graphical);
            } catch (IOException) {
                Debug.Show(Localization.Get("install_abort_io"));
                return;
            } catch (Exception)
            {
                Debug.Show(Localization.Get("install_abort"));
                return;
            }
            perc.Set(1.0);

            DoChanges(folderPath, perc);

            perc.SetTotal(1);
        }
コード例 #2
0
 public override void InitUI()
 {
     base.InitUI();
     if (this.IsChecked)
     {
         activeChange = this;
     }
 }
コード例 #3
0
        protected override void TitleBox_Unchecked(object sender, RoutedEventArgs e)
        {
            base.TitleBox_Unchecked(sender, e);

            if (activeChange == this)
            {
                activeChange = null;
            }
        }
コード例 #4
0
        protected override void TitleBox_Checked(object sender, RoutedEventArgs e)
        {
            base.TitleBox_Checked(sender, e);

            if (activeChange != null)
            {
                activeChange.IsChecked = false;
            }

            activeChange = this;
        }
コード例 #5
0
ファイル: Patcher.cs プロジェクト: PodeCaradox/UCP-New-GUI
        public static void Install(string folderPath, Percentage.SetHandler SetPercent)
        {
            Percentage perc = new Percentage(SetPercent);

            perc.SetTotal(0);

            perc.NextLimit = 0.1;
            AIVChange.DoChange(folderPath);
            perc.Set(1.0);

            DoChanges(folderPath, perc);

            perc.SetTotal(1);
        }
コード例 #6
0
ファイル: Patcher.cs プロジェクト: PodeCaradox/UCP-New-GUI
 public static void RestoreOriginals(string dir)
 {
     RestoreBinary(dir, CrusaderExe);
     RestoreBinary(dir, XtremeExe);
     AIVChange.Restore(dir);
 }