Exemplo n.º 1
0
        public FormFleet( FormMain parent, int fleetID )
        {
            InitializeComponent();

            FleetID = fleetID;
            Utility.SystemEvents.UpdateTimerTick += UpdateTimerTick;

            ConfigurationChanged();

            MainFontColor = Color.FromArgb( 0x00, 0x00, 0x00 );
            SubFontColor = Color.FromArgb( 0x88, 0x88, 0x88 );

            //ui init

            ControlHelper.SetDoubleBuffered( TableFleet );
            ControlHelper.SetDoubleBuffered( TableMember );

            TableFleet.Visible = false;
            TableFleet.SuspendLayout();
            TableFleet.BorderStyle = BorderStyle.FixedSingle;
            ControlFleet = new TableFleetControl( this, TableFleet );
            TableFleet.ResumeLayout();

            TableMember.SuspendLayout();
            ControlMember = new TableMemberControl[6];
            for ( int i = 0; i < ControlMember.Length; i++ ) {
                ControlMember[i] = new TableMemberControl( this, TableMember, i );
            }
            TableMember.ResumeLayout();

            ConfigurationChanged();		//fixme: 苦渋の決断

            Icon = ResourceManager.ImageToIcon( ResourceManager.Instance.Icons.Images[(int)ResourceManager.IconContent.FormFleet] );
        }
Exemplo n.º 2
0
        public FormCompass( FormMain parent )
        {
            InitializeComponent();

            ConfigurationChanged();

            MainFontColor = Color.FromArgb( 0x00, 0x00, 0x00 );
            SubFontColor = Color.FromArgb( 0x88, 0x88, 0x88 );

            ControlHelper.SetDoubleBuffered( BasePanel );
            ControlHelper.SetDoubleBuffered( TableEnemyFleet );
            ControlHelper.SetDoubleBuffered( TableEnemyMember );

            TableEnemyMember.SuspendLayout();
            ControlMember = new TableEnemyMemberControl[6];
            for ( int i = 0; i < ControlMember.Length; i++ ) {
                ControlMember[i] = new TableEnemyMemberControl( this, TableEnemyMember, i );
            }
            TableEnemyMember.ResumeLayout();

            //BasePanel.SetFlowBreak( TextMapArea, true );
            BasePanel.SetFlowBreak( TextDestination, true );
            //BasePanel.SetFlowBreak( TextEventKind, true );
            BasePanel.SetFlowBreak( TextEventDetail, true );

            TextDestination.ImageList = ResourceManager.Instance.Equipments;
            Icon = ResourceManager.ImageToIcon( ResourceManager.Instance.Icons.Images[(int)ResourceManager.IconContent.FormCompass] );
        }
Exemplo n.º 3
0
		public FormMain() {
            CultureInfo c = CultureInfo.CurrentCulture;
            CultureInfo ui = CultureInfo.CurrentUICulture;
            if (c.Name != "en-US" && c.Name != "ja-JP")
            {
                c = new CultureInfo("en-US");
            }
            if (ui.Name != "en-US" && ui.Name != "ja-JP")
            {
                ui = new CultureInfo("en-US");
            }
            Thread.CurrentThread.CurrentCulture = c;
            Thread.CurrentThread.CurrentUICulture = ui;
            Translator = new DynamicTranslator();
            Instance = this;
            this.SetStyle(ControlStyles.SupportsTransparentBackColor, true);
            InitializeComponent();
            ThemeBase thm;
            switch (Configuration.Config.UI.Theme)
            {
                case Theme.Light:
                    thm = new VS2012LightTheme();
                    break;
                case Theme.Dark:
                    thm = new VS2012DarkTheme();
                    break;
                default:
                    thm = new VS2012LightTheme();
                    break;
            }
            thm.Apply(MainDockPanel);
        }
		public FormWindowCapture( FormMain parent ) {
			InitializeComponent();

			this.parent = parent;
			this.Icon = ResourceManager.ImageToIcon( ResourceManager.Instance.Icons.Images[(int)ResourceManager.IconContent.FormWindowCapture] );
			this.windowCaptureButton.Image = ResourceManager.Instance.Icons.Images[(int)ResourceManager.IconContent.FormWindowCapture];

			SystemEvents.SystemShuttingDown += SystemEvents_SystemShuttingDown;
		}
