コード例 #1
0
        public frmLegendsViewer(string file = "")
        {
            InitializeComponent();
            FileLoader          = new LegendsViewer.FileLoader(this, btnXML, txtXML, btnHistory, txtHistory, btnSitePops, txtSitePops, btnMap, txtMap, lblStatus, txtLog);
            EventTabs           = new TabPage[] { tpHFEvents, tpSiteEvents, tpRegionEvents, tpURegionEvents, tpCivEvents, tpWarEvents, tpBattlesEvents, tpConqueringsEvents, tpEraEvents, tpBeastAttackEvents, tpArtifactsEvents };
            tcWorld.Height      = ClientSize.Height;
            btnBack.Location    = new Point(tcWorld.Right + 3, 3);
            btnForward.Location = new Point(btnBack.Right + 3, 3);
            Browser             = new DwarfTabControl(world);
            Browser.Location    = new Point(tcWorld.Right, btnBack.Bottom + 3);
            Browser.Size        = new Size(ClientSize.Width - Browser.Left, ClientSize.Height - Browser.Top);
            Browser.Anchor      = (AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Right);
            Controls.Add(Browser);
            foreach (TabPage tp in tcWorld.TabPages)
            {
                foreach (TabControl tabControl in tp.Controls.OfType <TabControl>())
                {
                    HideTabControlBorder(tabControl);
                }
            }
            if (file != "")
            {
                CommandFile = file;
            }

            hint.SetToolTip(chkFilterWarfare, "Unnotable Battle = Attackers outnumber defenders 10 to 1 and win and suffer < 10% losses. \nUnnotable Conquering = All Pillagings.");
        }
コード例 #2
0
        public frmLegendsViewer(string file = "")
        {
            InitializeComponent();

            System.Reflection.Assembly assembly = System.Reflection.Assembly.GetExecutingAssembly();
            FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(assembly.Location);
            version = fvi.FileVersion;

            Text = "Legends Viewer";
            lblVersion.Text = "v" + version;
            FileLoader = new FileLoader(this, btnXML, txtXML, btnHistory, txtHistory, btnSitePops, txtSitePops, btnMap, txtMap, lblStatus, txtLog);
            EventTabs = new TabPage[] { tpHFEvents, tpSiteEvents, tpRegionEvents, tpURegionEvents, tpCivEvents, tpWarEvents, tpBattlesEvents, tpConqueringsEvents, tpEraEvents, tpBeastAttackEvents, tpArtifactsEvents };
            tcWorld.Height = ClientSize.Height;
            btnBack.Location = new Point(tcWorld.Right + 3, 3);
            btnForward.Location = new Point(btnBack.Right + 3, 3);
            Browser = new DwarfTabControl(world);
            Browser.Location = new Point(tcWorld.Right, btnBack.Bottom + 3);
            Browser.Size = new Size(ClientSize.Width - Browser.Left , ClientSize.Height - Browser.Top);
            Browser.Anchor = (AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Right);
            Controls.Add(Browser);
            foreach (TabPage tp in tcWorld.TabPages)
                foreach (TabControl tabControl in tp.Controls.OfType<TabControl>())
                    HideTabControlBorder(tabControl);
            if (file != "")
                CommandFile = file;

            hint.SetToolTip(chkFilterWarfare, "Unnotable Battle = Attackers outnumber defenders 10 to 1 and win and suffer < 10% losses. \nUnnotable Conquering = All Pillagings.");
        }
コード例 #3
0
        public FrmLegendsViewer(string file = "")
        {
            InitializeComponent();

            // Start local http server
            LocalFileProvider.Run();

            Coordinator = new LvCoordinator(this);

            FileLoader            = summaryTab1.CreateLoader();
            FileLoader.AfterLoad += (sender, args) => AfterLoad(args.Arg);

            Assembly        assembly = Assembly.GetExecutingAssembly();
            FileVersionInfo fvi      = FileVersionInfo.GetVersionInfo(assembly.Location);

            _version = fvi.FileVersion;
            var versionNumbers = _version.Split('.');

            if (versionNumbers.Length > 3)
            {
                _version = $"{versionNumbers[0]}.{versionNumbers[1]}.{versionNumbers[2]}";
            }

            Text            = "Legends Viewer";
            lblVersion.Text = "v" + _version;
            lblVersion.Left = scWorld.Panel2.ClientSize.Width - lblVersion.Width - 3;
            tcWorld.Height  = scWorld.Panel2.ClientSize.Height;

            Browser = new DwarfTabControl(World)
            {
                Location = new Point(0, btnBack.Bottom + 3)
            };
            Browser.Size   = new Size(scWorld.Panel2.ClientSize.Width - Browser.Left, scWorld.Panel2.ClientSize.Height - Browser.Top);
            Browser.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Right;
            scWorld.Panel2.Controls.Add(Browser);
            foreach (TabPage tp in tcWorld.TabPages)
            {
                foreach (TabControl tabControl in tp.Controls.OfType <TabControl>())
                {
                    HideTabControlBorder(tabControl);
                }
            }

            if (file != "")
            {
                _commandFile = file;
            }

            foreach (var v in tcWorld.TabPages.OfType <TabPage>().SelectMany(x => x.Controls.OfType <BaseSearchTab>()))
            {
                v.Coordinator = Coordinator;
            }

            BrowserUtil.SetBrowserEmulationMode();
            Browser.Navigate(ControlOption.ReadMe);
        }
コード例 #4
0
ファイル: LegendsViewer.cs プロジェクト: RossM/Legends-Viewer
        public frmLegendsViewer(string file = "")
        {
            InitializeComponent();
            EventTabs = new TabPage[] { tpHFEvents, tpSiteEvents, tpRegionEvents, tpURegionEvents, tpCivEvents, tpWarEvents, tpBattlesEvents, tpConqueringsEvents, tpEraEvents, tpBeastAttackEvents };
            tcWorld.Height = ClientSize.Height;
            btnBack.Location = new Point(tcWorld.Right + 3, 3);
            btnForward.Location = new Point(btnBack.Right + 3, 3);
            Browser = new DwarfTabControl(world);
            Browser.Location = new Point(tcWorld.Right, btnBack.Bottom + 3);
            Browser.Size = new Size(ClientSize.Width - Browser.Left , ClientSize.Height - Browser.Top);
            Browser.Anchor = (AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Right);
            Controls.Add(Browser);
            foreach (TabPage tp in tcWorld.TabPages)
                foreach (TabControl tabControl in tp.Controls.OfType<TabControl>())
                    HideTabControlBorder(tabControl);
            CommandFile = file;
            if (CommandFile != "") openFiles(null, null);

            hint.SetToolTip(chkFilterWarfare, "Unnotable Battle = Attackers outnumber defenders 10 to 1 and win and suffer < 10% losses. \nUnnotable Conquering = All Pillagings.");
        }
コード例 #5
0
ファイル: ChartControl.cs プロジェクト: RossM/Legends-Viewer
 public ChartControl(World world, DwarfObject focusObject, DwarfTabControl dwarfTabControl)
 {
     World = world; FocusObject = focusObject; TabControl = dwarfTabControl;
     Title = "Chart";
     if (FocusObject != null) Title += " - " + FocusObject.ToLink(false, FocusObject);
 }