Exemplo n.º 1
0
 public PackBrowser(string filename)
 {
     // Set PrgressDialog
     this.pd = new ProgressDialog(this.Handle);
     this.pd.Title = this.Name;
     this.pd.Caption = Properties.Resources.Str_Initialize;
     this.pd.Animation = 151;
     this.pd.ShowDialog();
     InitializeComponent();
     this.PackFile = filename;
     this.w = new Worker(false);
     this.d = new Dialogs();
     this.isVista = (Environment.OSVersion.Version.Major >= 6) ? true : false;
 }
Exemplo n.º 2
0
        public MainWindow()
        {
            InitializeComponent();
            OperatingSystem osInfo = Environment.OSVersion;
            this.isVista = (osInfo.Version.Major >= 6) ? true : false;
            this.env = new MabiEnvironment(Properties.Resources.Uri_PatchTxt);
            this.d = new Dialogs();
            this.w = new Worker();
            this.PackageDir = this.env.MabinogiDir + "\\Package";
            this.MabiVer = (int)this.env.LocalVersion;
            this.Text = AssemblyProduct + String.Format(" v.{0}", AssemblyVersion);
            this.filter = Properties.Resources.PackFileDesc + "(*.pack)|";
            String PackageDir = (Properties.Settings.Default.LastPackFile != "") ?
                Properties.Settings.Default.LastPackFile :
                this.PackageDir;
            if (isVista){
                GlassExtensions.HookGlassRender(InputDir);
                GlassExtensions.HookGlassRender(SaveAs);
                GlassExtensions.HookGlassRender(Level);
                //new GlassRenderer(Level, 0, 0);
                GlassExtensions.HookGlassRender(PackageVersion);
                GlassExtensions.HookGlassRender(OpenPack);
                GlassExtensions.HookGlassRender(ExtractTo);
            }
            #region Init Pack Tab
            PackageVersion.Minimum = this.MabiVer;
            PackageVersion.Value = Int32.Parse(DateTime.Today.ToString("yyMMdd"));
            uCurrentVer.Text = String.Format("(Current:{0} / Server:{1})", env.LocalVersion, env.Version);
            SaveAs.Text = env.MabinogiDir+"\\Package\\custom-" + PackageVersion.Value.ToString() + ".pack";
            Level.SelectedIndex = 0;
            #endregion
            #region Init Unpack Tab

            string path = System.IO.Path.GetDirectoryName(Application.ExecutablePath);
            ExtractTo.Text = path;
            #endregion
            #region Init About Tab
            labelProductName.Text = AssemblyProduct;
            labelVersion.Text = String.Format("v.{0}", AssemblyVersion);
            labelCopyright.Text = AssemblyCopyright;
            labelDescription.Text = AssemblyDescription;
            #endregion
        }