Exemplo n.º 5
0
        public FormCompass( FormMain parent )
        {
            InitializeComponent();

            MainFontColor = Color.FromArgb( 0x00, 0x00, 0x00 );
            SubFontColor = Color.FromArgb( 0x88, 0x88, 0x88 );

            ControlHelper.SetDoubleBuffered( BasePanel );
            ControlHelper.SetDoubleBuffered( TableEnemyFleet );
            ControlHelper.SetDoubleBuffered( TableEnemyMember );

            TableEnemyMember.SuspendLayout();
            ControlMembers = new TableEnemyMemberControl[6];
            for ( int i = 0; i < ControlMembers.Length; i++ ) {
                ControlMembers[i] = new TableEnemyMemberControl( this, TableEnemyMember, i );
            }
            TableEnemyMember.ResumeLayout();

            TableEnemyCandidate.SuspendLayout();
            ControlCandidates = new TableEnemyCandidateControl[6];
            for ( int i  = 0; i < ControlCandidates.Length; i++ ) {
                ControlCandidates[i] = new TableEnemyCandidateControl( this, TableEnemyCandidate, i );
            }
            //row/column style init
            for ( int y = 0; y < TableEnemyCandidate.RowCount; y++ ) {
                var rs = new RowStyle( SizeType.AutoSize );
                if ( TableEnemyCandidate.RowStyles.Count <= y )
                    TableEnemyCandidate.RowStyles.Add( rs );
                else
                    TableEnemyCandidate.RowStyles[y] = rs;
            }
            for ( int x = 0; x < TableEnemyCandidate.ColumnCount; x++ ) {
                var cs = new ColumnStyle( SizeType.AutoSize );
                if ( TableEnemyCandidate.ColumnStyles.Count <= x )
                    TableEnemyCandidate.ColumnStyles.Add( cs );
                else
                    TableEnemyCandidate.ColumnStyles[x] = cs;
            }
            TableEnemyCandidate.ResumeLayout();

            //BasePanel.SetFlowBreak( TextMapArea, true );
            BasePanel.SetFlowBreak( TextDestination, true );
            //BasePanel.SetFlowBreak( TextEventKind, true );
            BasePanel.SetFlowBreak( TextEventDetail, true );

            TextDestination.ImageList = ResourceManager.Instance.Equipments;
            TextEventKind.ImageList = ResourceManager.Instance.Equipments;
            TextEventDetail.ImageList = ResourceManager.Instance.Equipments;
            TextFormation.ImageList = ResourceManager.Instance.Icons;
            TextAirSuperiority.ImageList = ResourceManager.Instance.Equipments;
            TextAirSuperiority.ImageIndex = (int)ResourceManager.EquipmentContent.CarrierBasedFighter;

            ConfigurationChanged();

            Icon = ResourceManager.ImageToIcon( ResourceManager.Instance.Icons.Images[(int)ResourceManager.IconContent.FormCompass] );
        }
Exemplo n.º 6
0
        public FormInformation( FormMain parent )
        {
            InitializeComponent();

            _ignorePort = 0;

            ConfigurationChanged();

            Icon = ResourceManager.ImageToIcon( ResourceManager.Instance.Icons.Images[(int)ResourceManager.IconContent.FormInformation] );
        }
Exemplo n.º 7
0
        public override bool RunService(FormMain main)
        {
            if (File.Exists(PLUGIN_SETTINGS))
                settings = DynamicJson.Parse(File.ReadAllText(PLUGIN_SETTINGS)).Deserialize<Settings>();
            else
                settings = new Settings();

            Task.Factory.StartNew(() => FatigueObserver.Instance.Initialize(main, this));

            return true;
        }
        public FormXPCalculator(FormMain parent)
        {
            InitializeComponent();
            ConfigurationChanged();
            selectMap.SelectedIndex = 0;
            selectResult.SelectedIndex = 0;
            selectStartLevel.SelectedIndex = 0;

            this.Load += FormXPCalculator_Load;
            Utility.Configuration.Instance.ConfigurationChanged += ConfigurationChanged;
        }
		public void Initialize( FormMain parent ) {

			_parentForm = parent;

			Expedition = new NotifierExpedition( Utility.Configuration.Config.NotifierExpedition );
			Construction = new NotifierConstruction( Utility.Configuration.Config.NotifierConstruction );
			Repair = new NotifierRepair( Utility.Configuration.Config.NotifierRepair );
			Condition = new NotifierCondition( Utility.Configuration.Config.NotifierCondition );
			Damage = new NotifierDamage( Utility.Configuration.Config.NotifierDamage );
			
		}
