コード例 #1
0
ファイル: FileLoader.cs プロジェクト: vulcant/Legends-Viewer
        public FileLoader(frmLegendsViewer form, Button xmlButton, TextBox xmlText, Button historyButton, TextBox historyText, Button sitesButton, TextBox sitesText, Button mapButton, TextBox mapText, Label statusLabel, RichTextBox logText)
        {
            Form = form;
            XMLButton = xmlButton;
            XMLText = xmlText;
            HistoryButton = historyButton;
            HistoryText = historyText;
            SitesButton = sitesButton;
            SitesText = sitesText;
            MapButton = mapButton;
            MapText = mapText;
            StatusLabel = statusLabel;
            LogText = logText;

            XMLState = HistoryState = SitesState = MapState = FileState.Default;

            XMLButton.Click += XMLClick;
            HistoryButton.Click += HistoryClick;
            SitesButton.Click += SitesClick;
            MapButton.Click += MapClick;

            ExtractedFiles = new List<string>();

            if (Environment.Is64BitProcess)
                SevenZip.SevenZipExtractor.SetLibraryPath("7z64.dll");
        }
コード例 #2
0
ファイル: FileLoader.cs プロジェクト: karv/Legends-Viewer
        public FileLoader(frmLegendsViewer form, Button xmlButton, TextBox xmlText, Button historyButton, TextBox historyText, Button sitesButton, TextBox sitesText, Button mapButton, TextBox mapText, Label statusLabel, RichTextBox logText)
        {
            Form          = form;
            XMLButton     = xmlButton;
            XMLText       = xmlText;
            HistoryButton = historyButton;
            HistoryText   = historyText;
            SitesButton   = sitesButton;
            SitesText     = sitesText;
            MapButton     = mapButton;
            MapText       = mapText;
            StatusLabel   = statusLabel;
            LogText       = logText;

            XMLState = HistoryState = SitesState = MapState = FileState.Default;

            XMLButton.Click     += XMLClick;
            HistoryButton.Click += HistoryClick;
            SitesButton.Click   += SitesClick;
            MapButton.Click     += MapClick;

            ExtractedFiles = new List <string>();

            if (Environment.Is64BitProcess)
            {
                SevenZip.SevenZipExtractor.SetLibraryPath("7z64.dll");
            }
        }
コード例 #3
0
        public FileLoader(frmLegendsViewer form, Button xmlButton, TextBox xmlText, Button historyButton, TextBox historyText, Button sitesButton, TextBox sitesText, Button mapButton, TextBox mapText, Label statusLabel, RichTextBox logText)
        {
            Form          = form;
            XMLButton     = xmlButton;
            XMLText       = xmlText;
            HistoryButton = historyButton;
            HistoryText   = historyText;
            SitesButton   = sitesButton;
            SitesText     = sitesText;
            MapButton     = mapButton;
            MapText       = mapText;
            StatusLabel   = statusLabel;
            LogText       = logText;

            XMLState = HistoryState = SitesState = MapState = FileState.Default;

            XMLButton.Click     += XMLClick;
            HistoryButton.Click += HistoryClick;
            SitesButton.Click   += SitesClick;
            MapButton.Click     += MapClick;

            ExtractedFiles = new List <string>();

            if (Environment.Is64BitProcess)
            {
                SevenZipBase.SetLibraryPath("7z64.dll");
            }

            try
            {
                var assembly     = Assembly.GetExecutingAssembly();
                var resourceName = "LegendsViewer.Controls.HTML.Styles.legends.css";
                using (Stream stream = assembly.GetManifestResourceStream(resourceName))
                    using (StreamReader reader = new StreamReader(stream))
                    {
                        Controls.HTMLPrinter.LegendsCSS = reader.ReadToEnd();
                    }
                var chartjsName = "LegendsViewer.Controls.HTML.Scripts.Chart.min.js";
                using (Stream stream = assembly.GetManifestResourceStream(chartjsName))
                    using (StreamReader reader = new StreamReader(stream))
                    {
                        Controls.HTMLPrinter.ChartJS = reader.ReadToEnd();
                    }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
            }
        }
コード例 #4
0
ファイル: FileLoader.cs プロジェクト: 22367rh/Legends-Viewer
        public FileLoader(frmLegendsViewer form, Button xmlButton, TextBox xmlText, Button historyButton, TextBox historyText, Button sitesButton, TextBox sitesText, Button mapButton, TextBox mapText, Label statusLabel, RichTextBox logText)
        {
            Form = form;
            XMLButton = xmlButton;
            XMLText = xmlText;
            HistoryButton = historyButton;
            HistoryText = historyText;
            SitesButton = sitesButton;
            SitesText = sitesText;
            MapButton = mapButton;
            MapText = mapText;
            StatusLabel = statusLabel;
            LogText = logText;

            XMLState = HistoryState = SitesState = MapState = FileState.Default;

            XMLButton.Click += XMLClick;
            HistoryButton.Click += HistoryClick;
            SitesButton.Click += SitesClick;
            MapButton.Click += MapClick;

            ExtractedFiles = new List<string>();
        }
コード例 #5
0
ファイル: FileLoader.cs プロジェクト: figment/Legends-Viewer
        public FileLoader(frmLegendsViewer form, Button xmlButton, TextBox xmlText, Button historyButton, TextBox historyText, Button sitesButton, TextBox sitesText, Button mapButton, TextBox mapText, Label statusLabel, RichTextBox logText)
        {
            Form = form;
            XMLButton = xmlButton;
            XMLText = xmlText;
            HistoryButton = historyButton;
            HistoryText = historyText;
            SitesButton = sitesButton;
            SitesText = sitesText;
            MapButton = mapButton;
            MapText = mapText;
            StatusLabel = statusLabel;
            LogText = logText;

            XMLState = HistoryState = SitesState = MapState = FileState.Default;

            XMLButton.Click += XMLClick;
            HistoryButton.Click += HistoryClick;
            SitesButton.Click += SitesClick;
            MapButton.Click += MapClick;

            ExtractedFiles = new List<string>();

            if (Environment.Is64BitProcess)
                SevenZipBase.SetLibraryPath("7z64.dll");

            try
            {
                var assembly = Assembly.GetExecutingAssembly();
                var resourceName = "LegendsViewer.Controls.HTML.Styles.legends.css";
                using (Stream stream = assembly.GetManifestResourceStream(resourceName))
                using (StreamReader reader = new StreamReader(stream))
                {
                    Controls.HTMLPrinter.LegendsCSS = reader.ReadToEnd();
                }
                var chartjsName = "LegendsViewer.Controls.HTML.Scripts.Chart.min.js";
                using (Stream stream = assembly.GetManifestResourceStream(chartjsName))
                using (StreamReader reader = new StreamReader(stream))
                {
                    Controls.HTMLPrinter.ChartJS = reader.ReadToEnd();
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
            }
        }