public TableDockControl( FormDock parent ) { #region Initialize ShipName = new Label(); ShipName.Text = "???"; ShipName.Anchor = AnchorStyles.Left; ShipName.ForeColor = parent.ForeColor; ShipName.TextAlign = ContentAlignment.MiddleLeft; ShipName.Padding = new Padding( 0, 1, 0, 1 ); ShipName.Margin = new Padding( 2, 0, 2, 0 ); ShipName.MaximumSize = new Size( 60, 20 ); ShipName.AutoEllipsis = true; ShipName.AutoSize = true; ShipName.Visible = true; RepairTime = new Label(); RepairTime.Text = ""; RepairTime.Anchor = AnchorStyles.Left; RepairTime.ForeColor = parent.ForeColor; RepairTime.Tag = null; RepairTime.TextAlign = ContentAlignment.MiddleLeft; RepairTime.Padding = new Padding( 0, 1, 0, 1 ); RepairTime.Margin = new Padding( 2, 0, 2, 0 ); RepairTime.MinimumSize = new Size( 60, 10 ); RepairTime.AutoSize = true; RepairTime.Visible = true; ConfigurationChanged( parent ); ToolTipInfo = parent.ToolTipInfo; #endregion }
public TableDockControl(FormDock parent) { #region Initialize ShipName = new ImageLabel(); ShipName.Text = "???"; ShipName.Anchor = AnchorStyles.Left; ShipName.ForeColor = parent.ForeColor; ShipName.TextAlign = ContentAlignment.MiddleLeft; ShipName.Padding = new Padding(0, 1, 0, 1); ShipName.Margin = new Padding(2, 0, 2, 0); ShipName.MaximumSize = new Size(60, 20); //ShipName.AutoEllipsis = true; ShipName.ImageAlign = ContentAlignment.MiddleCenter; ShipName.AutoSize = true; ShipName.Visible = true; RepairTime = new Label(); RepairTime.Text = ""; RepairTime.Anchor = AnchorStyles.Left; RepairTime.ForeColor = parent.ForeColor; RepairTime.Tag = null; RepairTime.TextAlign = ContentAlignment.MiddleLeft; RepairTime.Padding = new Padding(0, 1, 0, 1); RepairTime.Margin = new Padding(2, 0, 2, 0); RepairTime.MinimumSize = new Size(60, 10); RepairTime.AutoSize = true; RepairTime.Visible = true; ConfigurationChanged(parent); ToolTipInfo = parent.ToolTipInfo; #endregion }
public void ConfigurationChanged(FormDock parent) { ShipName.ForeColor = parent.ForeColor; RepairTime.ForeColor = parent.ForeColor; ShipName.Font = parent.Font; RepairTime.Font = parent.Font; RepairTime.BackColor = Color.Transparent; }
public void ConfigurationChanged(FormDock parent) { var config = Utility.Configuration.Config.FormDock; ShipName.Font = parent.Font; RepairTime.Font = parent.Font; RepairTime.BackColor = Color.Transparent; ShipName.MaximumSize = new Size(config.MaxShipNameWidth, ShipName.MaximumSize.Height); }
public TableDockControl(FormDock parent) { #region Initialize ShipName = new ImageLabel { Text = "???", Anchor = AnchorStyles.Left, ForeColor = parent.ForeColor, TextAlign = ContentAlignment.MiddleLeft, Padding = new Padding(0, 1, 0, 1), Margin = new Padding(2, 1, 2, 1), MaximumSize = new Size(60, int.MaxValue), //ShipName.AutoEllipsis = true; ImageAlign = ContentAlignment.MiddleCenter, AutoSize = true, Visible = true }; RepairTime = new Label { Text = "", Anchor = AnchorStyles.Left, ForeColor = parent.ForeColor, Tag = null, TextAlign = ContentAlignment.MiddleLeft, Padding = new Padding(0, 1, 0, 1), Margin = new Padding(2, 1, 2, 1), MinimumSize = new Size(60, 10), AutoSize = true, Visible = true }; ConfigurationChanged(parent); ToolTipInfo = parent.ToolTipInfo; #endregion }
private async void FormMain_Load( object sender, EventArgs e ) { if ( !Directory.Exists( "Settings" ) ) Directory.CreateDirectory( "Settings" ); Utility.Configuration.Instance.Load( this ); Utility.Logger.Instance.LogAdded += new Utility.LogAddedEventHandler( ( Utility.Logger.LogData data ) => { if ( InvokeRequired ) { // Invokeはメッセージキューにジョブを投げて待つので、別のBeginInvokeされたジョブが既にキューにあると、 // それを実行してしまい、BeginInvokeされたジョブの順番が保てなくなる // GUIスレッドによる処理は、順番が重要なことがあるので、GUIスレッドからInvokeを呼び出してはいけない Invoke( new Utility.LogAddedEventHandler( Logger_LogAdded ), data ); } else { Logger_LogAdded( data ); } } ); Utility.Configuration.Instance.ConfigurationChanged += ConfigurationChanged; Utility.Logger.Add( 2, SoftwareInformation.SoftwareNameJapanese + " を起動しています…" ); this.Text = SoftwareInformation.VersionJapanese; ResourceManager.Instance.Load(); RecordManager.Instance.Load(); KCDatabase.Instance.Load(); NotifierManager.Instance.Initialize( this ); SyncBGMPlayer.Instance.ConfigurationChanged(); #region Icon settings Icon = ResourceManager.Instance.AppIcon; StripMenu_File_Configuration.Image = ResourceManager.Instance.Icons.Images[(int)ResourceManager.IconContent.FormConfiguration]; StripMenu_View_Fleet.Image = ResourceManager.Instance.Icons.Images[(int)ResourceManager.IconContent.FormFleet]; StripMenu_View_FleetOverview.Image = ResourceManager.Instance.Icons.Images[(int)ResourceManager.IconContent.FormFleet]; StripMenu_View_ShipGroup.Image = ResourceManager.Instance.Icons.Images[(int)ResourceManager.IconContent.FormShipGroup]; StripMenu_View_Dock.Image = ResourceManager.Instance.Icons.Images[(int)ResourceManager.IconContent.FormDock]; StripMenu_View_Arsenal.Image = ResourceManager.Instance.Icons.Images[(int)ResourceManager.IconContent.FormArsenal]; StripMenu_View_Headquarters.Image = ResourceManager.Instance.Icons.Images[(int)ResourceManager.IconContent.FormHeadQuarters]; StripMenu_View_Quest.Image = ResourceManager.Instance.Icons.Images[(int)ResourceManager.IconContent.FormQuest]; StripMenu_View_Information.Image = ResourceManager.Instance.Icons.Images[(int)ResourceManager.IconContent.FormInformation]; StripMenu_View_Compass.Image = ResourceManager.Instance.Icons.Images[(int)ResourceManager.IconContent.FormCompass]; StripMenu_View_Battle.Image = ResourceManager.Instance.Icons.Images[(int)ResourceManager.IconContent.FormBattle]; StripMenu_View_Browser.Image = ResourceManager.Instance.Icons.Images[(int)ResourceManager.IconContent.FormBrowser]; StripMenu_View_Log.Image = ResourceManager.Instance.Icons.Images[(int)ResourceManager.IconContent.FormLog]; StripMenu_WindowCapture.Image = ResourceManager.Instance.Icons.Images[(int)ResourceManager.IconContent.FormWindowCapture]; StripMenu_Tool_EquipmentList.Image = ResourceManager.Instance.Icons.Images[(int)ResourceManager.IconContent.FormEquipmentList]; StripMenu_Tool_DropRecord.Image = ResourceManager.Instance.Icons.Images[(int)ResourceManager.IconContent.FormDropRecord]; StripMenu_Tool_DevelopmentRecord.Image = ResourceManager.Instance.Icons.Images[(int)ResourceManager.IconContent.FormDevelopmentRecord]; StripMenu_Tool_ConstructionRecord.Image = ResourceManager.Instance.Icons.Images[(int)ResourceManager.IconContent.FormConstructionRecord]; StripMenu_Tool_ResourceChart.Image = ResourceManager.Instance.Icons.Images[(int)ResourceManager.IconContent.FormResourceChart]; StripMenu_Tool_AlbumMasterShip.Image = ResourceManager.Instance.Icons.Images[(int)ResourceManager.IconContent.FormAlbumShip]; StripMenu_Tool_AlbumMasterEquipment.Image = ResourceManager.Instance.Icons.Images[(int)ResourceManager.IconContent.FormAlbumEquipment]; StripMenu_Help_Version.Image = ResourceManager.Instance.Icons.Images[(int)ResourceManager.IconContent.AppIcon]; #endregion APIObserver.Instance.Start( Utility.Configuration.Config.Connection.Port, this ); MainDockPanel.Extender.FloatWindowFactory = new CustomFloatWindowFactory(); SubForms = new List<DockContent>(); //form init //注:一度全てshowしないとイベントを受け取れないので注意 fFleet = new FormFleet[4]; for ( int i = 0; i < fFleet.Length; i++ ) { SubForms.Add( fFleet[i] = new FormFleet( this, i + 1 ) ); } SubForms.Add( fDock = new FormDock( this ) ); SubForms.Add( fArsenal = new FormArsenal( this ) ); SubForms.Add( fHeadquarters = new FormHeadquarters( this ) ); SubForms.Add( fInformation = new FormInformation( this ) ); SubForms.Add( fCompass = new FormCompass( this ) ); SubForms.Add( fLog = new FormLog( this ) ); SubForms.Add( fQuest = new FormQuest( this ) ); SubForms.Add( fBattle = new FormBattle( this ) ); SubForms.Add( fFleetOverview = new FormFleetOverview( this ) ); SubForms.Add( fShipGroup = new FormShipGroup( this ) ); SubForms.Add( fBrowser = new FormBrowserHost( this ) ); SubForms.Add( fWindowCapture = new FormWindowCapture( this ) ); ConfigurationChanged(); //設定から初期化 LoadLayout( Configuration.Config.Life.LayoutFilePath ); SoftwareInformation.CheckUpdate(); // デバッグ: 開始時にAPIリストを読み込む if ( Configuration.Config.Debug.LoadAPIListOnLoad ) { try { await Task.Factory.StartNew( () => LoadAPIList( Configuration.Config.Debug.APIListPath ) ); } catch ( Exception ex ) { Utility.Logger.Add( 3, "API読み込みに失敗しました。" + ex.Message ); } } // 🎃 if ( DateTime.Now.Month == 10 && DateTime.Now.Day == 31 ) { APIObserver.Instance.APIList["api_port/port"].ResponseReceived += CallPumpkinHead; } // 完了通知(ログインページを開く) fBrowser.InitializeApiCompleted(); UIUpdateTimer.Start(); Utility.Logger.Add( 3, "起動処理が完了しました。" ); }
public TableDockControl(FormDock parent, TableLayoutPanel table, int row) : this( parent ) { AddToTable(table, row); }
private async void FormMain_Load( object sender, EventArgs e ) { Utility.Configuration.Instance.Load(); Utility.Logger.Instance.LogAdded += new Utility.LogAddedEventHandler( ( Utility.Logger.LogData data ) => { if ( InvokeRequired ) { // Invokeはメッセージキューにジョブを投げて待つので、別のBeginInvokeされたジョブが既にキューにあると、 // それを実行してしまい、BeginInvokeされたジョブの順番が保てなくなる // GUIスレッドによる処理は、順番が重要なことがあるので、GUIスレッドからInvokeを呼び出してはいけない Invoke( new Utility.LogAddedEventHandler( Logger_LogAdded ), data ); } else { Logger_LogAdded( data ); } } ); Utility.Configuration.Instance.ConfigurationChanged += ConfigurationChanged; Utility.Logger.Add( 2, SoftwareInformation.SoftwareNameJapanese + " を起動しています…" ); this.Text = SoftwareInformation.VersionJapanese; ResourceManager.Instance.Load(); RecordManager.Instance.Load(); KCDatabase.Instance.Load(); NotifierManager.Instance.Initialize( this ); Icon = ResourceManager.Instance.AppIcon; APIObserver.Instance.Start( Utility.Configuration.Config.Connection.Port, this ); MainDockPanel.Extender.FloatWindowFactory = new CustomFloatWindowFactory(); SubForms = new List<DockContent>(); //form init //注:一度全てshowしないとイベントを受け取れないので注意 fFleet = new FormFleet[4]; for ( int i = 0; i < fFleet.Length; i++ ) { SubForms.Add( fFleet[i] = new FormFleet( this, i + 1 ) ); } SubForms.Add( fDock = new FormDock( this ) ); SubForms.Add( fArsenal = new FormArsenal( this ) ); SubForms.Add( fHeadquarters = new FormHeadquarters( this ) ); SubForms.Add( fInformation = new FormInformation( this ) ); SubForms.Add( fCompass = new FormCompass( this ) ); SubForms.Add( fLog = new FormLog( this ) ); SubForms.Add( fQuest = new FormQuest( this ) ); SubForms.Add( fBattle = new FormBattle( this ) ); SubForms.Add( fFleetOverview = new FormFleetOverview( this ) ); SubForms.Add( fShipGroup = new FormShipGroup( this ) ); SubForms.Add( fBrowser = new FormBrowserHost( this ) ); SubForms.Add( fWindowCapture = new FormWindowCapture( this ) ); LoadLayout( Configuration.Config.Life.LayoutFilePath ); ConfigurationChanged(); //設定から初期化 SoftwareInformation.CheckUpdate(); // デバッグ: 開始時にAPIリストを読み込む if ( Configuration.Config.Debug.LoadAPIListOnLoad ) { try { await Task.Factory.StartNew( () => LoadAPIList( Configuration.Config.Debug.APIListPath ) ); } catch ( Exception ex ) { Utility.Logger.Add( 3, "API読み込みに失敗しました。" + ex.Message ); } } // 完了通知(ログインページを開く) fBrowser.InitializeApiCompleted(); UIUpdateTimer.Start(); Utility.Logger.Add( 2, "起動処理が完了しました。" ); }
private async void FormMain_Load(object sender, EventArgs e) { Utility.Configuration.Instance.Load(); Utility.Logger.Instance.LogAdded += new Utility.LogAddedEventHandler((Utility.Logger.LogData data) => { if (InvokeRequired) { // Invokeはメッセージキューにジョブを投げて待つので、別のBeginInvokeされたジョブが既にキューにあると、 // それを実行してしまい、BeginInvokeされたジョブの順番が保てなくなる // GUIスレッドによる処理は、順番が重要なことがあるので、GUIスレッドからInvokeを呼び出してはいけない Invoke(new Utility.LogAddedEventHandler(Logger_LogAdded), data); } else { Logger_LogAdded(data); } }); Utility.Configuration.Instance.ConfigurationChanged += ConfigurationChanged; Utility.Logger.Add(2, SoftwareInformation.SoftwareNameJapanese + " を起動しています…"); this.Text = SoftwareInformation.VersionJapanese; ResourceManager.Instance.Load(); RecordManager.Instance.Load(); KCDatabase.Instance.Load(); NotifierManager.Instance.Initialize(this); Icon = ResourceManager.Instance.AppIcon; APIObserver.Instance.Start(Utility.Configuration.Config.Connection.Port, this); MainDockPanel.Extender.FloatWindowFactory = new CustomFloatWindowFactory(); SubForms = new List <DockContent>(); //form init //注:一度全てshowしないとイベントを受け取れないので注意 fFleet = new FormFleet[4]; for (int i = 0; i < fFleet.Length; i++) { SubForms.Add(fFleet[i] = new FormFleet(this, i + 1)); } SubForms.Add(fDock = new FormDock(this)); SubForms.Add(fArsenal = new FormArsenal(this)); SubForms.Add(fHeadquarters = new FormHeadquarters(this)); SubForms.Add(fInformation = new FormInformation(this)); SubForms.Add(fCompass = new FormCompass(this)); SubForms.Add(fLog = new FormLog(this)); SubForms.Add(fQuest = new FormQuest(this)); SubForms.Add(fBattle = new FormBattle(this)); SubForms.Add(fFleetOverview = new FormFleetOverview(this)); SubForms.Add(fShipGroup = new FormShipGroup(this)); SubForms.Add(fBrowser = new FormBrowserHost(this)); SubForms.Add(fWindowCapture = new FormWindowCapture(this)); LoadLayout(Configuration.Config.Life.LayoutFilePath); ConfigurationChanged(); //設定から初期化 SoftwareInformation.CheckUpdate(); // デバッグ: 開始時にAPIリストを読み込む if (Configuration.Config.Debug.LoadAPIListOnLoad) { try { await Task.Factory.StartNew(() => LoadAPIList( Configuration.Config.Debug.APIListPath )); } catch (Exception ex) { Utility.Logger.Add(3, "API読み込みに失敗しました。" + ex.Message); } } // 完了通知(ログインページを開く) fBrowser.InitializeApiCompleted(); UIUpdateTimer.Start(); Utility.Logger.Add(2, "起動処理が完了しました。"); }
private async void FormMain_Load(object sender, EventArgs e) { if (!Directory.Exists("Settings")) { Directory.CreateDirectory("Settings"); } Utility.Configuration.Instance.Load(this); Utility.Logger.Instance.LogAdded += new Utility.LogAddedEventHandler((Utility.Logger.LogData data) => { if (InvokeRequired) { // Invokeはメッセージキューにジョブを投げて待つので、別のBeginInvokeされたジョブが既にキューにあると、 // それを実行してしまい、BeginInvokeされたジョブの順番が保てなくなる // GUIスレッドによる処理は、順番が重要なことがあるので、GUIスレッドからInvokeを呼び出してはいけない Invoke(new Utility.LogAddedEventHandler(Logger_LogAdded), data); } else { Logger_LogAdded(data); } }); Utility.Configuration.Instance.ConfigurationChanged += ConfigurationChanged; Utility.Logger.Add(2, SoftwareInformation.SoftwareNameJapanese + " を起動しています…"); this.Text = SoftwareInformation.VersionJapanese; ResourceManager.Instance.Load(); RecordManager.Instance.Load(); KCDatabase.Instance.Load(); NotifierManager.Instance.Initialize(this); SyncBGMPlayer.Instance.ConfigurationChanged(); #region Icon settings Icon = ResourceManager.Instance.AppIcon; StripMenu_File_Configuration.Image = ResourceManager.Instance.Icons.Images[(int)ResourceManager.IconContent.FormConfiguration]; StripMenu_View_Fleet.Image = ResourceManager.Instance.Icons.Images[(int)ResourceManager.IconContent.FormFleet]; StripMenu_View_FleetOverview.Image = ResourceManager.Instance.Icons.Images[(int)ResourceManager.IconContent.FormFleet]; StripMenu_View_ShipGroup.Image = ResourceManager.Instance.Icons.Images[(int)ResourceManager.IconContent.FormShipGroup]; StripMenu_View_Dock.Image = ResourceManager.Instance.Icons.Images[(int)ResourceManager.IconContent.FormDock]; StripMenu_View_Arsenal.Image = ResourceManager.Instance.Icons.Images[(int)ResourceManager.IconContent.FormArsenal]; StripMenu_View_Headquarters.Image = ResourceManager.Instance.Icons.Images[(int)ResourceManager.IconContent.FormHeadQuarters]; StripMenu_View_Quest.Image = ResourceManager.Instance.Icons.Images[(int)ResourceManager.IconContent.FormQuest]; StripMenu_View_Information.Image = ResourceManager.Instance.Icons.Images[(int)ResourceManager.IconContent.FormInformation]; StripMenu_View_Compass.Image = ResourceManager.Instance.Icons.Images[(int)ResourceManager.IconContent.FormCompass]; StripMenu_View_Battle.Image = ResourceManager.Instance.Icons.Images[(int)ResourceManager.IconContent.FormBattle]; StripMenu_View_Browser.Image = ResourceManager.Instance.Icons.Images[(int)ResourceManager.IconContent.FormBrowser]; StripMenu_View_Log.Image = ResourceManager.Instance.Icons.Images[(int)ResourceManager.IconContent.FormLog]; StripMenu_WindowCapture.Image = ResourceManager.Instance.Icons.Images[(int)ResourceManager.IconContent.FormWindowCapture]; StripMenu_View_BaseAirCorps.Image = ResourceManager.Instance.Icons.Images[(int)ResourceManager.IconContent.FormBaseAirCorps]; StripMenu_View_Json.Image = ResourceManager.Instance.Icons.Images[(int)ResourceManager.IconContent.FormJson]; StripMenu_Tool_EquipmentList.Image = ResourceManager.Instance.Icons.Images[(int)ResourceManager.IconContent.FormEquipmentList]; StripMenu_Tool_DropRecord.Image = ResourceManager.Instance.Icons.Images[(int)ResourceManager.IconContent.FormDropRecord]; StripMenu_Tool_DevelopmentRecord.Image = ResourceManager.Instance.Icons.Images[(int)ResourceManager.IconContent.FormDevelopmentRecord]; StripMenu_Tool_ConstructionRecord.Image = ResourceManager.Instance.Icons.Images[(int)ResourceManager.IconContent.FormConstructionRecord]; StripMenu_Tool_ResourceChart.Image = ResourceManager.Instance.Icons.Images[(int)ResourceManager.IconContent.FormResourceChart]; StripMenu_Tool_AlbumMasterShip.Image = ResourceManager.Instance.Icons.Images[(int)ResourceManager.IconContent.FormAlbumShip]; StripMenu_Tool_AlbumMasterEquipment.Image = ResourceManager.Instance.Icons.Images[(int)ResourceManager.IconContent.FormAlbumEquipment]; StripMenu_Help_Version.Image = ResourceManager.Instance.Icons.Images[(int)ResourceManager.IconContent.AppIcon]; #endregion APIObserver.Instance.Start(Utility.Configuration.Config.Connection.Port, this); MainDockPanel.Extender.FloatWindowFactory = new CustomFloatWindowFactory(); SubForms = new List <DockContent>(); //form init //注:一度全てshowしないとイベントを受け取れないので注意 fFleet = new FormFleet[4]; for (int i = 0; i < fFleet.Length; i++) { SubForms.Add(fFleet[i] = new FormFleet(this, i + 1)); } SubForms.Add(fDock = new FormDock(this)); SubForms.Add(fArsenal = new FormArsenal(this)); SubForms.Add(fHeadquarters = new FormHeadquarters(this)); SubForms.Add(fInformation = new FormInformation(this)); SubForms.Add(fCompass = new FormCompass(this)); SubForms.Add(fLog = new FormLog(this)); SubForms.Add(fQuest = new FormQuest(this)); SubForms.Add(fBattle = new FormBattle(this)); SubForms.Add(fFleetOverview = new FormFleetOverview(this)); SubForms.Add(fShipGroup = new FormShipGroup(this)); SubForms.Add(fBrowser = new FormBrowserHost(this)); SubForms.Add(fWindowCapture = new FormWindowCapture(this)); SubForms.Add(fBaseAirCorps = new FormBaseAirCorps(this)); SubForms.Add(fJson = new FormJson(this)); ConfigurationChanged(); //設定から初期化 LoadLayout(Configuration.Config.Life.LayoutFilePath); SoftwareInformation.CheckUpdate(); // デバッグ: 開始時にAPIリストを読み込む if (Configuration.Config.Debug.LoadAPIListOnLoad) { try { await Task.Factory.StartNew(() => LoadAPIList( Configuration.Config.Debug.APIListPath )); } catch (Exception ex) { Utility.Logger.Add(3, "API読み込みに失敗しました。" + ex.Message); } } APIObserver.Instance.ResponseReceived += (a, b) => UpdatePlayTime(); // 🎃 if (DateTime.Now.Month == 10 && DateTime.Now.Day == 31) { APIObserver.Instance.APIList["api_port/port"].ResponseReceived += CallPumpkinHead; } // 完了通知(ログインページを開く) fBrowser.InitializeApiCompleted(); UIUpdateTimer.Start(); Utility.Logger.Add(3, "起動処理が完了しました。"); }
public TableDockControl( FormDock parent, TableLayoutPanel table, int row ) : this(parent) { AddToTable( table, row ); }
public void ConfigurationChanged(FormDock parent) { ShipName.Font = parent.Font; RepairTime.Font = parent.Font; }
public void ConfigurationChanged( FormDock parent ) { ShipName.Font = parent.Font; RepairTime.Font = parent.Font; RepairTime.BackColor = Color.Transparent; }
public void ConfigurationChanged( FormDock parent ) { ShipName.Font = parent.Font; RepairTime.Font = parent.Font; }