Exemplo n.º 10
0
		public FormBattle( FormMain parent ) {
			InitializeComponent();

			ControlHelper.SetDoubleBuffered( TableTop );
			ControlHelper.SetDoubleBuffered( TableBottom );


			HPBars = new List<ShipStatusHP>( 18 );


			TableBottom.SuspendLayout();
			for ( int i = 0; i < 18; i++ ) {
				HPBars.Add( new ShipStatusHP() );
				HPBars[i].Size = new Size( 80, 20 );
				HPBars[i].Margin = new Padding( 2, 0, 2, 0 );
				HPBars[i].Anchor = AnchorStyles.None;
				HPBars[i].MainFont = MainFont;
				HPBars[i].SubFont = SubFont;
				HPBars[i].UsePrevValue = true;
				HPBars[i].ShowDifference = true;
				HPBars[i].MaximumDigit = 9999;

				if ( i < 6 ) {
					TableBottom.Controls.Add( HPBars[i], 0, i + 1 );
				} else if ( i < 12 ) {
					TableBottom.Controls.Add( HPBars[i], 2, i - 5 );
				} else {
					TableBottom.Controls.Add( HPBars[i], 1, i - 11 );
				}
			}
			TableBottom.ResumeLayout();


			SearchingFriend.ImageList =
			SearchingEnemy.ImageList =
			AACutin.ImageList =
			AirStage1Friend.ImageList =
			AirStage1Enemy.ImageList =
			AirStage2Friend.ImageList =
			AirStage2Enemy.ImageList =
				ResourceManager.Instance.Equipments;


			ConfigurationChanged();
			
			BaseLayoutPanel.Visible = false;


			Icon = ResourceManager.ImageToIcon( ResourceManager.Instance.Icons.Images[(int)ResourceManager.IconContent.FormBattle] );

		}
		public void Initialize( FormMain parent ) {

			_parentForm = parent;

			var c = Utility.Configuration.Config;

			Expedition = new NotifierExpedition( c.NotifierExpedition );
			Construction = new NotifierConstruction( c.NotifierConstruction );
			Repair = new NotifierRepair( c.NotifierRepair );
			Condition = new NotifierCondition( c.NotifierCondition );
			Damage = new NotifierDamage( c.NotifierDamage );
			AnchorageRepair = new NotifierAnchorageRepair( c.NotifierAnchorageRepair );

		}
Exemplo n.º 12
0
		public FormMain() {
            CultureInfo c = CultureInfo.CurrentCulture;
            CultureInfo ui = CultureInfo.CurrentUICulture;
            if (c.Name != "en-US" && c.Name != "ja-JP")
            {
                c = new CultureInfo("en-US");
            }
            if (ui.Name != "en-US" && ui.Name != "ja-JP")
            {
                ui = new CultureInfo("en-US");
            }
            Thread.CurrentThread.CurrentCulture = c;
            Thread.CurrentThread.CurrentUICulture = ui;

            Translator = new DynamicTranslator();
            Instance = this;
            InitializeComponent();
		}
Exemplo n.º 13
0
		public FormHeadquarters( FormMain parent ) {
			InitializeComponent();

			_parentForm = parent;


			ImageList icons = ResourceManager.Instance.Icons;

			ShipCount.ImageList = icons;
			ShipCount.ImageIndex = (int)ResourceManager.IconContent.HeadQuartersShip;
			EquipmentCount.ImageList = icons;
			EquipmentCount.ImageIndex = (int)ResourceManager.IconContent.HeadQuartersEquipment;
			InstantRepair.ImageList = icons;
			InstantRepair.ImageIndex = (int)ResourceManager.IconContent.ItemInstantRepair;
			InstantConstruction.ImageList = icons;
			InstantConstruction.ImageIndex = (int)ResourceManager.IconContent.ItemInstantConstruction;
			DevelopmentMaterial.ImageList = icons;
			DevelopmentMaterial.ImageIndex = (int)ResourceManager.IconContent.ItemDevelopmentMaterial;
			ModdingMaterial.ImageList = icons;
			ModdingMaterial.ImageIndex = (int)ResourceManager.IconContent.ItemModdingMaterial;
			FurnitureCoin.ImageList = icons;
			FurnitureCoin.ImageIndex = (int)ResourceManager.IconContent.ItemFurnitureCoin;
			Fuel.ImageList = icons;
			Fuel.ImageIndex = (int)ResourceManager.IconContent.ResourceFuel;
			Ammo.ImageList = icons;
			Ammo.ImageIndex = (int)ResourceManager.IconContent.ResourceAmmo;
			Steel.ImageList = icons;
			Steel.ImageIndex = (int)ResourceManager.IconContent.ResourceSteel;
			Bauxite.ImageList = icons;
			Bauxite.ImageIndex = (int)ResourceManager.IconContent.ResourceBauxite;


			ControlHelper.SetDoubleBuffered( FlowPanelMaster );
			ControlHelper.SetDoubleBuffered( FlowPanelAdmiral );
			ControlHelper.SetDoubleBuffered( FlowPanelFleet );
			ControlHelper.SetDoubleBuffered( FlowPanelUseItem );
			ControlHelper.SetDoubleBuffered( FlowPanelResource );


			ConfigurationChanged();

			Icon = ResourceManager.ImageToIcon( ResourceManager.Instance.Icons.Images[(int)ResourceManager.IconContent.FormHeadQuarters] );

		}
