OpenFile() private method

Shows the open file dialog.
private OpenFile ( ) : void
return void
Beispiel #1
0
        public static void CreateLink(byte[] Data)
        {
            FormHexEditor ApplictionForm;

            if (!Settings.Default.UseSystemLanguage)
            {
                string l = Settings.Default.SelectedLanguage;
                Thread.CurrentThread.CurrentUICulture = new CultureInfo(l);
                Thread.CurrentThread.CurrentCulture   = CultureInfo.CreateSpecificCulture(l);
            }



            ApplictionForm = new FormHexEditor();

            string _dumpDirectory = Path.Combine(AssemblyDirectory, "G1zDumps");

            if (!Directory.Exists(_dumpDirectory))
            {
                Directory.CreateDirectory(_dumpDirectory);
            }

            string _filename = Path.Combine(_dumpDirectory, Guid.NewGuid().ToString() + ".g1z");


            File.WriteAllBytes(_filename, Data);

            ApplictionForm.OpenFile(_filename);

            ApplictionForm.Show();
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            if (!Settings.Default.UseSystemLanguage)
            {
                string l = Settings.Default.SelectedLanguage;
                Thread.CurrentThread.CurrentUICulture = new CultureInfo(l);
                Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(l);
            }

            FormHexEditor = new FormHexEditor();
            if (args.Length > 0 && System.IO.File.Exists(args[0]))
                FormHexEditor.OpenFile(args[0]);
            Application.Run(FormHexEditor);
        }
Beispiel #3
0
        static void Main(string[] args)
        {
            if (!Settings.Default.UseSystemLanguage)
            {
                string l = Settings.Default.SelectedLanguage;
                Thread.CurrentThread.CurrentUICulture = new CultureInfo(l);
                Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(l);
            }

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            ApplictionForm = new FormHexEditor();
            if (args.Length > 0 && System.IO.File.Exists(args[0]))
                ApplictionForm.OpenFile(args[0]);
            Application.Run(ApplictionForm);
        }