Exemplo n.º 14
0
        public FormDock( FormMain parent )
        {
            InitializeComponent();

            Utility.SystemEvents.UpdateTimerTick += UpdateTimerTick;

            ControlHelper.SetDoubleBuffered( TableDock );

            ConfigurationChanged();

            TableDock.SuspendLayout();
            ControlDock = new TableDockControl[4];
            for ( int i = 0; i < ControlDock.Length; i++ ) {
                ControlDock[i] = new TableDockControl( this, TableDock, i );
            }
            TableDock.ResumeLayout();

            Icon = ResourceManager.ImageToIcon( ResourceManager.Instance.Icons.Images[(int)ResourceManager.IconContent.FormDock] );
        }
Exemplo n.º 15
0
        public FormFleetOverview( FormMain parent )
        {
            InitializeComponent();

            ConfigurationChanged();

            ControlHelper.SetDoubleBuffered( TableFleet );

            ControlFleet = new List<TableFleetControl>( 4 );
            for ( int i = 0; i < 4; i++ ) {
                ControlFleet.Add( new TableFleetControl( this, i + 1, TableFleet ) );
            }

            #region CombinedTag
            {
                CombinedTag = new ImageLabel();
                CombinedTag.Anchor = AnchorStyles.Left;
                CombinedTag.Font = Utility.Configuration.Config.UI.MainFont;
                CombinedTag.Margin = new Padding( 3, 2, 3, 2 );
                CombinedTag.ImageList = ResourceManager.Instance.Icons;
                CombinedTag.ImageIndex = (int)ResourceManager.IconContent.FleetCombined;
                CombinedTag.Text = "-";
                CombinedTag.Visible = false;

                TableFleet.Controls.Add( CombinedTag, 1, 4 );

                #region set RowStyle
                RowStyle rs = new RowStyle( SizeType.AutoSize, 0 );

                if ( TableFleet.RowStyles.Count > 4 )
                    TableFleet.RowStyles[4] = rs;
                else
                    while ( TableFleet.RowStyles.Count <= 4 )
                        TableFleet.RowStyles.Add( rs );
                #endregion

            }
            #endregion

            Icon = ResourceManager.ImageToIcon( ResourceManager.Instance.Icons.Images[(int)ResourceManager.IconContent.FormFleet] );

            Utility.SystemEvents.UpdateTimerTick += UpdateTimerTick;
        }
Exemplo n.º 16
0
        public FormArsenal( FormMain parent )
        {
            InitializeComponent();

            Utility.SystemEvents.UpdateTimerTick += UpdateTimerTick;

            ControlHelper.SetDoubleBuffered( TableArsenal );

            ConfigurationChanged();

            TableArsenal.SuspendLayout();
            ControlArsenal = new TableArsenalControl[4];
            for ( int i = 0; i < ControlArsenal.Length; i++ ) {
                ControlArsenal[i] = new TableArsenalControl( this, TableArsenal, i );
            }
            TableArsenal.ResumeLayout();

            _buildingID = -1;

            Icon = ResourceManager.ImageToIcon( ResourceManager.Instance.Icons.Images[(int)ResourceManager.IconContent.FormArsenal] );
        }
Exemplo n.º 17
0
        public FormExpedition(FormMain parent)
        {
            InitializeComponent();
            ControlHelper.SetDoubleBuffered( ExpeditionView );

            #region セルスタイル
            CSDefaultLeft = new DataGridViewCellStyle()
            {
                Alignment = DataGridViewContentAlignment.MiddleLeft,
                BackColor = SystemColors.Control,
                ForeColor = SystemColors.ControlText,
                SelectionBackColor = Color.FromArgb( 0xFF, 0xFF, 0xCC ),
                SelectionForeColor = SystemColors.ControlText,
                WrapMode = DataGridViewTriState.False,
            };
            CSGreenLeft = new DataGridViewCellStyle( CSDefaultLeft )
            {
                BackColor = CellColorGreen,
                SelectionBackColor = CellColorGreen,
            };

            ExpeditionView.DefaultCellStyle = CSDefaultLeft;
            #endregion
        }
Exemplo n.º 18
0
		public FormSenka(FormMain parent)
		{
			InitializeComponent();
			ControlHelper.SetDoubleBuffered(SenkaView);

			#region セルスタイル
			CSDefaultLeft = new DataGridViewCellStyle()
			{
				Alignment = DataGridViewContentAlignment.MiddleLeft,
				BackColor = Color.White,
				ForeColor = Color.Black,
				SelectionBackColor = Color.White,
				SelectionForeColor = Color.Black,
				WrapMode = DataGridViewTriState.False,
			};
			CSRedTextLeft = new DataGridViewCellStyle( CSDefaultLeft )
			{
				ForeColor = Color.Red,
				SelectionForeColor = Color.Red,
			};

			SenkaView.DefaultCellStyle = CSDefaultLeft;
			#endregion
		}
Exemplo n.º 19
0
        public FormBrowserHost(FormMain parent)
        {
            InitializeComponent();

            Icon = ResourceManager.ImageToIcon(ResourceManager.Instance.Icons.Images[(int)ResourceManager.IconContent.FormBrowser]);
        }
Exemplo n.º 20
0
        public FormFleetOverview(FormMain parent)
        {
            InitializeComponent();

            ControlHelper.SetDoubleBuffered(TableFleet);


            ControlFleet = new List <TableFleetControl>(4);
            for (int i = 0; i < 4; i++)
            {
                ControlFleet.Add(new TableFleetControl(this, i + 1, TableFleet));
            }

            {
                AnchorageRepairingTimer            = new ImageLabel();
                AnchorageRepairingTimer.Anchor     = AnchorStyles.Left;
                AnchorageRepairingTimer.Margin     = new Padding(3, 2, 3, 2);
                AnchorageRepairingTimer.ImageList  = ResourceManager.Instance.Icons;
                AnchorageRepairingTimer.ImageIndex = (int)ResourceManager.IconContent.FleetDocking;
                AnchorageRepairingTimer.Text       = "-";
                //AnchorageRepairingTimer.Visible = false;

                TableFleet.Controls.Add(AnchorageRepairingTimer, 1, 4);

                #region set RowStyle
                RowStyle rs = new RowStyle(SizeType.AutoSize, 0);

                if (TableFleet.RowStyles.Count > 4)
                {
                    TableFleet.RowStyles[4] = rs;
                }
                else
                {
                    while (TableFleet.RowStyles.Count <= 4)
                    {
                        TableFleet.RowStyles.Add(rs);
                    }
                }
                #endregion
            }

            #region CombinedTag
            {
                CombinedTag            = new ImageLabel();
                CombinedTag.Anchor     = AnchorStyles.Left;
                CombinedTag.Margin     = new Padding(3, 2, 3, 2);
                CombinedTag.ImageList  = ResourceManager.Instance.Icons;
                CombinedTag.ImageIndex = (int)ResourceManager.IconContent.FleetCombined;
                CombinedTag.Text       = "-";
                CombinedTag.Visible    = false;

                TableFleet.Controls.Add(CombinedTag, 1, 5);

                #region set RowStyle
                RowStyle rs = new RowStyle(SizeType.AutoSize, 0);

                if (TableFleet.RowStyles.Count > 5)
                {
                    TableFleet.RowStyles[5] = rs;
                }
                else
                {
                    while (TableFleet.RowStyles.Count <= 5)
                    {
                        TableFleet.RowStyles.Add(rs);
                    }
                }
                #endregion
            }
            #endregion



            ConfigurationChanged();

            Icon = ResourceManager.ImageToIcon(ResourceManager.Instance.Icons.Images[(int)ResourceManager.IconContent.FormFleet]);

            Utility.SystemEvents.UpdateTimerTick += UpdateTimerTick;
        }
Exemplo n.º 21
0
        public FormQuest(FormMain parent)
        {
            InitializeComponent();

            ControlHelper.SetDoubleBuffered(QuestView);

            ConfigurationChanged();


            #region set cellstyle

            CSDefaultLeft           = new DataGridViewCellStyle();
            CSDefaultLeft.Alignment = DataGridViewContentAlignment.MiddleLeft;
            CSDefaultLeft.BackColor =
                CSDefaultLeft.SelectionBackColor = SystemColors.Control;
            CSDefaultLeft.ForeColor          = SystemColors.ControlText;
            CSDefaultLeft.SelectionForeColor = SystemColors.ControlText;
            CSDefaultLeft.WrapMode           = DataGridViewTriState.False;

            CSDefaultCenter           = new DataGridViewCellStyle(CSDefaultLeft);
            CSDefaultCenter.Alignment = DataGridViewContentAlignment.MiddleCenter;

            CSCategories = new DataGridViewCellStyle[9];
            for (int i = 0; i < CSCategories.Length; i++)
            {
                CSCategories[i] = new DataGridViewCellStyle(CSDefaultCenter);

                Color c;
                switch (i + 1)
                {
                case 1:                                 //編成
                    c = Color.FromArgb(0xAA, 0xFF, 0xAA);
                    break;

                case 2:                                 //出撃
                    c = Color.FromArgb(0xFF, 0xCC, 0xCC);
                    break;

                case 3:                                 //演習
                    c = Color.FromArgb(0xDD, 0xFF, 0xAA);
                    break;

                case 4:                                 //遠征
                    c = Color.FromArgb(0xCC, 0xFF, 0xFF);
                    break;

                case 5:                                 //補給/入渠
                    c = Color.FromArgb(0xFF, 0xFF, 0xCC);
                    break;

                case 6:                                 //工廠
                    c = Color.FromArgb(0xDD, 0xCC, 0xBB);
                    break;

                case 7:                                 //改装
                    c = Color.FromArgb(0xDD, 0xCC, 0xFF);
                    break;

                case 8:                                 //出撃(2)
                    c = Color.FromArgb(0xFF, 0xCC, 0xCC);
                    break;

                case 9:                                 //その他
                default:
                    c = CSDefaultCenter.BackColor;
                    break;
                }

                CSCategories[i].BackColor =
                    CSCategories[i].SelectionBackColor = c;
            }

            QuestView.DefaultCellStyle          = CSDefaultCenter;
            QuestView_Category.DefaultCellStyle = CSCategories[CSCategories.Length - 1];
            QuestView_Name.DefaultCellStyle     = CSDefaultLeft;
            QuestView_Progress.DefaultCellStyle = CSDefaultLeft;

            #endregion


            SystemEvents.SystemShuttingDown += SystemEvents_SystemShuttingDown;
        }
Exemplo n.º 22
0
        public FormLog(FormMain parent)
        {
            InitializeComponent();

            ConfigurationChanged();
        }
Exemplo n.º 23
0
        public FormCompass(FormMain parent)
        {
            InitializeComponent();



            MainFontColor = Utility.ThemeManager.GetColor(Utility.Configuration.Config.UI.Theme, Utility.ThemeColors.MainFontColor);
            SubFontColor  = Utility.ThemeManager.GetColor(Utility.Configuration.Config.UI.Theme, Utility.ThemeColors.SubFontColor);
            ConfigurationChanged();

            ControlHelper.SetDoubleBuffered(BasePanel);
            ControlHelper.SetDoubleBuffered(TableEnemyFleet);
            ControlHelper.SetDoubleBuffered(TableEnemyMember);


            TableEnemyMember.SuspendLayout();
            ControlMembers = new TableEnemyMemberControl[6];
            for (int i = 0; i < ControlMembers.Length; i++)
            {
                ControlMembers[i] = new TableEnemyMemberControl(this, TableEnemyMember, i);
            }
            TableEnemyMember.ResumeLayout();

            TableEnemyCandidate.SuspendLayout();
            ControlCandidates = new TableEnemyCandidateControl[6];
            for (int i = 0; i < ControlCandidates.Length; i++)
            {
                ControlCandidates[i] = new TableEnemyCandidateControl(this, TableEnemyCandidate, i);
            }
            //row/column style init
            for (int y = 0; y < TableEnemyCandidate.RowCount; y++)
            {
                var rs = new RowStyle(SizeType.AutoSize);
                if (TableEnemyCandidate.RowStyles.Count <= y)
                {
                    TableEnemyCandidate.RowStyles.Add(rs);
                }
                else
                {
                    TableEnemyCandidate.RowStyles[y] = rs;
                }
            }
            for (int x = 0; x < TableEnemyCandidate.ColumnCount; x++)
            {
                var cs = new ColumnStyle(SizeType.AutoSize);
                if (TableEnemyCandidate.ColumnStyles.Count <= x)
                {
                    TableEnemyCandidate.ColumnStyles.Add(cs);
                }
                else
                {
                    TableEnemyCandidate.ColumnStyles[x] = cs;
                }
            }
            TableEnemyCandidate.ResumeLayout();


            //BasePanel.SetFlowBreak( TextMapArea, true );
            BasePanel.SetFlowBreak(TextDestination, true);
            //BasePanel.SetFlowBreak( TextEventKind, true );
            BasePanel.SetFlowBreak(TextEventDetail, true);


            TextDestination.ImageList     = ResourceManager.Instance.Equipments;
            TextEventDetail.ImageList     = ResourceManager.Instance.Equipments;
            TextFormation.ImageList       = ResourceManager.Instance.Icons;
            TextAirSuperiority.ImageList  = ResourceManager.Instance.Equipments;
            TextAirSuperiority.ImageIndex = (int)ResourceManager.EquipmentContent.CarrierBasedFighter;



            ConfigurationChanged();

            Icon = ResourceManager.ImageToIcon(ResourceManager.Instance.Icons.Images[(int)ResourceManager.IconContent.FormCompass]);
        }
Exemplo n.º 24
0
        public FormQuest( FormMain parent )
        {
            InitializeComponent();

            ControlHelper.SetDoubleBuffered( QuestView );

            ConfigurationChanged();

            #region set cellstyle

            CSDefaultLeft = new DataGridViewCellStyle();
            CSDefaultLeft.Alignment = DataGridViewContentAlignment.MiddleLeft;
            CSDefaultLeft.BackColor =
            CSDefaultLeft.SelectionBackColor = SystemColors.Control;
            CSDefaultLeft.ForeColor = SystemColors.ControlText;
            CSDefaultLeft.SelectionForeColor = SystemColors.ControlText;
            CSDefaultLeft.WrapMode = DataGridViewTriState.False;

            CSDefaultCenter = new DataGridViewCellStyle( CSDefaultLeft );
            CSDefaultCenter.Alignment = DataGridViewContentAlignment.MiddleCenter;

            CSCategories = new DataGridViewCellStyle[9];
            for ( int i = 0; i < CSCategories.Length; i++ ) {
                CSCategories[i] = new DataGridViewCellStyle( CSDefaultCenter );

                Color c;
                switch ( i + 1 ) {
                    case 1:		//編成
                        c = Color.FromArgb( 0xAA, 0xFF, 0xAA );
                        break;
                    case 2:		//出撃
                        c = Color.FromArgb( 0xFF, 0xCC, 0xCC );
                        break;
                    case 3:		//演習
                        c = Color.FromArgb( 0xDD, 0xFF, 0xAA );
                        break;
                    case 4:		//遠征
                        c = Color.FromArgb( 0xCC, 0xFF, 0xFF );
                        break;
                    case 5:		//補給/入渠
                        c = Color.FromArgb( 0xFF, 0xFF, 0xCC );
                        break;
                    case 6:		//工廠
                        c = Color.FromArgb( 0xDD, 0xCC, 0xBB );
                        break;
                    case 7:		//改装
                        c = Color.FromArgb( 0xDD, 0xCC, 0xFF );
                        break;
                    case 8:		//出撃(2)
                        c = Color.FromArgb( 0xFF, 0xCC, 0xCC );
                        break;
                    case 9:		//その他
                    default:
                        c = CSDefaultCenter.BackColor;
                        break;
                }

                CSCategories[i].BackColor =
                CSCategories[i].SelectionBackColor = c;
            }

            QuestView.DefaultCellStyle = CSDefaultCenter;
            QuestView_Category.DefaultCellStyle = CSCategories[CSCategories.Length - 1];
            QuestView_Name.DefaultCellStyle = CSDefaultLeft;
            QuestView_Progress.DefaultCellStyle = CSDefaultLeft;

            #endregion

            SystemEvents.SystemShuttingDown += SystemEvents_SystemShuttingDown;
        }
Exemplo n.º 25
0
		public FormLog( FormMain parent ) {
			InitializeComponent();

			ConfigurationChanged();
		}
Exemplo n.º 26
0
        public override bool RunService(FormMain main)
        {
            Task.Factory.StartNew(() => WhiteObserver.Instance.Initialize());

            return true;
        }
Exemplo n.º 27
0
        public FormQuest(FormMain parent)
        {
            InitializeComponent();

            ControlHelper.SetDoubleBuffered(QuestView);

            ConfigurationChanged();


            #region set cellstyle

            CSDefaultLeft = new DataGridViewCellStyle
            {
                Alignment = DataGridViewContentAlignment.MiddleLeft
            };
            CSDefaultLeft.BackColor =
                CSDefaultLeft.SelectionBackColor = Utility.Configuration.Config.UI.BackColor;
            CSDefaultLeft.ForeColor          = Utility.Configuration.Config.UI.ForeColor;
            CSDefaultLeft.SelectionForeColor = Utility.Configuration.Config.UI.ForeColor;
            CSDefaultLeft.WrapMode           = DataGridViewTriState.False;

            CSDefaultCenter = new DataGridViewCellStyle(CSDefaultLeft)
            {
                Alignment = DataGridViewContentAlignment.MiddleCenter
            };

            CSCategories = new DataGridViewCellStyle[9];
            for (int i = 0; i < CSCategories.Length; i++)
            {
                CSCategories[i] = new DataGridViewCellStyle(CSDefaultCenter);

                Color c;
                CSCategories[i].ForeColor = CSCategories[i].SelectionForeColor = Utility.Configuration.Config.UI.Quest_TypeFG;
                switch (i + 1)
                {
                case 1:                             //編成
                    c = Utility.Configuration.Config.UI.Quest_Type1Color;
                    break;

                case 2:                             //出撃
                    c = Utility.Configuration.Config.UI.Quest_Type2Color;
                    break;

                case 3:                             //演習
                    c = Utility.Configuration.Config.UI.Quest_Type3Color;
                    break;

                case 4:                             //遠征
                    c = Utility.Configuration.Config.UI.Quest_Type4Color;
                    break;

                case 5:                             //補給/入渠
                    c = Utility.Configuration.Config.UI.Quest_Type5Color;
                    break;

                case 6:                             //工廠
                    c = Utility.Configuration.Config.UI.Quest_Type6Color;
                    break;

                case 7:                             //改装
                    c = Utility.Configuration.Config.UI.Quest_Type7Color;
                    break;

                case 8:                             //出撃(2)
                    c = Utility.Configuration.Config.UI.Quest_Type2Color;
                    break;

                case 9:                             //その他
                default:
                    c = CSDefaultCenter.BackColor;
                    CSCategories[i].ForeColor = CSCategories[i].SelectionForeColor = Utility.Configuration.Config.UI.ForeColor;
                    break;
                }

                CSCategories[i].BackColor =
                    CSCategories[i].SelectionBackColor = c;
            }

            QuestView.DefaultCellStyle          = CSDefaultCenter;
            QuestView_Category.DefaultCellStyle = CSCategories[CSCategories.Length - 1];
            QuestView_Name.DefaultCellStyle     = CSDefaultLeft;
            QuestView_Progress.DefaultCellStyle = CSDefaultLeft;

            #endregion

            if (Utility.Configuration.Config.UI.RemoveBarShadow)
            {             // 暂时借用这个属性
                QuestView.ColumnHeadersHeight       = 21;
                QuestView.EnableHeadersVisualStyles = false;
                QuestView.ColumnHeadersBorderStyle  = DataGridViewHeaderBorderStyle.Single;
                QuestView.ColumnHeadersDefaultCellStyle.ForeColor = Utility.Configuration.Config.UI.ForeColor;
                QuestView.ColumnHeadersDefaultCellStyle.BackColor = Utility.Configuration.Config.UI.SubBackColor;
                QuestView.GridColor       = Utility.Configuration.Config.UI.SubBackColor;
                QuestView.BackgroundColor = Utility.Configuration.Config.UI.BackColor;
            }

            SystemEvents.SystemShuttingDown += SystemEvents_SystemShuttingDown;
        }
Exemplo n.º 28
0
        public FormBrowserHost( FormMain parent )
        {
            InitializeComponent();

            Icon = ResourceManager.ImageToIcon( ResourceManager.Instance.Icons.Images[(int)ResourceManager.IconContent.FormBrowser] );
        }
Exemplo n.º 29
0
        public FormShipGroup( FormMain parent )
        {
            InitializeComponent();

            ControlHelper.SetDoubleBuffered( ShipView );

            IsRowsUpdating = true;

            foreach ( DataGridViewColumn column in ShipView.Columns ) {
                column.MinimumWidth = 2;
            }

            #region set CellStyle

            CSDefaultLeft = new DataGridViewCellStyle();
            CSDefaultLeft.Alignment = DataGridViewContentAlignment.MiddleLeft;
            CSDefaultLeft.BackColor = SystemColors.Control;
            CSDefaultLeft.Font = Font;
            CSDefaultLeft.ForeColor = SystemColors.ControlText;
            CSDefaultLeft.SelectionBackColor = Color.FromArgb( 0xFF, 0xFF, 0xCC );
            CSDefaultLeft.SelectionForeColor = SystemColors.ControlText;
            CSDefaultLeft.WrapMode = DataGridViewTriState.False;

            CSDefaultCenter = new DataGridViewCellStyle( CSDefaultLeft );
            CSDefaultCenter.Alignment = DataGridViewContentAlignment.MiddleCenter;

            CSDefaultRight = new DataGridViewCellStyle( CSDefaultLeft );
            CSDefaultRight.Alignment = DataGridViewContentAlignment.MiddleRight;

            CSRedRight = new DataGridViewCellStyle( CSDefaultRight );
            CSRedRight.BackColor =
            CSRedRight.SelectionBackColor = CellColorRed;

            CSOrangeRight = new DataGridViewCellStyle( CSDefaultRight );
            CSOrangeRight.BackColor =
            CSOrangeRight.SelectionBackColor = CellColorOrange;

            CSYellowRight = new DataGridViewCellStyle( CSDefaultRight );
            CSYellowRight.BackColor =
            CSYellowRight.SelectionBackColor = CellColorYellow;

            CSGreenRight = new DataGridViewCellStyle( CSDefaultRight );
            CSGreenRight.BackColor =
            CSGreenRight.SelectionBackColor = CellColorGreen;

            CSGrayRight = new DataGridViewCellStyle( CSDefaultRight );
            CSGrayRight.ForeColor =
            CSGrayRight.SelectionForeColor = CellColorGray;

            CSCherryRight = new DataGridViewCellStyle( CSDefaultRight );
            CSCherryRight.BackColor =
            CSCherryRight.SelectionBackColor = CellColorCherry;

            CSIsLocked = new DataGridViewCellStyle( CSDefaultCenter );
            CSIsLocked.ForeColor =
            CSIsLocked.SelectionForeColor = Color.FromArgb( 0xFF, 0x88, 0x88 );

            ShipView.DefaultCellStyle = CSDefaultRight;
            ShipView_Name.DefaultCellStyle = CSDefaultLeft;
            ShipView_Slot1.DefaultCellStyle = CSDefaultLeft;
            ShipView_Slot2.DefaultCellStyle = CSDefaultLeft;
            ShipView_Slot3.DefaultCellStyle = CSDefaultLeft;
            ShipView_Slot4.DefaultCellStyle = CSDefaultLeft;
            ShipView_Slot5.DefaultCellStyle = CSDefaultLeft;
            ShipView_ExpansionSlot.DefaultCellStyle = CSDefaultLeft;

            #endregion

            SystemEvents.SystemShuttingDown += SystemShuttingDown;
        }
Exemplo n.º 30
0
 public FormDialogue(FormMain parent)
 {
     InitializeComponent();
 }